diff --git a/config/Config-kernel.in b/config/Config-kernel.in index c3dd8767ba..6d8d34d5c9 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -946,18 +946,10 @@ config KERNEL_SECURITY_SELINUX_DEVELOP bool "NSA SELinux Development Support" depends on KERNEL_SECURITY_SELINUX -choice - prompt "First legacy 'major LSM' to be initialized" +config KERNEL_LSM + string + default "lockdown,yama,loadpin,safesetid,integrity,selinux" depends on KERNEL_SECURITY_SELINUX - default KERNEL_DEFAULT_SECURITY_SELINUX - - config KERNEL_DEFAULT_SECURITY_SELINUX - bool "SELinux" - - config KERNEL_DEFAULT_SECURITY_DAC - bool "Unix Discretionary Access Controls" - -endchoice config KERNEL_EXT4_FS_SECURITY bool "Ext4 Security Labels" diff --git a/package/ctcgfw/luci-app-naiveproxy/luasrc/model/cbi/naiveproxy.lua b/package/ctcgfw/luci-app-naiveproxy/luasrc/model/cbi/naiveproxy.lua index cfc727836c..b06da1a763 100644 --- a/package/ctcgfw/luci-app-naiveproxy/luasrc/model/cbi/naiveproxy.lua +++ b/package/ctcgfw/luci-app-naiveproxy/luasrc/model/cbi/naiveproxy.lua @@ -22,7 +22,7 @@ server_addr = s:option(Value, "server_addr", translate("Server Address")) server_addr.description = translate("proto://user:pass@hostname[:port]") server_addr.rmempty = false -extra_command = s:option(Value, "extra_command", translate("Extra Argument")) -extra_command.description = translate("Appends extra argument to NaiveProxy") +extra_argument= s:option(Value, "extra_argument", translate("Extra Argument")) +extra_argument.description = translate("Appends extra argument to NaiveProxy") return mp diff --git a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash index 819f8b3d7d..1c87956efa 100755 --- a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash +++ b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash @@ -811,7 +811,7 @@ yml_get_rule_provider() if [ -n "$config" ] && [ "$config" != "$CONFIG_NAME" ] && [ "$config" != "all" ]; then return fi - + if [ -z "$group" ]; then return fi @@ -1061,6 +1061,14 @@ do_run_core() if [ ! -f "/etc/openclash/clash" ] && [ -f "/etc/openclash/core/clash" ] && [ -z "$core_type" ]; then ln -s /etc/openclash/core/clash /etc/openclash/clash 2>/dev/null fi + + if [ ! -f "/etc/openclash/clash" ] && [ -f "/etc/openclash/core/clash_tun" ] && [ "$core_type" != "Game" ]; then + ln -s /etc/openclash/core/clash_tun /etc/openclash/clash 2>/dev/null + fi + + if [ ! -f "/etc/openclash/clash" ] && [ -f "/etc/openclash/core/clash_game" ] && [ "$core_type" != "Tun" ]; then + ln -s /etc/openclash/core/clash_game /etc/openclash/clash 2>/dev/null + fi #权限检查 [ ! -x "/etc/openclash/core/clash_tun" ] && chmod 4755 /etc/openclash/core/clash_tun 2>/dev/null diff --git a/package/ctcgfw/luci-app-openclash/files/etc/openclash/Country.mmdb b/package/ctcgfw/luci-app-openclash/files/etc/openclash/Country.mmdb index fe0fae367b..fc8c625b0d 100644 Binary files a/package/ctcgfw/luci-app-openclash/files/etc/openclash/Country.mmdb and b/package/ctcgfw/luci-app-openclash/files/etc/openclash/Country.mmdb differ diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua index 73abfdf4f1..187f3f2e73 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua @@ -87,7 +87,7 @@ for t,f in ipairs(fs.glob("/etc/openclash/game_rules/*"))do e[t]={} e[t].filename=fs.basename(f) if IsRuleFile(e[t].filename) then - e[t].name=luci.sys.exec(string.format("grep -F '%s' /etc/openclash/game_rules.list |awk -F ',' '{print $1}' 2>/dev/null",e[t].filename)) + e[t].name=string.gsub(luci.sys.exec(string.format("grep -F '%s' /etc/openclash/game_rules.list |awk -F ',' '{print $1}' 2>/dev/null",e[t].filename)), "[\r\n]", "") o:value(e[t].name) end end @@ -147,7 +147,7 @@ for t,f in ipairs(fs.glob("/etc/openclash/rule_provider/*"))do e[t]={} e[t].filename=fs.basename(f) if IsYamlFile(e[t].filename) or IsYmlFile(e[t].filename) then - e[t].name=luci.sys.exec(string.format("grep -F ',%s' /etc/openclash/rule_providers.list |awk -F ',' '{print $1}' 2>/dev/null",e[t].filename)) + e[t].name=string.gsub(luci.sys.exec(string.format("grep -F ',%s' /etc/openclash/rule_providers.list |awk -F ',' '{print $1}' 2>/dev/null",e[t].filename)), "[\r\n]", "") if e[t].name ~= "" and e[t].name ~= nil then o:value(e[t].name) end diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm index 03ab3775e4..26eb321871 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/view/openclash/developer.htm @@ -1,16 +1,17 @@
- - - - - - - - - - + + + + + + + + + + +
<%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%><%:Collecting data...%>
@@ -26,6 +27,7 @@ var haishanh = document.getElementById('_haishanh'); var FQrabbit = document.getElementById('_FQrabbit'); var Fndroid = document.getElementById('_Fndroid'); + var Alecthw = document.getElementById('_Alecthw'); Dreamacro.innerHTML = 'Dreamacro'; vernesong.innerHTML = 'vernesong'; frainzy1477.innerHTML = 'frainzy1477'; @@ -36,6 +38,7 @@ haishanh.innerHTML = 'haishanh'; FQrabbit.innerHTML = 'FQrabbit'; Fndroid.innerHTML = 'Fndroid'; + Alecthw.innerHTML = 'Alecthw'; function Dreamacro_rediret() { @@ -87,6 +90,11 @@ url12='https://github.com/FQrabbit'; window.open(url12); }; + function Alecthw_rediret() + { + url13='https://github.com/alecthw'; + window.open(url13); + }; function imgerrorfun(imgobj,imgSrc){ setTimeout(function(){ diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_core.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_core.sh index 6c796789e4..76c2214344 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_core.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_core.sh @@ -75,7 +75,7 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then case $CORE_TYPE in "Tun") [ -s "/tmp/clash_tun.gz" ] && { - gzip -d /tmp/clash_tun.gz >/dev/null 2>&1 && mv /tmp/clash /tmp/clash_tun >/dev/null 2>&1 + gzip -d /tmp/clash_tun.gz >/dev/null 2>&1 rm -rf /tmp/clash_tun.gz >/dev/null 2>&1 rm -rf /etc/openclash/core/clash_tun >/dev/null 2>&1 chmod 4755 /tmp/clash_tun >/dev/null 2>&1 diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_ipdb.sh b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_ipdb.sh index d26855589b..edaafa189b 100755 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_ipdb.sh +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/openclash_ipdb.sh @@ -12,9 +12,9 @@ fi echo "开始下载 GEOIP 数据库..." >$START_LOG if pidof clash >/dev/null; then - curl -sL --connect-timeout 10 --retry 2 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" https://geolite.clash.dev/Country.mmdb -o /tmp/Country.mmdb >/dev/null 2>&1 + curl -sL --connect-timeout 10 --retry 2 -x http://$PROXY_ADDR:$HTTP_PORT -U "$PROXY_AUTH" https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/Country.mmdb -o /tmp/Country.mmdb >/dev/null 2>&1 else - curl -sL --connect-timeout 10 --retry 2 https://geolite.clash.dev/Country.mmdb -o /tmp/Country.mmdb >/dev/null 2>&1 + curl -sL --connect-timeout 10 --retry 2 https://raw.githubusercontent.com/alecthw/mmdb_china_ip_list/release/Country.mmdb -o /tmp/Country.mmdb >/dev/null 2>&1 fi if [ "$?" -eq "0" ] && [ -s "/tmp/Country.mmdb" ]; then echo "GEOIP 数据库下载成功,检查数据库版本是否更新..." >$START_LOG diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/14.2b1ab3375a2b9a48edab.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/14.2b1ab3375a2b9a48edab.js new file mode 100644 index 0000000000..8ddc0d1a01 --- /dev/null +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/14.2b1ab3375a2b9a48edab.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{"+924":function(t,e,n){"use strict";n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return c}));var r=n("9AQC");function o(t,e){return void 0===e&&(e=0),"string"!=typeof t||0===e||t.length<=e?t:t.substr(0,e)+"..."}function i(t,e){var n=t,r=n.length;if(r<=150)return n;e>r&&(e=r);var o=Math.max(e-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i"}try{c.currentTarget=Object(r.c)(a.currentTarget)?Object(i.h)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(t){c.currentTarget=""}for(var o in"undefined"!=typeof CustomEvent&&Object(r.g)(t,CustomEvent)&&(c.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,o)&&(c[o]=a);return c}return t}function p(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function l(t,e,n){void 0===e&&(e=3),void 0===n&&(n=102400);var r=d(t,e);return p(r)>n?l(t,e-1,n):r}function f(e,n){return"domain"===n&&e&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":void 0!==t&&e===t?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":Object(r.l)(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?"[Function: "+Object(i.e)(e)+"]":e}function h(t,e,n,i){if(void 0===n&&(n=1/0),void 0===i&&(i=new o.a),0===n)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var n=f(t);return Object(r.i)(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var a=f(e,t);if(Object(r.i)(a))return a;var c=u(e),s=Array.isArray(e)?[]:{};if(i.memoize(e))return"[Circular ~]";for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(s[p]=h(p,c[p],n-1,i));return i.unmemoize(e),s}function d(t,e){try{return JSON.parse(JSON.stringify(t,(function(t,n){return h(t,n,e)})))}catch(t){return"**non-serializable**"}}function v(t,e){void 0===e&&(e=40);var n=Object.keys(u(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Object(a.d)(n[0],e);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>e))return r===n.length?o:Object(a.d)(o,e)}return""}}).call(this,n("yLpj"))},"8oxB":function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,u=[],p=!1,l=-1;function f(){p&&s&&(p=!1,s.length?u=s.concat(u):l=-1,u.length&&h())}function h(){if(!p){var t=c(f);p=!0;for(var e=u.length;e;){for(s=u,u=[];++l1)for(var n=1;n"}return t.event_id||""}function f(t){var e=s();if(!("console"in e))return t();var n=e.console,r={};["debug","info","warn","error","log","assert"].forEach((function(t){t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)}));var o=t();return Object.keys(r).forEach((function(t){n[t]=r[t]})),o}function h(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function d(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach((function(n){t.exception.values[0].mechanism[n]=e[n]}))}catch(t){}}function v(){try{return document.location.href}catch(t){return""}}function _(t){try{for(var e=t,n=[],r=0,o=0,i=" > ".length,a=void 0;e&&r++<5&&!("html"===(a=y(e))||r>1&&o+n.length*i+a.length>=80);)n.push(a),o+=a.length,e=e.parentNode;return n.reverse().join(" > ")}catch(t){return""}}function y(t){var e,n,r,o,a,c=t,s=[];if(!c||!c.tagName)return"";if(s.push(c.tagName.toLowerCase()),c.id&&s.push("#"+c.id),(e=c.className)&&Object(i.k)(e))for(n=e.split(/\s+/),a=0;a"}catch(t){return""}}}).call(this,n("8oxB"),n("yLpj"),n("3UD+")(t))},"9AQC":function(t,e,n){"use strict";function r(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(t,Error)}}function o(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function i(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function a(t){return"[object DOMException]"===Object.prototype.toString.call(t)}function c(t){return"[object String]"===Object.prototype.toString.call(t)}function s(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function p(t){return"undefined"!=typeof Event&&v(t,Event)}function l(t){return"undefined"!=typeof Element&&v(t,Element)}function f(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function h(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t){return u(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function v(t,e){try{return t instanceof e}catch(t){return!1}}n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"k",(function(){return c})),n.d(e,"i",(function(){return s})),n.d(e,"h",(function(){return u})),n.d(e,"f",(function(){return p})),n.d(e,"c",(function(){return l})),n.d(e,"j",(function(){return f})),n.d(e,"m",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"g",(function(){return v}))},WSEr:function(t,e,n){"use strict";n.r(e),n.d(e,"Severity",(function(){return a})),n.d(e,"Status",(function(){return c})),n.d(e,"addGlobalEventProcessor",(function(){return v})),n.d(e,"addBreadcrumb",(function(){return N})),n.d(e,"captureException",(function(){return T})),n.d(e,"captureEvent",(function(){return R})),n.d(e,"captureMessage",(function(){return I})),n.d(e,"configureScope",(function(){return D})),n.d(e,"getHubFromCarrier",(function(){return w})),n.d(e,"getCurrentHub",(function(){return E})),n.d(e,"Hub",(function(){return m})),n.d(e,"makeMain",(function(){return j})),n.d(e,"Scope",(function(){return h})),n.d(e,"startTransaction",(function(){return M})),n.d(e,"setContext",(function(){return C})),n.d(e,"setExtra",(function(){return A})),n.d(e,"setExtras",(function(){return U})),n.d(e,"setTag",(function(){return P})),n.d(e,"setTags",(function(){return L})),n.d(e,"setUser",(function(){return F})),n.d(e,"withScope",(function(){return B})),n.d(e,"BrowserClient",(function(){return Vt})),n.d(e,"injectReportDialog",(function(){return It})),n.d(e,"eventFromException",(function(){return ht})),n.d(e,"eventFromMessage",(function(){return dt})),n.d(e,"defaultIntegrations",(function(){return ae})),n.d(e,"forceLoad",(function(){return pe})),n.d(e,"init",(function(){return ce})),n.d(e,"lastEventId",(function(){return ue})),n.d(e,"onLoad",(function(){return le})),n.d(e,"showReportDialog",(function(){return se})),n.d(e,"flush",(function(){return fe})),n.d(e,"close",(function(){return he})),n.d(e,"wrap",(function(){return de})),n.d(e,"SDK_NAME",(function(){return zt})),n.d(e,"SDK_VERSION",(function(){return $t})),n.d(e,"Integrations",(function(){return ye})),n.d(e,"Transports",(function(){return i}));var r={};n.r(r),n.d(r,"FunctionToString",(function(){return Qt})),n.d(r,"InboundFilters",(function(){return Zt}));var o={};n.r(o),n.d(o,"GlobalHandlers",(function(){return ne})),n.d(o,"TryCatch",(function(){return ee})),n.d(o,"Breadcrumbs",(function(){return Jt})),n.d(o,"LinkedErrors",(function(){return re})),n.d(o,"UserAgent",(function(){return ie}));var i={};n.r(i),n.d(i,"BaseTransport",(function(){return mt})),n.d(i,"FetchTransport",(function(){return jt})),n.d(i,"XHRTransport",(function(){return Et}));var a,c,s=n("mrSG");!function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(a||(a={})),function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(a||(a={})),function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"}(c||(c={})),function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(c||(c={}));var u,p=n("9AQC"),l=n("9/Zf");!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(u||(u={}));var f=function(){function t(t){var e=this;this._state=u.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(u.RESOLVED,t)},this._reject=function(t){e._setResult(u.REJECTED,t)},this._setResult=function(t,n){e._state===u.PENDING&&(Object(p.m)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){if(e._state!==u.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t.done||(e._state===u.RESOLVED&&t.onfulfilled&&t.onfulfilled(e._value),e._state===u.REJECTED&&t.onrejected&&t.onrejected(e._value),t.done=!0)}))}};try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}return t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.all=function(e){return new t((function(n,r){if(Array.isArray(e))if(0!==e.length){var o=e.length,i=[];e.forEach((function(e,a){t.resolve(e).then((function(t){i[a]=t,0===(o-=1)&&n(i)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},t.prototype.then=function(e,n){var r=this;return new t((function(t,o){r._attachHandler({done:!1,onfulfilled:function(n){if(e)try{return void t(e(n))}catch(t){return void o(t)}else t(n)},onrejected:function(e){if(n)try{return void t(n(e))}catch(t){return void o(t)}else o(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var n=this;return new t((function(t,r){var o,i;return n.then((function(t){i=!1,o=t,e&&e()}),(function(t){i=!0,o=t,e&&e()})).then((function(){i?r(o):t(o)}))}))},t.prototype.toString=function(){return"[object SyncPromise]"},t}(),h=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var n=new t;return e&&(n._breadcrumbs=Object(s.e)(e._breadcrumbs),n._tags=Object(s.a)({},e._tags),n._extra=Object(s.a)({},e._extra),n._contexts=Object(s.a)({},e._contexts),n._user=e._user,n._level=e._level,n._span=e._span,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=Object(s.e)(e._eventProcessors)),n},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._notifyScopeListeners(),this},t.prototype.setTags=function(t){return this._tags=Object(s.a)(Object(s.a)({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var n;return this._tags=Object(s.a)(Object(s.a)({},this._tags),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=Object(s.a)(Object(s.a)({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var n;return this._extra=Object(s.a)(Object(s.a)({},this._extra),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var n;return this._contexts=Object(s.a)(Object(s.a)({},this._contexts),((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t=this.getSpan();if(t&&t.spanRecorder&&t.spanRecorder.spans[0])return t.spanRecorder.spans[0]},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags=Object(s.a)(Object(s.a)({},this._tags),e._tags),this._extra=Object(s.a)(Object(s.a)({},this._extra),e._extra),this._contexts=Object(s.a)(Object(s.a)({},this._contexts),e._contexts),e._user&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint)):Object(p.h)(e)&&(e=e,this._tags=Object(s.a)(Object(s.a)({},this._tags),e.tags),this._extra=Object(s.a)(Object(s.a)({},this._extra),e.extra),this._contexts=Object(s.a)(Object(s.a)({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var n=Object(s.a)({timestamp:Object(l.l)()},t);return this._breadcrumbs=void 0!==e&&e>=0?Object(s.e)(this._breadcrumbs,[n]).slice(-e):Object(s.e)(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,e){return this._extra&&Object.keys(this._extra).length&&(t.extra=Object(s.a)(Object(s.a)({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=Object(s.a)(Object(s.a)({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=Object(s.a)(Object(s.a)({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=Object(s.a)(Object(s.a)({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span&&(t.contexts=Object(s.a)({trace:this._span.getTraceContext()},t.contexts)),this._applyFingerprint(t),t.breadcrumbs=Object(s.e)(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(Object(s.e)(d(),this._eventProcessors),t,e)},t.prototype._notifyEventProcessors=function(t,e,n,r){var o=this;return void 0===r&&(r=0),new f((function(i,a){var c=t[r];if(null===e||"function"!=typeof c)i(e);else{var u=c(Object(s.a)({},e),n);Object(p.m)(u)?u.then((function(e){return o._notifyEventProcessors(t,e,n,r+1).then(i)})).then(null,a):o._notifyEventProcessors(t,u,n,r+1).then(i).then(null,a)}}))},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout((function(){t._scopeListeners.forEach((function(e){e(t)})),t._notifyingListeners=!1})))},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function d(){var t=Object(l.f)();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function v(t){d().push(t)}var _=Object(l.f)(),y="Sentry Logger ",b=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e0?t[t.length-1].scope:void 0,n=h.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n},t.prototype.popScope=function(){return void 0!==this.getStack().pop()},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var n=this._lastEventId=Object(l.m)(),r=e;if(!e){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(t){o=t}r={originalException:t,syntheticException:o}}return this._invokeClient("captureException",t,Object(s.a)(Object(s.a)({},r),{event_id:n})),n},t.prototype.captureMessage=function(t,e,n){var r=this._lastEventId=Object(l.m)(),o=n;if(!n){var i=void 0;try{throw new Error(t)}catch(t){i=t}o={originalException:t,syntheticException:i}}return this._invokeClient("captureMessage",t,e,Object(s.a)(Object(s.a)({},o),{event_id:r})),r},t.prototype.captureEvent=function(t,e){var n=this._lastEventId=Object(l.m)();return this._invokeClient("captureEvent",t,Object(s.a)(Object(s.a)({},e),{event_id:n})),n},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var n=this.getStackTop();if(n.scope&&n.client){var r=n.client.getOptions&&n.client.getOptions()||{},o=r.beforeBreadcrumb,i=void 0===o?null:o,a=r.maxBreadcrumbs,c=void 0===a?100:a;if(!(c<=0)){var u=Object(l.l)(),p=Object(s.a)({timestamp:u},t),f=i?Object(l.c)((function(){return i(p,e)})):p;null!==f&&n.scope.addBreadcrumb(f,Math.min(c,100))}}},t.prototype.setUser=function(t){var e=this.getStackTop();e.scope&&e.scope.setUser(t)},t.prototype.setTags=function(t){var e=this.getStackTop();e.scope&&e.scope.setTags(t)},t.prototype.setExtras=function(t){var e=this.getStackTop();e.scope&&e.scope.setExtras(t)},t.prototype.setTag=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setTag(t,e)},t.prototype.setExtra=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)},t.prototype.setContext=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop();e.scope&&e.client&&t(e.scope)},t.prototype.run=function(t){var e=j(this);try{t(this)}finally{j(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return g.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t){return this._callExtensionMethod("startTransaction",t)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype._invokeClient=function(t){for(var e,n=[],r=1;r1&&(l=h.slice(0,-1).join("/"),f=h.pop()),f){var d=f.match(/^\d+/);d&&(f=d[0])}this._fromComponents({host:c,pass:a,path:l,projectId:f,port:p,protocol:r,user:o})},t.prototype._fromComponents=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","user","host","projectId"].forEach((function(e){if(!t[e])throw new q("Invalid Dsn: "+e+" missing")})),!this.projectId.match(/^\d+$/))throw new q("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new q("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new q("Invalid Dsn: Invalid port "+this.port)},t}(),G=n("6PXS"),X=n("+924"),J=[];function z(t){var e={};return function(t){var e=t.defaultIntegrations&&Object(s.e)(t.defaultIntegrations)||[],n=t.integrations,r=[];if(Array.isArray(n)){var o=n.map((function(t){return t.name})),i=[];e.forEach((function(t){-1===o.indexOf(t.name)&&-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})),n.forEach((function(t){-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))}))}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=Object(s.e)(e);var a=r.map((function(t){return t.name}));return-1!==a.indexOf("Debug")&&r.push.apply(r,Object(s.e)(r.splice(a.indexOf("Debug"),1))),r}(t).forEach((function(t){e[t.name]=t,function(t){-1===J.indexOf(t.name)&&(t.setupOnce(v,E),J.push(t.name),g.log("Integration installed: "+t.name))}(t)})),e}var $=function(){function t(t,e){this._integrations={},this._processing=!1,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new Y(e.dsn))}return t.prototype.captureException=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._getBackend().eventFromException(t,e).then((function(t){o=r.captureEvent(t,e,n)})),o},t.prototype.captureMessage=function(t,e,n,r){var o=this,i=n&&n.event_id;return this._processing=!0,(Object(p.i)(t)?this._getBackend().eventFromMessage(""+t,e,n):this._getBackend().eventFromException(t,n)).then((function(t){i=o.captureEvent(t,n,r)})),i},t.prototype.captureEvent=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._processEvent(t,e,n).then((function(t){o=t&&t.event_id,r._processing=!1})).then(null,(function(t){g.error(t),r._processing=!1})),o},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then((function(n){return clearInterval(n.interval),e._getBackend().getTransport().close(t).then((function(t){return n.ready&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=z(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return g.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._isClientProcessing=function(t){var e=this;return new f((function(n){var r=0,o=0;clearInterval(o),o=setInterval((function(){e._processing?(r+=1,t&&r>=t&&n({interval:o,ready:!1})):n({interval:o,ready:!0})}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,a=Object(s.a)(Object(s.a)({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:Object(l.m)()),timestamp:t.timestamp||Object(l.l)()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var c=e;n&&n.captureContext&&(c=h.clone(c).update(n.captureContext));var u=f.resolve(a);return c&&(u=c.applyToEvent(a,n)),u.then((function(t){return"number"==typeof i&&i>0?r._normalizeEvent(t,i):t}))},t.prototype._normalizeEvent=function(t,e){if(!t)return null;var n=Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return Object(s.a)(Object(s.a)({},t),t.data&&{data:Object(G.c)(t.data,e)})}))}),t.user&&{user:Object(G.c)(t.user,e)}),t.contexts&&{contexts:Object(G.c)(t.contexts,e)}),t.extra&&{extra:Object(G.c)(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),n=e.environment,r=e.release,o=e.dist,i=e.maxValueLength,a=void 0===i?250:i;void 0===t.environment&&void 0!==n&&(t.environment=n),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==o&&(t.dist=o),t.message&&(t.message=Object(X.d)(t.message,a));var c=t.exception&&t.exception.values&&t.exception.values[0];c&&c.value&&(c.value=Object(X.d)(c.value,a));var s=t.request;s&&s.url&&(s.url=Object(X.d)(s.url,a))},t.prototype._applyIntegrationsMetadata=function(t){var e=t.sdk,n=Object.keys(this._integrations);e&&n.length>0&&(e.integrations=n)},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._processEvent=function(t,e,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;if(!this._isEnabled())return f.reject("SDK not enabled, will not send event.");var c="transaction"===t.type;return!c&&"number"==typeof a&&Math.random()>a?f.reject("This event has been sampled, will not send event."):new f((function(o,a){r._prepareEvent(t,n,e).then((function(t){if(null!==t){var n=t;if(e&&e.data&&!0===e.data.__sentry__||!i||c)return r._sendEvent(n),void o(n);var s=i(t,e);if(void 0===s)g.error("`beforeSend` method has to return `null` or a valid event.");else if(Object(p.m)(s))r._handleAsyncBeforeSend(s,o,a);else{if(null===(n=s))return g.log("`beforeSend` returned `null`, will not send event."),void o(null);r._sendEvent(n),o(n)}}else a("An event processor returned null, will not send event.")})).then(null,(function(t){r.captureException(t,{data:{__sentry__:!0},originalException:t}),a("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))}))},t.prototype._handleAsyncBeforeSend=function(t,e,n){var r=this;t.then((function(t){null!==t?(r._sendEvent(t),e(t)):n("`beforeSend` returned `null`, will not send event.")})).then(null,(function(t){n("beforeSend rejected with "+t)}))},t}(),V=function(){function t(){}return t.prototype.sendEvent=function(t){return f.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:c.Skipped})},t.prototype.close=function(t){return f.resolve(!0)},t}(),Q=function(){function t(t){this._options=t,this._options.dsn||g.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,e){throw new q("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,n){throw new q("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,(function(t){g.error("Error while sending event: "+t)}))},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new V},t}();function K(){if(!("fetch"in Object(l.f)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function Z(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function tt(){if(!K())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var et=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,rt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ot=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,it=/\((\S*)(?::(\d+))(?::(\d+))\)/,at=/Minified React error #\d+;/i;function ct(t){var e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:at.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,n=t.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),a=[],c=0;c eval")>-1&&(e=ot.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=e[1],n[4]=e[2],n[5]=""):0!==a||n[5]||void 0===t.columnNumber||(o[0].column=t.columnNumber+1),r={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func="?"),o.push(r)}if(!o.length)return null;return{message:ut(t),name:t.name,stack:o}}(t))return st(e,n)}catch(t){}return{message:ut(t),name:t&&t.name,stack:[],failed:!0}}function st(t,e){try{return Object(s.a)(Object(s.a)({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function ut(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function pt(t){var e=ft(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function lt(t){return{exception:{values:[pt(t)]}}}function ft(t){if(!t||!t.length)return[];var e=t,n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map((function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}})).reverse()}function ht(t,e,n){var r=vt(e,n&&n.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return Object(l.a)(r,{handled:!0,type:"generic"}),r.level=a.Error,n&&n.event_id&&(r.event_id=n.event_id),f.resolve(r)}function dt(t,e,n,r){void 0===n&&(n=a.Info);var o=_t(e,r&&r.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),f.resolve(o)}function vt(t,e,n){var r;if(void 0===n&&(n={}),Object(p.e)(t)&&t.error)return r=lt(ct(t=t.error));if(Object(p.a)(t)||Object(p.b)(t)){var o=t,i=o.name||(Object(p.a)(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;return r=_t(a,e,n),Object(l.b)(r,a),r}return Object(p.d)(t)?r=lt(ct(t)):Object(p.h)(t)||Object(p.f)(t)?(r=function(t,e,n){var r={exception:{values:[{type:Object(p.f)(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(G.a)(t)}]},extra:{__serialized__:Object(G.d)(t)}};if(e){var o=ft(ct(e).stack);r.stacktrace={frames:o}}return r}(t,e,n.rejection),Object(l.a)(r,{synthetic:!0}),r):(r=_t(t,e,n),Object(l.b)(r,""+t,void 0),Object(l.a)(r,{synthetic:!0}),r)}function _t(t,e,n){void 0===n&&(n={});var r={message:t};if(n.attachStacktrace&&e){var o=ft(ct(e).stack);r.stacktrace={frames:o}}return r}function yt(t,e){var n="transaction"===t.type,r={body:JSON.stringify(t),url:n?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(n){var o=JSON.stringify({event_id:t.event_id,sent_at:new Date(1e3*Object(l.l)()).toISOString()})+"\n"+JSON.stringify({type:t.type})+"\n"+r.body;r.body=o}return r}var bt=function(){function t(t){this.dsn=t,this._dsnObject=new Y(t)}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getBaseApiEndpoint=function(){var t=this._dsnObject,e=t.protocol?t.protocol+":":"",n=t.port?":"+t.port:"";return e+"//"+t.host+n+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var n=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+t+"/"+e),r.push("sentry_key="+n.user),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,n=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var o in r.push("dsn="+e.toString()),t)if("user"===o){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]));return r.length?n+"?"+r.join("&"):n},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(t){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+t+"/"},t.prototype._encodedAuth=function(){var t={sentry_key:this._dsnObject.user,sentry_version:"7"};return Object(G.e)(t)},t}(),gt=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()0&&n(!1)}),t);f.all(e._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},t}(),mt=function(){function t(t){this.options=t,this._buffer=new gt(30),this._api=new bt(this.options.dsn),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new q("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t}(),Ot=Object(l.f)(),jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._disabledUntil=new Date(Date.now()),e}return Object(s.b)(e,t),e.prototype.sendEvent=function(t){var e=this;if(new Date(Date.now())0}function kt(){wt+=1,setTimeout((function(){wt-=1}))}function Tt(t,e,n){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var o=r.map((function(t){return Tt(t,e)}));return t.handleEvent?t.handleEvent.apply(this,o):t.apply(this,o)}catch(t){throw kt(),B((function(n){n.addEventProcessor((function(t){var n=Object(s.a)({},t);return e.mechanism&&(Object(l.b)(n,void 0,void 0),Object(l.a)(n,e.mechanism)),n.extra=Object(s.a)(Object(s.a)({},n.extra),{arguments:r}),n})),T(t)})),t}};try{for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}catch(t){}t.prototype=t.prototype||{},r.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return t.name}})}catch(t){}return r}function It(t){if(void 0===t&&(t={}),t.eventId)if(t.dsn){var e=document.createElement("script");e.async=!0,e.src=new bt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}else g.error("Missing dsn option in showReportDialog call");else g.error("Missing eventId option in showReportDialog call")}var Rt,Dt=Object(l.f)(),Nt={},Ct={};function Ut(t){if(!Ct[t])switch(Ct[t]=!0,t){case"console":!function(){if(!("console"in Dt))return;["debug","info","warn","error","log","assert"].forEach((function(t){t in Dt.console&&Object(G.b)(Dt.console,t,(function(e){return function(){for(var n=[],r=0;r2?e[2]:void 0;if(r){var o=Rt,i=String(r);Rt=i,At("history",{from:o,to:i})}return t.apply(this,e)}}Dt.onpopstate=function(){for(var t=[],e=0;e"}0!==e.length&&E().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;E().addBreadcrumb({category:"xhr",data:t.xhr.__sentry_xhr__,type:"http"},{xhr:t.xhr})}else;},t.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?E().addBreadcrumb({category:"fetch",data:t.fetchData,level:a.Error,type:"http"},{data:t.error,input:t.args}):E().addBreadcrumb({category:"fetch",data:Object(s.a)(Object(s.a)({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},t.prototype._historyBreadcrumb=function(t){var e=Object(l.f)(),n=t.from,r=t.to,o=Object(l.k)(e.location.href),i=Object(l.k)(n),a=Object(l.k)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),E().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},t.id="Breadcrumbs",t}(),zt="sentry.javascript.browser",$t="5.22.3",Vt=function(t){function e(e){return void 0===e&&(e={}),t.call(this,xt,e)||this}return Object(s.b)(e,t),e.prototype.showReportDialog=function(t){void 0===t&&(t={}),Object(l.f)().document&&(this._isEnabled()?It(Object(s.a)(Object(s.a)({},t),{dsn:t.dsn||this.getDsn()})):g.error("Trying to call showReportDialog with Sentry Client disabled"))},e.prototype._prepareEvent=function(e,n,r){return e.platform=e.platform||"javascript",e.sdk=Object(s.a)(Object(s.a)({},e.sdk),{name:zt,packages:Object(s.e)(e.sdk&&e.sdk.packages||[],[{name:"npm:@sentry/browser",version:$t}]),version:$t}),t.prototype._prepareEvent.call(this,e,n,r)},e.prototype._sendEvent=function(e){var n=this.getIntegration(Jt);n&&n.addSentryBreadcrumb(e),t.prototype._sendEvent.call(this,e)},e}($),Qt=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){Xt=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],e=0;e0?e:Object(l.g)();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:o,filename:a,function:"?",in_app:!0,lineno:i}),t},t.id="GlobalHandlers",t}(),re=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){v((function(e,n){var r=E().getIntegration(t);return r?r._handler(e,n):e}))},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&Object(p.g)(e.originalException,Error)))return t;var n=this._walkErrorTree(e.originalException,this._key);return t.exception.values=Object(s.e)(n,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,n){if(void 0===n&&(n=[]),!Object(p.g)(t[e],Error)||n.length+1>=this._limit)return n;var r=pt(ct(t[e]));return this._walkErrorTree(t[e],e,Object(s.e)([r],n))},t.id="LinkedErrors",t}(),oe=Object(l.f)(),ie=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){v((function(e){if(E().getIntegration(t)){if(!oe.navigator||!oe.location)return e;var n=e.request||{};return n.url=n.url||oe.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=oe.navigator.userAgent,Object(s.a)(Object(s.a)({},e),{request:n})}return e}))},t.id="UserAgent",t}(),ae=[new r.InboundFilters,new r.FunctionToString,new ee,new Jt,new ne,new re,new ie];function ce(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=ae),void 0===t.release){var e=Object(l.f)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&g.enable();var n=E(),r=new t(e);n.bindClient(r)}(Vt,t)}function se(t){void 0===t&&(t={}),t.eventId||(t.eventId=E().lastEventId());var e=E().getClient();e&&e.showReportDialog(t)}function ue(){return E().lastEventId()}function pe(){}function le(t){t()}function fe(t){var e=E().getClient();return e?e.flush(t):f.reject(!1)}function he(t){var e=E().getClient();return e?e.close(t):f.reject(!1)}function de(t){return Tt(t)()}var ve={},_e=Object(l.f)();_e.Sentry&&_e.Sentry.Integrations&&(ve=_e.Sentry.Integrations);var ye=Object(s.a)(Object(s.a)(Object(s.a)({},ve),r),o)},wCA9:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;er&&(e=r);var o=Math.max(e-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} "+n),i"}try{s.currentTarget=Object(r.c)(a.currentTarget)?Object(i.h)(a.currentTarget):Object.prototype.toString.call(a.currentTarget)}catch(t){s.currentTarget=""}for(var o in"undefined"!=typeof CustomEvent&&Object(r.g)(t,CustomEvent)&&(s.detail=a.detail),a)Object.prototype.hasOwnProperty.call(a,o)&&(s[o]=a);return s}return t}function p(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function l(t,e,n){void 0===e&&(e=3),void 0===n&&(n=102400);var r=d(t,e);return p(r)>n?l(t,e-1,n):r}function f(e,n){return"domain"===n&&e&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":void 0!==t&&e===t?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":Object(r.l)(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?"[Function: "+Object(i.e)(e)+"]":e}function h(t,e,n,i){if(void 0===n&&(n=1/0),void 0===i&&(i=new o.a),0===n)return function(t){var e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";var n=f(t);return Object(r.i)(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();var a=f(e,t);if(Object(r.i)(a))return a;var s=u(e),c=Array.isArray(e)?[]:{};if(i.memoize(e))return"[Circular ~]";for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(c[p]=h(p,s[p],n-1,i));return i.unmemoize(e),c}function d(t,e){try{return JSON.parse(JSON.stringify(t,(function(t,n){return h(t,n,e)})))}catch(t){return"**non-serializable**"}}function v(t,e){void 0===e&&(e=40);var n=Object.keys(u(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Object(a.d)(n[0],e);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>e))return r===n.length?o:Object(a.d)(o,e)}return""}}).call(this,n("yLpj"))},"8oxB":function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],p=!1,l=-1;function f(){p&&c&&(p=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!p){var t=s(f);p=!0;for(var e=u.length;e;){for(c=u,u=[];++l1)for(var n=1;n"}return t.event_id||""}function f(t){var e=c();if(!("console"in e))return t();var n=e.console,r={};["debug","info","warn","error","log","assert"].forEach((function(t){t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)}));var o=t();return Object.keys(r).forEach((function(t){n[t]=r[t]})),o}function h(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function d(t,e){void 0===e&&(e={});try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach((function(n){t.exception.values[0].mechanism[n]=e[n]}))}catch(t){}}function v(){try{return document.location.href}catch(t){return""}}function _(t){try{for(var e=t,n=[],r=0,o=0,i=" > ".length,a=void 0;e&&r++<5&&!("html"===(a=y(e))||r>1&&o+n.length*i+a.length>=80);)n.push(a),o+=a.length,e=e.parentNode;return n.reverse().join(" > ")}catch(t){return""}}function y(t){var e,n,r,o,a,s=t,c=[];if(!s||!s.tagName)return"";if(c.push(s.tagName.toLowerCase()),s.id&&c.push("#"+s.id),(e=s.className)&&Object(i.k)(e))for(n=e.split(/\s+/),a=0;a"}catch(t){return""}}}).call(this,n("8oxB"),n("yLpj"),n("3UD+")(t))},"9AQC":function(t,e,n){"use strict";function r(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(t,Error)}}function o(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function i(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function a(t){return"[object DOMException]"===Object.prototype.toString.call(t)}function s(t){return"[object String]"===Object.prototype.toString.call(t)}function c(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function p(t){return"undefined"!=typeof Event&&v(t,Event)}function l(t){return"undefined"!=typeof Element&&v(t,Element)}function f(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function h(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t){return u(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function v(t,e){try{return t instanceof e}catch(t){return!1}}n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"k",(function(){return s})),n.d(e,"i",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"f",(function(){return p})),n.d(e,"c",(function(){return l})),n.d(e,"j",(function(){return f})),n.d(e,"m",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"g",(function(){return v}))},WSEr:function(t,e,n){"use strict";n.r(e),n.d(e,"Severity",(function(){return a})),n.d(e,"Status",(function(){return s})),n.d(e,"addGlobalEventProcessor",(function(){return v})),n.d(e,"addBreadcrumb",(function(){return N})),n.d(e,"captureException",(function(){return T})),n.d(e,"captureEvent",(function(){return R})),n.d(e,"captureMessage",(function(){return I})),n.d(e,"configureScope",(function(){return D})),n.d(e,"getHubFromCarrier",(function(){return w})),n.d(e,"getCurrentHub",(function(){return O})),n.d(e,"Hub",(function(){return b})),n.d(e,"makeMain",(function(){return x})),n.d(e,"Scope",(function(){return h})),n.d(e,"startTransaction",(function(){return M})),n.d(e,"setContext",(function(){return C})),n.d(e,"setExtra",(function(){return A})),n.d(e,"setExtras",(function(){return U})),n.d(e,"setTag",(function(){return P})),n.d(e,"setTags",(function(){return L})),n.d(e,"setUser",(function(){return F})),n.d(e,"withScope",(function(){return B})),n.d(e,"BrowserClient",(function(){return Vt})),n.d(e,"injectReportDialog",(function(){return It})),n.d(e,"eventFromException",(function(){return ht})),n.d(e,"eventFromMessage",(function(){return dt})),n.d(e,"defaultIntegrations",(function(){return ae})),n.d(e,"forceLoad",(function(){return pe})),n.d(e,"init",(function(){return se})),n.d(e,"lastEventId",(function(){return ue})),n.d(e,"onLoad",(function(){return le})),n.d(e,"showReportDialog",(function(){return ce})),n.d(e,"flush",(function(){return fe})),n.d(e,"close",(function(){return he})),n.d(e,"wrap",(function(){return de})),n.d(e,"SDK_NAME",(function(){return zt})),n.d(e,"SDK_VERSION",(function(){return $t})),n.d(e,"Integrations",(function(){return ye})),n.d(e,"Transports",(function(){return i}));var r={};n.r(r),n.d(r,"FunctionToString",(function(){return Qt})),n.d(r,"InboundFilters",(function(){return Zt}));var o={};n.r(o),n.d(o,"GlobalHandlers",(function(){return ne})),n.d(o,"TryCatch",(function(){return ee})),n.d(o,"Breadcrumbs",(function(){return Jt})),n.d(o,"LinkedErrors",(function(){return re})),n.d(o,"UserAgent",(function(){return ie}));var i={};n.r(i),n.d(i,"BaseTransport",(function(){return bt})),n.d(i,"FetchTransport",(function(){return xt})),n.d(i,"XHRTransport",(function(){return Ot}));var a,s,c=n("mrSG");!function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(a||(a={})),function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(a||(a={})),function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"}(s||(s={})),function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(s||(s={}));var u,p=n("9AQC");!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(u||(u={}));var l=function(){function t(t){var e=this;this._state=u.PENDING,this._handlers=[],this._resolve=function(t){e._setResult(u.RESOLVED,t)},this._reject=function(t){e._setResult(u.REJECTED,t)},this._setResult=function(t,n){e._state===u.PENDING&&(Object(p.m)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))},this._attachHandler=function(t){e._handlers=e._handlers.concat(t),e._executeHandlers()},this._executeHandlers=function(){if(e._state!==u.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t.done||(e._state===u.RESOLVED&&t.onfulfilled&&t.onfulfilled(e._value),e._state===u.REJECTED&&t.onrejected&&t.onrejected(e._value),t.done=!0)}))}};try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}return t.prototype.toString=function(){return"[object SyncPromise]"},t.resolve=function(e){return new t((function(t){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.all=function(e){return new t((function(n,r){if(Array.isArray(e))if(0!==e.length){var o=e.length,i=[];e.forEach((function(e,a){t.resolve(e).then((function(t){i[a]=t,0===(o-=1)&&n(i)})).then(null,r)}))}else n([]);else r(new TypeError("Promise.all requires an array as input."))}))},t.prototype.then=function(e,n){var r=this;return new t((function(t,o){r._attachHandler({done:!1,onfulfilled:function(n){if(e)try{return void t(e(n))}catch(t){return void o(t)}else t(n)},onrejected:function(e){if(n)try{return void t(n(e))}catch(t){return void o(t)}else o(e)}})}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(e){var n=this;return new t((function(t,r){var o,i;return n.then((function(t){i=!1,o=t,e&&e()}),(function(t){i=!0,o=t,e&&e()})).then((function(){i?r(o):t(o)}))}))},t}(),f=n("9/Zf"),h=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,setTimeout((function(){t._scopeListeners.forEach((function(e){e(t)})),t._notifyingListeners=!1})))},t.prototype._notifyEventProcessors=function(t,e,n,r){var o=this;return void 0===r&&(r=0),new l((function(i,a){var s=t[r];if(null===e||"function"!=typeof s)i(e);else{var u=s(c.a({},e),n);Object(p.m)(u)?u.then((function(e){return o._notifyEventProcessors(t,e,n,r+1).then(i)})).then(null,a):o._notifyEventProcessors(t,u,n,r+1).then(i).then(null,a)}}))},t.prototype.setUser=function(t){return this._user=t||{},this._notifyScopeListeners(),this},t.prototype.setTags=function(t){return this._tags=c.a({},this._tags,t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,e){var n;return this._tags=c.a({},this._tags,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=c.a({},this._extra,t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,e){var n;return this._extra=c.a({},this._extra,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,e){var n;return this._contexts=c.a({},this._contexts,((n={})[t]=e,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t=this.getSpan();if(t&&t.spanRecorder&&t.spanRecorder.spans[0])return t.spanRecorder.spans[0]},t.clone=function(e){var n=new t;return e&&(n._breadcrumbs=c.e(e._breadcrumbs),n._tags=c.a({},e._tags),n._extra=c.a({},e._extra),n._contexts=c.a({},e._contexts),n._user=e._user,n._level=e._level,n._span=e._span,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=c.e(e._eventProcessors)),n},t.prototype.update=function(e){if(!e)return this;if("function"==typeof e){var n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags=c.a({},this._tags,e._tags),this._extra=c.a({},this._extra,e._extra),this._contexts=c.a({},this._contexts,e._contexts),e._user&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint)):Object(p.h)(e)&&(e=e,this._tags=c.a({},this._tags,e.tags),this._extra=c.a({},this._extra,e.extra),this._contexts=c.a({},this._contexts,e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._span=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,e){var n=c.a({timestamp:Object(f.l)()},t);return this._breadcrumbs=void 0!==e&&e>=0?c.e(this._breadcrumbs,[n]).slice(-e):c.e(this._breadcrumbs,[n]),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t.prototype.applyToEvent=function(t,e){return this._extra&&Object.keys(this._extra).length&&(t.extra=c.a({},this._extra,t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=c.a({},this._tags,t.tags)),this._user&&Object.keys(this._user).length&&(t.user=c.a({},this._user,t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=c.a({},this._contexts,t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span&&(t.contexts=c.a({trace:this._span.getTraceContext()},t.contexts)),this._applyFingerprint(t),t.breadcrumbs=c.e(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this._notifyEventProcessors(c.e(d(),this._eventProcessors),t,e)},t}();function d(){var t=Object(f.f)();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function v(t){d().push(t)}var _=Object(f.f)(),y="Sentry Logger ",g=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],e=0;e0?t[t.length-1].scope:void 0,n=h.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n},t.prototype.popScope=function(){return void 0!==this.getStack().pop()},t.prototype.withScope=function(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,e){var n=this._lastEventId=Object(f.m)(),r=e;if(!e){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(t){o=t}r={originalException:t,syntheticException:o}}return this._invokeClient("captureException",t,c.a({},r,{event_id:n})),n},t.prototype.captureMessage=function(t,e,n){var r=this._lastEventId=Object(f.m)(),o=n;if(!n){var i=void 0;try{throw new Error(t)}catch(t){i=t}o={originalException:t,syntheticException:i}}return this._invokeClient("captureMessage",t,e,c.a({},o,{event_id:r})),r},t.prototype.captureEvent=function(t,e){var n=this._lastEventId=Object(f.m)();return this._invokeClient("captureEvent",t,c.a({},e,{event_id:n})),n},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,e){var n=this.getStackTop();if(n.scope&&n.client){var r=n.client.getOptions&&n.client.getOptions()||{},o=r.beforeBreadcrumb,i=void 0===o?null:o,a=r.maxBreadcrumbs,s=void 0===a?100:a;if(!(s<=0)){var u=Object(f.l)(),p=c.a({timestamp:u},t),l=i?Object(f.c)((function(){return i(p,e)})):p;null!==l&&n.scope.addBreadcrumb(l,Math.min(s,100))}}},t.prototype.setUser=function(t){var e=this.getStackTop();e.scope&&e.scope.setUser(t)},t.prototype.setTags=function(t){var e=this.getStackTop();e.scope&&e.scope.setTags(t)},t.prototype.setExtras=function(t){var e=this.getStackTop();e.scope&&e.scope.setExtras(t)},t.prototype.setTag=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setTag(t,e)},t.prototype.setExtra=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)},t.prototype.setContext=function(t,e){var n=this.getStackTop();n.scope&&n.scope.setContext(t,e)},t.prototype.configureScope=function(t){var e=this.getStackTop();e.scope&&e.client&&t(e.scope)},t.prototype.run=function(t){var e=x(this);try{t(this)}finally{x(e)}},t.prototype.getIntegration=function(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return m.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t){return this._callExtensionMethod("startTransaction",t)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype._callExtensionMethod=function(t){for(var e=[],n=1;n1&&(l=h.slice(0,-1).join("/"),f=h.pop()),f){var d=f.match(/^\d+/);d&&(f=d[0])}this._fromComponents({host:s,pass:a,path:l,projectId:f,port:p,protocol:r,user:o})},t.prototype._fromComponents=function(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId},t.prototype._validate=function(){var t=this;if(["protocol","user","host","projectId"].forEach((function(e){if(!t[e])throw new q("Invalid Dsn: "+e+" missing")})),!this.projectId.match(/^\d+$/))throw new q("Invalid Dsn: Invalid projectId "+this.projectId);if("http"!==this.protocol&&"https"!==this.protocol)throw new q("Invalid Dsn: Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new q("Invalid Dsn: Invalid port "+this.port)},t}(),G=n("6PXS"),X=n("+924"),J=[];function z(t){var e={};return function(t){var e=t.defaultIntegrations&&c.e(t.defaultIntegrations)||[],n=t.integrations,r=[];if(Array.isArray(n)){var o=n.map((function(t){return t.name})),i=[];e.forEach((function(t){-1===o.indexOf(t.name)&&-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})),n.forEach((function(t){-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))}))}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=c.e(e);var a=r.map((function(t){return t.name}));return-1!==a.indexOf("Debug")&&r.push.apply(r,c.e(r.splice(a.indexOf("Debug"),1))),r}(t).forEach((function(t){e[t.name]=t,function(t){-1===J.indexOf(t.name)&&(t.setupOnce(v,O),J.push(t.name),m.log("Integration installed: "+t.name))}(t)})),e}var $=function(){function t(t,e){this._integrations={},this._processing=!1,this._backend=new t(e),this._options=e,e.dsn&&(this._dsn=new Y(e.dsn))}return t.prototype.captureException=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._getBackend().eventFromException(t,e).then((function(t){o=r.captureEvent(t,e,n)})),o},t.prototype.captureMessage=function(t,e,n,r){var o=this,i=n&&n.event_id;return this._processing=!0,(Object(p.i)(t)?this._getBackend().eventFromMessage(""+t,e,n):this._getBackend().eventFromException(t,n)).then((function(t){i=o.captureEvent(t,n,r)})),i},t.prototype.captureEvent=function(t,e,n){var r=this,o=e&&e.event_id;return this._processing=!0,this._processEvent(t,e,n).then((function(t){o=t&&t.event_id,r._processing=!1})).then(null,(function(t){m.error(t),r._processing=!1})),o},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.flush=function(t){var e=this;return this._isClientProcessing(t).then((function(n){return clearInterval(n.interval),e._getBackend().getTransport().close(t).then((function(t){return n.ready&&t}))}))},t.prototype.close=function(t){var e=this;return this.flush(t).then((function(t){return e.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&(this._integrations=z(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(e){return m.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._isClientProcessing=function(t){var e=this;return new l((function(n){var r=0,o=0;clearInterval(o),o=setInterval((function(){e._processing?(r+=1,t&&r>=t&&n({interval:o,ready:!1})):n({interval:o,ready:!0})}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,e,n){var r=this,o=this.getOptions().normalizeDepth,i=void 0===o?3:o,a=c.a({},t,{event_id:t.event_id||(n&&n.event_id?n.event_id:Object(f.m)()),timestamp:t.timestamp||Object(f.l)()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var s=e;n&&n.captureContext&&(s=h.clone(s).update(n.captureContext));var u=l.resolve(a);return s&&(u=s.applyToEvent(a,n)),u.then((function(t){return"number"==typeof i&&i>0?r._normalizeEvent(t,i):t}))},t.prototype._normalizeEvent=function(t,e){if(!t)return null;var n=c.a({},t,t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return c.a({},t,t.data&&{data:Object(G.c)(t.data,e)})}))},t.user&&{user:Object(G.c)(t.user,e)},t.contexts&&{contexts:Object(G.c)(t.contexts,e)},t.extra&&{extra:Object(G.c)(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n},t.prototype._applyClientOptions=function(t){var e=this.getOptions(),n=e.environment,r=e.release,o=e.dist,i=e.maxValueLength,a=void 0===i?250:i;void 0===t.environment&&void 0!==n&&(t.environment=n),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==o&&(t.dist=o),t.message&&(t.message=Object(X.d)(t.message,a));var s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=Object(X.d)(s.value,a));var c=t.request;c&&c.url&&(c.url=Object(X.d)(c.url,a))},t.prototype._applyIntegrationsMetadata=function(t){var e=t.sdk,n=Object.keys(this._integrations);e&&n.length>0&&(e.integrations=n)},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._processEvent=function(t,e,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;if(!this._isEnabled())return l.reject("SDK not enabled, will not send event.");var s="transaction"===t.type;return!s&&"number"==typeof a&&Math.random()>a?l.reject("This event has been sampled, will not send event."):new l((function(o,a){r._prepareEvent(t,n,e).then((function(t){if(null!==t){var n=t;if(e&&e.data&&!0===e.data.__sentry__||!i||s)return r._sendEvent(n),void o(n);var c=i(t,e);if(void 0===c)m.error("`beforeSend` method has to return `null` or a valid event.");else if(Object(p.m)(c))r._handleAsyncBeforeSend(c,o,a);else{if(null===(n=c))return m.log("`beforeSend` returned `null`, will not send event."),void o(null);r._sendEvent(n),o(n)}}else a("An event processor returned null, will not send event.")})).then(null,(function(t){r.captureException(t,{data:{__sentry__:!0},originalException:t}),a("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))}))},t.prototype._handleAsyncBeforeSend=function(t,e,n){var r=this;t.then((function(t){null!==t?(r._sendEvent(t),e(t)):n("`beforeSend` returned `null`, will not send event.")})).then(null,(function(t){n("beforeSend rejected with "+t)}))},t}(),V=function(){function t(){}return t.prototype.sendEvent=function(t){return l.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:s.Skipped})},t.prototype.close=function(t){return l.resolve(!0)},t}(),Q=function(){function t(t){this._options=t,this._options.dsn||m.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype._setupTransport=function(){return new V},t.prototype.eventFromException=function(t,e){throw new q("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,e,n){throw new q("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){this._transport.sendEvent(t).then(null,(function(t){m.error("Error while sending event: "+t)}))},t.prototype.getTransport=function(){return this._transport},t}();function K(){if(!("fetch"in Object(f.f)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function Z(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function tt(){if(!K())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var et=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,rt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ot=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,it=/\((\S*)(?::(\d+))(?::(\d+))\)/,at=/Minified React error #\d+;/i;function st(t){var e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:at.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;for(var e,n=t.stacktrace,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=n.split("\n"),a=[],s=0;s eval")>-1&&(e=ot.exec(n[3]))?(n[1]=n[1]||"eval",n[3]=e[1],n[4]=e[2],n[5]=""):0!==a||n[5]||void 0===t.columnNumber||(o[0].column=t.columnNumber+1),r={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func="?"),o.push(r)}if(!o.length)return null;return{message:ut(t),name:t.name,stack:o}}(t))return ct(e,n)}catch(t){}return{message:ut(t),name:t&&t.name,stack:[],failed:!0}}function ct(t,e){try{return c.a({},t,{stack:t.stack.slice(e)})}catch(e){return t}}function ut(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function pt(t){var e=ft(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function lt(t){return{exception:{values:[pt(t)]}}}function ft(t){if(!t||!t.length)return[];var e=t,n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,50).map((function(t){return{colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line}})).reverse()}function ht(t,e,n){var r=vt(e,n&&n.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return Object(f.a)(r,{handled:!0,type:"generic"}),r.level=a.Error,n&&n.event_id&&(r.event_id=n.event_id),l.resolve(r)}function dt(t,e,n,r){void 0===n&&(n=a.Info);var o=_t(e,r&&r.syntheticException||void 0,{attachStacktrace:t.attachStacktrace});return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),l.resolve(o)}function vt(t,e,n){var r;if(void 0===n&&(n={}),Object(p.e)(t)&&t.error)return r=lt(st(t=t.error));if(Object(p.a)(t)||Object(p.b)(t)){var o=t,i=o.name||(Object(p.a)(o)?"DOMError":"DOMException"),a=o.message?i+": "+o.message:i;return r=_t(a,e,n),Object(f.b)(r,a),r}return Object(p.d)(t)?r=lt(st(t)):Object(p.h)(t)||Object(p.f)(t)?(r=function(t,e,n){var r={exception:{values:[{type:Object(p.f)(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+Object(G.a)(t)}]},extra:{__serialized__:Object(G.d)(t)}};if(e){var o=ft(st(e).stack);r.stacktrace={frames:o}}return r}(t,e,n.rejection),Object(f.a)(r,{synthetic:!0}),r):(r=_t(t,e,n),Object(f.b)(r,""+t,void 0),Object(f.a)(r,{synthetic:!0}),r)}function _t(t,e,n){void 0===n&&(n={});var r={message:t};if(n.attachStacktrace&&e){var o=ft(st(e).stack);r.stacktrace={frames:o}}return r}function yt(t,e){var n="transaction"===t.type,r={body:JSON.stringify(t),url:n?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(n){var o=JSON.stringify({event_id:t.event_id,sent_at:new Date(1e3*Object(f.l)()).toISOString()})+"\n"+JSON.stringify({type:t.type})+"\n"+r.body;r.body=o}return r}var gt=function(){function t(t){this.dsn=t,this._dsnObject=new Y(t)}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.getBaseApiEndpoint=function(){var t=this._dsnObject,e=t.protocol?t.protocol+":":"",n=t.port?":"+t.port:"";return e+"//"+t.host+n+(t.path?"/"+t.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(t){return""+this.getBaseApiEndpoint()+this._dsnObject.projectId+"/"+t+"/"},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype._encodedAuth=function(){var t={sentry_key:this._dsnObject.user,sentry_version:"7"};return Object(G.e)(t)},t.prototype.getStoreEndpointPath=function(){var t=this._dsnObject;return(t.path?"/"+t.path:"")+"/api/"+t.projectId+"/store/"},t.prototype.getRequestHeaders=function(t,e){var n=this._dsnObject,r=["Sentry sentry_version=7"];return r.push("sentry_client="+t+"/"+e),r.push("sentry_key="+n.user),n.pass&&r.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}},t.prototype.getReportDialogEndpoint=function(t){void 0===t&&(t={});var e=this._dsnObject,n=this.getBaseApiEndpoint()+"embed/error-page/",r=[];for(var o in r.push("dsn="+e.toString()),t)if("user"===o){if(!t.user)continue;t.user.name&&r.push("name="+encodeURIComponent(t.user.name)),t.user.email&&r.push("email="+encodeURIComponent(t.user.email))}else r.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]));return r.length?n+"?"+r.join("&"):n},t}(),mt=function(){function t(t){this._limit=t,this._buffer=[]}return t.prototype.isReady=function(){return void 0===this._limit||this.length()0&&n(!1)}),t);l.all(e._buffer).then((function(){clearTimeout(r),n(!0)})).then(null,(function(){n(!0)}))}))},t}(),bt=function(){function t(t){this.options=t,this._buffer=new mt(30),this._api=new gt(this.options.dsn),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return t.prototype.sendEvent=function(t){throw new q("Transport Class has to implement `sendEvent` method")},t.prototype.close=function(t){return this._buffer.drain(t)},t}(),Et=Object(f.f)(),xt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._disabledUntil=new Date(Date.now()),e}return c.b(e,t),e.prototype.sendEvent=function(t){var e=this;if(new Date(Date.now())0}function kt(){wt+=1,setTimeout((function(){wt-=1}))}function Tt(t,e,n){if(void 0===e&&(e={}),"function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}var r=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var o=r.map((function(t){return Tt(t,e)}));return t.handleEvent?t.handleEvent.apply(this,o):t.apply(this,o)}catch(t){throw kt(),B((function(n){n.addEventProcessor((function(t){var n=c.a({},t);return e.mechanism&&(Object(f.b)(n,void 0,void 0),Object(f.a)(n,e.mechanism)),n.extra=c.a({},n.extra,{arguments:r}),n})),T(t)})),t}};try{for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}catch(t){}t.prototype=t.prototype||{},r.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:function(){return t.name}})}catch(t){}return r}function It(t){if(void 0===t&&(t={}),t.eventId)if(t.dsn){var e=document.createElement("script");e.async=!0,e.src=new gt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}else m.error("Missing dsn option in showReportDialog call");else m.error("Missing eventId option in showReportDialog call")}var Rt,Dt=Object(f.f)(),Nt={},Ct={};function Ut(t){if(!Ct[t])switch(Ct[t]=!0,t){case"console":!function(){if(!("console"in Dt))return;["debug","info","warn","error","log","assert"].forEach((function(t){t in Dt.console&&Object(G.b)(Dt.console,t,(function(e){return function(){for(var n=[],r=0;r2?e[2]:void 0;if(r){var o=Rt,i=String(r);Rt=i,At("history",{from:o,to:i})}return t.apply(this,e)}}Dt.onpopstate=function(){for(var t=[],e=0;e"}0!==e.length&&O().addBreadcrumb({category:"ui."+t.name,message:e},{event:t.event,name:t.name})},t.prototype._xhrBreadcrumb=function(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;O().addBreadcrumb({category:"xhr",data:t.xhr.__sentry_xhr__,type:"http"},{xhr:t.xhr})}else;},t.prototype._fetchBreadcrumb=function(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?O().addBreadcrumb({category:"fetch",data:t.fetchData,level:a.Error,type:"http"},{data:t.error,input:t.args}):O().addBreadcrumb({category:"fetch",data:c.a({},t.fetchData,{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))},t.prototype._historyBreadcrumb=function(t){var e=Object(f.f)(),n=t.from,r=t.to,o=Object(f.k)(e.location.href),i=Object(f.k)(n),a=Object(f.k)(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),O().addBreadcrumb({category:"navigation",data:{from:n,to:r}})},t.prototype.setupOnce=function(){var t=this;this._options.console&&Lt({callback:function(){for(var e=[],n=0;n0?e:Object(f.g)();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:o,filename:a,function:"?",in_app:!0,lineno:i}),t},t.id="GlobalHandlers",t}(),re=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._key=e.key||"cause",this._limit=e.limit||5}return t.prototype.setupOnce=function(){v((function(e,n){var r=O().getIntegration(t);return r?r._handler(e,n):e}))},t.prototype._handler=function(t,e){if(!(t.exception&&t.exception.values&&e&&Object(p.g)(e.originalException,Error)))return t;var n=this._walkErrorTree(e.originalException,this._key);return t.exception.values=c.e(n,t.exception.values),t},t.prototype._walkErrorTree=function(t,e,n){if(void 0===n&&(n=[]),!Object(p.g)(t[e],Error)||n.length+1>=this._limit)return n;var r=pt(st(t[e]));return this._walkErrorTree(t[e],e,c.e([r],n))},t.id="LinkedErrors",t}(),oe=Object(f.f)(),ie=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){v((function(e){if(O().getIntegration(t)){if(!oe.navigator||!oe.location)return e;var n=e.request||{};return n.url=n.url||oe.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=oe.navigator.userAgent,c.a({},e,{request:n})}return e}))},t.id="UserAgent",t}(),ae=[new r.InboundFilters,new r.FunctionToString,new ee,new Jt,new ne,new re,new ie];function se(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=ae),void 0===t.release){var e=Object(f.f)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&m.enable();var n=O(),r=new t(e);n.bindClient(r)}(Vt,t)}function ce(t){void 0===t&&(t={}),t.eventId||(t.eventId=O().lastEventId());var e=O().getClient();e&&e.showReportDialog(t)}function ue(){return O().lastEventId()}function pe(){}function le(t){t()}function fe(t){var e=O().getClient();return e?e.flush(t):l.reject(!1)}function he(t){var e=O().getClient();return e?e.close(t):l.reject(!1)}function de(t){return Tt(t)()}var ve={},_e=Object(f.f)();_e.Sentry&&_e.Sentry.Integrations&&(ve=_e.Sentry.Integrations);var ye=c.a({},ve,r,o)},wCA9:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){this._hasWeakSet="function"==typeof WeakSet,this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(t){if(this._hasWeakSet)return!!this._inner.has(t)||(this._inner.add(t),!1);for(var e=0;e1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,i=null;return function(){return o(e,n,arguments)||(i=t.apply(null,arguments)),n=arguments,i}}));var s=function(t){return t.logs.logs},u=function(t){return t.logs.tail},c=function(t){return t.logs.searchText},l=a(s,u,c,(function(t,e,n){for(var r=[],o=e;o>=0;o--)r.push(t[o]);if(300===t.length)for(var i=299;i>e;i--)r.push(t[i]);return""===n?r:r.filter((function(t){return t.payload.toLowerCase().indexOf(n)>=0}))}));function f(t){return function(e){e("logsUpdateSearchText",(function(e){e.logs.searchText=t.toLowerCase()}))}}function p(t){return function(e,n){var r=n(),o=s(r),i=u(r),a=i>=299?0:i+1;o[a]=t,e("logsAppendLog",(function(t){t.logs.tail=a}))}}var d={searchText:"",logs:[],tail:-1}},"+wdc":function(t,e,n){"use strict";var r,o,i,a,s;if(Object.defineProperty(e,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,l=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(t){throw setTimeout(l,0),t}},f=Date.now();e.unstable_now=function(){return Date.now()-f},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(l,0))},o=function(t,e){c=setTimeout(t,e)},i=function(){clearTimeout(c)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var p=window.performance,d=window.Date,h=window.setTimeout,v=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)e.unstable_now=function(){return p.now()};else{var y=d.now();e.unstable_now=function(){return d.now()-y}}var g=!1,b=null,w=-1,O=5,x=0;a=function(){return e.unstable_now()>=x},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125>>1,o=t[r];if(!(void 0!==o&&0k(a,n))void 0!==u&&0>k(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[i]=n,r=i);else{if(!(void 0!==u&&0>k(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function k(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var T=[],A=[],R=1,L=null,M=3,_=!1,D=!1,N=!1;function V(t){for(var e=C(A);null!==e;){if(null===e.callback)P(A);else{if(!(e.startTime<=t))break;P(A),e.sortIndex=e.expirationTime,j(T,e)}e=C(A)}}function F(t){if(N=!1,V(t),!D)if(null!==C(T))D=!0,r(B);else{var e=C(A);null!==e&&o(F,e.startTime-t)}}function B(t,n){D=!1,N&&(N=!1,i()),_=!0;var r=M;try{for(V(n),L=C(T);null!==L&&(!(L.expirationTime>n)||t&&!a());){var s=L.callback;if(null!==s){L.callback=null,M=L.priorityLevel;var u=s(L.expirationTime<=n);n=e.unstable_now(),"function"==typeof u?L.callback=u:L===C(T)&&P(T),V(n)}else P(T);L=C(T)}if(null!==L)var c=!0;else{var l=C(A);null!==l&&o(F,l.startTime-n),c=!1}return c}finally{L=null,M=r,_=!1}}function I(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=s;e.unstable_ImmediatePriority=1,e.unstable_UserBlockingPriority=2,e.unstable_NormalPriority=3,e.unstable_IdlePriority=5,e.unstable_LowPriority=4,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=M;M=t;try{return e()}finally{M=n}},e.unstable_next=function(t){switch(M){case 1:case 2:case 3:var e=3;break;default:e=M}var n=M;M=e;try{return t()}finally{M=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0s?(t.sortIndex=u,j(A,t),null===C(T)&&t===C(A)&&(N?i():N=!0,o(F,u-s))):(t.sortIndex=a,j(T,t),D||_||(D=!0,r(B))),t},e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_wrapCallback=function(t){var e=M;return function(){var n=M;M=e;try{return t.apply(this,arguments)}finally{M=n}}},e.unstable_getCurrentPriorityLevel=function(){return M},e.unstable_shouldYield=function(){var t=e.unstable_now();V(t);var n=C(T);return n!==L&&null!==L&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var X=Object(r.forwardRef)((function(t,e){var n=t.color,r=void 0===n?"currentColor":n,i=t.size,a=void 0===i?24:i,s=$(t,["color","size"]);return o.a.createElement("svg",G({ref:e,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),o.a.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))}));X.propTypes={color:w.a.string,size:w.a.oneOfType([w.a.string,w.a.number])},X.displayName="GitHub";var Y=X,Q=n("Qv+K"),K=n("o0o1"),Z=n.n(K),J=(n("ls82"),n("HaE+")),tt=n("EJpJ");function et(t,e){return nt.apply(this,arguments)}function nt(){return(nt=Object(J.a)(Z.a.mark((function t(e,n){var r,o,i,a,s;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},t.prev=1,o=Object(tt.a)(n),i=o.url,a=o.init,t.next=5,fetch(i+e,a);case 5:if(!(s=t.sent).ok){t.next=10;break}return t.next=9,s.json();case 9:r=t.sent;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(1),console.log("failed to fetch "+e,t.t0);case 15:return t.abrupt("return",r);case 16:case"end":return t.stop()}}),t,null,[[1,12]])})))).apply(this,arguments)}var rt=n("DKqX"),ot=n("WfPo"),it=n("OADI"),at=n("zZH+"),st=n.n(at);function ut(t){var e=t.name,n=t.link,o=t.version;return r.createElement("div",{className:st.a.root},r.createElement("h2",null,e),r.createElement("p",null,r.createElement("span",null,"Version "),r.createElement("span",{className:st.a.mono},o)),r.createElement("p",null,r.createElement("a",{className:st.a.link,href:n,target:"_blank",rel:"noopener noreferrer"},r.createElement(Y,{size:20}),r.createElement("span",null,"Source"))))}var ct=Object(ot.a)((function(t){return{apiConfig:Object(it.c)(t)}}))((function(t){var e=Object(Q.c)(["/version",t.apiConfig],et,{suspense:!0}).data;return r.createElement(r.Fragment,null,r.createElement(rt.a,{title:"About"}),e&&e.version?r.createElement(ut,{name:"Clash",version:e.version,link:"https://github.com/Dreamacro/clash"}):null,r.createElement(ut,{name:"Yacd",version:"0.2.4",link:"https://github.com/haishanh/yacd"}))})),lt=n("vJea"),ft=n("+FPD"),pt=n("LNGp"),dt=n("GmYy"),ht={app:Object(it.j)(),modals:pt.b,configs:lt.d,proxies:dt.j,logs:ft.d},vt={selectChartStyleIndex:it.k,updateAppConfig:it.m,app:{updateCollapsibleIsOpen:it.o,updateAppConfig:it.m},proxies:dt.b},mt={0:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};var yt=n("Plid"),gt=n.n(yt),bt=n("n57c"),wt=n("wx14"),Ot=n("Ff2n"),xt=n("iuhU"),Et=n("SzcZ"),St=n.n(Et),jt=o.a.useCallback;function Ct(t){var e=t.id,n=t.label,r=t.value,i=t.onChange,a=Object(Ot.a)(t,["id","label","value","onChange"]),s=jt((function(t){return i(t)}),[i]),u=Object(xt.a)({[St.a.floatAbove]:"string"==typeof r&&""!==r});return o.a.createElement("div",{className:St.a.root},o.a.createElement("input",Object(wt.a)({id:e,value:r,onChange:s},a)),o.a.createElement("label",{htmlFor:e,className:u},n))}Ct.propTypes={value:w.a.oneOfType([w.a.string,w.a.number]),type:w.a.oneOf(["text","number"]),onChange:w.a.func,id:w.a.string,label:w.a.string};var Pt=n("VVUS"),kt=o.a.useState,Tt=o.a.useEffect,At=o.a.useRef,Rt=o.a.useCallback;var Lt=Object(ot.a)((function(t){return{apiConfig:Object(it.c)(t)}}))((function(t){var e=t.apiConfig,n=t.dispatch,r=kt(e.hostname),i=Object(c.a)(r,2),a=i[0],s=i[1],u=kt(e.port),l=Object(c.a)(u,2),f=l[0],p=l[1],d=kt(e.secret),h=Object(c.a)(d,2),v=h[0],m=h[1],y=At(!1),g=At(null);Tt((function(){function t(){return(t=Object(J.a)(Z.a.mark((function t(){var e,n,r,o;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("/");case 3:return e=t.sent,t.next=6,e.json();case 6:"clash"===t.sent.hello&&!1===y.current&&(n=window.location,r=n.hostname,o=n.port,s(r),p(o)),t.next=12;break;case 10:t.prev=10,t.t0=t.catch(0);case 12:case"end":return t.stop()}}),t,null,[[0,10]])})))).apply(this,arguments)}g.current.focus(),function(){t.apply(this,arguments)}()}),[]);var b=Rt((function(t){y.current=!0;var e=t.target,n=e.name,r=e.value;switch(n){case"port":p(r);break;case"hostname":s(r);break;case"secret":m(r);break;default:throw new Error("unknown input name "+n)}}),[]),w=Rt((function(){n(Object(it.n)({hostname:a,port:f,secret:v}))}),[a,f,v,n]),O=Rt((function(t){13===t.keyCode&&w()}),[w]);return o.a.createElement("div",{className:gt.a.root,ref:g,onKeyDown:O},o.a.createElement("div",{className:gt.a.header},o.a.createElement("div",{className:gt.a.icon},o.a.createElement(Pt.a,{width:160,height:160}))),o.a.createElement("div",{className:gt.a.body},o.a.createElement("div",{className:gt.a.hostnamePort},o.a.createElement("div",null,o.a.createElement(Ct,{id:"hostname",name:"hostname",label:"Hostname",type:"text",value:a,onChange:b})),o.a.createElement("div",null,o.a.createElement(Ct,{id:"port",name:"port",label:"Port",type:"number",value:f,onChange:b}))),o.a.createElement("div",null,o.a.createElement(Ct,{id:"secret",name:"secret",label:"Secret(optional)",value:v,type:"text",onChange:b}))),o.a.createElement("div",{className:gt.a.footer},o.a.createElement(bt.a,{label:"Confirm",onClick:w})))})),Mt=n("rRNg"),_t=n.n(Mt),Dt=n("Z9Yo"),Nt=n.n(Dt);function Vt(t){var e=t.isOpen,n=t.onRequestClose,r=t.className,i=t.overlayClassName,a=t.children,s=Object(Ot.a)(t,["isOpen","onRequestClose","className","overlayClassName","children"]),c=Object(xt.a)(r,Nt.a.content),l=Object(xt.a)(i,Nt.a.overlay);return o.a.createElement(u.a,Object(wt.a)({isOpen:e,onRequestClose:n,className:c,overlayClassName:l},s),a)}Vt.propTypes={isOpen:w.a.bool.isRequired,onRequestClose:w.a.func.isRequired,children:w.a.node.isRequired,className:w.a.string,overlayClassName:w.a.string};var Ft=o.a.memo(Vt),Bt=o.a.useCallback,It=o.a.useEffect;var Ut=Object(ot.a)((function(t){return{modals:t.modals,apiConfig:Object(it.c)(t)}}))((function(t){var e=t.dispatch,n=t.apiConfig,r=t.modals;if(!window.fetch){var i=mt[0].detail,a=new Error(i);throw a.code=0,a}var s=Bt((function(){e(Object(pt.a)("apiConfig"))}),[e]);return It((function(){e(Object(lt.a)(n))}),[e,n]),o.a.createElement(Ft,{isOpen:r.apiConfig,className:_t.a.content,overlayClassName:_t.a.overlay,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,onRequestClose:s},o.a.createElement("div",{className:_t.a.container},o.a.createElement(Lt,null)))}));n("ma9I"),n("SuFq"),n("JfAA");function qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wt(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.width,n=void 0===e?24:e,r=t.height,i=void 0===r?24:r;return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))}oe.propTypes={width:w.a.number,height:w.a.number};function ie(t){var e=t.message,n=t.detail;return o.a.createElement("div",{className:re.a.root},o.a.createElement("div",{className:re.a.yacd},o.a.createElement(Pt.a,{width:150,height:150})),e?o.a.createElement("h1",null,e):null,n?o.a.createElement("p",null,n):null,o.a.createElement("p",null,o.a.createElement("a",{className:re.a.link,href:"https://github.com/haishanh/yacd/issues"},o.a.createElement(oe,{width:16,height:16}),"haishanh/yacd")))}ie.propTypes={message:w.a.string};var ae=ie;function se(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Qt(t);if(e){var o=Qt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yt(this,n)}}var ue=function(t){$t(n,t);var e=se(n);function n(){var t;qt(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var Ie=Object(r.forwardRef)((function(t,e){var n=t.color,r=void 0===n?"currentColor":n,i=t.size,a=void 0===i?24:i,s=Be(t,["color","size"]);return o.a.createElement("svg",Fe({ref:e,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),o.a.createElement("circle",{cx:"12",cy:"12",r:"10"}),o.a.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),o.a.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))}));Ie.propTypes={color:w.a.string,size:w.a.oneOfType([w.a.string,w.a.number])},Ie.displayName="Info";var Ue=Ie,qe={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},We=r.createContext&&r.createContext(qe),ze=function(){return(ze=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&void 0!==arguments[0]&&arguments[0],e=o.a.useState(t),n=Object(c.a)(e,2),r=n[0],i=n[1],a=o.a.useCallback((function(){i((function(t){return!t}))}),[]);return[r,a]}(!1),e=Object(c.a)(t,2),n=e[0],r=e[1];return o.a.createElement(dn.a,{checked:n,onChange:r})}r.PureComponent;var En=Object(r.lazy)((function(){return Promise.all([n.e(0),n.e(12),n.e(4)]).then(n.bind(null,"rfEN"))})),Sn=Object(r.lazy)((function(){return n.e(3).then(n.bind(null,"EeQf"))})),jn=Object(r.lazy)((function(){return Promise.all([n.e(1),n.e(6)]).then(n.bind(null,"aTX5"))})),Cn=Object(r.lazy)((function(){return Promise.all([n.e(0),n.e(13),n.e(7)]).then(n.bind(null,"kCV3"))})),Pn=Object(r.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(9)]).then(n.bind(null,"BVyM"))})),kn=[["home","/",o.a.createElement(Re,null)],["connections","/connections",o.a.createElement(En,null)],["configs","/configs",o.a.createElement(Sn,null)],["logs","/logs",o.a.createElement(jn,null)],["proxies","/proxies",o.a.createElement(Cn,null)],["rules","/rules",o.a.createElement(Pn,null)],["about","/about",o.a.createElement(ct,null)],!1].filter(Boolean),Tn=function(){return o.a.createElement(ce,null,o.a.createElement(H.RecoilRoot,null,o.a.createElement(ot.b,{initialState:ht,actions:vt},o.a.createElement(W,null,o.a.createElement("div",{className:Ne.a.app},o.a.createElement(Ut,null),o.a.createElement(cn,null),o.a.createElement("div",{className:Ne.a.content},o.a.createElement(r.Suspense,{fallback:o.a.createElement(_e,null)},o.a.createElement(T,null,kn.map((function(t){var e=Object(c.a)(t,3),n=e[0],r=e[1],i=e[2];return o.a.createElement(P,{key:n,path:r,element:i})}))))))))))},An=document.getElementById("app");u.a.setAppElement(An),(0,a.a.createRoot)(An).render(o.a.createElement(Tn,null)),console.log("Checkout the repo: https://github.com/haishanh/yacd"),console.log("Version:","0.2.4")},Ff2n:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",(function(){return r}))},GmYy:function(t,e,n){"use strict";n.d(e,"j",(function(){return A})),n.d(e,"a",(function(){return L})),n.d(e,"e",(function(){return M})),n.d(e,"d",(function(){return _})),n.d(e,"f",(function(){return D})),n.d(e,"g",(function(){return N})),n.d(e,"h",(function(){return F})),n.d(e,"c",(function(){return B})),n.d(e,"n",(function(){return I})),n.d(e,"i",(function(){return W})),n.d(e,"m",(function(){return Y})),n.d(e,"l",(function(){return Z})),n.d(e,"b",(function(){return et})),n.d(e,"k",(function(){return nt}));n("pNMO"),n("4Brf"),n("TeQF"),n("QWBl"),n("pjDv"),n("yXV3"),n("4mDm"),n("2B1R"),n("+2oP"),n("ToJy"),n("27RR"),n("07d7"),n("5s+n"),n("JfAA"),n("FZtP"),n("3bBZ");var r=n("o0o1"),o=n.n(r),i=n("rePB"),a=n("ODXe"),s=(n("ls82"),n("HaE+")),u=n("dBaT"),c=n("4x4b"),l=n("EJpJ");function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e2&&void 0!==c[2]?c[2]:"http://www.gstatic.com/generate_204",i=Object(l.a)(e),a=i.url,s=i.init,u=`${a}/proxies/${n}/delay?${"timeout=5000&url="+r}`,t.next=6,fetch(u,s);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return w.apply(this,arguments)}function w(){return(w=Object(s.a)(o.a.mark((function t(e){var n,r,i,a;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(l.a)(e),r=n.url,i=n.init,t.next=3,fetch(r+"/providers/proxies",i);case 3:if(404!==(a=t.sent).status){t.next=6;break}return t.abrupt("return",{providers:{}});case 6:return t.next=8,a.json();case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(t,e){return x.apply(this,arguments)}function x(){return(x=Object(s.a)(o.a.mark((function t(e,n){var r,i,a,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(l.a)(e),i=r.url,a=r.init,s=p(p({},a),{},{method:"PUT"}),t.next=4,fetch(i+"/providers/proxies/"+n,s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(t,e){return S.apply(this,arguments)}function S(){return(S=Object(s.a)(o.a.mark((function t(e,n){var r,i,a,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(l.a)(e),i=r.url,a=r.init,s=p(p({},a),{},{method:"GET"}),t.next=4,fetch(i+"/providers/proxies/"+n+"/healthcheck",s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var j=n("OADI");function C(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&p.chains.indexOf(r)<0&&u.push(p.id)}catch(t){l.e(t)}finally{l.f()}return t.next=13,Promise.all(u.map((function(t){return c.b(e,t).catch(R)})));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(t,e,n,r,o){return G.apply(this,arguments)}function G(){return(G=Object(s.a)(o.a.mark((function t(e,n,r,i,a){var s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,v(r,i,a);case 3:if(!1!==t.sent.ok){t.next=6;break}throw new Error("failed to switch proxy: res.statusText");case 6:t.next=12;break;case 8:throw t.prev=8,t.t0=t.catch(0),console.log(t.t0,"failed to swith proxy"),t.t0;case 12:e(B(r)),Object(j.b)(n())&&(s=M(n()),X(r,s,{groupName:i,itemName:a}));case 15:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}function $(){return function(t){t("closeModalClosePrevConns",(function(t){t.proxies.showModalClosePrevConns=!1}))}}function X(t,e,n){var r=function(t,e,n){for(var r,o=[n,e],i=n;(r=t[i])&&r.now;)o.unshift(r.now),i=r.now;return o}(e,n.groupName,n.itemName);!function(t,e,n){z.apply(this,arguments)}(t,n.groupName,r[0])}function Y(t,e,n){return function(){var r=Object(s.a)(o.a.mark((function r(i,a){return o.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:H(i,a,t,e,n).catch(R),i("store/proxies#switchProxy",(function(t){var r=t.proxies.proxies;r[e]&&r[e].now&&(r[e].now=n)}));case 2:case"end":return r.stop()}}),r)})));return function(t,e){return r.apply(this,arguments)}}()}function Q(t,e){return function(){var n=Object(s.a)(o.a.mark((function n(r,i){var a,s,u,c,l,f,p;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=Object(j.f)(i()),n.next=3,y(t,e,a);case 3:return s=n.sent,u="",!1===s.ok&&(u=s.statusText),n.next=8,s.json();case 8:c=n.sent,l=c.delay,f=_(i()),p=T(T({},f),{},{[e]:{error:u,number:l}}),r("requestDelayForProxyOnce",(function(t){t.proxies.delay=p}));case 13:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}()}function K(t,e){return function(){var n=Object(s.a)(o.a.mark((function n(r){return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r(Q(t,e));case 2:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()}function Z(t){return function(){var e=Object(s.a)(o.a.mark((function e(n,r){var i,a,s,u,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=V(r()),e.next=3,Promise.all(i.map((function(e){return n(K(t,e))})));case 3:a=N(r()),s=C(a),e.prev=5,s.s();case 7:if((u=s.n()).done){e.next=13;break}return c=u.value,e.next=11,U(t,c.name);case 11:e.next=7;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),s.e(e.t0);case 18:return e.prev=18,s.f(),e.finish(18);case 21:return e.next=23,n(B(t));case 23:case"end":return e.stop()}}),e,null,[[5,15,18,21]])})));return function(t,n){return e.apply(this,arguments)}}()}function J(t){var e,n=[],r=[];for(var o in t){var i=t[o];i.all&&Array.isArray(i.all)?(n.push(o),"GLOBAL"===o&&(e=i.all)):L.indexOf(i.type)<0&&r.push(o)}return e&&(e.push("GLOBAL"),n=n.map((function(t){return[e.indexOf(t),t]})).sort((function(t,e){return t[0]-e[0]})).map((function(t){return t[1]}))),[n,r]}function tt(t){for(var e=Object.keys(t),n=[],r={},o=0;o-1})).map((function(e){return r(K(t,e))})),n.next=4,Promise.all(s);case 4:return n.next=6,r(B(t));case 6:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}()},closeModalClosePrevConns:$,closePrevConnsAndTheModal:function(t){return function(){var e=Object(s.a)(o.a.mark((function e(n,r){var i,a,s,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r(),s=null===(i=a.proxies.switchProxyCtx)||void 0===i?void 0:i.to){e.next=5;break}return n((function(t){t("closeModalClosePrevConns",(function(t){t.proxies.showModalClosePrevConns=!1}))})),e.abrupt("return");case 5:u=a.proxies.proxies,X(t,u,s),n("closePrevConnsAndTheModal",(function(t){t.proxies.showModalClosePrevConns=!1,t.proxies.switchProxyCtx=void 0}));case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}},nt=Object(u.atom)({key:"proxyFilterText",default:""})},"HaE+":function(t,e,n){"use strict";function r(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}n.d(e,"a",(function(){return o}))},"J3/6":function(t,e,n){t.exports={TrafficNow:"_2n4kL7wLDR"}},Jf6s:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));n("QWBl"),n("yXV3"),n("pDQq"),n("07d7"),n("5s+n"),n("EnZy"),n("FZtP");var r,o=n("EJpJ"),i=new TextDecoder("utf-8"),a={labels:Array(150),up:Array(150),down:Array(150),size:150,subscribers:[],appendData(t){this.up.push(t.up),this.down.push(t.down);var e=new Date,n=""+e.getMinutes()+e.getSeconds();this.labels.push(n),this.up.length>this.size&&this.up.shift(),this.down.length>this.size&&this.down.shift(),this.labels.length>this.size&&this.labels.shift(),this.subscribers.forEach((function(e){return e(t)}))},subscribe(t){var e=this;return this.subscribers.push(t),function(){var n=e.subscribers.indexOf(t);e.subscribers.splice(n,1)}}},s=!1,u="";function c(t){a.appendData(JSON.parse(t))}function l(t){if(s||1===r)return a;r=1;var e=function(t){var e=t.hostname,n=t.port,r=t.secret,o="";return"string"==typeof r&&""!==r&&(o+="?token="+encodeURIComponent(r)),`ws://${e}:${n}/traffic${o}`}(t),n=new WebSocket(e);return n.addEventListener("error",(function(t){r=3})),n.addEventListener("close",(function(e){r=3,function(t){if(s)return a;s=!0;var e=Object(o.a)(t),n=e.url,r=e.init;fetch(n+"/traffic",r).then((function(t){t.ok?function t(e){return e.read().then((function(n){for(var r=n.done,o=n.value,a=i.decode(o,{stream:!r}),l=(u+=a).split("\n"),f=l[l.length-1],p=0;pk(null!=t?t:L,r,["TODO debug name",n]))},function(t){return{...t,nodeToComponentSubscriptions:T(t.nodeToComponentSubscriptions,e,t=>P(null!=t?t:L,r))}}]},fireNodeSubscriptions:function(t,e,n){var r;const o="enqueue"===n&&null!==(r=t.getState().nextTree)&&void 0!==r?r:t.getState().currentTree,i=function(t,e){const n=new Set,r=new Set,o=Array.from(e);for(let e=o.pop();e;e=o.pop()){var i;n.add(e),r.add(e);const a=null!==(i=t.nodeToNodeSubscriptions.get(e))&&void 0!==i?i:M;for(const t of a)r.has(t)||o.push(t)}return n}(o,e);for(const e of i){var a;(null!==(a=o.nodeToComponentSubscriptions.get(e))&&void 0!==a?a:[]).forEach(([e,r])=>{"enqueue"===n?t.getState().queuedComponentCallbacks.push(r):r(o)})}j("value became available, waking components",Array.from(e).join(", "),()=>{const e=t.getState().suspendedComponentResolvers;e.forEach(t=>t()),e.clear()})},detectCircularDependencies:function t(e,n){if(!n.length)return;const r=n[n.length-1],o=e.nodeToNodeSubscriptions.get(r);if(!(null==o?void 0:o.size))return;const i=n[0];if(o.has(i))throw new Error("Recoil selector has circular dependencies: "+[...n,i].reverse().join(" → "));for(const r of o)t(e,[...n,r])}},F=function(t,e){const n=new Map;return t.forEach((t,r)=>{n.set(r,e(t,r))}),n};const{getNodeLoadable:B,peekNodeLoadable:I,setNodeValue:U,setUnvalidatedAtomValue:q,subscribeComponentToNode:W}=V,{RecoilValueNotReady:z}=x,{AbstractRecoilValue:H,RecoilState:G,RecoilValueReadOnly:$}=m;var X={RecoilValueReadOnly:$,AbstractRecoilValue:H,RecoilState:G,valueFromValueOrUpdater:function(t,{key:e},n){if("function"==typeof n){var r;const o=t.getState(),i=null!==(r=o.nextTree)&&void 0!==r?r:o.currentTree,a=I(t,i,e);if("loading"===a.state)throw new z(e);if("hasError"===a.state)throw a.contents;return n(a.contents)}return n},getRecoilValueAsLoadable:function(t,{key:e}){let n;return j("get RecoilValue",e,()=>t.replaceState(C(r=>{const[o,i]=B(t,r,e);return n=i,o}))),n},setRecoilValue:function(t,{key:e},n){j("set RecoilValue",e,()=>t.replaceState(C(r=>{const[o,i]=U(t,r,e,n);return t.fireNodeSubscriptions(i,"enqueue"),o})))},setUnvalidatedRecoilValue:function(t,{key:e},n){j("set unvalidated persisted atom",e,()=>t.replaceState(C(r=>{const o=q(r,e,n);return t.fireNodeSubscriptions(new Set([e]),"enqueue"),o})))},subscribeToRecoilValue:function(t,{key:e},n){let r,o;return j("subscribe component to RecoilValue",e,()=>t.replaceState(C(t=>([r,o]=W(t,e,n),r)))),{release:t=>t.replaceState(o)}}};function Y(){return{transactionMetadata:{},atomValues:new Map,nonvalidatedAtoms:new Map,dirtyAtoms:new Set,nodeDeps:new Map,nodeToNodeSubscriptions:new Map,nodeToComponentSubscriptions:new Map}}function Q(t){return{currentTree:t,nextTree:null,transactionSubscriptions:new Map,queuedComponentCallbacks:[],suspendedComponentResolvers:new Set}}var K={makeEmptyTreeState:Y,makeEmptyStoreState:function(){return Q(Y())},makeStoreState:Q};const{DEFAULT_VALUE:Z}=x,{getRecoilValueAsLoadable:J,setRecoilValue:tt,valueFromValueOrUpdater:et}=X,{makeEmptyTreeState:nt,makeStoreState:rt}=K;class ot{constructor(t){a(this,"_store",void 0),a(this,"getLoadable",t=>J(this._store,t)),a(this,"getPromise",t=>this.getLoadable(t).toPromise()),a(this,"map",t=>{const e=new st(this._store.getState().currentTree);return t(e),at(e.getStore_INTERNAL().getState().currentTree)}),a(this,"asyncMap",async t=>{const e=new st(this._store.getState().currentTree);return await t(e),at(e.getStore_INTERNAL().getState().currentTree)}),this._store=function(t){const e=rt(t);return{getState:()=>e,replaceState:t=>{e.currentTree=t(e.currentTree)},subscribeToTransactions:()=>{throw new Error("Cannot subscribe to Snapshots")},addTransactionMetadata:()=>{throw new Error("Cannot subscribe to Snapshots")},fireNodeSubscriptions:()=>{}}}(t)}getStore_INTERNAL(){return this._store}}function it(t){return{transactionMetadata:{...t.transactionMetadata},atomValues:new Map(t.atomValues),nonvalidatedAtoms:new Map(t.nonvalidatedAtoms),dirtyAtoms:new Set(t.dirtyAtoms),nodeDeps:new Map(t.nodeDeps),nodeToNodeSubscriptions:F(t.nodeToNodeSubscriptions,t=>new Set(t)),nodeToComponentSubscriptions:new Map}}function at(t){return new ot(it(t))}class st extends ot{constructor(t){super(it(t)),a(this,"set",(t,e)=>{const n=this.getStore_INTERNAL(),r=et(n,t,e);tt(n,t,r)}),a(this,"reset",t=>tt(this.getStore_INTERNAL(),t,Z))}}var ut={Snapshot:ot,MutableSnapshot:st,freshSnapshot:function(){return new ot(nt())},cloneSnapshot:at},ct=ut.Snapshot,lt=ut.MutableSnapshot,ft=ut.freshSnapshot,pt=ut.cloneSnapshot,dt=function(t,e){if(null!=t)return t;throw new Error(null!=e?e:"Got unexpected null or undefined")},ht=v(Object.freeze({__proto__:null,Snapshot:ct,MutableSnapshot:lt,freshSnapshot:ft,cloneSnapshot:pt}));const{useContext:vt,useEffect:mt,useRef:yt,useState:gt}=o,{fireNodeSubscriptions:bt,setNodeValue:wt,setUnvalidatedAtomValue:Ot}=V,{freshSnapshot:xt}=ht,{makeEmptyStoreState:Et,makeStoreState:St}=K;function jt(){throw new Error("This component must be used inside a component.")}const Ct=Object.freeze({getState:jt,replaceState:jt,subscribeToTransactions:jt,addTransactionMetadata:jt,fireNodeSubscriptions:jt});function Pt(t){null===t.nextTree&&(t.nextTree={...t.currentTree,dirtyAtoms:new Set,transactionMetadata:{}})}const kt=o.createContext({current:Ct}),Tt=()=>vt(kt);function At(t){const e=Tt(),[n,r]=gt([]);return t.setNotifyBatcherOfChange(()=>r({})),mt(()=>{E("Batcher",()=>{const t=e.current.getState(),{nextTree:n}=t;null!==n&&(n.dirtyAtoms.size&&t.transactionSubscriptions.forEach(t=>t(e.current)),t.queuedComponentCallbacks.forEach(t=>t(n)),t.queuedComponentCallbacks.splice(0,t.queuedComponentCallbacks.length),t.currentTree=n,t.nextTree=null)})}),null}let Rt=0;var Lt={useStoreRef:Tt,RecoilRoot:function({initializeState_DEPRECATED:t,initializeState:e,children:n}){let r;const i=yt(null),a={getState:()=>r.current,replaceState:t=>{const e=s.current.getState();Pt(e);const n=dt(e.nextTree),r=t(n);r!==n&&(e.nextTree=r,dt(i.current)())},subscribeToTransactions:t=>{const e=Rt++;return s.current.getState().transactionSubscriptions.set(e,t),{release:()=>{s.current.getState().transactionSubscriptions.delete(e)}}},addTransactionMetadata:t=>{Pt(s.current.getState());for(const e of Object.keys(t))dt(s.current.getState().nextTree).transactionMetadata[e]=t[e]},fireNodeSubscriptions:function(t,e){bt(s.current,t,e)}},s=yt(a);return r=yt(null!=t?function(t,e){const n=Et();return e({set:(e,r)=>{n.currentTree=wt(t,n.currentTree,e.key,r)[0]},setUnvalidatedAtomValues:t=>{t.forEach((t,e)=>{n.currentTree=Ot(n.currentTree,e,t)})}}),n}(a,t):null!=e?function(t){const e=xt().map(t);return St(e.getStore_INTERNAL().getState().currentTree)}(e):Et()),o.createElement(kt.Provider,{value:s},o.createElement(At,{setNotifyBatcherOfChange:function(t){i.current=t}}),n)}},Mt=function(t,...e){const n=new Set;t:for(const r of t){for(const t of e)if(t.has(r))continue t;n.add(r)}return n};const{useCallback:_t,useEffect:Dt,useMemo:Nt,useRef:Vt,useState:Ft}=o,{peekNodeLoadable:Bt,setNodeValue:It}=V,{DEFAULT_VALUE:Ut,getNode:qt,nodes:Wt}=x,{useStoreRef:zt}=Lt,{AbstractRecoilValue:Ht,getRecoilValueAsLoadable:Gt,setRecoilValue:$t,setUnvalidatedRecoilValue:Xt,subscribeToRecoilValue:Yt,valueFromValueOrUpdater:Qt}=X,{Snapshot:Kt,cloneSnapshot:Zt}=ht,{setByAddingToSet:Jt}=S;function te(){const t=zt(),[e,n]=Ft([]),r=Vt(new Set);r.current=new Set;const o=Vt(new Set),i=Vt(new Map),a=_t(e=>{const n=i.current.get(e);n&&(n.release(t.current),i.current.delete(e))},[t,i]);return Dt(()=>{const e=t.current;function s(t,e){i.current.has(e)&&n([])}Mt(r.current,o.current).forEach(t=>{if(i.current.has(t))return;const n=Yt(e,new Ht(t),e=>{j("RecoilValue subscription fired",t,()=>{s(0,t)})});i.current.set(t,n),j("initial update on subscribing",t,()=>{s(e.getState(),t)})}),Mt(o.current,r.current).forEach(t=>{a(t)}),o.current=r.current}),Dt(()=>{const t=i.current;return()=>t.forEach((t,e)=>a(e))},[a]),Nt(()=>{function e(e){return n=>{const r=Qt(t.current,e,n);$t(t.current,e,r)}}function n(e){return r.current.has(e.key)||(r.current=Jt(r.current,e.key)),Gt(t.current,e)}function o(e){return function(t,e,n){if("hasValue"===t.state)return t.contents;if("loading"===t.state)throw new Promise(t=>{n.current.getState().suspendedComponentResolvers.add(t)});throw"hasError"===t.state?t.contents:new Error(`Invalid value of loadable atom "${e.key}"`)}(n(e),e,t)}return{getRecoilValue:o,getRecoilValueLoadable:n,getRecoilState:function(t){return[o(t),e(t)]},getRecoilStateLoadable:function(t){return[n(t),e(t)]},getSetRecoilState:e,getResetRecoilState:function(e){return()=>$t(t.current,e,Ut)}}},[r,t])}function ee(t){const e=zt();Dt(()=>e.current.subscribeToTransactions(t).release,[t,e])}function ne(t){const e=t.atomValues,n=F(function(t,e){const n=new Map;for(const[r,o]of t)e(o,r)&&n.set(r,o);return n}(e,(t,e)=>{var n;const r=null===(n=qt(e).options)||void 0===n?void 0:n.persistence_UNSTABLE;return null!=r&&"none"!==r.type&&"hasValue"===t.state}),t=>t.contents);return function(...t){const e=new Map;for(let n=0;n{i.unstable_batchedUpdates(()=>{t.current.replaceState(n=>{const r=e.getStore_INTERNAL().getState().currentTree,o=new Set;for(const t of[n.atomValues.keys(),r.atomValues.keys()])for(const e of t){var i,a;(null===(i=n.atomValues.get(e))||void 0===i?void 0:i.contents)!==(null===(a=r.atomValues.get(e))||void 0===a?void 0:a.contents)&&o.add(e)}return t.current.fireNodeSubscriptions(o,"enqueue"),{...r,nodeToComponentSubscriptions:n.nodeToComponentSubscriptions}})})},[t])}class oe{}const ie=new oe;var ae={useRecoilCallback:function(t,e){const n=zt(),r=re();return _t((...e)=>{const o=Zt(n.current.getState().currentTree);function a(t,e){const r=Qt(n.current,t,e);$t(n.current,t,r)}function s(t){$t(n.current,t,Ut)}let u=ie;return i.unstable_batchedUpdates(()=>{u=t({set:a,reset:s,snapshot:o,gotoSnapshot:r})(...e)}),u instanceof oe&&function(t,e){if(!t)throw new Error(e)}(!1),u},null!=e?[...e,n]:void 0)},useRecoilValue:function(t){return te().getRecoilValue(t)},useRecoilValueLoadable:function(t){return te().getRecoilValueLoadable(t)},useRecoilState:function(t){const e=te(),[n]=e.getRecoilState(t);return[n,_t(e.getSetRecoilState(t),[t])]},useRecoilStateLoadable:function(t){const e=te(),[n]=e.getRecoilStateLoadable(t);return[n,_t(e.getSetRecoilState(t),[t])]},useSetRecoilState:function(t){return _t(te().getSetRecoilState(t),[t])},useResetRecoilState:function(t){return _t(te().getResetRecoilState(t),[t])},useRecoilInterface:te,useSnapshotWithStateChange_DEPRECATED:function(t){const e=zt();let n=function(){const[t,e]=Ft(0);return ee(_t(()=>e(t=>t+1),[])),{transactionMetadata:{...(n=zt().current.getState().currentTree).transactionMetadata},atomValues:new Map(n.atomValues),nonvalidatedAtoms:new Map(n.nonvalidatedAtoms),dirtyAtoms:new Set(n.dirtyAtoms),nodeDeps:new Map(n.nodeDeps),nodeToNodeSubscriptions:F(n.nodeToNodeSubscriptions,t=>new Set(t)),nodeToComponentSubscriptions:F(n.nodeToComponentSubscriptions,t=>new Map(t))};var n}();t(({key:t},r)=>{[n]=It(e.current,n,t,Bt(e.current,n,t).map(r))});const r=F(n.atomValues,t=>t.contents),o=function(t,...e){const n=new Set;t:for(const r of t){for(const t of e)if(!t.has(r))continue t;n.add(r)}return n}(n.dirtyAtoms,new Set(r.keys()));return{atomValues:r,updatedAtoms:o}},useTransactionSubscription_DEPRECATED:ee,useTransactionObservation_DEPRECATED:function(t){ee(_t(e=>{const n=e.getState().currentTree;let r=e.getState().nextTree;r||(r=e.getState().currentTree);const o=ne(r),i=ne(n),a=F(Wt,t=>{var e,n,r,o,i,a;return{persistence_UNSTABLE:{type:null!==(e=null===(n=t.options)||void 0===n||null===(r=n.persistence_UNSTABLE)||void 0===r?void 0:r.type)&&void 0!==e?e:"none",backButton:null!==(o=null===(i=t.options)||void 0===i||null===(a=i.persistence_UNSTABLE)||void 0===a?void 0:a.backButton)&&void 0!==o&&o}}}),s=new Set(r.dirtyAtoms);t({atomValues:o,previousAtomValues:i,atomInfo:a,modifiedAtoms:s,transactionMetadata:{...r.transactionMetadata}})},[t]))},useRecoilTransactionObserver:function(t){ee(_t(e=>{const n=e.getState().currentTree;let r=e.getState().nextTree;r||(r=n),t({snapshot:Zt(r),previousSnapshot:Zt(n)})},[t]))},useRecoilSnapshot:function(){const t=zt(),[e,n]=Ft(()=>Zt(t.current.getState().currentTree));return ee(_t(t=>{var e;return n(Zt(null!==(e=t.getState().nextTree)&&void 0!==e?e:t.getState().currentTree))},[])),e},useGoToSnapshot_DEPRECATED:function(){const t=zt();return e=>{i.unstable_batchedUpdates(()=>{e.updatedAtoms.forEach(n=>{$t(t.current,new Ht(n),e.atomValues.get(n))})})}},useGotoRecoilSnapshot:re,useSetUnvalidatedAtomValues:function(){const t=zt();return(e,n={})=>{i.unstable_batchedUpdates(()=>{t.current.addTransactionMetadata(n),e.forEach((e,n)=>Xt(t.current,new Ht(n),e))})}}},se=function(t){return!!t&&"function"==typeof t.then};const ue={getValue(){if("hasValue"!==this.state)throw this.contents;return this.contents},toPromise(){return"hasValue"===this.state?Promise.resolve(this.contents):"hasError"===this.state?Promise.reject(this.contents):this.contents},valueMaybe(){return"hasValue"===this.state?this.contents:void 0},valueOrThrow(){if("hasValue"!==this.state)throw new Error(`Loadable expected value, but in "${this.state}" state`);return this.contents},errorMaybe(){return"hasError"===this.state?this.contents:void 0},errorOrThrow(){if("hasError"!==this.state)throw new Error(`Loadable expected error, but in "${this.state}" state`);return this.contents},promiseMaybe(){return"loading"===this.state?this.contents:void 0},promiseOrThrow(){if("loading"!==this.state)throw new Error(`Loadable expected promise, but in "${this.state}" state`);return this.contents},map(t){if("hasError"===this.state)return this;if("hasValue"===this.state)try{const e=t(this.contents);return se(e)?fe(e):ce(e)}catch(e){return se(e)?fe(e.next(()=>t(this.contents))):le(e)}if("loading"===this.state)return fe(this.contents.then(t).catch(e=>{if(se(e))return e.then(()=>t(this.contents));throw e}));throw new Error("Invalid Loadable state")}};function ce(t){return Object.freeze({state:"hasValue",contents:t,...ue})}function le(t){return Object.freeze({state:"hasError",contents:t,...ue})}function fe(t){return Object.freeze({state:"loading",contents:t,...ue})}var pe={loadableWithValue:ce,loadableWithError:le,loadableWithPromise:fe,loadableLoading:function(){return fe(new Promise(()=>{}))},loadableAll:function(t){return t.every(t=>"hasValue"===t.state)?ce(t.map(t=>t.contents)):t.some(t=>"hasError"===t.state)?le(dt(t.find(t=>"hasError"===t.state),"Invalid loadable passed to loadableAll").contents):fe(Promise.all(t.map(t=>t.contents)))}},de=function t(e){if("object"==typeof e&&!function(t){if(null===t||"object"!=typeof t)return!0;switch(typeof t.$$typeof){case"symbol":case"number":return!0}return null!=t["@@__IMMUTABLE_ITERABLE__@@"]||null!=t["@@__IMMUTABLE_KEYED__@@"]||null!=t["@@__IMMUTABLE_INDEXED__@@"]||null!=t["@@__IMMUTABLE_ORDERED__@@"]||null!=t["@@__IMMUTABLE_RECORD__@@"]||!!function(t){var e,n;if("undefined"==typeof window)return!1;const r=null!==(n=(null!=t?null!==(e=t.ownerDocument)&&void 0!==e?e:t:document).defaultView)&&void 0!==n?n:window;return!(null==t||!("function"==typeof r.Node?t instanceof r.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}(t)||!!se(t)}(e)){Object.freeze(e);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];"object"!=typeof r||null==r||Object.isFrozen(r)||t(r)}Object.seal(e)}};const he=Symbol("ArrayKeyedMap"),ve=new Map;class me{constructor(t){if(this._base=new Map,t instanceof me)for(const[e,n]of t.entries())this.set(e,n);else if(t)for(const[e,n]of t)this.set(e,n);return this}get(t){const e=Array.isArray(t)?t:[t];let n=this._base;return e.forEach(t=>{var e;n=null!==(e=n.get(t))&&void 0!==e?e:ve}),void 0===n?void 0:n.get(he)}set(t,e){const n=Array.isArray(t)?t:[t];let r=this._base,o=r;return n.forEach(t=>{o=r.get(t),o||(o=new Map,r.set(t,o)),r=o}),o.set(he,e),this}delete(t){const e=Array.isArray(t)?t:[t];let n=this._base,r=n;return e.forEach(t=>{r=n.get(t),r||(r=new Map,n.set(t,r)),n=r}),r.delete(he),this}entries(){const t=[];return function e(n,r){n.forEach((n,o)=>{o===he?t.push([r,n]):e(n,r.concat(o))})}(this._base,[]),t.values()}toBuiltInMap(){return new Map(this.entries())}}var ye=me,ge=function(){return new ye},be=function(t,e,n){const r=t.entries();let o=r.next();for(;!o.done;){const i=o.value;if(!e.call(n,i[1],i[0],t))return!1;o=r.next()}return!0};Object.freeze(new Set);const{mapBySettingInMap:we,mapByUpdatingInMap:Oe,setByAddingToSet:xe,setByDeletingFromSet:Ee}=S,{detectCircularDependencies:Se,getNodeLoadable:je,setNodeValue:Ce}=V,{loadableWithError:Pe,loadableWithPromise:ke,loadableWithValue:Te}=pe,{DEFAULT_VALUE:Ae,RecoilValueNotReady:Re,registerNode:Le}=x,{startPerfBlock:Me}={startPerfBlock:function(t){return()=>null}},{isRecoilValue:_e}=m,De=Object.freeze(new Set);function Ne(t){const e=[];for(const n of Array.from(t.keys()).sort()){const r=dt(t.get(n));e.push(n),e.push(r.contents)}return e}var Ve=function(t){const{key:e,get:n,cacheImplementation_UNSTABLE:r}=t,o=null!=t.set?t.set:void 0;let i=null!=r?r:ge();function a(r,o){var s;let u=o;const c=null!==(s=o.nodeDeps.get(e))&&void 0!==s?s:De,l=Ne(new Map(Array.from(c).sort().map(t=>{const[e,n]=je(r,u,t);return u=e,[t,n]}))),f=i.get(l);if(null!=f)return[u,f];const[p,d,h]=function(t,r){var o;const[i,s,u]=function(t,r){const o=Me(e);let i=r;const s=new Map;function u({key:e}){let n;if([i,n]=je(t,i,e),s.set(e,n),"hasValue"===n.state)return n.contents;throw n.contents}try{const t=n({get:u}),e=_e(t)?u(t):t,r=se(e)?ke(e.finally(o)):(o(),Te(e));return[i,r,s]}catch(e){const n=se(e)?ke(e.then(()=>{let e=Pe(new Error("Internal Recoil Selector Error"));if(t.replaceState(n=>{let r;return[r,e]=a(t,n),r}),"hasError"===e.state)throw e.contents;return e.contents}).finally(o)):(o(),Pe(e));return[i,n,s]}}(t,r);let c=i;const l=null!==(o=r.nodeDeps.get(e))&&void 0!==o?o:De,f=new Set(u.keys());var p,d;d=f,c=(p=l).size===d.size&&be(p,t=>d.has(t))?c:{...c,nodeDeps:we(c.nodeDeps,e,f)};const h=Mt(f,l),v=Mt(l,f);for(const t of h)c={...c,nodeToNodeSubscriptions:Oe(c.nodeToNodeSubscriptions,t,t=>xe(null!=t?t:De,e))};for(const t of v)c={...c,nodeToNodeSubscriptions:Oe(c.nodeToNodeSubscriptions,t,t=>Ee(null!=t?t:De,e))};return[c,s,u]}(r,u);u=p;const v=Ne(h);return function(n,r,o){"loading"!==o.state?1==!t.dangerouslyAllowMutability&&de(o.contents):o.contents.then(o=>(1==!t.dangerouslyAllowMutability&&de(o),i=i.set(r,Te(o)),n.fireNodeSubscriptions(new Set([e]),"now"),o)).catch(o=>(se(o)||(1==!t.dangerouslyAllowMutability&&de(o),i=i.set(r,Pe(o)),n.fireNodeSubscriptions(new Set([e]),"now")),o)),i=i.set(r,o)}(r,v,d),[u,d]}function s(t,e){return a(t,e)}return Le(null!=o?{key:e,options:t,get:s,set:function(t,e,n){let r=e;const i=new Set;function a({key:e}){const[n,o]=je(t,r,e);if(r=n,"hasValue"===o.state)return o.contents;throw"loading"===o.state?new Re(e):o.contents}function s(e,n){const o="function"==typeof n?n(a(e)):n;let s;[r,s]=Ce(t,r,e.key,o),s.forEach(t=>i.add(t))}return o({set:s,get:a,reset:function(t){s(t,Ae)}},n),[r,i]}}:{key:e,options:t,get:s})};const{loadableWithValue:Fe}=pe,{DEFAULT_VALUE:Be,DefaultValue:Ie,registerNode:Ue}=x,{isRecoilValue:qe}=m,{mapByDeletingFromMap:We,mapBySettingInMap:ze,setByAddingToSet:He}=S;var Ge=function t(e){const{default:n,...r}=e;return qe(n)||se(n)?function(e){const n=t({...e,default:Be,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:{...e.persistence_UNSTABLE,validator:t=>t instanceof Ie?t:dt(e.persistence_UNSTABLE).validator(t,Be)}});return Ve({key:e.key+"__withFallback",get:({get:t})=>{const r=t(n);return r instanceof Ie?e.default:r},set:({set:t},e)=>t(n,e),dangerouslyAllowMutability:e.dangerouslyAllowMutability})}({...r,default:n}):function(t){const{key:e,persistence_UNSTABLE:n}=t;return Ue({key:e,options:t,get:(r,o)=>{if(o.atomValues.has(e))return[o,dt(o.atomValues.get(e))];if(o.nonvalidatedAtoms.has(e)){if(null==n)return[o,Fe(t.default)];const r=o.nonvalidatedAtoms.get(e),i=n.validator(r,Be);return i instanceof Ie?[{...o,nonvalidatedAtoms:We(o.nonvalidatedAtoms,e)},Fe(t.default)]:[{...o,atomValues:ze(o.atomValues,e,Fe(i)),nonvalidatedAtoms:We(o.nonvalidatedAtoms,e)},Fe(i)]}return[o,Fe(t.default)]},set:(n,r,o)=>(!0!==t.dangerouslyAllowMutability&&de(o),[{...r,dirtyAtoms:He(r.dirtyAtoms,e),atomValues:o instanceof Ie?We(r.atomValues,e):ze(r.atomValues,e,Fe(o)),nonvalidatedAtoms:We(r.nonvalidatedAtoms,e)},new Set([e])])})}({...r,default:n})},$e=function(t,e={allowFunctions:!1}){return function t(e,n,r){if("string"==typeof e&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(!0!==(null==n?void 0:n.allowFunctions))throw new Error("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}return null===e?"null":"object"!=typeof e?null!==(o=JSON.stringify(e))&&void 0!==o?o:"":se(e)?"__PROMISE__":Array.isArray(e)?`[${e.map((e,r)=>t(e,n,r.toString()))}]`:"function"==typeof e.toJSON?t(e.toJSON(r),n,r):e instanceof Map?t(Array.from(e).reduce((e,[r,o])=>({...e,["string"==typeof r?r:t(r,n)]:o}),{}),n,r):e instanceof Set?t(Array.from(e).sort((e,r)=>t(e,n).localeCompare(t(r,n))),n,r):null!=e[Symbol.iterator]&&"function"==typeof e[Symbol.iterator]?t(Array.from(e),n,r):`{${Object.keys(e).filter(t=>void 0!==e[t]).sort().map(r=>`${t(r,n)}:${t(e[r],n,r)}`).join(",")}}`;var o}(t,e)},Xe=function(){const t=new Map,e={get:e=>t.get($e(e)),set:(n,r)=>(t.set($e(n),r),e),map:t};return e};let Ye=0;var Qe=function(t){var e,n;let r=null!==(e=null===(n=t.cacheImplementationForParams_UNSTABLE)||void 0===n?void 0:n.call(t))&&void 0!==e?e:Xe();return e=>{var n,o;const i=r.get(e);if(null!=i)return i;const a=`${t.key}__selectorFamily/${null!==(n=$e(e,{allowFunctions:!0}))&&void 0!==n?n:"void"}/${Ye++}`,s=n=>t.get(e)(n),u=null===(o=t.cacheImplementation_UNSTABLE)||void 0===o?void 0:o.call(t);let c;if(null!=t.set){const n=t.set;c=Ve({key:a,get:s,set:(t,r)=>n(e)(t,r),cacheImplementation_UNSTABLE:u,dangerouslyAllowMutability:t.dangerouslyAllowMutability})}else c=Ve({key:a,get:s,cacheImplementation_UNSTABLE:u,dangerouslyAllowMutability:t.dangerouslyAllowMutability});return r=r.set(e,c),c}},Ke=v(Object.freeze({__proto__:null}));const{DEFAULT_VALUE:Ze,DefaultValue:Je}=x;function tn(t,e){return be(e,e=>t.has(e))}const en=(t,e)=>Array.from(e).reduce((e,n)=>({...e,[n]:t[n]}),{});function nn(t){if(null==t)return;const{...e}=t;return{...e,validator:t=>t instanceof Ke?new Ke(t.value.filter(([t,e])=>t instanceof Set&&e instanceof Map).map(([t,n])=>[t,Array.from(n.entries()).reduce((t,[n,r])=>{const o=e.validator(r,Ze);return o instanceof Je||t.set(n,o),t},new Map)])):e.validator(t,Ze)}}const rn=Qe({key:"__constant",get:t=>()=>t,cacheImplementationForParams_UNSTABLE:ge});const on=Qe({key:"__error",get:t=>()=>{throw new Error(t)},cacheImplementationForParams_UNSTABLE:ge});const{loadableWithError:an,loadableWithPromise:sn,loadableWithValue:un}=pe;function cn(t,e){const n=Array(e.length).fill(void 0),r=Array(e.length).fill(void 0);for(const[o,i]of e.entries())try{n[o]=t(i)}catch(t){r[o]=t}return[n,r]}function ln(t){return null!=t&&!se(t)}function fn(t){return Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(e=>t[e])}function pn(t,e){return Array.isArray(t)?e:Object.getOwnPropertyNames(t).reduce((t,n,r)=>({...t,[n]:e[r]}),{})}function dn(t,e,n){return pn(t,n.map((t,n)=>null==t?un(e[n]):se(t)?sn(t):an(t)))}var hn={waitForNone:Qe({key:"__waitForNone",get:t=>({get:e})=>{const n=fn(t),[r,o]=cn(e,n);return dn(t,r,o)}}),waitForAny:Qe({key:"__waitForAny",get:t=>({get:e})=>{const n=fn(t),[r,o]=cn(e,n);if(o.some(t=>null==t))return dn(t,r,o);if(o.every(ln))throw o.find(ln);throw new Promise((e,n)=>{for(const[i,a]of o.entries())se(a)&&a.then(n=>{r[i]=n,o[i]=null,e(dn(t,r,o))}).catch(t=>{o[i]=t,o.every(ln)&&n(o[0])})})}}),waitForAll:Qe({key:"__waitForAll",get:t=>({get:e})=>{const n=fn(t),[r,o]=cn(e,n);if(o.every(t=>null==t))return pn(t,r);const i=o.find(ln);if(null!=i)throw i;throw Promise.all(o).then(e=>pn(t,e))}}),noWait:Qe({key:"__noWait",get:t=>({get:e})=>{try{return un(e(t))}catch(t){return se(t)?sn(t):an(t)}}})};const{DefaultValue:vn}=x,{RecoilRoot:mn}=Lt,{isRecoilValue:yn}=m,{useGotoRecoilSnapshot:gn,useRecoilCallback:bn,useRecoilSnapshot:wn,useRecoilState:On,useRecoilStateLoadable:xn,useRecoilTransactionObserver:En,useRecoilValue:Sn,useRecoilValueLoadable:jn,useResetRecoilState:Cn,useSetRecoilState:Pn,useSetUnvalidatedAtomValues:kn,useTransactionObservation_DEPRECATED:Tn}=ae,{noWait:An,waitForAll:Rn,waitForAny:Ln,waitForNone:Mn}=hn;var _n={DefaultValue:vn,RecoilRoot:mn,atom:Ge,selector:Ve,atomFamily:function(t){let e=Xe();const n={key:t.key,default:Ze,persistence_UNSTABLE:nn(t.persistence_UNSTABLE)};let r;r=Ge(n);const o=Qe({key:t.key+"__atomFamily/Default",get:e=>({get:n})=>{const o=n("function"==typeof r?r(e):r);if(!(o instanceof Je)){const t=function(t,e){if(!(t instanceof Ke))return t;if("object"!=typeof e||null==e||Array.isArray(e))return Ze;const n=t.value,r=new Set(Object.keys(e));for(const[t,o]of n)if(tn(r,t)){const n=r.size===t.size?e:en(e,t),i=o.get($e(n));if(void 0!==i)return i}return Ze}(o,e);if(!(t instanceof Je))return t}return"function"==typeof t.default?t.default(e):t.default},dangerouslyAllowMutability:t.dangerouslyAllowMutability});return n=>{var r;const i=e.get(n);if(null!=i)return i;const a=Ge({key:`${t.key}__${null!==(r=$e(n))&&void 0!==r?r:"void"}`,default:o(n),persistence_UNSTABLE:t.persistence_UNSTABLE,dangerouslyAllowMutability:t.dangerouslyAllowMutability});return e=e.set(n,a),a}},selectorFamily:Qe,constSelector:function(t){return rn(t)},errorSelector:function(t){return on(t)},readOnlySelector:function(t){return t},useRecoilValue:Sn,useRecoilValueLoadable:jn,useRecoilState:On,useRecoilStateLoadable:xn,useSetRecoilState:Pn,useResetRecoilState:Cn,useRecoilCallback:bn,useGotoRecoilSnapshot:gn,useRecoilSnapshot:wn,useRecoilTransactionObserver_UNSTABLE:En,useTransactionObservation_UNSTABLE:Tn,useSetUnvalidatedAtomValues_UNSTABLE:kn,noWait:An,waitForNone:Mn,waitForAny:Ln,waitForAll:Rn,isRecoilValue:yn},Dn=_n.DefaultValue,Nn=_n.RecoilRoot,Vn=_n.atom,Fn=_n.selector,Bn=_n.atomFamily,In=_n.selectorFamily,Un=_n.constSelector,qn=_n.errorSelector,Wn=_n.readOnlySelector,zn=_n.useRecoilValue,Hn=_n.useRecoilValueLoadable,Gn=_n.useRecoilState,$n=_n.useRecoilStateLoadable,Xn=_n.useSetRecoilState,Yn=_n.useResetRecoilState,Qn=_n.useRecoilCallback,Kn=_n.useGotoRecoilSnapshot,Zn=_n.useRecoilSnapshot,Jn=_n.useRecoilTransactionObserver_UNSTABLE,tr=_n.useTransactionObservation_UNSTABLE,er=_n.useSetUnvalidatedAtomValues_UNSTABLE,nr=_n.noWait,rr=_n.waitForNone,or=_n.waitForAny,ir=_n.waitForAll,ar=_n.isRecoilValue;e.DefaultValue=Dn,e.RecoilRoot=Nn,e.atom=Vn,e.atomFamily=Bn,e.constSelector=Un,e.default=_n,e.errorSelector=qn,e.isRecoilValue=ar,e.noWait=nr,e.readOnlySelector=Wn,e.selector=Fn,e.selectorFamily=In,e.useGotoRecoilSnapshot=Kn,e.useRecoilCallback=Qn,e.useRecoilSnapshot=Zn,e.useRecoilState=Gn,e.useRecoilStateLoadable=$n,e.useRecoilTransactionObserver_UNSTABLE=Jn,e.useRecoilValue=zn,e.useRecoilValueLoadable=Hn,e.useResetRecoilState=Yn,e.useSetRecoilState=Xn,e.useSetUnvalidatedAtomValues_UNSTABLE=er,e.useTransactionObservation_UNSTABLE=tr,e.waitForAll=ir,e.waitForAny=or,e.waitForNone=rr},MgzW:function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c0&&void 0!==arguments[0]?arguments[0]:"dark";"dark"===t?(C.classList.remove("light"),C.classList.add("dark")):(C.classList.remove("dark"),C.classList.add("light"))}function k(){return function(t,e){var n="light"===y(e())?"dark":"light";P(n),t("storeSwitchTheme",(function(t){t.app.theme=n})),u(e().app)}}function T(){!function(){try{localStorage.removeItem("yacd.haishan.me")}catch(t){}}();try{window.location.reload()}catch(t){}}function A(t){return function(e,n){e("appSelectChartStyleIndex",(function(e){e.app.selectedChartStyleIndex=t})),u(n().app)}}function R(t,e){return function(n,r){n("appUpdateAppConfig",(function(n){n.app[t]=e})),u(r().app)}}function L(t,e,n){return function(r,o){r("updateCollapsibleIsOpen",(function(r){r.app.collapsibleIsOpen[`${t}:${e}`]=n})),S(o().app)}}var M={clashAPIConfig:{hostname:"127.0.0.1",port:"7892",secret:""},latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!1};function _(){var t=function(){try{var t=localStorage.getItem("yacd.haishan.me");if(!t)return;return JSON.parse(t)}catch(t){return}}();t=p(p({},M),t);var e=function(){var t=window.location.search,e={};if("string"!=typeof t||""===t)return e;for(var n=t.replace(/^\?/,"").split("&"),r=0;r0&&0===(g-=1)&&f.show(e),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(c.returnFocus(),c.teardownScopedFocus()):c.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(c.setupScopedFocus(n.node),c.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var t=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:t},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(t){9===t.keyCode&&(0,l.default)(n.content,t),n.props.shouldCloseOnEsc&&27===t.keyCode&&(t.stopPropagation(),n.requestClose(t))},n.handleOverlayOnClick=function(t){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(t):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(t){n.props.shouldCloseOnOverlayClick||t.target!=n.overlay||t.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(t){return n.ownerHandlesClose()&&n.props.onRequestClose(t)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(t,e){var r="object"===(void 0===e?"undefined":o(e))?e:{base:y[t],afterOpen:y[t]+"--after-open",beforeClose:y[t]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"==typeof e&&e?i+" "+e:i},n.attributesFromObject=function(t,e){return Object.keys(e).reduce((function(n,r){return n[t+"-"+r]=e[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(t,e){this.props.isOpen&&!t.isOpen?this.open():!this.props.isOpen&&t.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!e.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var t=this.props,e=t.appElement,n=t.ariaHideApp,r=t.htmlOpenClassName,o=t.bodyOpenClassName;o&&p.add(document.body,o),r&&p.add(document.getElementsByTagName("html")[0],r),n&&(g+=1,f.hide(e)),h.default.register(this)}},{key:"render",value:function(){var t=this.props,e=t.id,n=t.className,o=t.overlayClassName,i=t.defaultStyles,a=n?{}:i.content,u=o?{}:i.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},u,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",r({id:e,ref:this.setContentRef,style:r({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),e}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:u.default.bool.isRequired,defaultStyles:u.default.shape({content:u.default.object,overlay:u.default.object}),style:u.default.shape({content:u.default.object,overlay:u.default.object}),className:u.default.oneOfType([u.default.string,u.default.object]),overlayClassName:u.default.oneOfType([u.default.string,u.default.object]),bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,ariaHideApp:u.default.bool,appElement:u.default.instanceOf(d.default),onAfterOpen:u.default.func,onAfterClose:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,role:u.default.string,contentLabel:u.default.string,aria:u.default.object,data:u.default.object,children:u.default.node,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,testId:u.default.string},e.default=b,t.exports=e.default},"Qv+K":function(t,e,n){"use strict";n.d(e,"a",(function(){return B})),n.d(e,"b",(function(){return rt})),n.d(e,"c",(function(){return at}));var r,o=n("q1tI");function i(){return(i=Object.assign||function(t){for(var e=1;e0&&r<1/0&&(this.refetchIntervalId=setInterval((function(){e.query.instances.some((function(t){return t.config.enabled}))&&(v()||e.query.instances.some((function(t){return t.config.refetchIntervalInBackground})))&&e.query.fetch()}),r))}},e.run=function(){try{var t=this;return function(t){if(t&&t.then)return t.then(O)}(function(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}((function(){return function(t){var e=t();if(e&&e.then)return e.then(O)}((function(){if(t.query.instances.some((function(t){return t.config.enabled}))&&(!t.config.suspense||!t.query.state.isFetched)&&t.query.state.isStale&&(t.config.refetchOnMount||1===t.query.instances.length))return function(t,e){if(!e)return t&&t.then?t.then(O):Promise.resolve()}(t.query.fetch())}))}),(function(t){f.error(t)})))}catch(t){return Promise.reject(t)}},e.unsubscribe=function(t){var e=this;this.query.instances=this.query.instances.filter((function(t){return t.id!==e.id})),this.query.instances.length||(this.clearInterval(),this.query.cancel(),t||c||this.query.scheduleGarbageCollection())},e.onStateUpdate=function(t,e){var n,r,o,i,a,s,u,c,l;e.type===k.Success&&t.isSuccess&&(null==(r=(o=this.config).onSuccess)||r.call(o,t.data),null==(i=(a=this.config).onSettled)||i.call(a,t.data,null));e.type===k.Error&&t.isError&&(null==(s=(u=this.config).onError)||s.call(u,t.error),null==(c=(l=this.config).onSettled)||c.call(l,void 0,t.error));null==(n=this.stateUpdateListener)||n.call(this,t)},t}();function E(){}function S(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}function j(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function C(t){return function(){for(var e=[],n=0;n-1&&(c+=o?-1:1);if(void 0===(r=n[c]))return e.preventDefault(),void(r=o?s:a).focus();e.preventDefault(),r.focus()};var r,o=n("ZDLa"),i=(r=o)&&r.__esModule?r:{default:r};t.exports=e.default},SzcZ:function(t,e,n){t.exports={root:"_2uN43zExEi",floatAbove:"_2gQ0j5OHC8"}},Tk1H:function(t,e,n){t.exports={root:"_113JVByWGF",yacd:"_1m2ZsnzFvt",link:"_3TKFOM4Tgj"}},UIKY:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.register=function(t){-1===e.openInstances.indexOf(t)&&(e.openInstances.push(t),e.emit("register"))},this.deregister=function(t){var n=e.openInstances.indexOf(t);-1!==n&&(e.openInstances.splice(n,1),e.emit("deregister"))},this.subscribe=function(t){e.subscribers.push(t)},this.emit=function(t){e.subscribers.forEach((function(n){return n(t,e.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};e.default=r,t.exports=e.default},Utih:function(t,e,n){"use strict";n("yXV3"),n("2B1R");var r=n("17x9"),o=n.n(r),i=n("q1tI"),a=n.n(i),s=n("YKzy"),u=n.n(s);function c(t){var e=t.options,n=t.value,r=t.name,o=t.onChange,s=Object(i.useMemo)((function(){return e.map((function(t){return t.value})).indexOf(n)}),[e,n]),c=Object(i.useCallback)((function(t){var n=Math.floor(100/e.length);return t===e.length-1?100-e.length*n+n:t>-1?n:void 0}),[e]),l=Object(i.useMemo)((function(){return{width:c(s)+"%",left:s*c(0)+"%"}}),[s,c]);return a.a.createElement("div",{className:u.a.ToggleSwitch},a.a.createElement("div",{className:u.a.slider,style:l}),e.map((function(t,e){var i=`${r}-${t.label}`,s=0===e?"":"border-left";return a.a.createElement("label",{htmlFor:i,key:i,className:s,style:{width:c(e)+"%"}},a.a.createElement("input",{id:i,name:r,type:"radio",value:t.value,checked:n===t.value,onChange:o}),a.a.createElement("div",null,t.label))})))}c.propTypes={options:o.a.array,value:o.a.string,name:o.a.string,onChange:o.a.func},e.a=a.a.memo(c)},V4mC:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("q1tI"),o=n("QCnb"),i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function a(t,e){var n=i.current;if(null===n)throw Error("react-cache: read and preload may only be called from within a component's render. They are not supported in event handlers or lifecycle methods.");return n.readContext(t,e)}function s(t){return t}var u=function(t){function e(){!1===s&&a>r&&(s=!0,o.unstable_scheduleCallback(n))}function n(){s=!1;var t=r;if(null!==i)for(var e=i.previous;a>t&&null!==e;){var n=e.onDelete,o=e.previous;e.onDelete=null,e.previous=e.next=null,e===i?i=e=null:(i.previous=o,o.next=i,e=o),--a,n()}}var r=500,i=null,a=0,s=!1;return{add:function(t,e){return t={value:t,onDelete:e,next:null,previous:null},null===i?t.previous=t.next=t:((e=i.previous).next=t,t.previous=e,i.previous=t,t.next=i),i=t,a+=1,t},update:function(t,e){t.value=e},access:function(t){var n=t.next;if(null!==n){var r=i;if(i!==t){var o=t.previous;o.next=n,n.previous=o,(n=r.previous).next=t,t.previous=n,r.previous=t,t.next=r,i=t}}return e(),t.value},setLimit:function(t){r=t,e()}}}(),c=new Map,l=r.createContext(null);function f(t,e,n,r){var o=c.get(t);void 0===o&&(o=new Map,c.set(t,o));var i=o.get(r);if(void 0===i){(e=e(n)).then((function(t){if(0===a.status){var e=a;e.status=1,e.value=t}}),(function(t){if(0===a.status){var e=a;e.status=2,e.value=t}}));var a={status:0,value:e};return t=u.add(a,p.bind(null,t,r)),o.set(r,t),a}return u.access(i)}function p(t,e){var n=c.get(t);void 0!==n&&(n.delete(e),0===n.size&&c.delete(t))}e.unstable_createResource=function(t,e){var n=void 0!==e?e:s,r={read:function(e){a(l);var o=n(e);switch((e=f(r,t,e,o)).status){case 0:throw e.value;case 1:return e.value;case 2:throw e.value}},preload:function(e){a(l);var o=n(e);f(r,t,e,o)}};return r},e.unstable_setGlobalCacheLimit=function(t){u.setLimit(t)}},VCL8:function(t,e,n){"use strict";function r(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function o(t){this.setState(function(e){var n=this.constructor.getDerivedStateFromProps(t,e);return null!=n?n:null}.bind(this))}function i(t,e){try{var n=this.props,r=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var n=null,a=null,s=null;if("function"==typeof e.componentWillMount?n="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?s="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var u=t.displayName||t.name,c="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=r,e.componentWillReceiveProps=o),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=i;var l=e.componentDidUpdate;e.componentDidUpdate=function(t,e,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,t,e,r)}}return t}n.r(e),n.d(e,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},VKEO:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleBlur=c,e.handleFocus=l,e.markForFocusLater=function(){a.push(document.activeElement)},e.returnFocus=function(){var t=null;try{return void(0!==a.length&&(t=a.pop()).focus())}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},e.popWithoutFocus=function(){a.length>0&&a.pop()},e.setupScopedFocus=function(t){s=t,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",l,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",l))},e.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",l)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",l))};var r,o=n("ZDLa"),i=(r=o)&&r.__esModule?r:{default:r};var a=[],s=null,u=!1;function c(){u=!0}function l(){if(u){if(u=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,i.default)(s)[0]||s).focus()}),0)}}},VVUS:function(t,e,n){"use strict";var r=n("iuhU"),o=n("17x9"),i=n.n(o),a=n("q1tI"),s=n.n(a),u=n("uG2Q"),c=n.n(u);function l(t){var e=t.width,n=void 0===e?320:e,o=t.height,i=void 0===o?320:o,a=t.animate,u=void 0!==a&&a,l=t.c0,f=void 0===l?"currentColor":l,p=t.c1,d=void 0===p?"#eee":p,h=Object(r.a)({[c.a.path]:u});return s.a.createElement("svg",{width:n,height:i,viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{d:"M71.689 53.055c9.23-1.487 25.684 27.263 41.411 56.663 18.572-8.017 71.708-7.717 93.775 0 4.714-15.612 31.96-57.405 41.626-56.663 3.992.088 13.07 31.705 23.309 94.96 2.743 16.949 7.537 47.492 14.38 91.63-42.339 17.834-84.37 26.751-126.095 26.751-41.724 0-83.756-8.917-126.095-26.751C52.973 116.244 65.536 54.047 71.689 53.055z",stroke:d,strokeWidth:"4",strokeLinecap:"round",fill:f,className:h}),s.a.createElement("circle",{fill:d,cx:"216.5",cy:"181.5",r:"14.5"}),s.a.createElement("circle",{fill:d,cx:"104.5",cy:"181.5",r:"14.5"}),s.a.createElement("g",{stroke:d,strokeLinecap:"round",strokeWidth:"4"},s.a.createElement("path",{d:"M175.568 218.694c-2.494 1.582-5.534 2.207-8.563 1.508-3.029-.7-5.487-2.594-7.035-5.11M143.981 218.694c2.494 1.582 5.534 2.207 8.563 1.508 3.03-.7 5.488-2.594 7.036-5.11"}))))}l.propTypes={width:i.a.number,height:i.a.number},e.a=l},WbBG:function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},WfPo:function(t,e,n){"use strict";n.d(e,"c",(function(){return gt})),n.d(e,"b",(function(){return bt})),n.d(e,"a",(function(){return wt}));n("pNMO"),n("TeQF"),n("QWBl"),n("27RR"),n("FZtP");var r=n("rePB"),o=n("ODXe");function i(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:h(t)?2:v(t)?3:0}function l(t,e){return 2===c(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){return 2===c(t)?t.get(e):t[e]}function p(t,e,n){var r=c(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function d(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function h(t){return q&&t instanceof Map}function v(t){return W&&t instanceof Set}function m(t){return t.o||t.t}function y(t){if(Array.isArray(t))return t.slice();var e=Y(t);delete e[$];for(var n=X(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=b),Object.freeze(t),e&&u(t,(function(t,e){return g(e,!0)}),!0))}function b(){i(2)}function w(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function O(t){var e=Q[t];return e||i(19,t),e}function x(){return I}function E(t,e){e&&(O("Patches"),t.u=[],t.s=[],t.v=e)}function S(t){j(t),t.p.forEach(P),t.p=null}function j(t){t===I&&(I=t.l)}function C(t){return I={p:[],l:I,h:t,m:!0,_:0}}function P(t){var e=t[$];0===e.i||1===e.i?e.j():e.g=!0}function k(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.O||O("ES5").S(e,t,r),r?(n[$].P&&(S(e),i(4)),s(t)&&(t=T(e,t),e.l||R(e,t)),e.u&&O("Patches").M(n[$],t,e.u,e.s)):t=T(e,n,[]),S(e),e.u&&e.v(e.u,e.s),t!==H?t:void 0}function T(t,e,n){if(w(e))return e;var r=e[$];if(!r)return u(e,(function(o,i){return A(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return R(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=y(r.k):r.o;u(3===r.i?new Set(o):o,(function(e,i){return A(t,r,o,e,i,n)})),R(t,o,!1),n&&t.u&&O("Patches").R(r,n,t.u,t.s)}return r.o}function A(t,e,n,r,o,i){if(a(o)){var u=T(t,o,i&&e&&3!==e.i&&!l(e.D,r)?i.concat(r):void 0);if(p(n,r,u),!a(u))return;t.m=!1}if(s(o)&&!w(o)){if(!t.h.N&&t._<1)return;T(t,o),e&&e.A.l||R(t,o)}}function R(t,e,n){void 0===n&&(n=!1),t.h.N&&t.m&&g(e,n)}function L(t,e){var n=t[$];return(n?m(n):t)[e]}function M(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function _(t){t.P||(t.P=!0,t.l&&_(t.l))}function D(t){t.o||(t.o=y(t.t))}function N(t,e,n){var r=h(e)?O("MapSet").T(e,n):v(e)?O("MapSet").F(e,n):t.O?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:x(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=r,i=K;n&&(o=[r],i=Z);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(e,n):O("ES5").J(e,n);return(n?n.A:x()).p.push(r),r}function V(t){return a(t)||i(22,t),function t(e){if(!s(e))return e;var n,r=e[$],o=c(e);if(r){if(!r.P&&(r.i<4||!O("ES5").K(r)))return r.t;r.I=!0,n=F(e,o),r.I=!1}else n=F(e,o);return u(n,(function(e,o){r&&f(r.t,e)===o||p(n,e,t(o))})),3===o?new Set(n):n}(t)}function F(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return y(t)}var B,I,U="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),q="undefined"!=typeof Map,W="undefined"!=typeof Set,z="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=U?Symbol.for("immer-nothing"):((B={})["immer-nothing"]=!0,B),G=U?Symbol.for("immer-draftable"):"__$immer_draftable",$=U?Symbol.for("immer-state"):"__$immer_state",X=("undefined"!=typeof Symbol&&Symbol.iterator,"undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames),Y=Object.getOwnPropertyDescriptors||function(t){var e={};return X(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},Q={},K={get:function(t,e){if(e===$)return t;var n=m(t);if(!l(n,e))return function(t,e,n){var r,o=M(e,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!s(r)?r:r===L(t.t,e)?(D(t),t.o[e]=N(t.A.h,r,t)):r},has:function(t,e){return e in m(t)},ownKeys:function(t){return Reflect.ownKeys(m(t))},set:function(t,e,n){var r=M(m(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(t.D[e]=!0,!t.P){if(d(n,L(m(t),e))&&(void 0!==n||l(t.t,e)))return!0;D(t),_(t)}return t.o[e]=n,!0},deleteProperty:function(t,e){return void 0!==L(t.t,e)||e in t.t?(t.D[e]=!1,D(t),_(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=m(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){i(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){i(12)}},Z={};u(K,(function(t,e){Z[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Z.deleteProperty=function(t,e){return K.deleteProperty.call(this,t[0],e)},Z.set=function(t,e,n){return K.set.call(this,t[0],e,n,t[0])};var J=new(function(){function t(t){this.O=z,this.N=!1,"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var e=t.prototype;return e.produce=function(t,e,n){if("function"==typeof t&&"function"!=typeof e){var r=e;e=t;var o=this;return function(t){var n=this;void 0===t&&(t=r);for(var i=arguments.length,a=Array(i>1?i-1:0),s=1;s1?n-1:0),i=1;i=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}var o=O("Patches").$;return a(t)?o(t,e):this.produce(t,(function(t){return o(t,e.slice(n+1))}))},t}()),tt=J.produce,et=(J.produceWithPatches.bind(J),J.setAutoFreeze.bind(J)),nt=(J.setUseProxies.bind(J),J.applyPatches.bind(J),J.createDraft.bind(J),J.finishDraft.bind(J),tt),rt=n("q1tI"),ot=n.n(rt);function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function at(t){for(var e=1;e0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}))},XN28:function(t,e,n){t.exports={root:"_24ddJm1Q5s",h1:"B4QNkMu-0t"}},YKzy:function(t,e,n){t.exports={ToggleSwitch:"_2IgDTE__bQ",slider:"_2IfOm9qQ_4"}},Ye7m:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertNodeList=u,e.setElement=function(t){var e=t;if("string"==typeof e&&a.canUseDOM){var n=document.querySelectorAll(e);u(n,e),e="length"in n?n[0]:n}return s=e||s},e.validateElement=c,e.hide=function(t){c(t)&&(t||s).setAttribute("aria-hidden","true")},e.show=function(t){c(t)&&(t||s).removeAttribute("aria-hidden")},e.documentNotReadyOrSSRTesting=function(){s=null},e.resetForTesting=function(){s=null};var r,o=n("2W6z"),i=(r=o)&&r.__esModule?r:{default:r},a=n("2zs7");var s=null;function u(t,e){if(!t||!t.length)throw new Error("react-modal: No elements were found for selector "+e+".")}function c(t){return!(!t&&!s)||((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},Z9Yo:function(t,e,n){t.exports={overlay:"_2ueF0jmjym",content:"UZ5fqyDCOb"}},ZDLa:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return[].slice.call(t.querySelectorAll("*"),0).filter(a)};var r=/input|select|textarea|button|object/;function o(t){var e=t.offsetWidth<=0&&t.offsetHeight<=0;if(e&&!t.innerHTML)return!0;var n=window.getComputedStyle(t);return e?"visible"!==n.getPropertyValue("overflow")||t.scrollWidth<=0&&t.scrollHeight<=0:"none"==n.getPropertyValue("display")}function i(t,e){var n=t.nodeName.toLowerCase();return(r.test(n)&&!t.disabled||"a"===n&&t.href||e)&&function(t){for(var e=t;e&&e!==document.body;){if(o(e))return!1;e=e.parentNode}return!0}(t)}function a(t){var e=t.getAttribute("tabindex");null===e&&(e=void 0);var n=isNaN(e);return(n||e>=0)&&i(t,!n)}t.exports=e.default},ZMKu:function(t,e,n){"use strict";n.d(e,"a",(function(){return Wi}));var r={};n.r(r),n.d(r,"reversed",(function(){return Z})),n.d(r,"mirrored",(function(){return J})),n.d(r,"createReversedEasing",(function(){return tt})),n.d(r,"createMirroredEasing",(function(){return et})),n.d(r,"createExpoIn",(function(){return nt})),n.d(r,"createBackIn",(function(){return rt})),n.d(r,"createAnticipateEasing",(function(){return ot})),n.d(r,"linear",(function(){return it})),n.d(r,"easeIn",(function(){return at})),n.d(r,"easeOut",(function(){return st})),n.d(r,"easeInOut",(function(){return ut})),n.d(r,"circIn",(function(){return ct})),n.d(r,"circOut",(function(){return lt})),n.d(r,"circInOut",(function(){return ft})),n.d(r,"backIn",(function(){return pt})),n.d(r,"backOut",(function(){return dt})),n.d(r,"backInOut",(function(){return ht})),n.d(r,"anticipate",(function(){return vt})),n.d(r,"bounceOut",(function(){return mt})),n.d(r,"bounceIn",(function(){return yt})),n.d(r,"bounceInOut",(function(){return gt})),n.d(r,"cubicBezier",(function(){return jt}));var o=n("mrSG");var i,a=0,s="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-a));a=e+n,setTimeout((function(){return t(a)}),n)};!function(t){t.Read="read",t.Update="update",t.Render="render",t.PostRender="postRender",t.FixedUpdate="fixedUpdate"}(i||(i={}));var u=1/60*1e3,c=!0,l=!1,f=!1,p={delta:0,timestamp:0},d=[i.Read,i.Update,i.Render,i.PostRender],h=function(t){return l=t},v=d.reduce((function(t,e){var n,r,o,i,a,s,u,c,f,p=(n=h,r=[],o=[],i=0,a=!1,s=0,u=new WeakSet,c=new WeakSet,f={cancel:function(t){var e=o.indexOf(t);u.add(t),-1!==e&&o.splice(e,1)},process:function(t){var e,l;if(a=!0,r=(e=[o,r])[0],(o=e[1]).length=0,i=r.length)for(s=0;s4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),$=function(t){return"string"==typeof t&&T.test(t)||B(t)||I(t)},X=function(t){return z.test(t)?z.parse(t):H.test(t)?H.parse(t):G.test(t)?G.parse(t):t},Y=function(t){return B(t)?z.transform(t):I(t)?H.transform(t):t},Q=function(t){return"number"==typeof t?0:t},K={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(P),r=t.match(k);return n&&(e+=n.length),r&&(e+=r.length),e>0},parse:function(t){var e=t,n=[],r=e.match(k);r&&(e=e.replace(k,"${c}"),n.push.apply(n,r.map(X)));var o=e.match(P);return o&&n.push.apply(n,o.map(A.parse)),n},createTransformer:function(t){var e=t,n=0,r=t.match(k),o=r?r.length:0;if(r)for(var i=0;i=.001?function(e,r){for(var o=0,i=0;o<8;++o){if(0===(i=Et(r,t,n)))return r;r-=(St(r,t,n)-e)/i}return r}(e,i):0===a?i:function(e,r,o){var i,a,s=0;do{(i=St(a=r+(o-r)/2,t,n)-e)>0?o=a:r=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,s,s+.1)};!function(){for(var e=0;e<11;++e)o[e]=St(.1*e,t,n)}();return function(o){return t===e&&n===r?o:0===o?0:1===o?1:St(i(o),e,r)}}var Ct={x:0,y:0,z:0},Pt=function(t){return"number"==typeof t},kt=function(t){return function(e,n,r){return void 0!==r?t(e,n,r):function(r){return t(e,n,r)}}},Tt=kt((function(t,e,n){return Math.min(Math.max(n,t),e)})),At=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},Rt=function(t){return At(t)&&t.hasOwnProperty("z")},Lt=function(t,e){return Math.abs(t-e)},Mt=function(t,e){if(void 0===e&&(e=Ct),Pt(t)&&Pt(e))return Lt(t,e);if(At(t)&&At(e)){var n=Lt(t.x,e.x),r=Lt(t.y,e.y),o=Rt(t)&&Rt(e)?Lt(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},_t=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Dt=function(t,e,n){return-n*t+n*e+t},Nt=function(){return(Nt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),Oe={test:function(t){return"string"==typeof t&&ee.test(t)||de(t)||he(t)},parse:function(t){return ge.test(t)?ge.parse(t):be.test(t)?be.parse(t):we.test(t)?we.parse(t):t},transform:function(t){return de(t)?ge.transform(t):he(t)?be.transform(t):t}},xe=function(t){return"number"==typeof t?0:t},Ee={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(Jt),r=t.match(te);return n&&(e+=n.length),r&&(e+=r.length),e>0},parse:function(t){var e=t,n=[],r=e.match(te);r&&(e=e.replace(te,"${c}"),n.push.apply(n,r.map(Oe.parse)));var o=e.match(Jt);return o&&n.push.apply(n,o.map(ne.parse)),n},createTransformer:function(t){var e=t,n=0,r=t.match(te),o=r?r.length:0;if(r)for(var i=0;id||o<-d;r(i?b+o:b),i||(g.update(w),n())}),!0);return{stop:function(){return g.update(w)}}}))}),{from:A.test,modifyTarget:function(t){return"function"==typeof t},velocity:A.test}),Fe=De((function(t){return void 0===t&&(t={}),Pe((function(e){var n=e.update,r=e.complete,o=t.velocity,i=void 0===o?0:o,a=t.from,s=void 0===a?0:a,u=t.to,c=void 0===u?0:u,l=t.stiffness,f=void 0===l?100:l,p=t.damping,d=void 0===p?10:p,h=t.mass,v=void 0===h?1:h,m=t.restSpeed,y=void 0===m?.01:m,b=t.restDelta,w=void 0===b?.01:b,O=i?-i/1e3:0,x=0,S=c-s,j=s,C=j,P=E.update((function(t){var e=t.delta;x+=e;var o=d/(2*Math.sqrt(f*v)),a=Math.sqrt(f/v)/1e3;if(C=j,o<1){var s=Math.exp(-o*a*x),u=a*Math.sqrt(1-o*o);j=c-s*((O+o*a*S)/u*Math.sin(u*x)+S*Math.cos(u*x))}else{s=Math.exp(-a*x);j=c-s*(S+(O+a*S)*x)}i=Qt(j-C,e);var l=Math.abs(i)<=y,p=Math.abs(c-j)<=w;l&&p?(n(j=c),g.update(P),r()):n(j)}),!0);return{stop:function(){return g.update(P)}}}))}),{from:A.test,to:A.test,stiffness:A.test,damping:A.test,mass:A.test,velocity:A.test}),Be=De((function(t){var e=t.from,n=void 0===e?0:e,r=t.velocity,i=void 0===r?0:r,a=t.min,s=t.max,u=t.power,c=void 0===u?.8:u,l=t.timeConstant,f=void 0===l?700:l,p=t.bounceStiffness,d=void 0===p?500:p,h=t.bounceDamping,v=void 0===h?10:h,m=t.restDelta,y=void 0===m?1:m,g=t.modifyTarget;return Pe((function(t){var e,r=t.update,u=t.complete,l=n,p=n,h=!1,m=function(t){return void 0!==a&&t<=a},b=function(t){return void 0!==s&&t>=s},w=function(t){return m(t)||b(t)},O=function(t){r(t),l=p,i=Qt((p=t)-l,x().delta),e&&!h&&function(t,e){return m(t)&&e<0||b(t)&&e>0}(t,i)&&S({from:t,velocity:i})},E=function(t,n){e&&e.stop(),e=t.start({update:O,complete:function(){n?n():u()}})},S=function(t){h=!0,E(Fe(Object(o.a)({},t,{to:m(t.from)?a:s,stiffness:d,damping:v,restDelta:y})))};if(w(n))S({from:n,velocity:i});else if(0!==i){var j=Ve({from:n,velocity:i,timeConstant:f,power:c,restDelta:w(n)?20:y,modifyTarget:g});E(j,(function(){w(p)?S({from:p,velocity:i}):u()}))}else u();return{stop:function(){return e&&e.stop()}}}))}),{from:A.test,velocity:A.test,min:A.test,max:A.test,damping:A.test,stiffness:A.test,modifyTarget:function(t){return"function"==typeof t}}),Ie=De((function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,a=void 0===i?it:i,s=t.reverseEase;return void 0!==s&&s&&(a=tt(a)),Pe((function(t){var e=t.update;return{seek:function(t){return e(t)}}})).pipe(a,(function(t){return Dt(n,o,t)}))}),{ease:function(t){return"function"==typeof t},from:A.test,to:A.test}),Ue=Tt(0,1),qe=function(t){return void 0===t&&(t={}),Pe((function(e){var n,r=e.update,o=e.complete,i=t.duration,a=void 0===i?300:i,s=t.ease,u=void 0===s?st:s,c=t.flip,l=void 0===c?0:c,f=t.loop,p=void 0===f?0:f,d=t.yoyo,h=void 0===d?0:d,v=t.repeatDelay,m=void 0===v?0:v,y=t.from,b=void 0===y?0:y,w=t.to,O=void 0===w?1:w,x=t.elapsed,S=void 0===x?0:x,j=t.flipCount,C=void 0===j?0:j,P=t.yoyoCount,k=void 0===P?0:P,T=t.loopCount,A=void 0===T?0:T,R=Ie({from:b,to:O,ease:u}).start(r),L=0,M=!1,_=function(t){var e;void 0===t&&(t=!1),R=Ie({from:b=(e=[O,b])[0],to:O=e[1],ease:u,reverseEase:t}).start(r)},D=function(){L=Ue(_t(0,a,S)),R.seek(L)},N=function(){M=!0,n=E.update((function(t){var e,r=t.delta;S+=r,D(),!(e=M&&S>a+m)||(!e||p||l||h)&&(S=S-a-m,p&&A=t[o]&&a[i].seek(1);for(var n=1;ne||n===o);n++);var s=_t(t[n-1],t[n],e);a[n-1].seek(We(s))}}(i,u,t)}))},He=function(t,e,n){return Pe((function(r){var o=r.update,i=e.split(" ").map((function(e){return t.addEventListener(e,o,n),e}));return{stop:function(){return i.forEach((function(e){return t.removeEventListener(e,o,n)}))}}}))},Ge=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},$e=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},Xe=[Ge()];if("undefined"!=typeof document){He(document,"touchstart touchmove",{passive:!0,capture:!0}).start((function(t){var e=t.touches;!0;var n=e.length;Xe.length=0;for(var r=0;rr?n=_t(e.min,e.max-r,t.min):r>o&&(n=_t(t.min,t.max-o,e.min)),qn(n)}function Hn(t,e,n,r){var o=e.max-e.min,i=n.max-n.min;t.origin=void 0===r?zn(e,n):r,t.originPoint=Dt(e.min,e.max,t.origin),t.scale=i/o,Wn(t.scale,1,1e-4)&&(t.scale=1),t.translate=function(t,e,n){var r=Dt(t.min,t.max,n);return Dt(e.min,e.max,n)-r}(e,n,t.origin),Wn(t.translate)&&(t.translate=0)}function Gn(t,e,n,r){Hn(t.x,e.x,n.x,r),Hn(t.y,e.y,n.y,r)}function $n(t){return[t("x"),t("y")]}var Xn=function(t){return Array.isArray(t)},Yn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Qn=function(t){return{type:"spring",stiffness:700,damping:0===t?100:35}},Kn=function(){return{ease:"linear",duration:.3}},Zn=function(t){return{type:"keyframes",duration:.8,values:t}},Jn={x:Yn,y:Yn,z:Yn,rotate:Yn,rotateX:Yn,rotateY:Yn,rotateZ:Yn,scaleX:Qn,scaleY:Qn,scale:Qn,opacity:Kn,backgroundColor:Kn,color:Kn,default:Qn},tr=function(t){var e=t.to,n=t.duration;return Pe((function(t){var r=t.update,o=t.complete;r(e),n?Qe(n).start({complete:o}):o()}))},er=function(t){return Array.isArray(t)?(t.length,jt(t[0],t[1],t[2],t[3])):"string"==typeof t?r[t]:t},nr=function(t){return Array.isArray(t)&&"number"!=typeof t[0]},rr=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ee.test(e)||e.startsWith("url(")))},or=function(t){return 1e3*t},ir={tween:qe,spring:Fe,keyframes:ze,inertia:Be,just:tr},ar={tween:function(t){if(t.ease){var e=nr(t.ease)?t.ease[0]:t.ease;t.ease=er(e)}return t},keyframes:function(t){var e=t.from,n=(t.to,t.velocity,Object(o.d)(t,["from","to","velocity"]));if(n.values&&null===n.values[0]){var r=Object(o.f)(n.values);r[0]=e,n.values=r}return n.ease&&(n.easings=nr(n.ease)?n.ease.map(er):er(n.ease)),n.ease=it,n}},sr=function(t,e,n){var r=n?n.delay:0;if(void 0===n||!function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection;var e=Object(o.d)(t,["when","delay","delayChildren","staggerChildren","staggerDirection"]);return Object.keys(e).length}(n))return Object(o.a)({delay:r},function(t,e){var n;return n=Xn(e)?Zn:Jn[t]||Jn.default,Object(o.a)({to:e},n(e))}(t,e));var i=n[t]||n.default||n;return!1===i.type?{delay:i.hasOwnProperty("delay")?i.delay:r,to:Xn(e)?e[e.length-1]:e,type:"just"}:Xn(e)?Object(o.a)(Object(o.a)({values:e,duration:.8,delay:r,ease:"linear"},i),{type:"keyframes"}):Object(o.a)({type:"tween",to:e,delay:r},i)},ur=function(t,e,n,r){var i,a=e.get(),s=rr(t,a),u=rr(t,n),c=sr(t,n,r),l=c.type,f=void 0===l?"tween":l,p=Object(o.d)(c,["type"]),d=s&&u?ir[f]:tr,h=function(t,e){return ar[t]?ar[t](e):e}(f,Object(o.a)({from:a,velocity:e.getVelocity()},p));return((i=h).hasOwnProperty("duration")||i.hasOwnProperty("repeatDelay"))&&(h.duration&&(h.duration=or(h.duration)),h.repeatDelay&&(h.repeatDelay=or(h.repeatDelay))),[d,h]};function cr(t,e,n,r){void 0===r&&(r={});var i=r.delay,a=void 0===i?0:i,s=Object(o.d)(r,["delay"]);return e.start((function(r){var i,u=ur(t,e,n,s),c=u[0],l=u[1],f=l.delay,p=Object(o.d)(l,["delay"]);void 0!==f&&(a=f);var d=function(){var t=c(p);i=t.start({update:function(t){return e.set(t)},complete:r})};return a?i=Qe(or(a)).start({complete:d}):d(),function(){i&&i.stop()}}))}function lr(t,e){return on(function(t,e){var n=t.top,r=t.left,o=t.bottom,i=t.right;void 0===e&&(e=rn);var a=e({x:r,y:n}),s=e({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}var fr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},e.style={},e.reactStyle={},e.vars={},e.transform={},e.transformOrigin={},e.transformKeys=[],e.config=e.defaultConfig,e.isLayoutProjectionEnabled=!1,e.layoutUpdateListeners=new Set,e.hasViewportBoxUpdated=!1,e.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},e.treeScale={x:1,y:1},e.delta=un(),e.deltaFinal=un(),e.stopLayoutAxisAnimation={x:function(){},y:function(){}},e.isTargetBoxLocked=!1,e.axisProgress={x:en(0),y:en(0)},e.updateLayoutDelta=function(){e.isLayoutProjectionEnabled&&e.box&&e.updateLayoutDeltas(),e.children.forEach(pr)},e}return Object(o.b)(e,t),e.prototype.removeValue=function(e){t.prototype.removeValue.call(this,e),delete this.vars[e],delete this.style[e]},e.prototype.clean=function(){this.style={},this.vars={},this.transform={}},e.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=Object(o.a)(Object(o.a)({},this.defaultConfig),t)},e.prototype.read=function(t){return this.getComputedStyle()[t]||0},e.prototype.readNativeValue=function(t){if(xn(t)){var e=mn(t);return e&&e.default||0}return this.read(t)},e.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},e.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},e.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},e.prototype.onLayoutUpdate=function(t){var e=this;return this.layoutUpdateListeners.add(t),function(){return e.layoutUpdateListeners.delete(t)}},e.prototype.layoutReady=function(t){var e=this;this.layoutUpdateListeners.forEach((function(n){n(e.box,e.prevViewportBox||e.box,t)}))},e.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return lr(this.element,t)},e.prototype.getBoundingBoxWithoutTransforms=function(){var t,e,n=this.getBoundingBox();return t=n,e=this.latest,Un(t.x,e,Fn),Un(t.y,e,Bn),n},e.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},e.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms();var t=this.axisProgress,e=t.x,n=t.y;this.isTargetBoxLocked||e.isAnimating()||n.isAnimating()||(this.targetBox=an(this.prevViewportBox))},e.prototype.measureLayout=function(){this.box=this.getBoundingBox(),this.boxCorrected=an(this.box),this.targetBox||(this.targetBox=an(this.box))},e.prototype.refreshTargetBox=function(){this.targetBox=this.getBoundingBoxWithoutTransforms()},e.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},e.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},e.prototype.resetTransform=function(){var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},e.prototype.setAxisTarget=function(t,e,n){var r=this.targetBox[t];r.min=e,r.max=n,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},e.prototype.startLayoutAxisAnimation=function(t,e){var n=this,r=this.axisProgress[t],o=this.targetBox[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(e){return n.setAxisTarget(t,e,e+a)})),cr(t,r,0,e)},e.prototype.stopLayoutAnimation=function(){var t=this;$n((function(e){return t.axisProgress[e].stop()}))},e.prototype.updateLayoutDeltas=function(){var t,e,n,r,o,i,a;n=this.boxCorrected,r=this.box,Ln(n.x,r.x),Ln(n.y,r.y),this.parent&&(o=this.treeScale,i=this.parent.treeScale,a=this.parent.delta,o.x=i.x*a.x.scale,o.y=i.y*a.y.scale),function(t,e){for(var n=e.length,r=0;r=3;if(e||n){var i=t.point,a=x().timestamp;r.history.push(Object(o.a)(Object(o.a)({},i),{timestamp:a}));var s=r.handlers,u=s.onStart,c=s.onMove;e||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},!(Lo(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=i;var a=$o(No(t),this.transformPagePoint),s=a.point,u=x().timestamp;this.history=[Object(o.a)(Object(o.a)({},s),{timestamp:u})];var c=e.onSessionStart;c&&c(t,Xo(a,this.history));var l=zo(window,"pointermove",(function(t,e){return r.handlePointerMove(t,e)})),f=zo(window,"pointerup",(function(t,e){return r.handlePointerUp(t,e)}));this.removeListeners=function(){l&&l(),f&&f()}}}return t.prototype.handlePointerMove=function(t,e){this.lastMoveEvent=t,this.lastMoveEventInfo=$o(e,this.transformPagePoint),Ro(t)&&0===t.buttons?this.handlePointerUp(t,e):E.update(this.updatePoint,!0)},t.prototype.handlePointerUp=function(t,e){this.end();var n=this.handlers.onEnd;if(n){var r=Xo($o(e,this.transformPagePoint),this.history);n&&n(t,r)}},t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),g.update(this.updatePoint),To()},t}();function $o(t,e){return e?{point:e(t.point)}:t}function Xo(t,e){var n=t.point;return{point:n,delta:Fo.subtract(n,Qo(e)),offset:Fo.subtract(n,Yo(e)),velocity:Ko(e,.1)}}function Yo(t){return t[0]}function Qo(t){return t[t.length-1]}function Ko(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=Qo(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>or(e)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Zo(t,e,n,r,o){var i=t-e*n;return r?function(t,e,n){var r=e.min,o=e.max;return void 0!==r&&to&&(t=n?Dt(o,t,n):Math.min(t,o)),t}(i,r,o):i}function Jo(t,e,n){var r={},o=t.max-t.min;return void 0!==e&&(r.min=t.min+e),void 0!==n&&(r.max=Math.max(t.min+n-o,t.min)),r}function ti(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.mine?n="y":Math.abs(t.x)>e&&(n="x");return n}(l),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t),n.updateAxis("y",t),null===(a=(i=n.props).onDrag)||void 0===a||a.call(i,t,e),ei=t}},onEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:s})},t.prototype.prepareBoundingBox=function(){var t=this.visualElement.getInstance(),e=t.style.transform;this.visualElement.resetTransform(),this.visualElement.measureLayout(),t.style.transform=e,this.visualElement.refreshTargetBox()},t.prototype.resolveDragConstraints=function(){var t,e,n,r,o,i,a=this.props.dragConstraints;this.constraints=!!a&&(Je(a)?this.resolveRefConstraints(this.visualElement.box,a):(t=this.visualElement.box,n=(e=a).top,r=e.left,o=e.bottom,i=e.right,{x:Jo(t.x,r,i),y:Jo(t.y,n,o)}))},t.prototype.resolveRefConstraints=function(t,e){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,i=e.current;this.constraintsBox=lr(i,o);var a=function(t,e){return{x:ti(t.x,e.x),y:ti(t.y,e.y)}}(t,this.constraintsBox);if(r){var s=r(function(t){var e=t.x,n=t.y;return{top:n.min,bottom:n.max,left:e.min,right:e.max}}(a));s&&(a=on(s))}return a},t.prototype.cancelDrag=function(){To(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},t.prototype.stop=function(t,e){var n;this.visualElement.unlockTargetBox(),null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,s=o.onDragEnd;if(i||a){var u=e.velocity;this.animateDragEnd(u)}null==s||s(t,e)}},t.prototype.snapToCursor=function(t){this.prepareBoundingBox(),this.cursorProgress.x=.5,this.cursorProgress.y=.5,this.updateAxis("x",t),this.updateAxis("y",t)},t.prototype.updateAxis=function(t,e){var n,r=this.props,o=r.drag,i=r.dragElastic;if(oi(t,o,this.currentDirection)){var a=this.visualElement.box[t],s=a.max-a.min,u=this.cursorProgress[t],c=Zo(Vo(e).point[t],s,u,null===(n=this.constraints)||void 0===n?void 0:n[t],i);this.visualElement.setAxisTarget(t,c,c+s)}},t.prototype.updateProps=function(t){var e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,i=void 0!==r&&r,a=t.dragPropagation,s=void 0!==a&&a,u=t.dragConstraints,c=void 0!==u&&u,l=t.dragElastic,f=void 0===l?.35:l,p=t.dragMomentum,d=void 0===p||p,h=Object(o.d)(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(o.a)({drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:c,dragElastic:f,dragMomentum:d},h)},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,r=n.drag,i=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,u=$n((function(n){if(oi(n,r,e.currentDirection)){var u=e.constraints?e.constraints[n]:{},c=a?200:1e6,l=a?40:1e7,f=Object(o.a)(Object(o.a)({type:"inertia",velocity:i?t[n]:0,bounceStiffness:c,bounceDamping:l,timeConstant:750,restDelta:1,restSpeed:10},s),u);return e.visualElement.startLayoutAxisAnimation(n,f)}}));return Promise.all(u).then((function(){var t,n;null===(n=(t=e.props).onDragTransitionEnd)||void 0===n||n.call(t)}))},t.prototype.stopMotion=function(){this.visualElement.stopLayoutAnimation()},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.drag,r=e.dragConstraints;if(Je(r)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};$n((function(e){o[e]=zn(t.visualElement.targetBox[e],t.constraintsBox[e])})),this.prepareBoundingBox(),this.resolveDragConstraints(),$n((function(e){if(oi(e,n,null)){var r=function(t,e,n){var r=t.max-t.min,o=Dt(e.min,e.max-r,n);return{min:o,max:o+r}}(t.visualElement.targetBox[e],t.constraintsBox[e],o[e]),i=r.min,a=r.max;t.visualElement.setAxisTarget(e,i,a)}}))}},t.prototype.mount=function(t){var e=this,n=zo(t.getInstance(),"pointerdown",(function(t){var n=e.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&e.start(t)})),r=Ao(window,"resize",(function(){e.scalePoint()})),o=t.onLayoutUpdate((function(){e.isDragging&&e.resolveDragConstraints()})),i=t.prevSnapshot;return(null==i?void 0:i.isDragging)&&this.start(ei,{cursorProgress:i.cursorProgress}),function(){null==n||n(),null==r||r(),null==o||o(),e.cancelDrag()}},t}();function oi(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var ii=function(t){return function(e){return t(e),null}},ai=ii((function(t){var e=t.visualElement;return function(t,e){var n=t.dragControls,r=Object(Ke.useContext)(mo).transformPagePoint,i=dr((function(){return new ri({visualElement:e})}));i.updateProps(Object(o.a)(Object(o.a)({},t),{transformPagePoint:r})),Object(Ke.useEffect)((function(){return n&&n.subscribe(i)}),[i]),Object(Ke.useEffect)((function(){return i.mount(e)}),[])}(Object(o.d)(t,["visualElement"]),e)})),si={key:"drag",shouldRender:function(t){return!!t.drag},getComponent:function(){return ai}};var ui=function(t,e){return!!e&&(t===e||ui(t,e.parentElement))},ci=["whileHover","whileTap","whileDrag"],li=function(t){return ci.indexOf(t)+1},fi=li("whileTap");var pi=li("whileHover"),di=function(t){return function(e,n){Ro(e)&&t(e,n)}};function hi(t,e){!function(t,e){var n=t.onPan,r=t.onPanStart,o=t.onPanEnd,i=t.onPanSessionStart,a=n||r||o||i,s=Object(Ke.useRef)(null),u=Object(Ke.useContext)(mo).transformPagePoint,c={onSessionStart:i,onStart:r,onMove:n,onEnd:function(t,e){s.current=null,o&&o(t,e)}};Object(Ke.useEffect)((function(){null!==s.current&&s.current.updateHandlers(c)})),Ho(e,"pointerdown",a&&function(t){s.current=new Go(t,c,{transformPagePoint:u})}),xo((function(){return s.current&&s.current.end()}))}(t,e),function(t,e){var n=t.onTap,r=t.onTapStart,o=t.onTapCancel,i=t.whileTap,a=t.controls,s=n||r||o||i,u=Object(Ke.useRef)(!1),c=Object(Ke.useRef)(null);function l(){c.current&&c.current(),c.current=null}i&&a&&a.setOverride(i,fi);var f=Object(Ke.useRef)(null);f.current=function(t,r){var s=e.current;if(l(),u.current&&s){u.current=!1,a&&i&&a.clearOverride(fi);var c=Po(!0);c&&(c(),ui(s,t.target)?n&&n(t,r):o&&o(t,r))}},Ho(e,"pointerdown",s?function(t,n){l(),c.current=zo(window,"pointerup",(function(t,e){return f.current(t,e)})),e.current&&!u.current&&(u.current=!0,r&&r(t,n),a&&i&&a.startOverride(fi))}:void 0),xo(l)}(t,e),function(t,e){var n=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd,i=t.controls;n&&i&&i.setOverride(n,pi),Ho(e,"pointerenter",di((function(t,e){r&&r(t,e),n&&i&&i.startOverride(pi)}))),Ho(e,"pointerleave",di((function(t,e){o&&o(t,e),n&&i&&i.clearOverride(pi)})))}(t,e)}var vi,mi=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],yi=ii((function(t){var e=t.visualElement;hi(Object(o.d)(t,["visualElement"]),e)})),gi={key:"gestures",shouldRender:function(t){return mi.some((function(e){return t.hasOwnProperty(e)}))},getComponent:function(){return yi}},bi=ii((function(t){var e=t.animate,n=t.controls,r=t.exit,i=Pr(),a=i[0],s=i[1],u=Object(Ke.useContext)(Cr),c=Object(Ke.useRef)(!1),l=void 0!==(null==u?void 0:u.custom)?u.custom:t.custom;Object(Ke.useEffect)((function(){a?!c.current||!e||"boolean"==typeof e||e instanceof Jr||n.start(e):(!c.current&&r&&(n.setProps(Object(o.a)(Object(o.a)({},t),{custom:l})),n.start(r).then(s)),c.current=!0),a&&(c.current=!1)}),[e,n,l,r,a,s,t])})),wi={key:"exit",shouldRender:function(t){return!!t.exit&&!oo(t)},getComponent:function(){return bi}};!function(t){t.Target="Target",t.VariantLabel="VariantLabel",t.AnimationSubscription="AnimationSubscription"}(vi||(vi={}));function Oi(t,e){void 0===e&&(e=!1);t.transition;var n=t.transitionEnd,r=Object(o.d)(t,["transition","transitionEnd"]);return e?Object(o.a)(Object(o.a)({},r),n):r}var xi,Ei,Si=function(t){var e,n=t instanceof tn?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))};var ji=((xi={})[vi.Target]=ii((function(t){return function(t,e,n,r){var i=Object(Ke.useRef)(!0),a=Object(Ke.useRef)(null);a.current||(a.current=Oi(t,!0)),Object(Ke.useEffect)((function(){var s,u,c={},l=Oi(t),f=Oi(t,!0);for(var p in l){var d=i.current&&(!n.hasValue(p)||n.getValue(p).get()!==f[p]),h=null!==f[p],v=(s=a.current[p],void 0!==(u=f[p])&&(Array.isArray(s)&&Array.isArray(u)?!function(t,e){if(null===e)return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;re?1:n(_t(t,e,r))}}var Ni=Di(0,.5,lt),Vi=Di(.5,.95,it),Fi={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},getComponent:function(){return Ri}},Bi=function(t){function e(e){var n=t.call(this,e)||this,r=e.syncLayout;return wo(r)||(n.componentDidUpdate=function(){return r.flush()}),n}return Object(o.b)(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;wo(e)&&e.register(n)},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;return wo(e)?e.syncUpdate():(n.snapshotBoundingBox(),e.add(n)),null},e.prototype.componentDidUpdate=function(){},e.prototype.render=function(){return null},e}(Ze.a.Component);function Ii(t){var e=Object(Ke.useContext)(Oo);return Ze.a.createElement(Bi,Object(o.a)({},t,{syncLayout:e}))}var Ui={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return Ii}};function qi(t){var e={defaultFeatures:t,useVisualElement:Rr,render:Nr,animationControlsConfig:{makeTargetAnimatable:Zr}};var n=new Map;return new Proxy({custom:function(t){return Eo(t,e)}},{get:function(t,r){return"custom"===r?t.custom:(n.has(r)||n.set(r,Eo(r,e)),n.get(r))}})}var Wi=qi([Ui,Ti,si,gi,wi,Fi]);function zi(t,e){return e&&t!==e.lead?{visibilityAction:vo.Hide}:e&&t.presence!==ho.Entering&&t===e.lead&&e.lead!==e.prevLead?{visibilityAction:vo.Show}:(t.presence===ho.Entering?n=null==e?void 0:e.getFollowOrigin():t.presence===ho.Exiting&&(r=null==e?void 0:e.getFollowTarget()),{originBox:n,targetBox:r});var n,r}function Hi(t,e){var n,r,o,i={},a=e&&e.lead,s=null==a?void 0:a.presence;return e&&t===a?t.presence===ho.Entering?i.originBox=e.getFollowOrigin():t.presence===ho.Exiting&&(i.targetBox=e.getFollowTarget()):e&&t===e.follow&&(i.transition=e.getLeadTransition(),s===ho.Entering?i.targetBox=e.getLeadTarget():s===ho.Exiting&&(i.originBox=e.getLeadOrigin())),(null===(n=null==e?void 0:e.follow)||void 0===n?void 0:n.isPresenceRoot)||(null==a?void 0:a.isPresenceRoot)?(e&&t!==a?e&&t===e.follow?a&&s!==ho.Entering&&s===ho.Exiting&&(i.crossfadeOpacity=null===(o=null==e?void 0:e.lead)||void 0===o?void 0:o.getValue("opacity",1)):i.visibilityAction=vo.Hide:t.presence===ho.Entering&&(i.crossfadeOpacity=null===(r=null==e?void 0:e.follow)||void 0===r?void 0:r.getValue("opacity",0)),i):i}var Gi=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var e,n=t.config.layoutOrder;if(void 0===n)this.order.push(t);else{var r=this.order.findIndex((function(t){return n<=(t.config.layoutOrder||0)}));-1===r&&(t.presence=this.hasChildren?ho.Entering:ho.Present,r=this.order.length),this.order.splice(r,0,t)}if(this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var o=this.snapshot.latestMotionValues;for(var i in o)t.hasValue(i)?null===(e=t.getValue(i))||void 0===e||e.set(o[i]):t.addValue(i,en(o[i]))}this.hasChildren=!0},t.prototype.remove=function(t){var e=this.order.findIndex((function(e){return t===e}));-1!==e&&this.order.splice(e,1)},t.prototype.updateLeadAndFollow=function(){this.prevLead=this.lead,this.prevFollow=this.follow;var t=function(t,e){for(var n=e[0],r=e[1],o=void 0,i=0,a=void 0,s=t.length,u=!1,c=s-1;c>=0;c--){var l=t[c];if(c===s-1&&(u=l.isPresent),u)o=l;else{var f=t[c-1];f&&f.isPresent&&(o=l)}if(o){i=c;break}}if(o||(o=t[0]),a=t[i-1],o)for(c=i-1;c>=0;c--)if((l=t[c]).isPresent){a=l;break}return o!==n&&!u&&a===r&&t.find((function(t){return t===n}))&&(o=n),[o,a]}(this.order,[this.lead,this.follow]),e=t[0],n=t[1];this.lead=e,this.follow=n},t.prototype.updateSnapshot=function(){if(this.lead){var t={boundingBox:this.lead.prevViewportBox,latestMotionValues:{}};this.lead.forEachValue((function(e,n){var r=e.get();xn(r)||(t.latestMotionValues[n]=r)}));var e=ni.get(this.lead);e&&e.isDragging&&(t.isDragging=!0,t.cursorProgress=e.cursorProgress),this.snapshot=t}},t.prototype.isLeadPresent=function(){var t;return this.lead&&(null===(t=this.lead)||void 0===t?void 0:t.presence)!==ho.Exiting},t.prototype.shouldStackAnimate=function(){return!0},t.prototype.getFollowOrigin=function(){var t;return this.follow?this.follow.prevViewportBox:null===(t=this.snapshot)||void 0===t?void 0:t.boundingBox},t.prototype.getFollowTarget=function(){var t;return null===(t=this.follow)||void 0===t?void 0:t.box},t.prototype.getLeadOrigin=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.prevViewportBox},t.prototype.getLeadTarget=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.box},t.prototype.getLeadTransition=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.config.transition},t}();!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=new Set,e.stacks=new Map,e.hasMounted=!1,e.updateScheduled=!1,e.renderScheduled=!1,e.syncContext=Object(o.a)(Object(o.a)({},bo()),{syncUpdate:function(t){return e.scheduleUpdate(t)},forceUpdate:function(){e.syncContext=Object(o.a)({},e.syncContext),e.scheduleUpdate(!0)},register:function(t){return e.addChild(t)},remove:function(t){return e.removeChild(t)}}),e}Object(o.b)(e,t),e.prototype.componentDidMount=function(){this.hasMounted=!0,this.updateStacks()},e.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},e.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},e.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var e=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==ho.Entering&&(t.presence=t.presence===ho.Exiting?ho.Entering:ho.Present):t.presence=ho.Exiting})),this.updateStacks();var n="crossfade"===e?Hi:zi,r={measureLayout:function(t){return t.measureLayout()},layoutReady:function(e){var r=e.layoutId;e.layoutReady(n(e,t.getStack(r)))}};this.children.forEach((function(e){return t.syncContext.add(e)})),this.syncContext.flush(r),this.stacks.forEach((function(t){return t.snapshot=void 0}))},e.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},e.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(t){return t.snapshotBoundingBox()})),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},e.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?ho.Entering:ho.Present},e.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},e.prototype.addToStack=function(t){var e=this.getStack(t.layoutId);null==e||e.add(t)},e.prototype.removeFromStack=function(t){var e=this.getStack(t.layoutId);null==e||e.remove(t)},e.prototype.getStack=function(t){if(void 0!==t)return!this.stacks.has(t)&&this.stacks.set(t,new Gi),this.stacks.get(t)},e.prototype.render=function(){return Object(Ke.createElement)(Oo.Provider,{value:this.syncContext},this.props.children)}}(Ke.Component);function $i(){return{scrollX:en(0),scrollY:en(0),scrollXProgress:en(0),scrollYProgress:en(0)}}"undefined"!=typeof window?Ke.useLayoutEffect:Ke.useEffect;$i();var Xi=en(null);if("undefined"!=typeof window)if(window.matchMedia){var Yi=window.matchMedia("(prefers-reduced-motion)"),Qi=function(){return Xi.set(Yi.matches)};Yi.addListener(Qi),Qi()}else Xi.set(!1);!function(){function t(){this.componentControls=new Set}t.prototype.subscribe=function(t){var e=this;return this.componentControls.add(t),function(){return e.componentControls.delete(t)}},t.prototype.start=function(t,e){this.componentControls.forEach((function(n){n.start(t.nativeEvent||t,e)}))}}();!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.initialState={},e}Object(o.b)(e,t),e.prototype.updateLayoutDelta=function(){},e.prototype.build=function(){},e.prototype.clean=function(){},e.prototype.getBoundingBox=function(){return{x:{min:0,max:0},y:{min:0,max:0}}},e.prototype.readNativeValue=function(t){return this.initialState[t]||0},e.prototype.render=function(){this.build()}}(nn)},a3WO:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]?arguments[4]:{};c((function(){var i=document.getElementById(e).getContext("2d"),a=new t(i,{type:"line",data:n,options:u(u({},l),o)}),s=r&&r.subscribe((function(){return a.update()}));return function(){s&&s(),a.destroy()}}),[t,e,n,r,o])}},btwz:function(t,e,n){t.exports={lo:"_2fg1R7Zu62"}},dBaT:function(t,e,n){"use strict";t.exports=n("MF5s")},ewTs:function(t,e,n){},fbhf:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpClassLists=function(){0};var r={},o={};e.add=function(t,e){return n=t.classList,i="html"==t.nodeName.toLowerCase()?r:o,void e.split(" ").forEach((function(t){!function(t,e){t[e]||(t[e]=0),t[e]+=1}(i,t),n.add(t)}));var n,i},e.remove=function(t,e){return n=t.classList,i="html"==t.nodeName.toLowerCase()?r:o,void e.split(" ").forEach((function(t){!function(t,e){t[e]&&(t[e]-=1)}(i,t),0===i[t]&&n.remove(t)}));var n,i}},gjz0:function(t,e,n){t.exports={root:"_2kr0S-YLqE"}},"hN5/":function(t,e,n){},hkBY:function(t,e,n){"use strict";var r=n("q1tI"),o=n.n(r),i=n("ohBo"),a=n.n(i),s=n("OADI"),u=n("WfPo");e.a=Object(u.a)((function(t){return{theme:Object(s.i)(t)}}))((function(t){var e=t.checked,n=void 0!==e&&e,r=t.onChange,i=t.theme,s=t.name,u="dark"===i?"#393939":"#e9e9e9";return o.a.createElement(a.a,{onChange:r,checked:n,uncheckedIcon:!1,checkedIcon:!1,offColor:u,onColor:"#047aff",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:s})}))},iuhU:function(t,e,n){"use strict";function r(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=undefined),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},mLhc:function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var c={};function l(){}function f(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(E([])));v&&v!==e&&n.call(v,o)&&(d=v);var m=p.prototype=l.prototype=Object.create(d);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,s){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function b(t,e){var n=t.iterator[e.method];if(undefined===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=undefined,b(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=undefined),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(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 x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=undefined),c}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},mrSG:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return l}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(){for(var t=[],e=0;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var c=Object(r.forwardRef)((function(t,e){var n=t.color,r=void 0===n?"currentColor":n,i=t.size,a=void 0===i?24:i,c=u(t,["color","size"]);return o.a.createElement("svg",s({ref:e,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),o.a.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))}));c.propTypes={color:a.a.string,size:a.a.oneOfType([a.a.string,a.a.number])},c.displayName="Zap",e.a=c},"zZH+":function(t,e,n){t.exports={root:"cHbZy_rAHf",mono:"_2SNe_x81Ib",link:"LUI6m76ply"}},zouR:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return u}));n("07d7"),n("5s+n");var r=n("xaHF"),o=n("KGqP"),i=Object(r.unstable_createResource)((function(){return n.e(11).then(n.t.bind(null,"JVhT",7)).then((function(t){return t.default}))})),a={borderWidth:1,lineTension:0,pointRadius:0},s={responsive:!0,maintainAspectRatio:!0,title:{display:!1},legend:{display:!0,position:"top",labels:{fontColor:"#ccc",boxWidth:20}},tooltips:{enabled:!1,mode:"index",intersect:!1,animationDuration:100},hover:{mode:"nearest",intersect:!0},scales:{xAxes:[{display:!1,gridLines:{display:!1}}],yAxes:[{display:!0,gridLines:{display:!0,color:"#555",borderDash:[3,6],drawBorder:!1},ticks:{callback:t=>Object(o.a)(t)+"/s "}}]}},u=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}]}},[[0,10,5,8]],[0,12,4,1,9,13,7,6,3,11]]); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.9446db28fec78551ca86.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.9446db28fec78551ca86.js new file mode 100644 index 0000000000..fb0170f324 --- /dev/null +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.9446db28fec78551ca86.js @@ -0,0 +1,2 @@ +/*! For license information please see app.9446db28fec78551ca86.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+FPD":function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"e",(function(){return f})),n.d(e,"a",(function(){return p})),n.d(e,"d",(function(){return d}));n("TeQF"),n("yXV3");function r(t,e){return t===e}function o(t,e,n){if(null===e||null===n||e.length!==n.length)return!1;for(var r=e.length,o=0;o1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,i=null;return function(){return o(e,n,arguments)||(i=t.apply(null,arguments)),n=arguments,i}}));var s=function(t){return t.logs.logs},u=function(t){return t.logs.tail},c=function(t){return t.logs.searchText},l=a(s,u,c,(function(t,e,n){for(var r=[],o=e;o>=0;o--)r.push(t[o]);if(300===t.length)for(var i=299;i>e;i--)r.push(t[i]);return""===n?r:r.filter((function(t){return t.payload.toLowerCase().indexOf(n)>=0}))}));function f(t){return function(e){e("logsUpdateSearchText",(function(e){e.logs.searchText=t.toLowerCase()}))}}function p(t){return function(e,n){var r=n(),o=s(r),i=u(r),a=i>=299?0:i+1;o[a]=t,e("logsAppendLog",(function(t){t.logs.tail=a}))}}var d={searchText:"",logs:[],tail:-1}},"+wdc":function(t,e,n){"use strict";var r,o,i,a,s;if(Object.defineProperty(e,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,l=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(t){throw setTimeout(l,0),t}},f=Date.now();e.unstable_now=function(){return Date.now()-f},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(l,0))},o=function(t,e){c=setTimeout(t,e)},i=function(){clearTimeout(c)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var p=window.performance,d=window.Date,h=window.setTimeout,v=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)e.unstable_now=function(){return p.now()};else{var y=d.now();e.unstable_now=function(){return d.now()-y}}var g=!1,b=null,w=-1,O=5,x=0;a=function(){return e.unstable_now()>=x},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125>>1,o=t[r];if(!(void 0!==o&&0k(a,n))void 0!==u&&0>k(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[i]=n,r=i);else{if(!(void 0!==u&&0>k(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function k(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var T=[],A=[],R=1,M=null,L=3,D=!1,_=!1,N=!1;function F(t){for(var e=C(A);null!==e;){if(null===e.callback)P(A);else{if(!(e.startTime<=t))break;P(A),e.sortIndex=e.expirationTime,j(T,e)}e=C(A)}}function V(t){if(N=!1,F(t),!_)if(null!==C(T))_=!0,r(B);else{var e=C(A);null!==e&&o(V,e.startTime-t)}}function B(t,n){_=!1,N&&(N=!1,i()),D=!0;var r=L;try{for(F(n),M=C(T);null!==M&&(!(M.expirationTime>n)||t&&!a());){var s=M.callback;if(null!==s){M.callback=null,L=M.priorityLevel;var u=s(M.expirationTime<=n);n=e.unstable_now(),"function"==typeof u?M.callback=u:M===C(T)&&P(T),F(n)}else P(T);M=C(T)}if(null!==M)var c=!0;else{var l=C(A);null!==l&&o(V,l.startTime-n),c=!1}return c}finally{M=null,L=r,D=!1}}function I(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=s;e.unstable_ImmediatePriority=1,e.unstable_UserBlockingPriority=2,e.unstable_NormalPriority=3,e.unstable_IdlePriority=5,e.unstable_LowPriority=4,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=L;L=t;try{return e()}finally{L=n}},e.unstable_next=function(t){switch(L){case 1:case 2:case 3:var e=3;break;default:e=L}var n=L;L=e;try{return t()}finally{L=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0s?(t.sortIndex=u,j(A,t),null===C(T)&&t===C(A)&&(N?i():N=!0,o(V,u-s))):(t.sortIndex=a,j(T,t),_||D||(_=!0,r(B))),t},e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_wrapCallback=function(t){var e=L;return function(){var n=L;L=e;try{return t.apply(this,arguments)}finally{L=n}}},e.unstable_getCurrentPriorityLevel=function(){return L},e.unstable_shouldYield=function(){var t=e.unstable_now();F(t);var n=C(T);return n!==M&&null!==M&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var $=Object(r.forwardRef)((function(t,e){var n=t.color,r=void 0===n?"currentColor":n,i=t.size,a=void 0===i?24:i,s=Q(t,["color","size"]);return o.a.createElement("svg",G({ref:e,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),o.a.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))}));$.propTypes={color:w.a.string,size:w.a.oneOfType([w.a.string,w.a.number])},$.displayName="GitHub";var K=$,X=n("Qv+K"),Y=n("o0o1"),Z=n.n(Y),J=(n("ls82"),n("HaE+")),tt=n("EJpJ");function et(t,e){return nt.apply(this,arguments)}function nt(){return(nt=Object(J.a)(Z.a.mark((function t(e,n){var r,o,i,a,s;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},t.prev=1,o=Object(tt.a)(n),i=o.url,a=o.init,t.next=5,fetch(i+e,a);case 5:if(!(s=t.sent).ok){t.next=10;break}return t.next=9,s.json();case 9:r=t.sent;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(1),console.log("failed to fetch "+e,t.t0);case 15:return t.abrupt("return",r);case 16:case"end":return t.stop()}}),t,null,[[1,12]])})))).apply(this,arguments)}var rt=n("DKqX"),ot=n("WfPo"),it=n("OADI"),at=n("zZH+"),st=n.n(at);function ut(t){var e=t.name,n=t.link,o=t.version;return r.createElement("div",{className:st.a.root},r.createElement("h2",null,e),r.createElement("p",null,r.createElement("span",null,"Version "),r.createElement("span",{className:st.a.mono},o)),r.createElement("p",null,r.createElement("a",{className:st.a.link,href:n,target:"_blank",rel:"noopener noreferrer"},r.createElement(K,{size:20}),r.createElement("span",null,"Source"))))}var ct=Object(ot.a)((function(t){return{apiConfig:Object(it.c)(t)}}))((function(t){var e=Object(X.c)(["/version",t.apiConfig],et,{suspense:!0}).data;return r.createElement(r.Fragment,null,r.createElement(rt.a,{title:"About"}),e&&e.version?r.createElement(ut,{name:"Clash",version:e.version,link:"https://github.com/Dreamacro/clash"}):null,r.createElement(ut,{name:"Yacd",version:"0.2.5",link:"https://github.com/haishanh/yacd"}))})),lt=n("vJea"),ft=n("+FPD"),pt=n("LNGp"),dt=n("GmYy"),ht={app:Object(it.j)(),modals:pt.b,configs:lt.d,proxies:dt.j,logs:ft.d},vt={selectChartStyleIndex:it.k,updateAppConfig:it.m,app:{updateCollapsibleIsOpen:it.o,updateAppConfig:it.m},proxies:dt.b},mt={0:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};var yt=n("Plid"),gt=n.n(yt),bt=n("n57c"),wt=n("wx14"),Ot=n("Ff2n"),xt=n("iuhU"),Et=n("SzcZ"),St=n.n(Et),jt=o.a.useCallback;function Ct(t){var e=t.id,n=t.label,r=t.value,i=t.onChange,a=Object(Ot.a)(t,["id","label","value","onChange"]),s=jt((function(t){return i(t)}),[i]),u=Object(xt.a)({[St.a.floatAbove]:"string"==typeof r&&""!==r});return o.a.createElement("div",{className:St.a.root},o.a.createElement("input",Object(wt.a)({id:e,value:r,onChange:s},a)),o.a.createElement("label",{htmlFor:e,className:u},n))}Ct.propTypes={value:w.a.oneOfType([w.a.string,w.a.number]),type:w.a.oneOf(["text","number"]),onChange:w.a.func,id:w.a.string,label:w.a.string};var Pt=n("VVUS"),kt=o.a.useState,Tt=o.a.useEffect,At=o.a.useRef,Rt=o.a.useCallback;var Mt=Object(ot.a)((function(t){return{apiConfig:Object(it.c)(t)}}))((function(t){var e=t.apiConfig,n=t.dispatch,r=kt(e.hostname),i=Object(c.a)(r,2),a=i[0],s=i[1],u=kt(e.port),l=Object(c.a)(u,2),f=l[0],p=l[1],d=kt(e.secret),h=Object(c.a)(d,2),v=h[0],m=h[1],y=At(!1),g=At(null);Tt((function(){function t(){return(t=Object(J.a)(Z.a.mark((function t(){var e,n,r,o;return Z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("/");case 3:return e=t.sent,t.next=6,e.json();case 6:"clash"===t.sent.hello&&!1===y.current&&(n=window.location,r=n.hostname,o=n.port,s(r),p(o)),t.next=12;break;case 10:t.prev=10,t.t0=t.catch(0);case 12:case"end":return t.stop()}}),t,null,[[0,10]])})))).apply(this,arguments)}g.current.focus(),function(){t.apply(this,arguments)}()}),[]);var b=Rt((function(t){y.current=!0;var e=t.target,n=e.name,r=e.value;switch(n){case"port":p(r);break;case"hostname":s(r);break;case"secret":m(r);break;default:throw new Error("unknown input name "+n)}}),[]),w=Rt((function(){n(Object(it.n)({hostname:a,port:f,secret:v}))}),[a,f,v,n]),O=Rt((function(t){13===t.keyCode&&w()}),[w]);return o.a.createElement("div",{className:gt.a.root,ref:g,onKeyDown:O},o.a.createElement("div",{className:gt.a.header},o.a.createElement("div",{className:gt.a.icon},o.a.createElement(Pt.a,{width:160,height:160}))),o.a.createElement("div",{className:gt.a.body},o.a.createElement("div",{className:gt.a.hostnamePort},o.a.createElement("div",null,o.a.createElement(Ct,{id:"hostname",name:"hostname",label:"Hostname",type:"text",value:a,onChange:b})),o.a.createElement("div",null,o.a.createElement(Ct,{id:"port",name:"port",label:"Port",type:"number",value:f,onChange:b}))),o.a.createElement("div",null,o.a.createElement(Ct,{id:"secret",name:"secret",label:"Secret(optional)",value:v,type:"text",onChange:b}))),o.a.createElement("div",{className:gt.a.footer},o.a.createElement(bt.a,{label:"Confirm",onClick:w})))})),Lt=n("rRNg"),Dt=n.n(Lt),_t=n("Z9Yo"),Nt=n.n(_t);function Ft(t){var e=t.isOpen,n=t.onRequestClose,r=t.className,i=t.overlayClassName,a=t.children,s=Object(Ot.a)(t,["isOpen","onRequestClose","className","overlayClassName","children"]),c=Object(xt.a)(r,Nt.a.content),l=Object(xt.a)(i,Nt.a.overlay);return o.a.createElement(u.a,Object(wt.a)({isOpen:e,onRequestClose:n,className:c,overlayClassName:l},s),a)}Ft.propTypes={isOpen:w.a.bool.isRequired,onRequestClose:w.a.func.isRequired,children:w.a.node.isRequired,className:w.a.string,overlayClassName:w.a.string};var Vt=o.a.memo(Ft),Bt=o.a.useCallback,It=o.a.useEffect;var Ut=Object(ot.a)((function(t){return{modals:t.modals,apiConfig:Object(it.c)(t)}}))((function(t){var e=t.dispatch,n=t.apiConfig,r=t.modals;if(!window.fetch){var i=mt[0].detail,a=new Error(i);throw a.code=0,a}var s=Bt((function(){e(Object(pt.a)("apiConfig"))}),[e]);return It((function(){e(Object(lt.a)(n))}),[e,n]),o.a.createElement(Vt,{isOpen:r.apiConfig,className:Dt.a.content,overlayClassName:Dt.a.overlay,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,onRequestClose:s},o.a.createElement("div",{className:Dt.a.container},o.a.createElement(Mt,null)))}));n("ma9I"),n("SuFq"),n("JfAA");function qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wt(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.width,n=void 0===e?24:e,r=t.height,i=void 0===r?24:r;return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))}oe.propTypes={width:w.a.number,height:w.a.number};function ie(t){var e=t.message,n=t.detail;return o.a.createElement("div",{className:re.a.root},o.a.createElement("div",{className:re.a.yacd},o.a.createElement(Pt.a,{width:150,height:150})),e?o.a.createElement("h1",null,e):null,n?o.a.createElement("p",null,n):null,o.a.createElement("p",null,o.a.createElement("a",{className:re.a.link,href:"https://github.com/haishanh/yacd/issues"},o.a.createElement(oe,{width:16,height:16}),"haishanh/yacd")))}ie.propTypes={message:w.a.string};var ae=ie;function se(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xt(t);if(e){var o=Xt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Kt(this,n)}}var ue=function(t){Qt(n,t);var e=se(n);function n(){var t;qt(this,n);for(var r=arguments.length,o=new Array(r),i=0;i=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var Ie=Object(r.forwardRef)((function(t,e){var n=t.color,r=void 0===n?"currentColor":n,i=t.size,a=void 0===i?24:i,s=Be(t,["color","size"]);return o.a.createElement("svg",Ve({ref:e,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),o.a.createElement("circle",{cx:"12",cy:"12",r:"10"}),o.a.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),o.a.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))}));Ie.propTypes={color:w.a.string,size:w.a.oneOfType([w.a.string,w.a.number])},Ie.displayName="Info";var Ue=Ie,qe={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},We=r.createContext&&r.createContext(qe),ze=function(){return(ze=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&void 0!==arguments[0]&&arguments[0],e=o.a.useState(t),n=Object(c.a)(e,2),r=n[0],i=n[1],a=o.a.useCallback((function(){i((function(t){return!t}))}),[]);return[r,a]}(!1),e=Object(c.a)(t,2),n=e[0],r=e[1];return o.a.createElement(sn.a,{checked:n,onChange:r})}r.PureComponent;var yn=Object(r.lazy)((function(){return Promise.all([n.e(0),n.e(12),n.e(4)]).then(n.bind(null,"rfEN"))})),gn=Object(r.lazy)((function(){return n.e(3).then(n.bind(null,"EeQf"))})),bn=Object(r.lazy)((function(){return Promise.all([n.e(1),n.e(6)]).then(n.bind(null,"aTX5"))})),wn=Object(r.lazy)((function(){return Promise.all([n.e(0),n.e(13),n.e(7)]).then(n.bind(null,"kCV3"))})),On=Object(r.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(9)]).then(n.bind(null,"BVyM"))})),xn=[["home","/",o.a.createElement(Re,null)],["connections","/connections",o.a.createElement(yn,null)],["configs","/configs",o.a.createElement(gn,null)],["logs","/logs",o.a.createElement(bn,null)],["proxies","/proxies",o.a.createElement(wn,null)],["rules","/rules",o.a.createElement(On,null)],["about","/about",o.a.createElement(ct,null)],!1].filter(Boolean),En=function(){return o.a.createElement(ce,null,o.a.createElement(H.RecoilRoot,null,o.a.createElement(ot.b,{initialState:ht,actions:vt},o.a.createElement(W,null,o.a.createElement("div",{className:Ne.a.app},o.a.createElement(Ut,null),o.a.createElement(nn,null),o.a.createElement("div",{className:Ne.a.content},o.a.createElement(r.Suspense,{fallback:o.a.createElement(De,null)},o.a.createElement(T,null,xn.map((function(t){var e=Object(c.a)(t,3),n=e[0],r=e[1],i=e[2];return o.a.createElement(P,{key:n,path:r,element:i})}))))))))))},Sn=document.getElementById("app");u.a.setAppElement(Sn),(0,a.a.createRoot)(Sn).render(o.a.createElement(En,null)),console.log("Checkout the repo: https://github.com/haishanh/yacd"),console.log("Version:","0.2.5")},Ff2n:function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,"a",(function(){return r}))},GmYy:function(t,e,n){"use strict";n.d(e,"j",(function(){return A})),n.d(e,"a",(function(){return M})),n.d(e,"e",(function(){return L})),n.d(e,"d",(function(){return D})),n.d(e,"f",(function(){return _})),n.d(e,"g",(function(){return N})),n.d(e,"h",(function(){return V})),n.d(e,"c",(function(){return B})),n.d(e,"n",(function(){return I})),n.d(e,"i",(function(){return W})),n.d(e,"m",(function(){return K})),n.d(e,"l",(function(){return Z})),n.d(e,"b",(function(){return et})),n.d(e,"k",(function(){return nt}));n("pNMO"),n("4Brf"),n("TeQF"),n("QWBl"),n("pjDv"),n("yXV3"),n("4mDm"),n("2B1R"),n("+2oP"),n("ToJy"),n("27RR"),n("07d7"),n("5s+n"),n("JfAA"),n("FZtP"),n("3bBZ");var r=n("o0o1"),o=n.n(r),i=n("rePB"),a=n("ODXe"),s=(n("ls82"),n("HaE+")),u=n("dBaT"),c=n("4x4b"),l=n("EJpJ");function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e2&&void 0!==c[2]?c[2]:"http://www.gstatic.com/generate_204",i=Object(l.a)(e),a=i.url,s=i.init,u=`${a}/proxies/${n}/delay?${"timeout=5000&url="+r}`,t.next=6,fetch(u,s);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return w.apply(this,arguments)}function w(){return(w=Object(s.a)(o.a.mark((function t(e){var n,r,i,a;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(l.a)(e),r=n.url,i=n.init,t.next=3,fetch(r+"/providers/proxies",i);case 3:if(404!==(a=t.sent).status){t.next=6;break}return t.abrupt("return",{providers:{}});case 6:return t.next=8,a.json();case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(t,e){return x.apply(this,arguments)}function x(){return(x=Object(s.a)(o.a.mark((function t(e,n){var r,i,a,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(l.a)(e),i=r.url,a=r.init,s=p(p({},a),{},{method:"PUT"}),t.next=4,fetch(i+"/providers/proxies/"+n,s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(t,e){return S.apply(this,arguments)}function S(){return(S=Object(s.a)(o.a.mark((function t(e,n){var r,i,a,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(l.a)(e),i=r.url,a=r.init,s=p(p({},a),{},{method:"GET"}),t.next=4,fetch(i+"/providers/proxies/"+n+"/healthcheck",s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var j=n("OADI");function C(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&p.chains.indexOf(r)<0&&u.push(p.id)}catch(t){l.e(t)}finally{l.f()}return t.next=13,Promise.all(u.map((function(t){return c.b(e,t).catch(R)})));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(t,e,n,r,o){return G.apply(this,arguments)}function G(){return(G=Object(s.a)(o.a.mark((function t(e,n,r,i,a){var s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,v(r,i,a);case 3:if(!1!==t.sent.ok){t.next=6;break}throw new Error("failed to switch proxy: res.statusText");case 6:t.next=12;break;case 8:throw t.prev=8,t.t0=t.catch(0),console.log(t.t0,"failed to swith proxy"),t.t0;case 12:e(B(r)),Object(j.b)(n())&&(s=L(n()),$(r,s,{groupName:i,itemName:a}));case 15:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}function Q(){return function(t){t("closeModalClosePrevConns",(function(t){t.proxies.showModalClosePrevConns=!1}))}}function $(t,e,n){var r=function(t,e,n){for(var r,o=[n,e],i=n;(r=t[i])&&r.now;)o.unshift(r.now),i=r.now;return o}(e,n.groupName,n.itemName);!function(t,e,n){z.apply(this,arguments)}(t,n.groupName,r[0])}function K(t,e,n){return function(){var r=Object(s.a)(o.a.mark((function r(i,a){return o.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:H(i,a,t,e,n).catch(R),i("store/proxies#switchProxy",(function(t){var r=t.proxies.proxies;r[e]&&r[e].now&&(r[e].now=n)}));case 2:case"end":return r.stop()}}),r)})));return function(t,e){return r.apply(this,arguments)}}()}function X(t,e){return function(){var n=Object(s.a)(o.a.mark((function n(r,i){var a,s,u,c,l,f,p;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=Object(j.f)(i()),n.next=3,y(t,e,a);case 3:return s=n.sent,u="",!1===s.ok&&(u=s.statusText),n.next=8,s.json();case 8:c=n.sent,l=c.delay,f=D(i()),p=T(T({},f),{},{[e]:{error:u,number:l}}),r("requestDelayForProxyOnce",(function(t){t.proxies.delay=p}));case 13:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}()}function Y(t,e){return function(){var n=Object(s.a)(o.a.mark((function n(r){return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r(X(t,e));case 2:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()}function Z(t){return function(){var e=Object(s.a)(o.a.mark((function e(n,r){var i,a,s,u,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=F(r()),e.next=3,Promise.all(i.map((function(e){return n(Y(t,e))})));case 3:a=N(r()),s=C(a),e.prev=5,s.s();case 7:if((u=s.n()).done){e.next=13;break}return c=u.value,e.next=11,U(t,c.name);case 11:e.next=7;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),s.e(e.t0);case 18:return e.prev=18,s.f(),e.finish(18);case 21:return e.next=23,n(B(t));case 23:case"end":return e.stop()}}),e,null,[[5,15,18,21]])})));return function(t,n){return e.apply(this,arguments)}}()}function J(t){var e,n=[],r=[];for(var o in t){var i=t[o];i.all&&Array.isArray(i.all)?(n.push(o),"GLOBAL"===o&&(e=i.all)):M.indexOf(i.type)<0&&r.push(o)}return e&&(e.push("GLOBAL"),n=n.map((function(t){return[e.indexOf(t),t]})).sort((function(t,e){return t[0]-e[0]})).map((function(t){return t[1]}))),[n,r]}function tt(t){for(var e=Object.keys(t),n=[],r={},o=0;o-1})).map((function(e){return r(Y(t,e))})),n.next=4,Promise.all(s);case 4:return n.next=6,r(B(t));case 6:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}()},closeModalClosePrevConns:Q,closePrevConnsAndTheModal:function(t){return function(){var e=Object(s.a)(o.a.mark((function e(n,r){var i,a,s,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r(),s=null===(i=a.proxies.switchProxyCtx)||void 0===i?void 0:i.to){e.next=5;break}return n((function(t){t("closeModalClosePrevConns",(function(t){t.proxies.showModalClosePrevConns=!1}))})),e.abrupt("return");case 5:u=a.proxies.proxies,$(t,u,s),n("closePrevConnsAndTheModal",(function(t){t.proxies.showModalClosePrevConns=!1,t.proxies.switchProxyCtx=void 0}));case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}},nt=Object(u.atom)({key:"proxyFilterText",default:""})},"HaE+":function(t,e,n){"use strict";function r(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}n.d(e,"a",(function(){return o}))},"J3/6":function(t,e,n){t.exports={TrafficNow:"_2n4kL7wLDR"}},Jf6s:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));n("QWBl"),n("yXV3"),n("pDQq"),n("07d7"),n("5s+n"),n("EnZy"),n("FZtP");var r,o=n("EJpJ"),i=new TextDecoder("utf-8"),a={labels:Array(150),up:Array(150),down:Array(150),size:150,subscribers:[],appendData(t){this.up.push(t.up),this.down.push(t.down);var e=new Date,n=""+e.getMinutes()+e.getSeconds();this.labels.push(n),this.up.length>this.size&&this.up.shift(),this.down.length>this.size&&this.down.shift(),this.labels.length>this.size&&this.labels.shift(),this.subscribers.forEach((function(e){return e(t)}))},subscribe(t){var e=this;return this.subscribers.push(t),function(){var n=e.subscribers.indexOf(t);e.subscribers.splice(n,1)}}},s=!1,u="";function c(t){a.appendData(JSON.parse(t))}function l(t){if(s||1===r)return a;r=1;var e=function(t){var e=t.hostname,n=t.port,r=t.secret,o="";return"string"==typeof r&&""!==r&&(o+="?token="+encodeURIComponent(r)),`ws://${e}:${n}/traffic${o}`}(t),n=new WebSocket(e);return n.addEventListener("error",(function(t){r=3})),n.addEventListener("close",(function(e){r=3,function(t){if(s)return a;s=!0;var e=Object(o.a)(t),n=e.url,r=e.init;fetch(n+"/traffic",r).then((function(t){t.ok?function t(e){return e.read().then((function(n){for(var r=n.done,o=n.value,a=i.decode(o,{stream:!r}),l=(u+=a).split("\n"),f=l[l.length-1],p=0;pk(null!=t?t:M,r,["TODO debug name",n]))},function(t){return{...t,nodeToComponentSubscriptions:T(t.nodeToComponentSubscriptions,e,t=>P(null!=t?t:M,r))}}]},fireNodeSubscriptions:function(t,e,n){var r;const o="enqueue"===n&&null!==(r=t.getState().nextTree)&&void 0!==r?r:t.getState().currentTree,i=function(t,e){const n=new Set,r=new Set,o=Array.from(e);for(let e=o.pop();e;e=o.pop()){var i;n.add(e),r.add(e);const a=null!==(i=t.nodeToNodeSubscriptions.get(e))&&void 0!==i?i:L;for(const t of a)r.has(t)||o.push(t)}return n}(o,e);for(const e of i){var a;(null!==(a=o.nodeToComponentSubscriptions.get(e))&&void 0!==a?a:[]).forEach(([e,r])=>{"enqueue"===n?t.getState().queuedComponentCallbacks.push(r):r(o)})}j("value became available, waking components",Array.from(e).join(", "),()=>{const e=t.getState().suspendedComponentResolvers;e.forEach(t=>t()),e.clear()})},detectCircularDependencies:function t(e,n){if(!n.length)return;const r=n[n.length-1],o=e.nodeToNodeSubscriptions.get(r);if(!(null==o?void 0:o.size))return;const i=n[0];if(o.has(i))throw new Error("Recoil selector has circular dependencies: "+[...n,i].reverse().join(" → "));for(const r of o)t(e,[...n,r])}},V=function(t,e){const n=new Map;return t.forEach((t,r)=>{n.set(r,e(t,r))}),n};const{getNodeLoadable:B,peekNodeLoadable:I,setNodeValue:U,setUnvalidatedAtomValue:q,subscribeComponentToNode:W}=F,{RecoilValueNotReady:z}=x,{AbstractRecoilValue:H,RecoilState:G,RecoilValueReadOnly:Q}=m;var $={RecoilValueReadOnly:Q,AbstractRecoilValue:H,RecoilState:G,valueFromValueOrUpdater:function(t,{key:e},n){if("function"==typeof n){var r;const o=t.getState(),i=null!==(r=o.nextTree)&&void 0!==r?r:o.currentTree,a=I(t,i,e);if("loading"===a.state)throw new z(e);if("hasError"===a.state)throw a.contents;return n(a.contents)}return n},getRecoilValueAsLoadable:function(t,{key:e}){let n;return j("get RecoilValue",e,()=>t.replaceState(C(r=>{const[o,i]=B(t,r,e);return n=i,o}))),n},setRecoilValue:function(t,{key:e},n){j("set RecoilValue",e,()=>t.replaceState(C(r=>{const[o,i]=U(t,r,e,n);return t.fireNodeSubscriptions(i,"enqueue"),o})))},setUnvalidatedRecoilValue:function(t,{key:e},n){j("set unvalidated persisted atom",e,()=>t.replaceState(C(r=>{const o=q(r,e,n);return t.fireNodeSubscriptions(new Set([e]),"enqueue"),o})))},subscribeToRecoilValue:function(t,{key:e},n){let r,o;return j("subscribe component to RecoilValue",e,()=>t.replaceState(C(t=>([r,o]=W(t,e,n),r)))),{release:t=>t.replaceState(o)}}};function K(){return{transactionMetadata:{},atomValues:new Map,nonvalidatedAtoms:new Map,dirtyAtoms:new Set,nodeDeps:new Map,nodeToNodeSubscriptions:new Map,nodeToComponentSubscriptions:new Map}}function X(t){return{currentTree:t,nextTree:null,transactionSubscriptions:new Map,queuedComponentCallbacks:[],suspendedComponentResolvers:new Set}}var Y={makeEmptyTreeState:K,makeEmptyStoreState:function(){return X(K())},makeStoreState:X};const{DEFAULT_VALUE:Z}=x,{getRecoilValueAsLoadable:J,setRecoilValue:tt,valueFromValueOrUpdater:et}=$,{makeEmptyTreeState:nt,makeStoreState:rt}=Y;class ot{constructor(t){a(this,"_store",void 0),a(this,"getLoadable",t=>J(this._store,t)),a(this,"getPromise",t=>this.getLoadable(t).toPromise()),a(this,"map",t=>{const e=new st(this._store.getState().currentTree);return t(e),at(e.getStore_INTERNAL().getState().currentTree)}),a(this,"asyncMap",async t=>{const e=new st(this._store.getState().currentTree);return await t(e),at(e.getStore_INTERNAL().getState().currentTree)}),this._store=function(t){const e=rt(t);return{getState:()=>e,replaceState:t=>{e.currentTree=t(e.currentTree)},subscribeToTransactions:()=>{throw new Error("Cannot subscribe to Snapshots")},addTransactionMetadata:()=>{throw new Error("Cannot subscribe to Snapshots")},fireNodeSubscriptions:()=>{}}}(t)}getStore_INTERNAL(){return this._store}}function it(t){return{transactionMetadata:{...t.transactionMetadata},atomValues:new Map(t.atomValues),nonvalidatedAtoms:new Map(t.nonvalidatedAtoms),dirtyAtoms:new Set(t.dirtyAtoms),nodeDeps:new Map(t.nodeDeps),nodeToNodeSubscriptions:V(t.nodeToNodeSubscriptions,t=>new Set(t)),nodeToComponentSubscriptions:new Map}}function at(t){return new ot(it(t))}class st extends ot{constructor(t){super(it(t)),a(this,"set",(t,e)=>{const n=this.getStore_INTERNAL(),r=et(n,t,e);tt(n,t,r)}),a(this,"reset",t=>tt(this.getStore_INTERNAL(),t,Z))}}var ut={Snapshot:ot,MutableSnapshot:st,freshSnapshot:function(){return new ot(nt())},cloneSnapshot:at},ct=ut.Snapshot,lt=ut.MutableSnapshot,ft=ut.freshSnapshot,pt=ut.cloneSnapshot,dt=function(t,e){if(null!=t)return t;throw new Error(null!=e?e:"Got unexpected null or undefined")},ht=v(Object.freeze({__proto__:null,Snapshot:ct,MutableSnapshot:lt,freshSnapshot:ft,cloneSnapshot:pt}));const{useContext:vt,useEffect:mt,useRef:yt,useState:gt}=o,{fireNodeSubscriptions:bt,setNodeValue:wt,setUnvalidatedAtomValue:Ot}=F,{freshSnapshot:xt}=ht,{makeEmptyStoreState:Et,makeStoreState:St}=Y;function jt(){throw new Error("This component must be used inside a component.")}const Ct=Object.freeze({getState:jt,replaceState:jt,subscribeToTransactions:jt,addTransactionMetadata:jt,fireNodeSubscriptions:jt});function Pt(t){null===t.nextTree&&(t.nextTree={...t.currentTree,dirtyAtoms:new Set,transactionMetadata:{}})}const kt=o.createContext({current:Ct}),Tt=()=>vt(kt);function At(t){const e=Tt(),[n,r]=gt([]);return t.setNotifyBatcherOfChange(()=>r({})),mt(()=>{E("Batcher",()=>{const t=e.current.getState(),{nextTree:n}=t;null!==n&&(n.dirtyAtoms.size&&t.transactionSubscriptions.forEach(t=>t(e.current)),t.queuedComponentCallbacks.forEach(t=>t(n)),t.queuedComponentCallbacks.splice(0,t.queuedComponentCallbacks.length),t.currentTree=n,t.nextTree=null)})}),null}let Rt=0;var Mt={useStoreRef:Tt,RecoilRoot:function({initializeState_DEPRECATED:t,initializeState:e,children:n}){let r;const i=yt(null),a={getState:()=>r.current,replaceState:t=>{const e=s.current.getState();Pt(e);const n=dt(e.nextTree),r=t(n);r!==n&&(e.nextTree=r,dt(i.current)())},subscribeToTransactions:t=>{const e=Rt++;return s.current.getState().transactionSubscriptions.set(e,t),{release:()=>{s.current.getState().transactionSubscriptions.delete(e)}}},addTransactionMetadata:t=>{Pt(s.current.getState());for(const e of Object.keys(t))dt(s.current.getState().nextTree).transactionMetadata[e]=t[e]},fireNodeSubscriptions:function(t,e){bt(s.current,t,e)}},s=yt(a);return r=yt(null!=t?function(t,e){const n=Et();return e({set:(e,r)=>{n.currentTree=wt(t,n.currentTree,e.key,r)[0]},setUnvalidatedAtomValues:t=>{t.forEach((t,e)=>{n.currentTree=Ot(n.currentTree,e,t)})}}),n}(a,t):null!=e?function(t){const e=xt().map(t);return St(e.getStore_INTERNAL().getState().currentTree)}(e):Et()),o.createElement(kt.Provider,{value:s},o.createElement(At,{setNotifyBatcherOfChange:function(t){i.current=t}}),n)}},Lt=function(t,...e){const n=new Set;t:for(const r of t){for(const t of e)if(t.has(r))continue t;n.add(r)}return n};const{useCallback:Dt,useEffect:_t,useMemo:Nt,useRef:Ft,useState:Vt}=o,{peekNodeLoadable:Bt,setNodeValue:It}=F,{DEFAULT_VALUE:Ut,getNode:qt,nodes:Wt}=x,{useStoreRef:zt}=Mt,{AbstractRecoilValue:Ht,getRecoilValueAsLoadable:Gt,setRecoilValue:Qt,setUnvalidatedRecoilValue:$t,subscribeToRecoilValue:Kt,valueFromValueOrUpdater:Xt}=$,{Snapshot:Yt,cloneSnapshot:Zt}=ht,{setByAddingToSet:Jt}=S;function te(){const t=zt(),[e,n]=Vt([]),r=Ft(new Set);r.current=new Set;const o=Ft(new Set),i=Ft(new Map),a=Dt(e=>{const n=i.current.get(e);n&&(n.release(t.current),i.current.delete(e))},[t,i]);return _t(()=>{const e=t.current;function s(t,e){i.current.has(e)&&n([])}Lt(r.current,o.current).forEach(t=>{if(i.current.has(t))return;const n=Kt(e,new Ht(t),e=>{j("RecoilValue subscription fired",t,()=>{s(0,t)})});i.current.set(t,n),j("initial update on subscribing",t,()=>{s(e.getState(),t)})}),Lt(o.current,r.current).forEach(t=>{a(t)}),o.current=r.current}),_t(()=>{const t=i.current;return()=>t.forEach((t,e)=>a(e))},[a]),Nt(()=>{function e(e){return n=>{const r=Xt(t.current,e,n);Qt(t.current,e,r)}}function n(e){return r.current.has(e.key)||(r.current=Jt(r.current,e.key)),Gt(t.current,e)}function o(e){return function(t,e,n){if("hasValue"===t.state)return t.contents;if("loading"===t.state)throw new Promise(t=>{n.current.getState().suspendedComponentResolvers.add(t)});throw"hasError"===t.state?t.contents:new Error(`Invalid value of loadable atom "${e.key}"`)}(n(e),e,t)}return{getRecoilValue:o,getRecoilValueLoadable:n,getRecoilState:function(t){return[o(t),e(t)]},getRecoilStateLoadable:function(t){return[n(t),e(t)]},getSetRecoilState:e,getResetRecoilState:function(e){return()=>Qt(t.current,e,Ut)}}},[r,t])}function ee(t){const e=zt();_t(()=>e.current.subscribeToTransactions(t).release,[t,e])}function ne(t){const e=t.atomValues,n=V(function(t,e){const n=new Map;for(const[r,o]of t)e(o,r)&&n.set(r,o);return n}(e,(t,e)=>{var n;const r=null===(n=qt(e).options)||void 0===n?void 0:n.persistence_UNSTABLE;return null!=r&&"none"!==r.type&&"hasValue"===t.state}),t=>t.contents);return function(...t){const e=new Map;for(let n=0;n{i.unstable_batchedUpdates(()=>{t.current.replaceState(n=>{const r=e.getStore_INTERNAL().getState().currentTree,o=new Set;for(const t of[n.atomValues.keys(),r.atomValues.keys()])for(const e of t){var i,a;(null===(i=n.atomValues.get(e))||void 0===i?void 0:i.contents)!==(null===(a=r.atomValues.get(e))||void 0===a?void 0:a.contents)&&o.add(e)}return t.current.fireNodeSubscriptions(o,"enqueue"),{...r,nodeToComponentSubscriptions:n.nodeToComponentSubscriptions}})})},[t])}class oe{}const ie=new oe;var ae={useRecoilCallback:function(t,e){const n=zt(),r=re();return Dt((...e)=>{const o=Zt(n.current.getState().currentTree);function a(t,e){const r=Xt(n.current,t,e);Qt(n.current,t,r)}function s(t){Qt(n.current,t,Ut)}let u=ie;return i.unstable_batchedUpdates(()=>{u=t({set:a,reset:s,snapshot:o,gotoSnapshot:r})(...e)}),u instanceof oe&&function(t,e){if(!t)throw new Error(e)}(!1),u},null!=e?[...e,n]:void 0)},useRecoilValue:function(t){return te().getRecoilValue(t)},useRecoilValueLoadable:function(t){return te().getRecoilValueLoadable(t)},useRecoilState:function(t){const e=te(),[n]=e.getRecoilState(t);return[n,Dt(e.getSetRecoilState(t),[t])]},useRecoilStateLoadable:function(t){const e=te(),[n]=e.getRecoilStateLoadable(t);return[n,Dt(e.getSetRecoilState(t),[t])]},useSetRecoilState:function(t){return Dt(te().getSetRecoilState(t),[t])},useResetRecoilState:function(t){return Dt(te().getResetRecoilState(t),[t])},useRecoilInterface:te,useSnapshotWithStateChange_DEPRECATED:function(t){const e=zt();let n=function(){const[t,e]=Vt(0);return ee(Dt(()=>e(t=>t+1),[])),{transactionMetadata:{...(n=zt().current.getState().currentTree).transactionMetadata},atomValues:new Map(n.atomValues),nonvalidatedAtoms:new Map(n.nonvalidatedAtoms),dirtyAtoms:new Set(n.dirtyAtoms),nodeDeps:new Map(n.nodeDeps),nodeToNodeSubscriptions:V(n.nodeToNodeSubscriptions,t=>new Set(t)),nodeToComponentSubscriptions:V(n.nodeToComponentSubscriptions,t=>new Map(t))};var n}();t(({key:t},r)=>{[n]=It(e.current,n,t,Bt(e.current,n,t).map(r))});const r=V(n.atomValues,t=>t.contents),o=function(t,...e){const n=new Set;t:for(const r of t){for(const t of e)if(!t.has(r))continue t;n.add(r)}return n}(n.dirtyAtoms,new Set(r.keys()));return{atomValues:r,updatedAtoms:o}},useTransactionSubscription_DEPRECATED:ee,useTransactionObservation_DEPRECATED:function(t){ee(Dt(e=>{const n=e.getState().currentTree;let r=e.getState().nextTree;r||(r=e.getState().currentTree);const o=ne(r),i=ne(n),a=V(Wt,t=>{var e,n,r,o,i,a;return{persistence_UNSTABLE:{type:null!==(e=null===(n=t.options)||void 0===n||null===(r=n.persistence_UNSTABLE)||void 0===r?void 0:r.type)&&void 0!==e?e:"none",backButton:null!==(o=null===(i=t.options)||void 0===i||null===(a=i.persistence_UNSTABLE)||void 0===a?void 0:a.backButton)&&void 0!==o&&o}}}),s=new Set(r.dirtyAtoms);t({atomValues:o,previousAtomValues:i,atomInfo:a,modifiedAtoms:s,transactionMetadata:{...r.transactionMetadata}})},[t]))},useRecoilTransactionObserver:function(t){ee(Dt(e=>{const n=e.getState().currentTree;let r=e.getState().nextTree;r||(r=n),t({snapshot:Zt(r),previousSnapshot:Zt(n)})},[t]))},useRecoilSnapshot:function(){const t=zt(),[e,n]=Vt(()=>Zt(t.current.getState().currentTree));return ee(Dt(t=>{var e;return n(Zt(null!==(e=t.getState().nextTree)&&void 0!==e?e:t.getState().currentTree))},[])),e},useGoToSnapshot_DEPRECATED:function(){const t=zt();return e=>{i.unstable_batchedUpdates(()=>{e.updatedAtoms.forEach(n=>{Qt(t.current,new Ht(n),e.atomValues.get(n))})})}},useGotoRecoilSnapshot:re,useSetUnvalidatedAtomValues:function(){const t=zt();return(e,n={})=>{i.unstable_batchedUpdates(()=>{t.current.addTransactionMetadata(n),e.forEach((e,n)=>$t(t.current,new Ht(n),e))})}}},se=function(t){return!!t&&"function"==typeof t.then};const ue={getValue(){if("hasValue"!==this.state)throw this.contents;return this.contents},toPromise(){return"hasValue"===this.state?Promise.resolve(this.contents):"hasError"===this.state?Promise.reject(this.contents):this.contents},valueMaybe(){return"hasValue"===this.state?this.contents:void 0},valueOrThrow(){if("hasValue"!==this.state)throw new Error(`Loadable expected value, but in "${this.state}" state`);return this.contents},errorMaybe(){return"hasError"===this.state?this.contents:void 0},errorOrThrow(){if("hasError"!==this.state)throw new Error(`Loadable expected error, but in "${this.state}" state`);return this.contents},promiseMaybe(){return"loading"===this.state?this.contents:void 0},promiseOrThrow(){if("loading"!==this.state)throw new Error(`Loadable expected promise, but in "${this.state}" state`);return this.contents},map(t){if("hasError"===this.state)return this;if("hasValue"===this.state)try{const e=t(this.contents);return se(e)?fe(e):ce(e)}catch(e){return se(e)?fe(e.next(()=>t(this.contents))):le(e)}if("loading"===this.state)return fe(this.contents.then(t).catch(e=>{if(se(e))return e.then(()=>t(this.contents));throw e}));throw new Error("Invalid Loadable state")}};function ce(t){return Object.freeze({state:"hasValue",contents:t,...ue})}function le(t){return Object.freeze({state:"hasError",contents:t,...ue})}function fe(t){return Object.freeze({state:"loading",contents:t,...ue})}var pe={loadableWithValue:ce,loadableWithError:le,loadableWithPromise:fe,loadableLoading:function(){return fe(new Promise(()=>{}))},loadableAll:function(t){return t.every(t=>"hasValue"===t.state)?ce(t.map(t=>t.contents)):t.some(t=>"hasError"===t.state)?le(dt(t.find(t=>"hasError"===t.state),"Invalid loadable passed to loadableAll").contents):fe(Promise.all(t.map(t=>t.contents)))}},de=function t(e){if("object"==typeof e&&!function(t){if(null===t||"object"!=typeof t)return!0;switch(typeof t.$$typeof){case"symbol":case"number":return!0}return null!=t["@@__IMMUTABLE_ITERABLE__@@"]||null!=t["@@__IMMUTABLE_KEYED__@@"]||null!=t["@@__IMMUTABLE_INDEXED__@@"]||null!=t["@@__IMMUTABLE_ORDERED__@@"]||null!=t["@@__IMMUTABLE_RECORD__@@"]||!!function(t){var e,n;if("undefined"==typeof window)return!1;const r=null!==(n=(null!=t?null!==(e=t.ownerDocument)&&void 0!==e?e:t:document).defaultView)&&void 0!==n?n:window;return!(null==t||!("function"==typeof r.Node?t instanceof r.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}(t)||!!se(t)}(e)){Object.freeze(e);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];"object"!=typeof r||null==r||Object.isFrozen(r)||t(r)}Object.seal(e)}};const he=Symbol("ArrayKeyedMap"),ve=new Map;class me{constructor(t){if(this._base=new Map,t instanceof me)for(const[e,n]of t.entries())this.set(e,n);else if(t)for(const[e,n]of t)this.set(e,n);return this}get(t){const e=Array.isArray(t)?t:[t];let n=this._base;return e.forEach(t=>{var e;n=null!==(e=n.get(t))&&void 0!==e?e:ve}),void 0===n?void 0:n.get(he)}set(t,e){const n=Array.isArray(t)?t:[t];let r=this._base,o=r;return n.forEach(t=>{o=r.get(t),o||(o=new Map,r.set(t,o)),r=o}),o.set(he,e),this}delete(t){const e=Array.isArray(t)?t:[t];let n=this._base,r=n;return e.forEach(t=>{r=n.get(t),r||(r=new Map,n.set(t,r)),n=r}),r.delete(he),this}entries(){const t=[];return function e(n,r){n.forEach((n,o)=>{o===he?t.push([r,n]):e(n,r.concat(o))})}(this._base,[]),t.values()}toBuiltInMap(){return new Map(this.entries())}}var ye=me,ge=function(){return new ye},be=function(t,e,n){const r=t.entries();let o=r.next();for(;!o.done;){const i=o.value;if(!e.call(n,i[1],i[0],t))return!1;o=r.next()}return!0};Object.freeze(new Set);const{mapBySettingInMap:we,mapByUpdatingInMap:Oe,setByAddingToSet:xe,setByDeletingFromSet:Ee}=S,{detectCircularDependencies:Se,getNodeLoadable:je,setNodeValue:Ce}=F,{loadableWithError:Pe,loadableWithPromise:ke,loadableWithValue:Te}=pe,{DEFAULT_VALUE:Ae,RecoilValueNotReady:Re,registerNode:Me}=x,{startPerfBlock:Le}={startPerfBlock:function(t){return()=>null}},{isRecoilValue:De}=m,_e=Object.freeze(new Set);function Ne(t){const e=[];for(const n of Array.from(t.keys()).sort()){const r=dt(t.get(n));e.push(n),e.push(r.contents)}return e}var Fe=function(t){const{key:e,get:n,cacheImplementation_UNSTABLE:r}=t,o=null!=t.set?t.set:void 0;let i=null!=r?r:ge();function a(r,o){var s;let u=o;const c=null!==(s=o.nodeDeps.get(e))&&void 0!==s?s:_e,l=Ne(new Map(Array.from(c).sort().map(t=>{const[e,n]=je(r,u,t);return u=e,[t,n]}))),f=i.get(l);if(null!=f)return[u,f];const[p,d,h]=function(t,r){var o;const[i,s,u]=function(t,r){const o=Le(e);let i=r;const s=new Map;function u({key:e}){let n;if([i,n]=je(t,i,e),s.set(e,n),"hasValue"===n.state)return n.contents;throw n.contents}try{const t=n({get:u}),e=De(t)?u(t):t,r=se(e)?ke(e.finally(o)):(o(),Te(e));return[i,r,s]}catch(e){const n=se(e)?ke(e.then(()=>{let e=Pe(new Error("Internal Recoil Selector Error"));if(t.replaceState(n=>{let r;return[r,e]=a(t,n),r}),"hasError"===e.state)throw e.contents;return e.contents}).finally(o)):(o(),Pe(e));return[i,n,s]}}(t,r);let c=i;const l=null!==(o=r.nodeDeps.get(e))&&void 0!==o?o:_e,f=new Set(u.keys());var p,d;d=f,c=(p=l).size===d.size&&be(p,t=>d.has(t))?c:{...c,nodeDeps:we(c.nodeDeps,e,f)};const h=Lt(f,l),v=Lt(l,f);for(const t of h)c={...c,nodeToNodeSubscriptions:Oe(c.nodeToNodeSubscriptions,t,t=>xe(null!=t?t:_e,e))};for(const t of v)c={...c,nodeToNodeSubscriptions:Oe(c.nodeToNodeSubscriptions,t,t=>Ee(null!=t?t:_e,e))};return[c,s,u]}(r,u);u=p;const v=Ne(h);return function(n,r,o){"loading"!==o.state?1==!t.dangerouslyAllowMutability&&de(o.contents):o.contents.then(o=>(1==!t.dangerouslyAllowMutability&&de(o),i=i.set(r,Te(o)),n.fireNodeSubscriptions(new Set([e]),"now"),o)).catch(o=>(se(o)||(1==!t.dangerouslyAllowMutability&&de(o),i=i.set(r,Pe(o)),n.fireNodeSubscriptions(new Set([e]),"now")),o)),i=i.set(r,o)}(r,v,d),[u,d]}function s(t,e){return a(t,e)}return Me(null!=o?{key:e,options:t,get:s,set:function(t,e,n){let r=e;const i=new Set;function a({key:e}){const[n,o]=je(t,r,e);if(r=n,"hasValue"===o.state)return o.contents;throw"loading"===o.state?new Re(e):o.contents}function s(e,n){const o="function"==typeof n?n(a(e)):n;let s;[r,s]=Ce(t,r,e.key,o),s.forEach(t=>i.add(t))}return o({set:s,get:a,reset:function(t){s(t,Ae)}},n),[r,i]}}:{key:e,options:t,get:s})};const{loadableWithValue:Ve}=pe,{DEFAULT_VALUE:Be,DefaultValue:Ie,registerNode:Ue}=x,{isRecoilValue:qe}=m,{mapByDeletingFromMap:We,mapBySettingInMap:ze,setByAddingToSet:He}=S;var Ge=function t(e){const{default:n,...r}=e;return qe(n)||se(n)?function(e){const n=t({...e,default:Be,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:{...e.persistence_UNSTABLE,validator:t=>t instanceof Ie?t:dt(e.persistence_UNSTABLE).validator(t,Be)}});return Fe({key:e.key+"__withFallback",get:({get:t})=>{const r=t(n);return r instanceof Ie?e.default:r},set:({set:t},e)=>t(n,e),dangerouslyAllowMutability:e.dangerouslyAllowMutability})}({...r,default:n}):function(t){const{key:e,persistence_UNSTABLE:n}=t;return Ue({key:e,options:t,get:(r,o)=>{if(o.atomValues.has(e))return[o,dt(o.atomValues.get(e))];if(o.nonvalidatedAtoms.has(e)){if(null==n)return[o,Ve(t.default)];const r=o.nonvalidatedAtoms.get(e),i=n.validator(r,Be);return i instanceof Ie?[{...o,nonvalidatedAtoms:We(o.nonvalidatedAtoms,e)},Ve(t.default)]:[{...o,atomValues:ze(o.atomValues,e,Ve(i)),nonvalidatedAtoms:We(o.nonvalidatedAtoms,e)},Ve(i)]}return[o,Ve(t.default)]},set:(n,r,o)=>(!0!==t.dangerouslyAllowMutability&&de(o),[{...r,dirtyAtoms:He(r.dirtyAtoms,e),atomValues:o instanceof Ie?We(r.atomValues,e):ze(r.atomValues,e,Ve(o)),nonvalidatedAtoms:We(r.nonvalidatedAtoms,e)},new Set([e])])})}({...r,default:n})},Qe=function(t,e={allowFunctions:!1}){return function t(e,n,r){if("string"==typeof e&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(!0!==(null==n?void 0:n.allowFunctions))throw new Error("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}return null===e?"null":"object"!=typeof e?null!==(o=JSON.stringify(e))&&void 0!==o?o:"":se(e)?"__PROMISE__":Array.isArray(e)?`[${e.map((e,r)=>t(e,n,r.toString()))}]`:"function"==typeof e.toJSON?t(e.toJSON(r),n,r):e instanceof Map?t(Array.from(e).reduce((e,[r,o])=>({...e,["string"==typeof r?r:t(r,n)]:o}),{}),n,r):e instanceof Set?t(Array.from(e).sort((e,r)=>t(e,n).localeCompare(t(r,n))),n,r):null!=e[Symbol.iterator]&&"function"==typeof e[Symbol.iterator]?t(Array.from(e),n,r):`{${Object.keys(e).filter(t=>void 0!==e[t]).sort().map(r=>`${t(r,n)}:${t(e[r],n,r)}`).join(",")}}`;var o}(t,e)},$e=function(){const t=new Map,e={get:e=>t.get(Qe(e)),set:(n,r)=>(t.set(Qe(n),r),e),map:t};return e};let Ke=0;var Xe=function(t){var e,n;let r=null!==(e=null===(n=t.cacheImplementationForParams_UNSTABLE)||void 0===n?void 0:n.call(t))&&void 0!==e?e:$e();return e=>{var n,o;const i=r.get(e);if(null!=i)return i;const a=`${t.key}__selectorFamily/${null!==(n=Qe(e,{allowFunctions:!0}))&&void 0!==n?n:"void"}/${Ke++}`,s=n=>t.get(e)(n),u=null===(o=t.cacheImplementation_UNSTABLE)||void 0===o?void 0:o.call(t);let c;if(null!=t.set){const n=t.set;c=Fe({key:a,get:s,set:(t,r)=>n(e)(t,r),cacheImplementation_UNSTABLE:u,dangerouslyAllowMutability:t.dangerouslyAllowMutability})}else c=Fe({key:a,get:s,cacheImplementation_UNSTABLE:u,dangerouslyAllowMutability:t.dangerouslyAllowMutability});return r=r.set(e,c),c}},Ye=v(Object.freeze({__proto__:null}));const{DEFAULT_VALUE:Ze,DefaultValue:Je}=x;function tn(t,e){return be(e,e=>t.has(e))}const en=(t,e)=>Array.from(e).reduce((e,n)=>({...e,[n]:t[n]}),{});function nn(t){if(null==t)return;const{...e}=t;return{...e,validator:t=>t instanceof Ye?new Ye(t.value.filter(([t,e])=>t instanceof Set&&e instanceof Map).map(([t,n])=>[t,Array.from(n.entries()).reduce((t,[n,r])=>{const o=e.validator(r,Ze);return o instanceof Je||t.set(n,o),t},new Map)])):e.validator(t,Ze)}}const rn=Xe({key:"__constant",get:t=>()=>t,cacheImplementationForParams_UNSTABLE:ge});const on=Xe({key:"__error",get:t=>()=>{throw new Error(t)},cacheImplementationForParams_UNSTABLE:ge});const{loadableWithError:an,loadableWithPromise:sn,loadableWithValue:un}=pe;function cn(t,e){const n=Array(e.length).fill(void 0),r=Array(e.length).fill(void 0);for(const[o,i]of e.entries())try{n[o]=t(i)}catch(t){r[o]=t}return[n,r]}function ln(t){return null!=t&&!se(t)}function fn(t){return Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(e=>t[e])}function pn(t,e){return Array.isArray(t)?e:Object.getOwnPropertyNames(t).reduce((t,n,r)=>({...t,[n]:e[r]}),{})}function dn(t,e,n){return pn(t,n.map((t,n)=>null==t?un(e[n]):se(t)?sn(t):an(t)))}var hn={waitForNone:Xe({key:"__waitForNone",get:t=>({get:e})=>{const n=fn(t),[r,o]=cn(e,n);return dn(t,r,o)}}),waitForAny:Xe({key:"__waitForAny",get:t=>({get:e})=>{const n=fn(t),[r,o]=cn(e,n);if(o.some(t=>null==t))return dn(t,r,o);if(o.every(ln))throw o.find(ln);throw new Promise((e,n)=>{for(const[i,a]of o.entries())se(a)&&a.then(n=>{r[i]=n,o[i]=null,e(dn(t,r,o))}).catch(t=>{o[i]=t,o.every(ln)&&n(o[0])})})}}),waitForAll:Xe({key:"__waitForAll",get:t=>({get:e})=>{const n=fn(t),[r,o]=cn(e,n);if(o.every(t=>null==t))return pn(t,r);const i=o.find(ln);if(null!=i)throw i;throw Promise.all(o).then(e=>pn(t,e))}}),noWait:Xe({key:"__noWait",get:t=>({get:e})=>{try{return un(e(t))}catch(t){return se(t)?sn(t):an(t)}}})};const{DefaultValue:vn}=x,{RecoilRoot:mn}=Mt,{isRecoilValue:yn}=m,{useGotoRecoilSnapshot:gn,useRecoilCallback:bn,useRecoilSnapshot:wn,useRecoilState:On,useRecoilStateLoadable:xn,useRecoilTransactionObserver:En,useRecoilValue:Sn,useRecoilValueLoadable:jn,useResetRecoilState:Cn,useSetRecoilState:Pn,useSetUnvalidatedAtomValues:kn,useTransactionObservation_DEPRECATED:Tn}=ae,{noWait:An,waitForAll:Rn,waitForAny:Mn,waitForNone:Ln}=hn;var Dn={DefaultValue:vn,RecoilRoot:mn,atom:Ge,selector:Fe,atomFamily:function(t){let e=$e();const n={key:t.key,default:Ze,persistence_UNSTABLE:nn(t.persistence_UNSTABLE)};let r;r=Ge(n);const o=Xe({key:t.key+"__atomFamily/Default",get:e=>({get:n})=>{const o=n("function"==typeof r?r(e):r);if(!(o instanceof Je)){const t=function(t,e){if(!(t instanceof Ye))return t;if("object"!=typeof e||null==e||Array.isArray(e))return Ze;const n=t.value,r=new Set(Object.keys(e));for(const[t,o]of n)if(tn(r,t)){const n=r.size===t.size?e:en(e,t),i=o.get(Qe(n));if(void 0!==i)return i}return Ze}(o,e);if(!(t instanceof Je))return t}return"function"==typeof t.default?t.default(e):t.default},dangerouslyAllowMutability:t.dangerouslyAllowMutability});return n=>{var r;const i=e.get(n);if(null!=i)return i;const a=Ge({key:`${t.key}__${null!==(r=Qe(n))&&void 0!==r?r:"void"}`,default:o(n),persistence_UNSTABLE:t.persistence_UNSTABLE,dangerouslyAllowMutability:t.dangerouslyAllowMutability});return e=e.set(n,a),a}},selectorFamily:Xe,constSelector:function(t){return rn(t)},errorSelector:function(t){return on(t)},readOnlySelector:function(t){return t},useRecoilValue:Sn,useRecoilValueLoadable:jn,useRecoilState:On,useRecoilStateLoadable:xn,useSetRecoilState:Pn,useResetRecoilState:Cn,useRecoilCallback:bn,useGotoRecoilSnapshot:gn,useRecoilSnapshot:wn,useRecoilTransactionObserver_UNSTABLE:En,useTransactionObservation_UNSTABLE:Tn,useSetUnvalidatedAtomValues_UNSTABLE:kn,noWait:An,waitForNone:Ln,waitForAny:Mn,waitForAll:Rn,isRecoilValue:yn},_n=Dn.DefaultValue,Nn=Dn.RecoilRoot,Fn=Dn.atom,Vn=Dn.selector,Bn=Dn.atomFamily,In=Dn.selectorFamily,Un=Dn.constSelector,qn=Dn.errorSelector,Wn=Dn.readOnlySelector,zn=Dn.useRecoilValue,Hn=Dn.useRecoilValueLoadable,Gn=Dn.useRecoilState,Qn=Dn.useRecoilStateLoadable,$n=Dn.useSetRecoilState,Kn=Dn.useResetRecoilState,Xn=Dn.useRecoilCallback,Yn=Dn.useGotoRecoilSnapshot,Zn=Dn.useRecoilSnapshot,Jn=Dn.useRecoilTransactionObserver_UNSTABLE,tr=Dn.useTransactionObservation_UNSTABLE,er=Dn.useSetUnvalidatedAtomValues_UNSTABLE,nr=Dn.noWait,rr=Dn.waitForNone,or=Dn.waitForAny,ir=Dn.waitForAll,ar=Dn.isRecoilValue;e.DefaultValue=_n,e.RecoilRoot=Nn,e.atom=Fn,e.atomFamily=Bn,e.constSelector=Un,e.default=Dn,e.errorSelector=qn,e.isRecoilValue=ar,e.noWait=nr,e.readOnlySelector=Wn,e.selector=Vn,e.selectorFamily=In,e.useGotoRecoilSnapshot=Yn,e.useRecoilCallback=Xn,e.useRecoilSnapshot=Zn,e.useRecoilState=Gn,e.useRecoilStateLoadable=Qn,e.useRecoilTransactionObserver_UNSTABLE=Jn,e.useRecoilValue=zn,e.useRecoilValueLoadable=Hn,e.useResetRecoilState=Kn,e.useSetRecoilState=$n,e.useSetUnvalidatedAtomValues_UNSTABLE=er,e.useTransactionObservation_UNSTABLE=tr,e.waitForAll=ir,e.waitForAny=or,e.waitForNone=rr},MgzW:function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c0&&void 0!==arguments[0]?arguments[0]:"dark";"dark"===t?(C.classList.remove("light"),C.classList.add("dark")):(C.classList.remove("dark"),C.classList.add("light"))}function k(){return function(t,e){var n="light"===y(e())?"dark":"light";P(n),t("storeSwitchTheme",(function(t){t.app.theme=n})),u(e().app)}}function T(){!function(){try{localStorage.removeItem("yacd.haishan.me")}catch(t){}}();try{window.location.reload()}catch(t){}}function A(t){return function(e,n){e("appSelectChartStyleIndex",(function(e){e.app.selectedChartStyleIndex=t})),u(n().app)}}function R(t,e){return function(n,r){n("appUpdateAppConfig",(function(n){n.app[t]=e})),u(r().app)}}function M(t,e,n){return function(r,o){r("updateCollapsibleIsOpen",(function(r){r.app.collapsibleIsOpen[`${t}:${e}`]=n})),S(o().app)}}var L={clashAPIConfig:{hostname:"127.0.0.1",port:"7892",secret:""},latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!1};function D(){var t=function(){try{var t=localStorage.getItem("yacd.haishan.me");if(!t)return;return JSON.parse(t)}catch(t){return}}();t=p(p({},L),t);var e=function(){var t=window.location.search,e={};if("string"!=typeof t||""===t)return e;for(var n=t.replace(/^\?/,"").split("&"),r=0;r0&&0===(g-=1)&&f.show(e),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(c.returnFocus(),c.teardownScopedFocus()):c.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(c.setupScopedFocus(n.node),c.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var t=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:t},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(t){9===t.keyCode&&(0,l.default)(n.content,t),n.props.shouldCloseOnEsc&&27===t.keyCode&&(t.stopPropagation(),n.requestClose(t))},n.handleOverlayOnClick=function(t){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(t):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(t){n.props.shouldCloseOnOverlayClick||t.target!=n.overlay||t.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(t){return n.ownerHandlesClose()&&n.props.onRequestClose(t)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(t,e){var r="object"===(void 0===e?"undefined":o(e))?e:{base:y[t],afterOpen:y[t]+"--after-open",beforeClose:y[t]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"==typeof e&&e?i+" "+e:i},n.attributesFromObject=function(t,e){return Object.keys(e).reduce((function(n,r){return n[t+"-"+r]=e[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(t,e){this.props.isOpen&&!t.isOpen?this.open():!this.props.isOpen&&t.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!e.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var t=this.props,e=t.appElement,n=t.ariaHideApp,r=t.htmlOpenClassName,o=t.bodyOpenClassName;o&&p.add(document.body,o),r&&p.add(document.getElementsByTagName("html")[0],r),n&&(g+=1,f.hide(e)),h.default.register(this)}},{key:"render",value:function(){var t=this.props,e=t.id,n=t.className,o=t.overlayClassName,i=t.defaultStyles,a=n?{}:i.content,u=o?{}:i.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},u,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",r({id:e,ref:this.setContentRef,style:r({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),e}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:u.default.bool.isRequired,defaultStyles:u.default.shape({content:u.default.object,overlay:u.default.object}),style:u.default.shape({content:u.default.object,overlay:u.default.object}),className:u.default.oneOfType([u.default.string,u.default.object]),overlayClassName:u.default.oneOfType([u.default.string,u.default.object]),bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,ariaHideApp:u.default.bool,appElement:u.default.instanceOf(d.default),onAfterOpen:u.default.func,onAfterClose:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,role:u.default.string,contentLabel:u.default.string,aria:u.default.object,data:u.default.object,children:u.default.node,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,testId:u.default.string},e.default=b,t.exports=e.default},"Qv+K":function(t,e,n){"use strict";n.d(e,"a",(function(){return I})),n.d(e,"b",(function(){return nt})),n.d(e,"c",(function(){return ot}));var r,o=n("q1tI");function i(){return(i=Object.assign||function(t){for(var e=1;e0||(this.cacheTimeout=setTimeout((function(){t.clear()}),this.config.cacheTime)))},e.refetch=function(t){try{var e=this;return C((function(){return j(e.fetch())}),(function(e){if(!0===(null==t?void 0:t.throwOnError))throw e}))}catch(t){return Promise.reject(t)}},e.cancel=function(){var t;null==(t=this.cancelFetch)||t.call(this)},e.continue=function(){var t;null==(t=this.continueFetch)||t.call(this)},e.clearTimersObservers=function(){this.observers.forEach((function(t){t.clearRefetchInterval()}))},e.clearStaleTimeout=function(){this.staleTimeout&&(clearTimeout(this.staleTimeout),this.staleTimeout=void 0)},e.clearCacheTimeout=function(){this.cacheTimeout&&(clearTimeout(this.cacheTimeout),this.cacheTimeout=void 0)},e.setData=function(t){var e,n,r=this.state.data,o=f(t,r);this.config.structuralSharing&&(o=function t(e,n){if(e===n)return e;var r=Array.isArray(e)&&Array.isArray(n);if(r||y(e)&&y(n)){for(var o=r?e.length:Object.keys(e).length,i=r?n:Object.keys(n),a=i.length,s=r?[]:{},u=0,c=0;c-1&&(c+=o?-1:1);if(void 0===(r=n[c]))return e.preventDefault(),void(r=o?s:a).focus();e.preventDefault(),r.focus()};var r,o=n("ZDLa"),i=(r=o)&&r.__esModule?r:{default:r};t.exports=e.default},SzcZ:function(t,e,n){t.exports={root:"_2uN43zExEi",floatAbove:"_2gQ0j5OHC8"}},Tk1H:function(t,e,n){t.exports={root:"_113JVByWGF",yacd:"_1m2ZsnzFvt",link:"_3TKFOM4Tgj"}},UIKY:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.register=function(t){-1===e.openInstances.indexOf(t)&&(e.openInstances.push(t),e.emit("register"))},this.deregister=function(t){var n=e.openInstances.indexOf(t);-1!==n&&(e.openInstances.splice(n,1),e.emit("deregister"))},this.subscribe=function(t){e.subscribers.push(t)},this.emit=function(t){e.subscribers.forEach((function(n){return n(t,e.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};e.default=r,t.exports=e.default},Utih:function(t,e,n){"use strict";n("yXV3"),n("2B1R");var r=n("17x9"),o=n.n(r),i=n("q1tI"),a=n.n(i),s=n("YKzy"),u=n.n(s);function c(t){var e=t.options,n=t.value,r=t.name,o=t.onChange,s=Object(i.useMemo)((function(){return e.map((function(t){return t.value})).indexOf(n)}),[e,n]),c=Object(i.useCallback)((function(t){var n=Math.floor(100/e.length);return t===e.length-1?100-e.length*n+n:t>-1?n:void 0}),[e]),l=Object(i.useMemo)((function(){return{width:c(s)+"%",left:s*c(0)+"%"}}),[s,c]);return a.a.createElement("div",{className:u.a.ToggleSwitch},a.a.createElement("div",{className:u.a.slider,style:l}),e.map((function(t,e){var i=`${r}-${t.label}`,s=0===e?"":"border-left";return a.a.createElement("label",{htmlFor:i,key:i,className:s,style:{width:c(e)+"%"}},a.a.createElement("input",{id:i,name:r,type:"radio",value:t.value,checked:n===t.value,onChange:o}),a.a.createElement("div",null,t.label))})))}c.propTypes={options:o.a.array,value:o.a.string,name:o.a.string,onChange:o.a.func},e.a=a.a.memo(c)},V4mC:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("q1tI"),o=n("QCnb"),i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function a(t,e){var n=i.current;if(null===n)throw Error("react-cache: read and preload may only be called from within a component's render. They are not supported in event handlers or lifecycle methods.");return n.readContext(t,e)}function s(t){return t}var u=function(t){function e(){!1===s&&a>r&&(s=!0,o.unstable_scheduleCallback(n))}function n(){s=!1;var t=r;if(null!==i)for(var e=i.previous;a>t&&null!==e;){var n=e.onDelete,o=e.previous;e.onDelete=null,e.previous=e.next=null,e===i?i=e=null:(i.previous=o,o.next=i,e=o),--a,n()}}var r=500,i=null,a=0,s=!1;return{add:function(t,e){return t={value:t,onDelete:e,next:null,previous:null},null===i?t.previous=t.next=t:((e=i.previous).next=t,t.previous=e,i.previous=t,t.next=i),i=t,a+=1,t},update:function(t,e){t.value=e},access:function(t){var n=t.next;if(null!==n){var r=i;if(i!==t){var o=t.previous;o.next=n,n.previous=o,(n=r.previous).next=t,t.previous=n,r.previous=t,t.next=r,i=t}}return e(),t.value},setLimit:function(t){r=t,e()}}}(),c=new Map,l=r.createContext(null);function f(t,e,n,r){var o=c.get(t);void 0===o&&(o=new Map,c.set(t,o));var i=o.get(r);if(void 0===i){(e=e(n)).then((function(t){if(0===a.status){var e=a;e.status=1,e.value=t}}),(function(t){if(0===a.status){var e=a;e.status=2,e.value=t}}));var a={status:0,value:e};return t=u.add(a,p.bind(null,t,r)),o.set(r,t),a}return u.access(i)}function p(t,e){var n=c.get(t);void 0!==n&&(n.delete(e),0===n.size&&c.delete(t))}e.unstable_createResource=function(t,e){var n=void 0!==e?e:s,r={read:function(e){a(l);var o=n(e);switch((e=f(r,t,e,o)).status){case 0:throw e.value;case 1:return e.value;case 2:throw e.value}},preload:function(e){a(l);var o=n(e);f(r,t,e,o)}};return r},e.unstable_setGlobalCacheLimit=function(t){u.setLimit(t)}},VCL8:function(t,e,n){"use strict";function r(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function o(t){this.setState(function(e){var n=this.constructor.getDerivedStateFromProps(t,e);return null!=n?n:null}.bind(this))}function i(t,e){try{var n=this.props,r=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var n=null,a=null,s=null;if("function"==typeof e.componentWillMount?n="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?s="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var u=t.displayName||t.name,c="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=r,e.componentWillReceiveProps=o),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=i;var l=e.componentDidUpdate;e.componentDidUpdate=function(t,e,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,t,e,r)}}return t}n.r(e),n.d(e,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},VKEO:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleBlur=c,e.handleFocus=l,e.markForFocusLater=function(){a.push(document.activeElement)},e.returnFocus=function(){var t=null;try{return void(0!==a.length&&(t=a.pop()).focus())}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},e.popWithoutFocus=function(){a.length>0&&a.pop()},e.setupScopedFocus=function(t){s=t,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",l,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",l))},e.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",l)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",l))};var r,o=n("ZDLa"),i=(r=o)&&r.__esModule?r:{default:r};var a=[],s=null,u=!1;function c(){u=!0}function l(){if(u){if(u=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,i.default)(s)[0]||s).focus()}),0)}}},VVUS:function(t,e,n){"use strict";var r=n("iuhU"),o=n("17x9"),i=n.n(o),a=n("q1tI"),s=n.n(a),u=n("uG2Q"),c=n.n(u);function l(t){var e=t.width,n=void 0===e?320:e,o=t.height,i=void 0===o?320:o,a=t.animate,u=void 0!==a&&a,l=t.c0,f=void 0===l?"currentColor":l,p=t.c1,d=void 0===p?"#eee":p,h=Object(r.a)({[c.a.path]:u});return s.a.createElement("svg",{width:n,height:i,viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg"},s.a.createElement("g",{fill:"none",fillRule:"evenodd"},s.a.createElement("path",{d:"M71.689 53.055c9.23-1.487 25.684 27.263 41.411 56.663 18.572-8.017 71.708-7.717 93.775 0 4.714-15.612 31.96-57.405 41.626-56.663 3.992.088 13.07 31.705 23.309 94.96 2.743 16.949 7.537 47.492 14.38 91.63-42.339 17.834-84.37 26.751-126.095 26.751-41.724 0-83.756-8.917-126.095-26.751C52.973 116.244 65.536 54.047 71.689 53.055z",stroke:d,strokeWidth:"4",strokeLinecap:"round",fill:f,className:h}),s.a.createElement("circle",{fill:d,cx:"216.5",cy:"181.5",r:"14.5"}),s.a.createElement("circle",{fill:d,cx:"104.5",cy:"181.5",r:"14.5"}),s.a.createElement("g",{stroke:d,strokeLinecap:"round",strokeWidth:"4"},s.a.createElement("path",{d:"M175.568 218.694c-2.494 1.582-5.534 2.207-8.563 1.508-3.029-.7-5.487-2.594-7.035-5.11M143.981 218.694c2.494 1.582 5.534 2.207 8.563 1.508 3.03-.7 5.488-2.594 7.036-5.11"}))))}l.propTypes={width:i.a.number,height:i.a.number},e.a=l},WbBG:function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},WfPo:function(t,e,n){"use strict";n.d(e,"c",(function(){return gt})),n.d(e,"b",(function(){return bt})),n.d(e,"a",(function(){return wt}));n("pNMO"),n("TeQF"),n("QWBl"),n("27RR"),n("FZtP");var r=n("rePB"),o=n("ODXe");function i(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:h(t)?2:v(t)?3:0}function l(t,e){return 2===c(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){return 2===c(t)?t.get(e):t[e]}function p(t,e,n){var r=c(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function d(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function h(t){return q&&t instanceof Map}function v(t){return W&&t instanceof Set}function m(t){return t.o||t.t}function y(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=K(t);delete e[Q];for(var n=$(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=b),Object.freeze(t),e&&u(t,(function(t,e){return g(e,!0)}),!0))}function b(){i(2)}function w(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function O(t){var e=X[t];return e||i(19,t),e}function x(){return I}function E(t,e){e&&(O("Patches"),t.u=[],t.s=[],t.v=e)}function S(t){j(t),t.p.forEach(P),t.p=null}function j(t){t===I&&(I=t.l)}function C(t){return I={p:[],l:I,h:t,m:!0,_:0}}function P(t){var e=t[Q];0===e.i||1===e.i?e.j():e.g=!0}function k(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.O||O("ES5").S(e,t,r),r?(n[Q].P&&(S(e),i(4)),s(t)&&(t=T(e,t),e.l||R(e,t)),e.u&&O("Patches").M(n[Q],t,e.u,e.s)):t=T(e,n,[]),S(e),e.u&&e.v(e.u,e.s),t!==H?t:void 0}function T(t,e,n){if(w(e))return e;var r=e[Q];if(!r)return u(e,(function(o,i){return A(t,r,e,o,i,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return R(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=y(r.k):r.o;u(3===r.i?new Set(o):o,(function(e,i){return A(t,r,o,e,i,n)})),R(t,o,!1),n&&t.u&&O("Patches").R(r,n,t.u,t.s)}return r.o}function A(t,e,n,r,o,i){if(a(o)){var u=T(t,o,i&&e&&3!==e.i&&!l(e.D,r)?i.concat(r):void 0);if(p(n,r,u),!a(u))return;t.m=!1}if(s(o)&&!w(o)){if(!t.h.N&&t._<1)return;T(t,o),e&&e.A.l||R(t,o)}}function R(t,e,n){void 0===n&&(n=!1),t.h.N&&t.m&&g(e,n)}function M(t,e){var n=t[Q];return(n?m(n):t)[e]}function L(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function D(t){t.P||(t.P=!0,t.l&&D(t.l))}function _(t){t.o||(t.o=y(t.t))}function N(t,e,n){var r=h(e)?O("MapSet").T(e,n):v(e)?O("MapSet").F(e,n):t.O?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:x(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},o=r,i=Y;n&&(o=[r],i=Z);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(e,n):O("ES5").J(e,n);return(n?n.A:x()).p.push(r),r}function F(t){return a(t)||i(22,t),function t(e){if(!s(e))return e;var n,r=e[Q],o=c(e);if(r){if(!r.P&&(r.i<4||!O("ES5").K(r)))return r.t;r.I=!0,n=V(e,o),r.I=!1}else n=V(e,o);return u(n,(function(e,o){r&&f(r.t,e)===o||p(n,e,t(o))})),3===o?new Set(n):n}(t)}function V(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return y(t)}var B,I,U="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),q="undefined"!=typeof Map,W="undefined"!=typeof Set,z="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=U?Symbol.for("immer-nothing"):((B={})["immer-nothing"]=!0,B),G=U?Symbol.for("immer-draftable"):"__$immer_draftable",Q=U?Symbol.for("immer-state"):"__$immer_state",$=("undefined"!=typeof Symbol&&Symbol.iterator,"undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames),K=Object.getOwnPropertyDescriptors||function(t){var e={};return $(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},X={},Y={get:function(t,e){if(e===Q)return t;var n=m(t);if(!l(n,e))return function(t,e,n){var r,o=L(e,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!s(r)?r:r===M(t.t,e)?(_(t),t.o[e]=N(t.A.h,r,t)):r},has:function(t,e){return e in m(t)},ownKeys:function(t){return Reflect.ownKeys(m(t))},set:function(t,e,n){var r=L(m(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(t.D[e]=!0,!t.P){if(d(n,M(m(t),e))&&(void 0!==n||l(t.t,e)))return!0;_(t),D(t)}return t.o[e]=n,!0},deleteProperty:function(t,e){return void 0!==M(t.t,e)||e in t.t?(t.D[e]=!1,_(t),D(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=m(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){i(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){i(12)}},Z={};u(Y,(function(t,e){Z[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Z.deleteProperty=function(t,e){return Y.deleteProperty.call(this,t[0],e)},Z.set=function(t,e,n){return Y.set.call(this,t[0],e,n,t[0])};var J=new(function(){function t(t){this.O=z,this.N=!1,"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var e=t.prototype;return e.produce=function(t,e,n){if("function"==typeof t&&"function"!=typeof e){var r=e;e=t;var o=this;return function(t){var n=this;void 0===t&&(t=r);for(var i=arguments.length,a=Array(i>1?i-1:0),s=1;s1?n-1:0),i=1;i=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}var o=O("Patches").$;return a(t)?o(t,e):this.produce(t,(function(t){return o(t,e.slice(n+1))}))},t}()),tt=J.produce,et=(J.produceWithPatches.bind(J),J.setAutoFreeze.bind(J)),nt=(J.setUseProxies.bind(J),J.applyPatches.bind(J),J.createDraft.bind(J),J.finishDraft.bind(J),tt),rt=n("q1tI"),ot=n.n(rt);function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function at(t){for(var e=1;e0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}))},XN28:function(t,e,n){t.exports={root:"_24ddJm1Q5s",h1:"B4QNkMu-0t"}},YKzy:function(t,e,n){t.exports={ToggleSwitch:"_2IgDTE__bQ",slider:"_2IfOm9qQ_4"}},Ye7m:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertNodeList=u,e.setElement=function(t){var e=t;if("string"==typeof e&&a.canUseDOM){var n=document.querySelectorAll(e);u(n,e),e="length"in n?n[0]:n}return s=e||s},e.validateElement=c,e.hide=function(t){c(t)&&(t||s).setAttribute("aria-hidden","true")},e.show=function(t){c(t)&&(t||s).removeAttribute("aria-hidden")},e.documentNotReadyOrSSRTesting=function(){s=null},e.resetForTesting=function(){s=null};var r,o=n("2W6z"),i=(r=o)&&r.__esModule?r:{default:r},a=n("2zs7");var s=null;function u(t,e){if(!t||!t.length)throw new Error("react-modal: No elements were found for selector "+e+".")}function c(t){return!(!t&&!s)||((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},Z9Yo:function(t,e,n){t.exports={overlay:"_2ueF0jmjym",content:"UZ5fqyDCOb"}},ZDLa:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return[].slice.call(t.querySelectorAll("*"),0).filter(a)};var r=/input|select|textarea|button|object/;function o(t){var e=t.offsetWidth<=0&&t.offsetHeight<=0;if(e&&!t.innerHTML)return!0;var n=window.getComputedStyle(t);return e?"visible"!==n.getPropertyValue("overflow")||t.scrollWidth<=0&&t.scrollHeight<=0:"none"==n.getPropertyValue("display")}function i(t,e){var n=t.nodeName.toLowerCase();return(r.test(n)&&!t.disabled||"a"===n&&t.href||e)&&function(t){for(var e=t;e&&e!==document.body;){if(o(e))return!1;e=e.parentNode}return!0}(t)}function a(t){var e=t.getAttribute("tabindex");null===e&&(e=void 0);var n=isNaN(e);return(n||e>=0)&&i(t,!n)}t.exports=e.default},ZMKu:function(t,e,n){"use strict";n.d(e,"a",(function(){return Ci}));var r={};n.r(r),n.d(r,"DecayAnimator",(function(){return ee})),n.d(r,"KeyframesAnimator",(function(){return te})),n.d(r,"SpringAnimator",(function(){return ht})),n.d(r,"angle",(function(){return fe})),n.d(r,"animate",(function(){return se})),n.d(r,"anticipate",(function(){return Xt})),n.d(r,"applyOffset",(function(){return pe})),n.d(r,"attract",(function(){return ve})),n.d(r,"attractExpo",(function(){return me})),n.d(r,"backIn",(function(){return Qt})),n.d(r,"backInOut",(function(){return Kt})),n.d(r,"backOut",(function(){return $t})),n.d(r,"bounceIn",(function(){return Zt})),n.d(r,"bounceInOut",(function(){return Jt})),n.d(r,"bounceOut",(function(){return Yt})),n.d(r,"circIn",(function(){return zt})),n.d(r,"circInOut",(function(){return Gt})),n.d(r,"circOut",(function(){return Ht})),n.d(r,"clamp",(function(){return Rt})),n.d(r,"createAnticipate",(function(){return Bt})),n.d(r,"createAttractor",(function(){return he})),n.d(r,"createBackIn",(function(){return Vt})),n.d(r,"createExpoIn",(function(){return Ft})),n.d(r,"cubicBezier",(function(){return De})),n.d(r,"degreesToRadians",(function(){return ye})),n.d(r,"distance",(function(){return Oe})),n.d(r,"easeIn",(function(){return Ut})),n.d(r,"easeInOut",(function(){return Wt})),n.d(r,"easeOut",(function(){return qt})),n.d(r,"inertia",(function(){return ce})),n.d(r,"interpolate",(function(){return Dt})),n.d(r,"isPoint",(function(){return ge})),n.d(r,"isPoint3D",(function(){return be})),n.d(r,"linear",(function(){return It})),n.d(r,"mirrorEasing",(function(){return Nt})),n.d(r,"mix",(function(){return mt})),n.d(r,"mixColor",(function(){return Ot})),n.d(r,"mixComplex",(function(){return At})),n.d(r,"pipe",(function(){return jt})),n.d(r,"pointFromVector",(function(){return xe})),n.d(r,"progress",(function(){return vt})),n.d(r,"radiansToDegrees",(function(){return le})),n.d(r,"reverseEasing",(function(){return _t})),n.d(r,"smooth",(function(){return je})),n.d(r,"smoothFrame",(function(){return Se})),n.d(r,"snap",(function(){return Ce})),n.d(r,"steps",(function(){return _e})),n.d(r,"toDecimal",(function(){return Ee})),n.d(r,"velocityPerFrame",(function(){return Pe})),n.d(r,"velocityPerSecond",(function(){return ue})),n.d(r,"wrap",(function(){return ke}));var o=n("mrSG");var i,a=0,s="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-a));a=e+n,setTimeout((function(){return t(a)}),n)};!function(t){t.Read="read",t.Update="update",t.Render="render",t.PostRender="postRender",t.FixedUpdate="fixedUpdate"}(i||(i={}));var u=1/60*1e3,c=!0,l=!1,f=!1,p={delta:0,timestamp:0},d=[i.Read,i.Update,i.Render,i.PostRender],h=function(t){return l=t},v=d.reduce((function(t,e){var n,r,o,i,a,s,u,c,f,p=(n=h,r=[],o=[],i=0,a=!1,s=0,u=new WeakSet,c=new WeakSet,f={cancel:function(t){var e=o.indexOf(t);u.add(t),-1!==e&&o.splice(e,1)},process:function(t){var e,l;if(a=!0,r=(e=[o,r])[0],(o=e[1]).length=0,i=r.length)for(s=0;s4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),$={test:function(t){return"string"==typeof t&&k.test(t)||I(t)||U(t)},parse:function(t){return H.test(t)?H.parse(t):G.test(t)?G.parse(t):Q.test(t)?Q.parse(t):t},transform:function(t){return I(t)?H.transform(t):U(t)?G.transform(t):t}},K=function(t){return"number"==typeof t?0:t},X={test:function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(C),r=t.match(P);return n&&(e+=n.length),r&&(e+=r.length),e>0},parse:function(t){var e=t,n=[],r=e.match(P);r&&(e=e.replace(P,"${c}"),n.push.apply(n,r.map($.parse)));var o=e.match(C);return o&&n.push.apply(n,o.map(T.parse)),n},createTransformer:function(t){var e=t,n=0,r=t.match(P),o=r?r.length:0;if(r)for(var i=0;it[u-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var c=Lt(e,a,s),l=2===u?function(t,e){var n=t[0],r=t[1],o=e[0];return function(t){return o(vt(n,r,t))}}(t,c):function(t,e){var n=t.length,r=n-1;return function(o){var i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){for(var s=1;so||s===r);s++);i=s-1}var u=vt(t[i],t[i+1],o);return e[i](u)}}(t,c);return i?function(e){return l(Rt(t[0],t[u-1],e))}:l}var _t=function(t){return function(e){return 1-t(1-e)}},Nt=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},Ft=function(t){return function(e){return Math.pow(e,t)}},Vt=function(t){return function(e){return e*e*((t+1)*e-t)}},Bt=function(t){var e=Vt(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}},It=function(t){return t},Ut=Ft(2),qt=_t(Ut),Wt=Nt(Ut),zt=function(t){return 1-Math.sin(Math.acos(t))},Ht=_t(zt),Gt=Nt(Ht),Qt=Vt(1.525),$t=_t(Qt),Kt=Nt(Qt),Xt=Bt(1.525),Yt=function(t){if(1===t||0===t)return t;var e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Zt=_t(Yt),Jt=function(t){return t<.5?.5*(1-Yt(1-2*t)):.5*Yt(2*t-1)+.5};var te=function(){function t(t){this.isComplete=!1,this.updateOptions(t);var e=this.options,n=e.from,r=e.to;this.values=Array.isArray(r)?r:[n,r],this.createInterpolator()}return t.prototype.createInterpolator=function(){var t,e,n=this.options,r=n.duration,o=n.ease,i=n.offset;o=Array.isArray(o)?o:(t=this.values,e=o,t.map((function(){return e||Wt})).splice(0,t.length-1));var a=function(t,e){return t.map((function(t){return t*e}))}(i=i||function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(this.values),r);this.interpolator=Dt(a,this.values,{ease:o})},t.prototype.update=function(t){var e=this.options.duration;return this.isComplete=t>=e,this.interpolator(t)},t.prototype.updateOptions=function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,a=t.offset,s=t.duration,u=void 0===s?300:s;this.options={from:n,to:o,ease:i,offset:a,duration:u}},t.prototype.flipTarget=function(){this.values.reverse(),this.createInterpolator()},t.needsInterpolation=function(){return!1},t.uniqueOptionKeys=new Set(["duration","ease"]),t}(),ee=function(){function t(t){this.isComplete=!1,this.updateOptions(t);var e=this.options,n=e.power,r=e.velocity,o=e.modifyTarget,i=e.from,a=n*r,s=i+a,u=void 0===o?s:o(s);u!==s&&(a=u-i),this.target=u,this.amplitude=a}return t.prototype.flipTarget=function(){},t.prototype.update=function(t){var e=this.options,n=e.timeConstant,r=e.restDelta,o=-this.amplitude*Math.exp(-t/n);return this.isComplete=!(o>r||o<-r),this.isComplete?this.target:this.target+o},t.prototype.updateOptions=function(t){var e=void 0===t?{}:t,n=e.velocity,r=void 0===n?0:n,o=e.from,i=void 0===o?0:o,a=e.power,s=void 0===a?.8:a,u=e.timeConstant,c=void 0===u?350:u,l=e.restDelta,f=void 0===l?.5:l,p=e.modifyTarget;this.options={velocity:r,from:i,power:s,timeConstant:c,restDelta:f,modifyTarget:p}},t.needsInterpolation=function(){return!1},t.uniqueOptionKeys=new Set(["power","timeConstant","modifyTarget"]),t}(),ne=[te,ee,ht],re={keyframes:te,spring:ht,decay:ee},oe=ne.length;function ie(t,e,n){return void 0===n&&(n=0),t-e-n}var ae=function(t){var e=function(e){var n=e.delta;return t(n)};return{start:function(){return dt.update(e,!0,!0)},stop:function(){return ut.update(e)}}};function se(t){var e,n,r,i=t.from,a=t.autoplay,s=void 0===a||a,u=t.driver,c=void 0===u?ae:u,l=t.elapsed,f=void 0===l?0:l,p=t.repeat,d=void 0===p?0:p,h=t.repeatType,v=void 0===h?"loop":h,m=t.repeatDelay,y=void 0===m?0:m,g=t.onPlay,b=t.onStop,w=t.onComplete,O=t.onRepeat,x=t.onUpdate,E=Object(o.d)(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),S=E.to,j=0,C=E.duration,P=!1,k=!0,T=function(t){if(Array.isArray(t.to))return te;if(re[t.type])return re[t.type];for(var e in t)for(var n=0;n=e+n:t<=-n}(f,C,y,k)&&R():(e.stop(),w&&w()))}function L(){null==g||g(),(e=c(M)).start()}return s&&L(),{play:L,pause:function(){},resume:function(){},reverse:function(){},seek:function(){},stop:function(){null==b||b(),e.stop()}}}function ue(t,e){return e?t*(1e3/e):0}function ce(t){var e,n=t.from,r=void 0===n?0:n,i=t.velocity,a=void 0===i?0:i,s=t.min,u=t.max,c=t.power,l=void 0===c?.8:c,f=t.timeConstant,p=void 0===f?750:f,d=t.bounceStiffness,h=void 0===d?500:d,v=t.bounceDamping,m=void 0===v?10:v,y=t.restDelta,g=void 0===y?1:y,b=t.modifyTarget,w=t.driver,O=t.onUpdate,x=t.onComplete;function E(t){return void 0!==s&&tu}function S(t){return void 0===s?u:void 0===u||Math.abs(s-t)0||C({from:k,to:T,velocity:a})}:void 0})}return{stop:function(){return null==e?void 0:e.stop()}}}var le=function(t){return 180*t/Math.PI},fe=function(t,e){return void 0===e&&(e=xt),le(Math.atan2(e.y-t.y,e.x-t.x))},pe=function(t,e){var n=!0;return void 0===e&&(e=t,n=!1),function(r){return n?r-t+e:(t=r,n=!0,e)}},de=function(t){return t},he=function(t){return void 0===t&&(t=de),function(e,n,r){var o=n-r,i=-(0-e+1)*(0-t(Math.abs(o)));return o<=0?n+i:n-i}},ve=he(),me=he(Math.sqrt),ye=function(t){return t*Math.PI/180},ge=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},be=function(t){return ge(t)&&t.hasOwnProperty("z")},we=function(t,e){return Math.abs(t-e)};function Oe(t,e){if(Et(t)&&Et(e))return we(t,e);if(ge(t)&&ge(e)){var n=we(t.x,e.x),r=we(t.y,e.y),o=be(t)&&be(e)?we(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var xe=function(t,e,n){return e=ye(e),{x:n*Math.cos(e)+t.x,y:n*Math.sin(e)+t.y}},Ee=function(t,e){return void 0===e&&(e=2),e=Math.pow(10,e),Math.round(t*e)/e},Se=function(t,e,n,r){return void 0===r&&(r=0),Ee(t+n*(e-t)/Math.max(r,n))},je=function(t){void 0===t&&(t=50);var e=0,n=0;return function(r){var o=pt().timestamp,i=o!==n?o-n:0,a=i?Se(e,r,i,t):e;return n=o,e=a,a}},Ce=function(t){if("number"==typeof t)return function(e){return Math.round(e/t)*t};var e=0,n=t.length;return function(r){var o=Math.abs(t[0]-r);for(e=1;eo)return t[e-1];if(e===n-1)return i;o=a}}};function Pe(t,e){return t/(1e3/e)}var ke=function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t},Te=function(t,e){return 1-3*e+3*t},Ae=function(t,e){return 3*e-6*t},Re=function(t){return 3*t},Me=function(t,e,n){return((Te(e,n)*t+Ae(e,n))*t+Re(e))*t},Le=function(t,e,n){return 3*Te(e,n)*t*t+2*Ae(e,n)*t+Re(e)};function De(t,e,n,r){if(t===e&&n===r)return It;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Me(.1*i,t,n);function a(e){for(var r=0,i=1;10!==i&&o[i]<=e;++i)r+=.1;--i;var a=r+.1*((e-o[i])/(o[i+1]-o[i])),s=Le(a,t,n);return s>=.001?function(t,e,n,r){for(var o=0;o<8;++o){var i=Le(e,n,r);if(0===i)return e;e-=(Me(e,n,r)-t)/i}return e}(e,a,t,n):0===s?a:function(t,e,n,r,o){var i,a,s=0;do{(i=Me(a=e+(n-e)/2,r,o)-t)>0?n=a:e=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)}return function(t){return 0===t||1===t?t:Me(a(t),e,r)}}var _e=function(t,e){return void 0===e&&(e="end"),function(n){var r=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(r):Math.ceil(r);return Rt(0,1,o/t)}},Ne=n("q1tI"),Fe=n.n(Ne),Ve=function(t){return"object"==typeof t&&t.hasOwnProperty("current")},Be=function(){function t(){this.subscriptions=new Set}return t.prototype.add=function(t){var e=this;return this.subscriptions.add(t),function(){e.subscriptions.delete(t)}},t.prototype.notify=function(t,e,n){var r,i;if(this.subscriptions.size)try{for(var a=Object(o.g)(this.subscriptions),s=a.next();!s.done;s=a.next()){(0,s.value)(t,e,n)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},t.prototype.clear=function(){this.subscriptions.clear()},t}(),Ie=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Be,this.renderSubscribers=new Be,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t,n.prev!==n.current&&n.updateSubscribers.notify(n.current),e&&n.renderSubscribers.notify(n.current);var r=x(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,E.postRender(n.scheduleVelocityCheck))},this.scheduleVelocityCheck=function(){return E.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current)},this.set(t,!1),this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?ue(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Ue(t){return new Ie(t)}var qe=function(){function t(t,e){var n=this;this.children=new Set,this.latest={},this.values=new Map,this.valueSubscriptions=new Map,this.config={},this.update=function(){return n.config.onUpdate(n.latest)},this.triggerRender=function(){return n.render()},this.scheduleRender=function(){return E.render(n.triggerRender,!1,!0)},this.ref=function(t){t?n.mount(t):n.unmount(),n.externalRef&&("function"==typeof n.externalRef?n.externalRef(t):Ve(n.externalRef)&&(n.externalRef.current=t))},this.parent=t,this.rootParent=t?t.rootParent:this,this.treePath=t?Object(o.e)(t.treePath,[t]):[],this.depth=t?t.depth+1:0,this.externalRef=e}return t.prototype.subscribe=function(t){var e=this;return this.children.add(t),function(){return e.children.delete(t)}},t.prototype.hasValue=function(t){return this.values.has(t)},t.prototype.addValue=function(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latest[t]=e.get(),this.element&&this.subscribeToValue(t,e)},t.prototype.removeValue=function(t){var e=this.valueSubscriptions.get(t);e&&e(),this.values.delete(t),delete this.latest[t],this.valueSubscriptions.delete(t)},t.prototype.getValue=function(t,e){var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=new Ie(e),this.addValue(t,n)),n},t.prototype.forEachValue=function(t){this.values.forEach(t)},t.prototype.getInstance=function(){return this.element},t.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=Object(o.a)({},t)},t.prototype.setSingleStaticValue=function(t,e){this.latest[t]=e},t.prototype.setStaticValues=function(t,e){if("string"==typeof t)this.setSingleStaticValue(t,e);else for(var n in t)this.setSingleStaticValue(n,t[n])},t.prototype.scheduleUpdateLayoutDelta=function(){E.update(this.rootParent.updateLayoutDelta,!1,!0)},t.prototype.subscribeToValue=function(t,e){var n=this,r=e.onChange((function(e){n.setSingleStaticValue(t,e),n.latest[t]=e,n.config.onUpdate&&E.update(n.update,!1,!0)})),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,(function(){r(),o()}))},t.prototype.mount=function(t){var e=this;this.parent&&(this.removeFromParent=this.parent.subscribe(this)),this.element=this.current=t,this.forEachValue((function(t,n){return e.subscribeToValue(n,t)}))},t.prototype.unmount=function(){var t=this;this.forEachValue((function(e,n){return t.removeValue(n)})),g.update(this.update),g.render(this.render),this.removeFromParent&&this.removeFromParent()},t}();function We(t){return t}function ze(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function He(t){return{x:Object(o.a)({},t.x),y:Object(o.a)({},t.y)}}var Ge={translate:0,scale:1,origin:0,originPoint:0};function Qe(){return{x:Object(o.a)({},Ge),y:Object(o.a)({},Ge)}}var $e=Object(o.a)(Object(o.a)({},T),{transform:Math.round}),Ke={color:$,backgroundColor:$,outlineColor:$,fill:$,stroke:$,borderColor:$,borderTopColor:$,borderRightColor:$,borderBottomColor:$,borderLeftColor:$,borderWidth:_,borderTopWidth:_,borderRightWidth:_,borderBottomWidth:_,borderLeftWidth:_,borderRadius:_,radius:_,borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomRightRadius:_,borderBottomLeftRadius:_,width:_,maxWidth:_,height:_,maxHeight:_,size:_,top:_,right:_,bottom:_,left:_,padding:_,paddingTop:_,paddingRight:_,paddingBottom:_,paddingLeft:_,margin:_,marginTop:_,marginRight:_,marginBottom:_,marginLeft:_,rotate:L,rotateX:L,rotateY:L,rotateZ:L,scale:R,scaleX:R,scaleY:R,scaleZ:R,skew:L,skewX:L,skewY:L,distance:_,translateX:_,translateY:_,translateZ:_,x:_,y:_,z:_,perspective:_,transformPerspective:_,opacity:A,originX:V,originY:V,originZ:_,zIndex:$e,fillOpacity:A,strokeOpacity:A,numOctaves:$e},Xe=[T,_,D,L,F,N,{test:function(t){return"auto"===t},parse:function(t){return t}}],Ye=function(t){return function(e){return e.test(t)}},Ze=function(t){return Xe.find(Ye(t))},Je=Object(o.e)(Xe,[$,X]),tn=function(t){return Je.find(Ye(t))},en=function(t){return Ke[t]},nn=function(t,e){return e&&"number"==typeof t?e.transform(t):t},rn=["","X","Y","Z"],on=new Set,an=["transformPerspective","x","y","z"];function sn(t,e){return an.indexOf(t)-an.indexOf(e)}["perspective","translate","scale","rotate","skew"].forEach((function(t){var e=new Set(["rotate","skew"]).has(t);rn.forEach((function(n){var r=t+n;an.push(r),e&&on.add(r)}))}));var un=new Set(an);function cn(t){return un.has(t)}var ln=new Set(["originX","originY","originZ"]);function fn(t){return ln.has(t)}var pn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function dn(t,e){var n=t.x,r=t.y;return"translate3d("+n.translate/e.x+"px, "+r.translate/e.y+"px, 0) scale("+n.scale+", "+r.scale+")"}function hn(t){return t.startsWith("--")}function vn(t,e){return t/(e.max-e.min)*100}var mn={process:function(t,e){return"number"!=typeof t?t:vn(t,e.x)+"% "+vn(t,e.y)+"%"}},yn={borderRadius:Object(o.a)(Object(o.a)({},mn),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:mn,borderTopRightRadius:mn,borderBottomLeftRadius:mn,borderBottomRightRadius:mn,boxShadow:{process:function(t,e,n,r){var o=X.parse(t),i=X.createTransformer(t),a=n.x.scale*r.x,s=n.y.scale*r.y;o[1]/=a,o[2]/=s;var u=mt(a,s,.5);return"number"==typeof o[3]&&(o[3]/=u),"number"==typeof o[4]&&(o[4]/=u),i(o)}}};function gn(t,e,n,r,o,i,a,s,u,c,l,f){var p=a.enableHardwareAcceleration,d=a.transformTemplate,h=a.allowTransformNone;i.length=0;var v=!1,m=!1,y=!0;for(var g in t){var b=t[g],w=en(g),O=nn(b,w);if(cn(g)){if(v=!0,r[g]=O,i.push(g),!y)continue;b!==(void 0!==w.default?w.default:0)&&(y=!1)}else if(fn(g))o[g]=O,m=!0;else if("transform"!==g||"function"!=typeof b){var x=hn(g)?n:e;if(s&&yn[g]){var E=yn[g].process(b,f,u,l),S=yn[g].applyTo;if(S)for(var j=S.length,C=0;Cr?n=vt(e.min,e.max-r,t.min):r>o&&(n=vt(t.min,t.max-o,e.min)),Rt(0,1,n)}function Rn(t,e,n,r){var o=e.max-e.min,i=n.max-n.min;t.origin=void 0===r?An(e,n):r,t.originPoint=mt(e.min,e.max,t.origin),t.scale=i/o,Tn(t.scale,1,1e-4)&&(t.scale=1),t.translate=function(t,e,n){var r=mt(t.min,t.max,n);return mt(e.min,e.max,n)-r}(e,n,t.origin),Tn(t.translate)&&(t.translate=0)}function Mn(t,e,n,r){Rn(t.x,e.x,n.x,r),Rn(t.y,e.y,n.y,r)}function Ln(t){return[t("x"),t("y")]}var Dn=function(t){return 1e3*t},_n=function(t){if(Array.isArray(t)){t.length;var e=Object(o.c)(t,4);return De(e[0],e[1],e[2],e[3])}return"string"==typeof t?r[t]:t},Nn=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!X.test(e)||e.startsWith("url(")))},Fn=function(t){return Array.isArray(t)},Vn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Bn=function(t){return{type:"spring",stiffness:550,damping:0===t?100:30,restDelta:.01,restSpeed:10}},In=function(){return{type:"keyframes",ease:"linear",duration:.3}},Un=function(t){return{type:"keyframes",duration:.8,values:t}},qn={x:Vn,y:Vn,z:Vn,rotate:Vn,rotateX:Vn,rotateY:Vn,rotateZ:Vn,scaleX:Bn,scaleY:Bn,scale:Bn,opacity:In,backgroundColor:In,color:In,default:Bn};function Wn(t){var e=t.yoyo,n=t.loop,r=t.flip,i=t.ease,a=Object(o.d)(t,["yoyo","loop","flip","ease"]),s=Object(o.a)({},a);return a.duration&&(s.duration=Dn(a.duration)),a.repeatDelay&&(s.repeatDelay=Dn(a.repeatDelay)),i&&(s.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(i)?i.map(_n):_n(i)),"tween"===a.type&&(s.type="keyframes"),e?s.repeatType="reverse":n?s.repeatType="loop":r&&(s.repeatType="mirror"),s.repeat=n||e||r||a.repeat,"spring"!==a.type&&(s.type="keyframes"),s}function zn(t,e,n){var r,i,a;return function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=Object(o.e)(t.to),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Object(o.d)(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object(o.a)(Object(o.a)({},t),(r=n,i=e.to,a=Fn(i)?Un:qn[r]||qn.default,Object(o.a)({to:i},a(i))))),Object(o.a)(Object(o.a)({},e),Wn(t))}function Hn(t,e,n,r){return void 0===r&&(r={}),e.start((function(i){var a,s,u=function(t,e,n,r,i){var a=e.get(),s=r[t]||r.default||r,u=Nn(t,e.get()),c=Nn(t,n);return u&&c&&!1!==s.type?function(){var r={from:a,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?ce(Object(o.a)(Object(o.a)({},r),s)):se(zn(s,r,t))}:function(){return e.set(n),i(),{stop:function(){}}}}(t,e,n,r,i),c=function(t,e){var n,r,o,i,a;return null!==(a=null!==(i=null!==(r=null===(n=t[e])||void 0===n?void 0:n.delay)&&void 0!==r?r:null===(o=t.default)||void 0===o?void 0:o.delay)&&void 0!==i?i:t.delay)&&void 0!==a?a:0}(r,t),l=function(){return s=u()};return c?a=setTimeout(l,Dn(c)):l(),function(){clearTimeout(a),null==s||s.stop()}}))}function Gn(t,e){return ze(function(t,e){var n=t.top,r=t.left,o=t.bottom,i=t.right;void 0===e&&(e=We);var a=e({x:r,y:n}),s=e({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}var Qn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultConfig={enableHardwareAcceleration:!0,allowTransformNone:!0},e.style={},e.reactStyle={},e.vars={},e.transform={},e.transformOrigin={},e.transformKeys=[],e.config=e.defaultConfig,e.isLayoutProjectionEnabled=!1,e.layoutUpdateListeners=new Be,e.layoutMeasureListeners=new Be,e.viewportBoxUpdateListeners=new Be,e.hasViewportBoxUpdated=!1,e.targetBoxFinal={x:{min:0,max:1},y:{min:0,max:1}},e.treeScale={x:1,y:1},e.delta=Qe(),e.deltaFinal=Qe(),e.stopLayoutAxisAnimation={x:function(){},y:function(){}},e.isTargetBoxLocked=!1,e.axisProgress={x:Ue(0),y:Ue(0)},e.updateLayoutDelta=function(){e.isLayoutProjectionEnabled&&e.box&&e.updateLayoutDeltas(),e.children.forEach($n)},e}return Object(o.b)(e,t),e.prototype.removeValue=function(e){t.prototype.removeValue.call(this,e),delete this.vars[e],delete this.style[e]},e.prototype.clean=function(){this.style={},this.vars={},this.transform={}},e.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=Object(o.a)(Object(o.a)({},this.defaultConfig),t)},e.prototype.read=function(t){return this.getComputedStyle()[t]||0},e.prototype.addValue=function(e,n){t.prototype.addValue.call(this,e,n),e.startsWith("rotate")&&(this.layoutOrigin=.5)},e.prototype.readNativeValue=function(t){if(cn(t)){var e=en(t);return e&&e.default||0}return this.read(t)},e.prototype.enableLayoutProjection=function(){this.isLayoutProjectionEnabled=!0},e.prototype.hide=function(){!1!==this.isVisible&&(this.isVisible=!1,this.scheduleRender())},e.prototype.show=function(){!0!==this.isVisible&&(this.isVisible=!0,this.scheduleRender())},e.prototype.onLayoutUpdate=function(t){return this.layoutUpdateListeners.add(t)},e.prototype.onLayoutMeasure=function(t){return this.layoutMeasureListeners.add(t)},e.prototype.onViewportBoxUpdate=function(t){return this.viewportBoxUpdateListeners.add(t)},e.prototype.layoutReady=function(t){this.layoutUpdateListeners.notify(this.box,this.prevViewportBox||this.box,t)},e.prototype.getBoundingBox=function(){var t=this.config.transformPagePoint;return Gn(this.element,t)},e.prototype.getBoundingBoxWithoutTransforms=function(){var t,e,n=this.getBoundingBox();return t=n,e=this.latest,kn(t.x,e,jn),kn(t.y,e,Cn),n},e.prototype.getComputedStyle=function(){return window.getComputedStyle(this.element)},e.prototype.snapshotBoundingBox=function(){this.prevViewportBox=this.getBoundingBoxWithoutTransforms();var t=this.axisProgress,e=t.x,n=t.y;this.isTargetBoxLocked||e.isAnimating()||n.isAnimating()||(this.targetBox=He(this.prevViewportBox))},e.prototype.measureLayout=function(){this.box=this.getBoundingBox(),this.boxCorrected=He(this.box),this.targetBox||(this.targetBox=He(this.box)),this.layoutMeasureListeners.notify(this.box,this.prevViewportBox||this.box)},e.prototype.refreshTargetBox=function(){this.targetBox=this.getBoundingBoxWithoutTransforms()},e.prototype.lockTargetBox=function(){this.isTargetBoxLocked=!0},e.prototype.unlockTargetBox=function(){this.stopLayoutAnimation(),this.isTargetBoxLocked=!1},e.prototype.resetTransform=function(){var t=this.config.transformTemplate;this.element.style.transform=t?t({},""):"none",this.scheduleRender()},e.prototype.resetRotate=function(){var t=this,e=!1,n={};if(rn.forEach((function(r){var o="rotate"+r;t.hasValue(o)&&(e=!0,n[o]=t.latest[o],t.latest[o]=0)})),e){for(var r in this.render(),n)this.latest[r]=n[r];this.scheduleRender()}},e.prototype.setAxisTarget=function(t,e,n){var r=this.targetBox[t];r.min=e,r.max=n,this.hasViewportBoxUpdated=!0,this.rootParent.scheduleUpdateLayoutDelta()},e.prototype.startLayoutAxisAnimation=function(t,e){var n=this,r=this.axisProgress[t],o=this.targetBox[t],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(e){return n.setAxisTarget(t,e,e+a)})),Hn(t,r,0,e)},e.prototype.stopLayoutAnimation=function(){var t=this;Ln((function(e){return t.axisProgress[e].stop()}))},e.prototype.updateLayoutDeltas=function(){var t,e,n,r,o;t=this.boxCorrected,e=this.box,bn(t.x,e.x),bn(t.y,e.y),this.parent&&(n=this.treeScale,r=this.parent.treeScale,o=this.parent.delta,n.x=r.x*o.x.scale,n.y=r.y*o.y.scale),function(t,e){for(var n=e.length,r=0;r=3;if(e||n){var i=t.point,a=x().timestamp;r.history.push(Object(o.a)(Object(o.a)({},i),{timestamp:a}));var s=r.handlers,u=s.onStart,c=s.onMove;e||(u&&u(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),c&&c(r.lastMoveEvent,t)}}},!(ho(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=i;var a=To(go(t),this.transformPagePoint),s=a.point,u=x().timestamp;this.history=[Object(o.a)(Object(o.a)({},s),{timestamp:u})];var c=e.onSessionStart;c&&c(t,Ao(a,this.history));var l=Co(window,"pointermove",(function(t,e){return r.handlePointerMove(t,e)})),f=Co(window,"pointerup",(function(t,e){return r.handlePointerUp(t,e)}));this.removeListeners=function(){l&&l(),f&&f()}}}return t.prototype.handlePointerMove=function(t,e){this.lastMoveEvent=t,this.lastMoveEventInfo=To(e,this.transformPagePoint),po(t)&&0===t.buttons?this.handlePointerUp(t,e):E.update(this.updatePoint,!0)},t.prototype.handlePointerUp=function(t,e){this.end();var n=this.handlers.onEnd;if(n){var r=Ao(To(e,this.transformPagePoint),this.history);n&&n(t,r)}},t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),g.update(this.updatePoint),lo()},t}();function To(t,e){return e?{point:e(t.point)}:t}function Ao(t,e){var n=t.point;return{point:n,delta:wo.subtract(n,Mo(e)),offset:wo.subtract(n,Ro(e)),velocity:Lo(e,.1)}}function Ro(t){return t[0]}function Mo(t){return t[t.length-1]}function Lo(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=Mo(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>Dn(e)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Do(t,e,n){var r=e.min,o=e.max;return void 0!==r&&to&&(t=n?mt(o,t,n):Math.min(t,o)),t}function _o(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function No(t,e){var n,r=e.min-t.min,i=e.max-t.max;return e.max-e.mine?n="y":Math.abs(t.x)>e&&(n="x");return n}(l),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t,l),n.updateAxis("y",t,l),null===(a=(i=n.props).onDrag)||void 0===a||a.call(i,t,e),Fo=t}},onEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:s})},t.prototype.prepareBoundingBox=function(){var t=this.visualElement.getInstance(),e=t.style.transform;this.visualElement.resetTransform(),this.visualElement.measureLayout(),t.style.transform=e,this.visualElement.refreshTargetBox()},t.prototype.resolveDragConstraints=function(){var t,e,n,r,o,i,a=this,s=this.props.dragConstraints;this.constraints=!!s&&(Ve(s)?this.resolveRefConstraints(this.visualElement.box,s):(t=this.visualElement.box,n=(e=s).top,r=e.left,o=e.bottom,i=e.right,{x:_o(t.x,r,i),y:_o(t.y,n,o)})),this.constraints&&Ln((function(t){var e,n,r;a.getAxisMotionValue(t)&&(a.constraints[t]=(e=a.visualElement.box[t],n=a.constraints[t],r={},void 0!==n.min&&(r.min=n.min-e.min),void 0!==n.max&&(r.max=n.max-e.min),r))}))},t.prototype.resolveRefConstraints=function(t,e){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,i=e.current;this.constraintsBox=Gn(i,o);var a=function(t,e){return{x:No(t.x,e.x),y:No(t.y,e.y)}}(t,this.constraintsBox);if(r){var s=r(function(t){var e=t.x,n=t.y;return{top:n.min,bottom:n.max,left:e.min,right:e.max}}(a));s&&(a=ze(s))}return a},t.prototype.cancelDrag=function(){lo(),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null)},t.prototype.stop=function(t,e){var n;this.visualElement.unlockTargetBox(),null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var o=this.props,i=o.dragMomentum,a=o.dragElastic,s=o.onDragEnd;if(i||a){var u=e.velocity;this.animateDragEnd(u)}null==s||s(t,e)}},t.prototype.snapToCursor=function(t){var e=this;this.prepareBoundingBox(),Ln((function(n){var r=e.getAxisMotionValue(n);if(r){var o=bo(t).point,i=e.visualElement.box,a=i[n].max-i[n].min,s=i[n].min+a/2,u=o[n]-s;e.originPoint[n]=o[n],r.set(u)}else e.cursorProgress[n]=.5,e.updateVisualElementAxis(n,t)}))},t.prototype.updateAxis=function(t,e,n){if(Io(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,n):this.updateVisualElementAxis(t,e)},t.prototype.updateAxisMotionValue=function(t,e){var n=this.getAxisMotionValue(t);if(e&&n){var r=this.props.dragElastic,o=this.originPoint[t]+e[t],i=this.constraints?Do(o,this.constraints[t],r):o;n.set(i)}},t.prototype.updateVisualElementAxis=function(t,e){var n,r=this.props.dragElastic,o=this.visualElement.box[t],i=o.max-o.min,a=this.cursorProgress[t],s=function(t,e,n,r,o){var i=t-e*n;return r?Do(i,r,o):i}(bo(e).point[t],i,a,null===(n=this.constraints)||void 0===n?void 0:n[t],r);this.visualElement.setAxisTarget(t,s,s+i)},t.prototype.updateProps=function(t){var e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,i=void 0!==r&&r,a=t.dragPropagation,s=void 0!==a&&a,u=t.dragConstraints,c=void 0!==u&&u,l=t.dragElastic,f=void 0===l?.35:l,p=t.dragMomentum,d=void 0===p||p,h=Object(o.d)(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(o.a)({drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:c,dragElastic:f,dragMomentum:d},h)},t.prototype.getAxisMotionValue=function(t){var e=this.props,n=e.layout,r=e.layoutId,o="_drag"+t.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==r?void 0:this.visualElement.getValue(t,0)},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,r=n.drag,i=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,u=Ln((function(n){if(Io(n,r,e.currentDirection)){var u=e.constraints?e.constraints[n]:{},c=a?200:1e6,l=a?40:1e7,f=Object(o.a)(Object(o.a)({type:"inertia",velocity:i?t[n]:0,bounceStiffness:c,bounceDamping:l,timeConstant:750,restDelta:1,restSpeed:10},s),u);return e.getAxisMotionValue(n)?e.startAxisValueAnimation(n,f):e.visualElement.startLayoutAxisAnimation(n,f)}}));return Promise.all(u).then((function(){var t,n;null===(n=(t=e.props).onDragTransitionEnd)||void 0===n||n.call(t)}))},t.prototype.stopMotion=function(){var t=this;Ln((function(e){var n=t.getAxisMotionValue(e);n?n.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,e){var n=this.getAxisMotionValue(t);if(n){var r=n.get();return n.set(r),n.set(r),Hn(t,n,0,e)}},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.drag,r=e.dragConstraints;if(Ve(r)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};Ln((function(e){o[e]=An(t.visualElement.targetBox[e],t.constraintsBox[e])})),this.prepareBoundingBox(),this.resolveDragConstraints(),Ln((function(e){if(Io(e,n,null)){var r=function(t,e,n){var r=t.max-t.min,o=mt(e.min,e.max-r,n);return{min:o,max:o+r}}(t.visualElement.targetBox[e],t.constraintsBox[e],o[e]),i=r.min,a=r.max;t.visualElement.setAxisTarget(e,i,a)}}))}},t.prototype.mount=function(t){var e=this,n=Co(t.getInstance(),"pointerdown",(function(t){var n=e.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&e.start(t)})),r=fo(window,"resize",(function(){e.scalePoint()})),o=t.onLayoutUpdate((function(){e.isDragging&&e.resolveDragConstraints()})),i=t.prevSnapshot;return(null==i?void 0:i.isDragging)&&this.start(Fo,{cursorProgress:i.cursorProgress}),function(){null==n||n(),null==r||r(),null==o||o(),e.cancelDrag()}},t}();function Io(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var Uo=function(t){return function(e){return t(e),null}},qo=Uo((function(t){var e=t.visualElement;return function(t,e){var n=t.dragControls,r=Object(Ne.useContext)(Yr).transformPagePoint,i=Kn((function(){return new Bo({visualElement:e})}));i.updateProps(Object(o.a)(Object(o.a)({},t),{transformPagePoint:r})),Object(Ne.useEffect)((function(){return n&&n.subscribe(i)}),[i]),Object(Ne.useEffect)((function(){return i.mount(e)}),[])}(Object(o.d)(t,["visualElement"]),e)})),Wo={key:"drag",shouldRender:function(t){return!!t.drag},getComponent:function(){return qo}};function zo(t){return Object(Ne.useEffect)((function(){return function(){return t()}}),[])}var Ho=function(t,e){return!!e&&(t===e||Ho(t,e.parentElement))},Go=["whileHover","whileTap","whileDrag"],Qo=function(t){return Go.indexOf(t)+1},$o=Qo("whileTap");var Ko=Qo("whileHover"),Xo=function(t){return function(e,n){po(e)&&t(e,n)}};function Yo(t,e){!function(t,e){var n=t.onPan,r=t.onPanStart,o=t.onPanEnd,i=t.onPanSessionStart,a=n||r||o||i,s=Object(Ne.useRef)(null),u=Object(Ne.useContext)(Yr).transformPagePoint,c={onSessionStart:i,onStart:r,onMove:n,onEnd:function(t,e){s.current=null,o&&o(t,e)}};Object(Ne.useEffect)((function(){null!==s.current&&s.current.updateHandlers(c)})),Po(e,"pointerdown",a&&function(t){s.current=new ko(t,c,{transformPagePoint:u})}),zo((function(){return s.current&&s.current.end()}))}(t,e),function(t,e){var n=t.onTap,r=t.onTapStart,o=t.onTapCancel,i=t.whileTap,a=t.controls,s=n||r||o||i,u=Object(Ne.useRef)(!1),c=Object(Ne.useRef)(null);function l(){c.current&&c.current(),c.current=null}i&&a&&a.setOverride(i,$o);var f=Object(Ne.useRef)(null);f.current=function(t,r){var s=e.current;if(l(),u.current&&s){u.current=!1,a&&i&&a.clearOverride($o);var c=uo(!0);c&&(c(),Ho(s,t.target)?n&&n(t,r):o&&o(t,r))}},Po(e,"pointerdown",s?function(t,n){l(),c.current=Co(window,"pointerup",(function(t,e){return f.current(t,e)})),e.current&&!u.current&&(u.current=!0,r&&r(t,n),a&&i&&a.startOverride($o))}:void 0),zo(l)}(t,e),function(t,e){var n=t.whileHover,r=t.onHoverStart,o=t.onHoverEnd,i=t.controls;n&&i&&i.setOverride(n,Ko),Po(e,"pointerenter",Xo((function(t,e){r&&r(t,e),n&&i&&i.startOverride(Ko)}))),Po(e,"pointerleave",Xo((function(t,e){o&&o(t,e),n&&i&&i.clearOverride(Ko)})))}(t,e)}var Zo,Jo=["onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","whileTap","whileHover","onHoverStart","onHoverEnd"],ti=Uo((function(t){var e=t.visualElement;Yo(Object(o.d)(t,["visualElement"]),e)})),ei={key:"gestures",shouldRender:function(t){return Jo.some((function(e){return t.hasOwnProperty(e)}))},getComponent:function(){return ti}},ni=Uo((function(t){var e=t.animate,n=t.controls,r=t.exit,i=Object(o.c)(cr(),2),a=i[0],s=i[1],u=Object(Ne.useContext)(ur),c=Object(Ne.useRef)(!1),l=void 0!==(null==u?void 0:u.custom)?u.custom:t.custom;Object(Ne.useEffect)((function(){a?!c.current||!e||"boolean"==typeof e||e instanceof _r||n.start(e):(!c.current&&r&&n.start(r,{custom:l}).then(s),c.current=!0),a&&(c.current=!1)}),[e,n,l,r,a,s,t])})),ri={key:"exit",shouldRender:function(t){return!!t.exit&&!Ir(t)},getComponent:function(){return ni}};!function(t){t.Target="Target",t.VariantLabel="VariantLabel",t.AnimationSubscription="AnimationSubscription"}(Zo||(Zo={}));function oi(t,e){void 0===e&&(e=!1);t.transition;var n=t.transitionEnd,r=Object(o.d)(t,["transition","transitionEnd"]);return e?Object(o.a)(Object(o.a)({},r),n):r}var ii,ai,si=function(t){var e,n=t instanceof Ie?t.get():t;return Array.from(new Set((e=n)?Array.isArray(e)?e:[e]:[]))};var ui=((ii={})[Zo.Target]=Uo((function(t){return function(t,e,n,r){var i=Object(Ne.useRef)(!0),a=Object(Ne.useRef)(null);a.current||(a.current=oi(t,!0)),Object(Ne.useEffect)((function(){var s,u,c={},l=oi(t),f=oi(t,!0);for(var p in l){var d=i.current&&(!n.hasValue(p)||n.getValue(p).get()!==f[p]),h=null!==f[p],v=(s=a.current[p],void 0!==(u=f[p])&&(Array.isArray(s)&&Array.isArray(u)?!function(t,e){if(null===e)return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;re?1:n(vt(t,e,r))}}var bi=gi(0,.5,Ht),wi=gi(.5,.95,It),Oi={key:"animate-layout",shouldRender:function(t){return!!t.layout||!!t.layoutId},getComponent:function(){return hi}},xi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.b)(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;eo(e)&&e.register(n)},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;return eo(e)?e.syncUpdate():(n.snapshotBoundingBox(),e.add(n)),null},e.prototype.componentDidUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;eo(e)||e.flush();var r=n.axisProgress,o=r.x,i=r.y;!n.box||n.isTargetBoxLocked||o.isAnimating()||i.isAnimating()||(Ln((function(t){var e=n.box[t],r=e.min,o=e.max;n.setAxisTarget(t,r,o)})),n.render())},e.prototype.render=function(){return null},e}(Fe.a.Component);function Ei(t){var e=Object(Ne.useContext)(no);return Fe.a.createElement(xi,Object(o.a)({},t,{syncLayout:e}))}var Si={key:"measure-layout",shouldRender:function(t){return!!t.drag||!!t.layout||!!t.layoutId},getComponent:function(){return Ei}};function ji(t){var e={defaultFeatures:t,useVisualElement:dr,render:gr,animationControlsConfig:{makeTargetAnimatable:Dr}};var n=new Map;return new Proxy({custom:function(t){return oo(t,e)}},{get:function(t,r){return"custom"===r?t.custom:(n.has(r)||n.set(r,oo(r,e)),n.get(r))}})}var Ci=ji([Si,pi,Wo,ei,ri,Oi]);function Pi(t,e){return e&&t!==e.lead?{visibilityAction:Xr.Hide}:e&&t.presence!==Kr.Entering&&t===e.lead&&e.lead!==e.prevLead?{visibilityAction:Xr.Show}:(t.presence===Kr.Entering?n=null==e?void 0:e.getFollowOrigin():t.presence===Kr.Exiting&&(r=null==e?void 0:e.getFollowTarget()),{originBox:n,targetBox:r});var n,r}function ki(t,e){var n,r,o,i={},a=e&&e.lead,s=null==a?void 0:a.presence;return e&&t===a?t.presence===Kr.Entering?i.originBox=e.getFollowOrigin():t.presence===Kr.Exiting&&(i.targetBox=e.getFollowTarget()):e&&t===e.follow&&(i.transition=e.getLeadTransition(),s===Kr.Entering?i.targetBox=e.getLeadTarget():s===Kr.Exiting&&(i.originBox=e.getLeadOrigin())),(null===(n=null==e?void 0:e.follow)||void 0===n?void 0:n.isPresenceRoot)||(null==a?void 0:a.isPresenceRoot)?(e&&t!==a?e&&t===e.follow?a&&s!==Kr.Entering&&s===Kr.Exiting&&(i.crossfadeOpacity=null===(o=null==e?void 0:e.lead)||void 0===o?void 0:o.getValue("opacity",1)):i.visibilityAction=Xr.Hide:t.presence===Kr.Entering&&(i.crossfadeOpacity=null===(r=null==e?void 0:e.follow)||void 0===r?void 0:r.getValue("opacity",0)),i):i}var Ti=function(){function t(){this.order=[],this.hasChildren=!1}return t.prototype.add=function(t){var e,n=t.config.layoutOrder;if(void 0===n)this.order.push(t);else{var r=this.order.findIndex((function(t){return n<=(t.config.layoutOrder||0)}));-1===r&&(t.presence=this.hasChildren?Kr.Entering:Kr.Present,r=this.order.length),this.order.splice(r,0,t)}if(this.snapshot){t.prevSnapshot=this.snapshot,t.prevViewportBox=this.snapshot.boundingBox;var o=this.snapshot.latestMotionValues;for(var i in o)t.hasValue(i)?null===(e=t.getValue(i))||void 0===e||e.set(o[i]):t.addValue(i,Ue(o[i]))}this.hasChildren=!0},t.prototype.remove=function(t){var e=this.order.findIndex((function(e){return t===e}));-1!==e&&this.order.splice(e,1)},t.prototype.updateLeadAndFollow=function(){this.prevLead=this.lead,this.prevFollow=this.follow;var t=Object(o.c)(function(t,e){for(var n=Object(o.c)(e,2),r=n[0],i=n[1],a=void 0,s=0,u=void 0,c=t.length,l=!1,f=c-1;f>=0;f--){var p=t[f];if(f===c-1&&(l=p.isPresent),l)a=p;else{var d=t[f-1];d&&d.isPresent&&(a=p)}if(a){s=f;break}}if(a||(a=t[0]),u=t[s-1],a)for(f=s-1;f>=0;f--)if((p=t[f]).isPresent){u=p;break}return a!==r&&!l&&u===i&&t.find((function(t){return t===r}))&&(a=r),[a,u]}(this.order,[this.lead,this.follow]),2),e=t[0],n=t[1];this.lead=e,this.follow=n},t.prototype.updateSnapshot=function(){if(this.lead){var t={boundingBox:this.lead.prevViewportBox,latestMotionValues:{}};this.lead.forEachValue((function(e,n){var r=e.get();cn(r)||(t.latestMotionValues[n]=r)}));var e=Vo.get(this.lead);e&&e.isDragging&&(t.isDragging=!0,t.cursorProgress=e.cursorProgress),this.snapshot=t}},t.prototype.isLeadPresent=function(){var t;return this.lead&&(null===(t=this.lead)||void 0===t?void 0:t.presence)!==Kr.Exiting},t.prototype.shouldStackAnimate=function(){return!0},t.prototype.getFollowOrigin=function(){var t;return this.follow?this.follow.prevViewportBox:null===(t=this.snapshot)||void 0===t?void 0:t.boundingBox},t.prototype.getFollowTarget=function(){var t;return null===(t=this.follow)||void 0===t?void 0:t.box},t.prototype.getLeadOrigin=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.prevViewportBox},t.prototype.getLeadTarget=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.box},t.prototype.getLeadTransition=function(){var t;return null===(t=this.lead)||void 0===t?void 0:t.config.transition},t}();!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=new Set,e.stacks=new Map,e.hasMounted=!1,e.updateScheduled=!1,e.renderScheduled=!1,e.syncContext=Object(o.a)(Object(o.a)({},to()),{syncUpdate:function(t){return e.scheduleUpdate(t)},forceUpdate:function(){e.syncContext=Object(o.a)({},e.syncContext),e.scheduleUpdate(!0)},register:function(t){return e.addChild(t)},remove:function(t){return e.removeChild(t)}}),e}Object(o.b)(e,t),e.prototype.componentDidMount=function(){this.hasMounted=!0,this.updateStacks()},e.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},e.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},e.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var e=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==Kr.Entering&&(t.presence=t.presence===Kr.Exiting?Kr.Entering:Kr.Present):t.presence=Kr.Exiting})),this.updateStacks();var n="crossfade"===e?ki:Pi,r={measureLayout:function(t){return t.measureLayout()},layoutReady:function(e){var r=e.layoutId;e.layoutReady(n(e,t.getStack(r)))}};this.children.forEach((function(e){return t.syncContext.add(e)})),this.syncContext.flush(r),this.stacks.forEach((function(t){return t.snapshot=void 0}))},e.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},e.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.props._supportRotate&&this.children.forEach((function(t){return t.resetRotate()})),this.children.forEach((function(t){return t.snapshotBoundingBox()})),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},e.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?Kr.Entering:Kr.Present},e.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},e.prototype.addToStack=function(t){var e=this.getStack(t.layoutId);null==e||e.add(t)},e.prototype.removeFromStack=function(t){var e=this.getStack(t.layoutId);null==e||e.remove(t)},e.prototype.getStack=function(t){if(void 0!==t)return!this.stacks.has(t)&&this.stacks.set(t,new Ti),this.stacks.get(t)},e.prototype.render=function(){return Object(Ne.createElement)(no.Provider,{value:this.syncContext},this.props.children)}}(Ne.Component);function Ai(){return{scrollX:Ue(0),scrollY:Ue(0),scrollXProgress:Ue(0),scrollYProgress:Ue(0)}}Ai();var Ri=Ue(null);if("undefined"!=typeof window)if(window.matchMedia){var Mi=window.matchMedia("(prefers-reduced-motion)"),Li=function(){return Ri.set(Mi.matches)};Mi.addListener(Li),Li()}else Ri.set(!1);!function(){function t(){this.componentControls=new Set}t.prototype.subscribe=function(t){var e=this;return this.componentControls.add(t),function(){return e.componentControls.delete(t)}},t.prototype.start=function(t,e){this.componentControls.forEach((function(n){n.start(t.nativeEvent||t,e)}))}}();!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.initialState={},e}Object(o.b)(e,t),e.prototype.updateLayoutDelta=function(){},e.prototype.build=function(){},e.prototype.clean=function(){},e.prototype.getBoundingBox=function(){return{x:{min:0,max:0},y:{min:0,max:0}}},e.prototype.readNativeValue=function(t){return this.initialState[t]||0},e.prototype.render=function(){this.build()}}(qe)},a3WO:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]?arguments[4]:{};c((function(){var i=document.getElementById(e).getContext("2d"),a=new t(i,{type:"line",data:n,options:u(u({},l),o)}),s=r&&r.subscribe((function(){return a.update()}));return function(){s&&s(),a.destroy()}}),[t,e,n,r,o])}},btwz:function(t,e,n){t.exports={lo:"_2fg1R7Zu62"}},dBaT:function(t,e,n){"use strict";t.exports=n("MF5s")},ewTs:function(t,e,n){},fbhf:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dumpClassLists=function(){0};var r={},o={};e.add=function(t,e){return n=t.classList,i="html"==t.nodeName.toLowerCase()?r:o,void e.split(" ").forEach((function(t){!function(t,e){t[e]||(t[e]=0),t[e]+=1}(i,t),n.add(t)}));var n,i},e.remove=function(t,e){return n=t.classList,i="html"==t.nodeName.toLowerCase()?r:o,void e.split(" ").forEach((function(t){!function(t,e){t[e]&&(t[e]-=1)}(i,t),0===i[t]&&n.remove(t)}));var n,i}},gjz0:function(t,e,n){t.exports={root:"_2kr0S-YLqE"}},"hN5/":function(t,e,n){},hkBY:function(t,e,n){"use strict";var r=n("q1tI"),o=n.n(r),i=n("ohBo"),a=n.n(i),s=n("OADI"),u=n("WfPo");e.a=Object(u.a)((function(t){return{theme:Object(s.i)(t)}}))((function(t){var e=t.checked,n=void 0!==e&&e,r=t.onChange,i=t.theme,s=t.name,u="dark"===i?"#393939":"#e9e9e9";return o.a.createElement(a.a,{onChange:r,checked:n,uncheckedIcon:!1,checkedIcon:!1,offColor:u,onColor:"#047aff",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:s})}))},iuhU:function(t,e,n){"use strict";function r(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=undefined),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},mLhc:function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var c={};function l(){}function f(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(E([])));v&&v!==e&&n.call(v,o)&&(d=v);var m=p.prototype=l.prototype=Object.create(d);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,s){var c=u(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function b(t,e){var n=t.iterator[e.method];if(undefined===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=undefined,b(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=undefined),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(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 x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=undefined),c}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},mrSG:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return l}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(){for(var t=[],e=0;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var c=Object(r.forwardRef)((function(t,e){var n=t.color,r=void 0===n?"currentColor":n,i=t.size,a=void 0===i?24:i,c=u(t,["color","size"]);return o.a.createElement("svg",s({ref:e,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),o.a.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))}));c.propTypes={color:a.a.string,size:a.a.oneOfType([a.a.string,a.a.number])},c.displayName="Zap",e.a=c},"zZH+":function(t,e,n){t.exports={root:"cHbZy_rAHf",mono:"_2SNe_x81Ib",link:"LUI6m76ply"}},zouR:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return u}));n("07d7"),n("5s+n");var r=n("xaHF"),o=n("KGqP"),i=Object(r.unstable_createResource)((function(){return n.e(11).then(n.t.bind(null,"JVhT",7)).then((function(t){return t.default}))})),a={borderWidth:1,lineTension:0,pointRadius:0},s={responsive:!0,maintainAspectRatio:!0,title:{display:!1},legend:{display:!0,position:"top",labels:{fontColor:"#ccc",boxWidth:20}},tooltips:{enabled:!1,mode:"index",intersect:!1,animationDuration:100},hover:{mode:"nearest",intersect:!0},scales:{xAxes:[{display:!1,gridLines:{display:!1}}],yAxes:[{display:!0,gridLines:{display:!0,color:"#555",borderDash:[3,6],drawBorder:!1},ticks:{callback:t=>Object(o.a)(t)+"/s "}}]}},u=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}]}},[[0,10,5,8]],[0,12,4,1,9,13,7,6,3,11]]); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.8bd641dadb8c0be21576.js.LICENSE.txt b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.9446db28fec78551ca86.js.LICENSE.txt similarity index 100% rename from package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.8bd641dadb8c0be21576.js.LICENSE.txt rename to package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/app.9446db28fec78551ca86.js.LICENSE.txt diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/index.html b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/index.html index 20f1e3c981..f155b45471 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/index.html +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/index.html @@ -1 +1 @@ -yacd - Yet Another Clash Dashboard
\ No newline at end of file +yacd - Yet Another Clash Dashboard
\ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html index b1c0d6e099..35fa7a7fa3 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/report.html @@ -3,7 +3,7 @@ - yacd [11 Aug 2020 at 12:33] + yacd [30 Aug 2020 at 12:01] diff --git a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.41c657849345d551b223.js b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.184b22669d1e3f4e39e2.js similarity index 74% rename from package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.41c657849345d551b223.js rename to package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.184b22669d1e3f4e39e2.js index f1cc834b40..d716c474e4 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.41c657849345d551b223.js +++ b/package/ctcgfw/luci-app-openclash/files/usr/share/openclash/yacd/runtime.184b22669d1e3f4e39e2.js @@ -1 +1 @@ -!function(e){function r(r){for(var n,o,s=r[0],u=r[1],f=r[2],i=r[3]||[],l=0,b=[];l/dev/null - sed -i '/^hosts:/a\##Custom HOSTS##' "$7" 2>/dev/null + sed -i "/^dns:/a\ use-hosts: true" "$7" + sed -i '/^hosts:/a\##Custom HOSTS END##' "$7" 2>/dev/null + sed -i '/^hosts:/a\##Custom HOSTS##' "$7" 2>/dev/null sed -i '/##Custom HOSTS##/r/etc/openclash/custom/openclash_custom_hosts.list' "$7" 2>/dev/null sed -i "/^hosts:/,/^dns:/ {s/^ \{0,\}'/ '/}" "$7" 2>/dev/null #修改参数空格 fi diff --git a/package/lean/default-settings/files/zzz-default-settings b/package/lean/default-settings/files/zzz-default-settings index d4ada449fb..39d99dcc35 100755 --- a/package/lean/default-settings/files/zzz-default-settings +++ b/package/lean/default-settings/files/zzz-default-settings @@ -29,7 +29,7 @@ sed -i 's/services/nas/g' /usr/lib/lua/luci/view/minidlna_status.htm ln -sf /sbin/ip /usr/bin/ip -sed -i 's#http://downloads.openwrt.org#https://mirrors.cloud.tencent.com/lede#g' /etc/opkg/distfeeds.conf +sed -i 's#https://downloads.openwrt.org#https://mirrors.cloud.tencent.com/lede#g' /etc/opkg/distfeeds.conf sed -i '/openwrt_luci/ { s/snapshots/releases\/18.06.8/g; }' /etc/opkg/distfeeds.conf sed -i '/openwrt_packages/ { s/snapshots/releases\/18.06.8/g; }' /etc/opkg/distfeeds.conf sed -i "s/# //g" /etc/opkg/distfeeds.conf diff --git a/package/libs/libselinux/Makefile b/package/libs/libselinux/Makefile index 9270e88a04..450bdfbf3b 100644 --- a/package/libs/libselinux/Makefile +++ b/package/libs/libselinux/Makefile @@ -37,6 +37,13 @@ define Package/libselinux/description older version supported by the kernel) when loading policy. endef +define Package/libselinux-utils + SECTION:=utils + DEPENDS:=+libselinux + CATEGORY:=Utilities + TITLE:=Runtime SELinux utilities + URL:=http://selinuxproject.org/page/Main_Page +endef # Needed to link libselinux utilities, which link against # libselinux.so, which indirectly depends on libpcre.so, installed in @@ -76,5 +83,11 @@ define Package/libselinux/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libselinux.so.* $(1)/usr/lib/ endef +define Package/libselinux-utils/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin +endef + $(eval $(call HostBuild)) $(eval $(call BuildPackage,libselinux)) +$(eval $(call BuildPackage,libselinux-utils)) diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 6e2a914c18..4427d64277 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.16.7 +PKG_VERSION:=2.16.8 PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=c95b11557ee97d2bdfd48cd57cf9b648a6cddd2ca879e3c35c4e7525f2871992 +PKG_HASH:=fe9e3b15c3375943bdfebbbb20dd6b4f1147b3b5d926248bd835d73247407430 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0-or-later diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch index 70d178feb8..4cdeed921d 100644 --- a/package/libs/mbedtls/patches/200-config.patch +++ b/package/libs/mbedtls/patches/200-config.patch @@ -1,6 +1,6 @@ --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h -@@ -658,14 +658,14 @@ +@@ -692,14 +692,14 @@ * * Enable Output Feedback mode (OFB) for symmetric ciphers. */ @@ -17,7 +17,7 @@ /** * \def MBEDTLS_CIPHER_NULL_CIPHER -@@ -782,19 +782,19 @@ +@@ -816,19 +816,19 @@ * * Comment macros to disable the curve and functions for it */ @@ -46,7 +46,7 @@ /** * \def MBEDTLS_ECP_NIST_OPTIM -@@ -918,7 +918,7 @@ +@@ -952,7 +952,7 @@ * See dhm.h for more details. * */ @@ -55,7 +55,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -@@ -938,7 +938,7 @@ +@@ -972,7 +972,7 @@ * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA */ @@ -64,7 +64,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -@@ -963,7 +963,7 @@ +@@ -997,7 +997,7 @@ * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA */ @@ -73,7 +73,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -@@ -1097,7 +1097,7 @@ +@@ -1131,7 +1131,7 @@ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 */ @@ -82,7 +82,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -@@ -1121,7 +1121,7 @@ +@@ -1155,7 +1155,7 @@ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 */ @@ -91,7 +91,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED -@@ -1225,7 +1225,7 @@ +@@ -1259,7 +1259,7 @@ * This option is only useful if both MBEDTLS_SHA256_C and * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. */ @@ -100,7 +100,7 @@ /** * \def MBEDTLS_ENTROPY_NV_SEED -@@ -1320,14 +1320,14 @@ +@@ -1354,14 +1354,14 @@ * Uncomment this macro to disable the use of CRT in RSA. * */ @@ -117,7 +117,7 @@ /** * \def MBEDTLS_SHA256_SMALLER -@@ -1481,7 +1481,7 @@ +@@ -1515,7 +1515,7 @@ * configuration of this extension). * */ @@ -126,7 +126,7 @@ /** * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -@@ -1656,7 +1656,7 @@ +@@ -1690,7 +1690,7 @@ * * Comment this macro to disable support for SSL session tickets */ @@ -135,7 +135,7 @@ /** * \def MBEDTLS_SSL_EXPORT_KEYS -@@ -1686,7 +1686,7 @@ +@@ -1720,7 +1720,7 @@ * * Comment this macro to disable support for truncated HMAC in SSL */ @@ -144,7 +144,7 @@ /** * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT -@@ -1745,7 +1745,7 @@ +@@ -1779,7 +1779,7 @@ * * Comment this to disable run-time checking and save ROM space */ @@ -153,7 +153,7 @@ /** * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -@@ -2075,7 +2075,7 @@ +@@ -2109,7 +2109,7 @@ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 */ @@ -162,7 +162,7 @@ /** * \def MBEDTLS_ARIA_C -@@ -2141,7 +2141,7 @@ +@@ -2175,7 +2175,7 @@ * This module enables the AES-CCM ciphersuites, if other requisites are * enabled as well. */ @@ -171,7 +171,7 @@ /** * \def MBEDTLS_CERTS_C -@@ -2153,7 +2153,7 @@ +@@ -2187,7 +2187,7 @@ * * This module is used for testing (ssl_client/server). */ @@ -180,7 +180,7 @@ /** * \def MBEDTLS_CHACHA20_C -@@ -2261,7 +2261,7 @@ +@@ -2295,7 +2295,7 @@ * \warning DES is considered a weak cipher and its use constitutes a * security risk. We recommend considering stronger ciphers instead. */ @@ -189,7 +189,7 @@ /** * \def MBEDTLS_DHM_C -@@ -2424,7 +2424,7 @@ +@@ -2458,7 +2458,7 @@ * This module adds support for the Hashed Message Authentication Code * (HMAC)-based key derivation function (HKDF). */ @@ -198,7 +198,7 @@ /** * \def MBEDTLS_HMAC_DRBG_C -@@ -2734,7 +2734,7 @@ +@@ -2768,7 +2768,7 @@ * * This module enables abstraction of common (libc) functions. */ @@ -207,7 +207,7 @@ /** * \def MBEDTLS_POLY1305_C -@@ -2755,7 +2755,7 @@ +@@ -2789,7 +2789,7 @@ * Caller: library/md.c * */ @@ -216,7 +216,7 @@ /** * \def MBEDTLS_RSA_C -@@ -2862,7 +2862,7 @@ +@@ -2896,7 +2896,7 @@ * * Requires: MBEDTLS_CIPHER_C */ @@ -225,7 +225,7 @@ /** * \def MBEDTLS_SSL_CLI_C -@@ -2962,7 +2962,7 @@ +@@ -2996,7 +2996,7 @@ * * This module provides run-time version information. */ @@ -234,7 +234,7 @@ /** * \def MBEDTLS_X509_USE_C -@@ -3072,7 +3072,7 @@ +@@ -3106,7 +3106,7 @@ * Module: library/xtea.c * Caller: */ diff --git a/package/libs/nghttp2/Makefile b/package/libs/nghttp2/Makefile deleted file mode 100644 index 2cef96dd76..0000000000 --- a/package/libs/nghttp2/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=nghttp2 -PKG_VERSION:=1.41.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/nghttp2/nghttp2/releases/download/v$(PKG_VERSION) -PKG_HASH:=abc25b8dc601f5b3fefe084ce50fcbdc63e3385621bee0cbfa7b57f9ec3e67c2 - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING -CMAKE_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/libnghttp2 - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Library implementing the framing layer of HTTP/2 - MAINTAINER:=Hans Dedecker - ABI_VERSION:=14 -endef - -define Package/libnghttp2/description - C library implementing the framing layer of the HTTP/2 protocol. It can be used to build a HTTP/2-capable HTTP client or server -endef - -CMAKE_OPTIONS += \ - -DENABLE_LIB_ONLY=ON - -define Build/InstallDev - $(call Build/InstallDev/cmake,$(1)) - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libnghttp2.pc - $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libnghttp2.pc -endef - -define Package/libnghttp2/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnghttp2.so.* $(1)/usr/lib -endef - -$(eval $(call BuildPackage,libnghttp2)) diff --git a/package/lienol/luci-app-passwall/Makefile b/package/lienol/luci-app-passwall/Makefile index e7ac5a869a..83a9538192 100644 --- a/package/lienol/luci-app-passwall/Makefile +++ b/package/lienol/luci-app-passwall/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=3.9 -PKG_RELEASE:=51 -PKG_DATE:=20200903 +PKG_RELEASE:=52 +PKG_DATE:=20200905 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) @@ -16,14 +16,10 @@ include $(INCLUDE_DIR)/package.mk define Package/$(PKG_NAME)/config menu "Configuration" - -config PACKAGE_$(PKG_NAME)_INCLUDE_ipt2socks - bool "Include ipt2socks" - default y config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks bool "Include Shadowsocks" - default n + default y config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR bool "Include ShadowsocksR" @@ -35,7 +31,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray bool "Include V2ray" - default y + default y if i386||x86_64||arm||aarch64 config PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_Plus bool "Include Trojan_Plus" @@ -43,7 +39,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_Plus config PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_GO bool "Include Trojan_GO" - default n + default y if i386||x86_64||arm||aarch64 config PACKAGE_$(PKG_NAME)_INCLUDE_Brook bool "Include Brook" @@ -59,11 +55,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_haproxy config PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG bool "Include ChinaDNS-NG" - default y - -config PACKAGE_$(PKG_NAME)_INCLUDE_pdnsd - bool "Include pdnsd" - default y + default n config PACKAGE_$(PKG_NAME)_INCLUDE_https_dns_proxy bool "Include Https DNS Proxy(DoH)" @@ -71,15 +63,15 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_https_dns_proxy config PACKAGE_$(PKG_NAME)_INCLUDE_dns2socks bool "Include dns2socks" - default y + default n config PACKAGE_$(PKG_NAME)_INCLUDE_v2ray-plugin bool "Include v2ray-plugin (Shadowsocks plugin)" - default n + default y if i386||x86_64||arm||aarch64 config PACKAGE_$(PKG_NAME)_INCLUDE_simple-obfs bool "Include simple-obfs (Shadowsocks plugin)" - default n + default y if i386||x86_64||arm||aarch64 endmenu endef @@ -91,7 +83,8 @@ define Package/$(PKG_NAME) PKGARCH:=all DEPENDS:=+libmbedtls +iptables-mod-tproxy +ip +ipset +coreutils +coreutils-base64 +coreutils-nohup +luci-lib-jsonc \ +curl +ca-certificates +resolveip +unzip +dnsmasq-full +tcping +libuci-lua \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ipt2socks:ipt2socks \ + +ipt2socks \ + +pdnsd-alt \ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-redir \ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-local \ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR:shadowsocksr-libev-alt \ @@ -104,7 +97,6 @@ define Package/$(PKG_NAME) +PACKAGE_$(PKG_NAME)_INCLUDE_kcptun:kcptun-client \ +PACKAGE_$(PKG_NAME)_INCLUDE_haproxy:haproxy \ +PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG:chinadns-ng \ - +PACKAGE_$(PKG_NAME)_INCLUDE_pdnsd:pdnsd-alt \ +PACKAGE_$(PKG_NAME)_INCLUDE_https_dns_proxy:https-dns-proxy \ +PACKAGE_$(PKG_NAME)_INCLUDE_dns2socks:dns2socks \ +PACKAGE_$(PKG_NAME)_INCLUDE_v2ray-plugin:v2ray-plugin \ diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index 008d1ca1b6..bf76046f8a 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -24,10 +24,6 @@ uci:foreach(appname, "nodes", function(e) end) local socks_table = {} -socks_table[#socks_table + 1] = { - id = "", - remarks = "127.0.0.1:9050 - dns2sock" .. translate(" Default") -} uci:foreach(appname, "socks", function(s) if s.enabled == "1" and s.node then local id, remarks @@ -101,6 +97,15 @@ end s:tab("DNS", translate("DNS")) +if api.is_finded("chinadns-ng") then + o = s:taboption("DNS", Flag, "chinadns_ng", translate("Use ChinaDNS-NG"), translate("When checked, forced to be set to dnsmasq upstream DNS.")) + o.default = "0" + + o = s:taboption("DNS", Flag, "fair_mode", translate("ChinaDNS-NG Fair Mode")) + o.default = "1" + o:depends("chinadns_ng", "1") +end + o = s:taboption("DNS", Value, "up_china_dns", translate("Resolver For Local/WhiteList Domains") .. "(UDP)") o.description = translate("IP:Port mode acceptable, multi value split with english comma.") .. "
" .. translate("When the selection is not the default, this DNS is forced to be set to dnsmasq upstream DNS.") o.default = "default" @@ -118,24 +123,18 @@ o:value("1.2.4.8", "1.2.4.8 (CNNIC DNS)") o:value("210.2.4.8", "210.2.4.8 (CNNIC DNS)") o:value("180.76.76.76", "180.76.76.76 (" .. translate("Baidu") .. "DNS)") ----- DoH URL -o = s:taboption("DNS", Value, "up_china_dns_doh_url", translate("DoH request address")) -o.default = "https://dns.alidns.com/dns-query" -o:depends("up_china_dns", "https-dns-proxy") - ----- DoH Bootstrap -o = s:taboption("DNS", Value, "up_china_dns_doh_bootstrap", translate("DoH bootstrap DNS"), translate("The Bootstrap DNS server is used to resolve the IP address of the DoH resolver you specify as the upstream.")) -o.default = "223.5.5.5,223.6.6.6" +---- DoH +o = s:taboption("DNS", Value, "up_china_dns_doh", translate("DoH request address")) +o.description = translate("When custom, Please follow the format strictly:") .. "
" .. "https://dns.alidns.com/dns-query,223.5.5.5,223.6.6.6
" .. "https://doh.pub/dns-query,119.29.29.29" +o:value("https://dns.alidns.com/dns-query,223.5.5.5,223.6.6.6", "AliDNS") +o:value("https://doh.pub/dns-query,119.29.29.29,119.28.28.28", "DNSPod") +o.default = "https://dns.alidns.com/dns-query,223.5.5.5,223.6.6.6" o:depends("up_china_dns", "https-dns-proxy") ---- DNS Forward Mode -o = s:taboption("DNS", Value, "dns_mode", translate("Filter Mode")) -o.description = translate("When the selection is chinadns-ng, forced to be set to dnsmasq upstream DNS.") +o = s:taboption("DNS", ListValue, "dns_mode", translate("Filter Mode")) o.rmempty = false o:reset_values() -if api.is_finded("chinadns-ng") then - o:value("chinadns-ng", "ChinaDNS-NG") -end if api.is_finded("pdnsd") then o:value("pdnsd", "pdnsd") end @@ -145,69 +144,45 @@ end if api.is_finded("https-dns-proxy") then o:value("https-dns-proxy", "https-dns-proxy(DoH)") end +o:value("udp", translatef("Requery DNS By %s", translate("UDP Node"))) o:value("nonuse", translate("No Filter")) +o:value("custom", translate("Custom DNS")) + +---- Custom DNS +o = s:taboption("DNS", Value, "custom_dns", translate("Custom DNS")) +o.default = "127.0.0.1#5353" +o:depends({dns_mode = "custom"}) o = s:taboption("DNS", ListValue, "up_trust_pdnsd_dns", translate("Resolver For The List Proxied")) -- o.description = translate("You can use other resolving DNS services as trusted DNS, Example: dns2socks, dns-forwarder... 127.0.0.1#5353
Only use two at most, english comma separation, If you do not fill in the # and the following port, you are using port 53.") -o.default = "" -if api.is_finded("pdnsd") then - o:value("", "pdnsd + " .. translate("Access Filtered DNS By ") .. translate("TCP Node")) -end -o:value("udp", translate("Access Filtered DNS By ") .. translate("UDP Node")) -if api.is_finded("dns2socks") then - o:value("dns2socks", "dns2socks") -end +o.default = "tcp" +o:value("tcp", translatef("Requery DNS By %s", translate("TCP Node"))) +o:value("udp", translatef("Requery DNS By %s", translate("UDP Node"))) o:depends("dns_mode", "pdnsd") -o = s:taboption("DNS", ListValue, "up_trust_chinadns_ng_dns", translate("Resolver For The List Proxied") .. "(UDP)") -o.default = "pdnsd" -if api.is_finded("pdnsd") then - o:value("pdnsd", "pdnsd, " .. translate("Access Filtered DNS By ") .. translate("TCP Node")) -end -o:value("udp", translate("Access Filtered DNS By ") .. translate("UDP Node")) -if api.is_finded("dns2socks") then - o:value("dns2socks", "dns2socks") -end -if api.is_finded("https-dns-proxy") then - o:value("https-dns-proxy", "https-dns-proxy(DoH)") -end -o:depends("dns_mode", "chinadns-ng") - o = s:taboption("DNS", ListValue, "up_trust_doh_dns", translate("Resolver For The List Proxied")) -o:value("tcp", translate("Access Filtered DNS By ") .. translate("TCP Node")) -o:value("socks", translate("Access Filtered DNS By ") .. translate("Socks Node")) +o:value("tcp", translatef("Requery DNS By %s", translate("TCP Node"))) +o:value("socks", translatef("Requery DNS By %s", translate("Socks Node"))) o:depends("dns_mode", "https-dns-proxy") -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "https-dns-proxy"}) ----- Upstream trust DNS Mode for ChinaDNS-NG -o = s:taboption("DNS", Value, "socks_server", translate("Socks Server"), translate("Make sure socks service is available on this address if 'dns2socks' selected.")) -o.default = "" +o = s:taboption("DNS", Value, "socks_server", translate("Socks Server"), translate("Make sure socks service is available on this address.")) for k, v in pairs(socks_table) do o:value(v.id, v.remarks) end -o:depends({dns_mode = "pdnsd", up_trust_pdnsd_dns = "dns2socks"}) o:depends({dns_mode = "dns2socks"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "dns2socks"}) o:depends({dns_mode = "https-dns-proxy", up_trust_doh_dns = "socks"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "https-dns-proxy", up_trust_doh_dns = "socks"}) -o = s:taboption("DNS", Flag, "fair_mode", translate("ChinaDNS-NG Fair Mode")) -o.default = "1" -o:depends({dns_mode = "chinadns-ng"}) - ----- DoH URL -o = s:taboption("DNS", Value, "doh_url", translate("DoH request address")) -o.default = "https://dns.google/dns-query" +---- DoH +o = s:taboption("DNS", Value, "up_trust_doh", translate("DoH request address")) +o.description = translate("When custom, Please follow the format strictly:") .. "
" .. "https://dns.google/dns-query,8.8.8.8,8.8.4.4
" .. "https://doh.opendns.com/dns-query,208.67.222.222" +o:value("https://dns.adguard.com/dns-query,176.103.130.130,176.103.130.131", "AdGuard") +o:value("https://cloudflare-dns.com/dns-query,1.1.1.1,1.0.0.1", "Cloudflare") +o:value("https://security.cloudflare-dns.com/dns-query,1.1.1.2,1.0.0.2", "Cloudflare-Security") +o:value("https://doh.opendns.com/dns-query,208.67.222.222,208.67.220.220", "OpenDNS") +o:value("https://dns.google/dns-query,8.8.8.8,8.8.4.4", "Google") +o:value("https://doh.libredns.gr/dns-query,116.202.176.26", "LibreDNS") +o:value("https://doh.libredns.gr/ads,116.202.176.26", "LibreDNS (No Ads)") +o:value("https://dns.quad9.net/dns-query,9.9.9.9,149.112.112.112", "Quad9-Recommended") +o.default = "https://dns.google/dns-query,8.8.8.8,8.8.4.4" o:depends({dns_mode = "https-dns-proxy"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "https-dns-proxy"}) - ----- DoH Bootstrap -o = s:taboption("DNS", Value, "doh_bootstrap", translate("DoH bootstrap DNS"), translate("The Bootstrap DNS server is used to resolve the IP address of the DoH resolver you specify as the upstream.")) -o.default = "8.8.4.4" -o:value("8.8.4.4", "8.8.4.4 (Google DNS)") -o:value("8.8.8.8", "8.8.8.8 (Google DNS)") -o:value("208.67.222.222", "208.67.222.222 (Open DNS)") -o:value("208.67.220.220", "208.67.220.220 (Open DNS)") -o:depends({dns_mode = "https-dns-proxy"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "https-dns-proxy"}) ---- DNS Forward o = s:taboption("DNS", Value, "dns_forward", translate("Filtered DNS(For Proxied Domains)"), translate("IP:Port mode acceptable, the 1st for 'dns2socks' if split with english comma.")) @@ -218,16 +193,14 @@ o:value("208.67.222.222", "208.67.222.222 (Open DNS)") o:value("208.67.220.220", "208.67.220.220 (Open DNS)") o:depends({dns_mode = "dns2socks"}) o:depends({dns_mode = "pdnsd"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "pdnsd"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "udp"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "dns2socks"}) +o:depends({dns_mode = "udp"}) +--[[ o = s:taboption("DNS", Flag, "dns_cache", translate("Cache Resolved")) o.default = "1" -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "pdnsd"}) -o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "dns2socks"}) o:depends({dns_mode = "dns2socks"}) o:depends({dns_mode = "pdnsd"}) +]]-- o = s:taboption("DNS", Flag, "use_chnlist", translate("Use ChinaList"), translate("Only useful in non-gfwlist mode.") .. "
" .. translate("When used, the domestic DNS will be used only when the chnlist rule is hit, and the domain name that misses the rule will be resolved by remote DNS.")) o.default = "0" diff --git a/package/lienol/luci-app-passwall/po/zh-cn/passwall.po b/package/lienol/luci-app-passwall/po/zh-cn/passwall.po index 434b7c6ebb..827dcb6111 100644 --- a/package/lienol/luci-app-passwall/po/zh-cn/passwall.po +++ b/package/lienol/luci-app-passwall/po/zh-cn/passwall.po @@ -145,6 +145,9 @@ msgstr "过滤模式" msgid "No Filter" msgstr "不过滤" +msgid "Custom DNS" +msgstr "自定义DNS" + msgid "IP:Port mode ecceptable for specify other filtered name services." msgstr "定义接受 IP:Port 形式的输入,以指定其它域名服务的过滤服务。" @@ -157,8 +160,14 @@ msgstr "接受 IP:Port 形式的输入,多个以英文逗号分隔。" msgid "When the selection is not the default, this DNS is forced to be set to dnsmasq upstream DNS." msgstr "当选择的不是默认,则将此DNS强制设置为dnsmasq上游DNS。" -msgid "When the selection is chinadns-ng, forced to be set to dnsmasq upstream DNS." -msgstr "当选择的是ChinaDNS-NG,则将强制设置为dnsmasq上游DNS。" +msgid "When custom, Please follow the format strictly:" +msgstr "当自定义时,请严格遵循以下格式:" + +msgid "Use ChinaDNS-NG" +msgstr "使用ChinaDNS-NG" + +msgid "When checked, forced to be set to dnsmasq upstream DNS." +msgstr "当勾选,则将强制设置为dnsmasq上游DNS。" msgid "Use ChinaList" msgstr "使用chnlist" @@ -178,8 +187,8 @@ msgstr "百度" msgid "Resolver For The List Proxied" msgstr "解析被代理的域名列表" -msgid "Access Filtered DNS By" -msgstr "由过滤DNS解析,经过" +msgid "Requery DNS By %s" +msgstr "通过%s请求DNS" msgid "Forward To Socks Server" msgstr "转发至 Socks 服务器" @@ -190,8 +199,8 @@ msgstr "Socks服务器" msgid "Misconfigured" msgstr "配置不当" -msgid "Make sure socks service is available on this address if 'dns2socks' selected." -msgstr "如启用了 'dns2socks' 请确保此Socks服务可用。" +msgid "Make sure socks service is available on this address." +msgstr "请确保此Socks服务可用。" msgid "ChinaDNS-NG Fair Mode" msgstr "ChinaDNS-NG 公平模式" diff --git a/package/lienol/luci-app-passwall/root/etc/config/passwall b/package/lienol/luci-app-passwall/root/etc/config/passwall index 70f6006129..6ef6256b14 100644 --- a/package/lienol/luci-app-passwall/root/etc/config/passwall +++ b/package/lienol/luci-app-passwall/root/etc/config/passwall @@ -6,7 +6,7 @@ config global option dns_mode 'pdnsd' option up_china_dns 'default' option dns_forward '8.8.4.4' - option use_chnlist '1' + option use_chnlist '0' option use_tcp_node_resolve_dns '1' option tcp_proxy_mode 'chnroute' option udp_proxy_mode 'chnroute' diff --git a/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh b/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh index 518c8f3afa..3eb6ab3bc3 100755 --- a/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/package/lienol/luci-app-passwall/root/usr/share/passwall/app.sh @@ -46,7 +46,7 @@ config_t_get() { } get_enabled_anonymous_secs() { - uci -q show "${CONFIG}" | grep "${1}\[.*\.enabled='1'" | cut -d'.' -sf2 + uci -q show "${CONFIG}" | grep "${1}\[.*\.enabled='1'" | cut -d '.' -sf2 } get_host_ip() { @@ -282,6 +282,7 @@ load_config() { NO_PROXY=1 } + CHINADNS_NG=$(config_t_get global chinadns_ng 0) DNS_MODE=$(config_t_get global dns_mode pdnsd) DNS_FORWARD=$(config_t_get global dns_forward 8.8.4.4:53 | sed 's/:/#/g') DNS_CACHE=$(config_t_get global dns_cache 1) @@ -597,7 +598,7 @@ start_crontab() { if [ "$autoupdate" = "1" ]; then local t="0 $dayupdate * * $weekupdate" [ "$weekupdate" = "7" ] && t="0 $dayupdate * * *" - echo "$t lua $APP_PATH/rule_update.lua nil log > /dev/null 2>&1 &" >>/etc/crontabs/root + echo "$t lua $APP_PATH/rule_update.lua log > /dev/null 2>&1 &" >>/etc/crontabs/root echolog "配置定时任务:自动更新规则。" fi @@ -630,30 +631,78 @@ stop_crontab() { start_dns() { if [ "${LOCAL_DNS}" = "https-dns-proxy" ]; then - up_china_dns_doh_url=$(config_t_get global up_china_dns_doh_url "https://dns.alidns.com/dns-query") - up_china_dns_doh_bootstrap=$(config_t_get global up_china_dns_doh_bootstrap "223.5.5.5,223.6.6.6") - ln_start_bin "$(first_type https-dns-proxy)" https-dns-proxy -a 127.0.0.1 -p "${LOCAL_DOH_PORT}" -b "${up_china_dns_doh_bootstrap}" -r "${up_china_dns_doh_url}" -4 + _doh=$(config_t_get global up_china_dns_doh "https://dns.alidns.com/dns-query,223.5.5.5,223.6.6.6,2400:3200::1,2400:3200:baba::1") + _doh_url=$(echo $_doh | awk -F ',' '{print $1}') + _doh_bootstrap=$(echo $_doh | cut -d ',' -sf 2-) + ln_start_bin "$(first_type https-dns-proxy)" https-dns-proxy -a 127.0.0.1 -p "${LOCAL_DOH_PORT}" -b "${_doh_bootstrap}" -r "${_doh_url}" -4 LOCAL_DNS="127.0.0.1#${LOCAL_DOH_PORT}" + unset _doh _doh_url _doh_bootstrap fi - local dns2socks_socks_server dns2socks_forward dns2sock_cache doh_port pdnsd_port pdnsd_forward other_port up_trust_pdnsd_dns msg - local global chnlist returnhome china_ng_chn china_ng_gfw chnlist_param gfwlist_param extra_mode up_trust_chinadns_ng_dns - dns2socks_socks_server=$(echo $(config_t_get global socks_server 127.0.0.1:9050) | sed "s/#/:/g") - dns2socks_forward=$(get_first_dns DNS_FORWARD 53 | sed 's/#/:/g') - dns2socks_listen="127.0.0.1:${DNS_PORT}" - [ "$DNS_CACHE" == "0" ] && dns2sock_cache="/d" - doh_port=${DNS_PORT} - pdnsd_port=${DNS_PORT} + local pdnsd_forward other_port up_trust_pdnsd_dns msg + local global chnlist returnhome china_ng_chn china_ng_gfw chnlist_param gfwlist_param extra_mode + dns_listen_port=${DNS_PORT} pdnsd_forward=${DNS_FORWARD} - china_ng_chn="${LOCAL_DNS}" other_port=$(expr $DNS_PORT + 1) china_ng_gfw="127.0.0.1#${other_port}" + china_ng_chn="${LOCAL_DNS}" returnhome=$(echo "${TCP_PROXY_MODE}${LOCALHOST_TCP_PROXY_MODE}${UDP_PROXY_MODE}${LOCALHOST_UDP_PROXY_MODE}" | grep "returnhome") global=$(echo "${TCP_PROXY_MODE}${LOCALHOST_TCP_PROXY_MODE}${UDP_PROXY_MODE}${LOCALHOST_UDP_PROXY_MODE}" | grep "global") chnlist=$(echo "${TCP_PROXY_MODE}${LOCALHOST_TCP_PROXY_MODE}${UDP_PROXY_MODE}${LOCALHOST_UDP_PROXY_MODE}" | grep "chnroute") [ -n "${returnhome}" ] && china_ng_chn="${china_ng_gfw}" && china_ng_gfw="${LOCAL_DNS}" sed -n 's/^ipset=\/\.\?\([^/]*\).*$/\1/p' "${RULES_PATH}/gfwlist.conf" | sort -u > "${TMP_PATH}/gfwlist.txt" echolog "过滤服务配置:准备接管域名解析[$?]..." + + [ "$CHINADNS_NG" = "1" ] && { + echolog " | - (chinadns-ng) 只支持2~4级的域名过滤..." + [ -z "${global}${chnlist}" ] && echolog " | - (chinadns-ng) 此模式下,列表外的域名查询会同时发送给本地DNS(可切换到Pdnsd + TCP节点模式解决)..." + [ -n "${returnhome}" ] && msg="本地" || msg="代理" + [ -z "${global}${chnlist}" ] && echolog " | - (chinadns-ng) 列表外域名查询的结果,不在中国IP段内(chnroute/chnroute6)时,只采信${msg} DNS 的应答..." + echolog " | - (chinadns-ng) 上游 DNS (${china_ng_gfw}) 有一定概率会比 DNS (${china_ng_chn}) 先返回的话(比如 DNS 的本地查询缓存),启用 '公平模式' 可以优先接受${msg} DNS 的中国IP段内(chnroute/chnroute6)的应答..." + if [ "$DNS_MODE" = "pdnsd" ]; then + msg="pdnsd" + elif [ "$DNS_MODE" = "dns2socks" ]; then + #[ -n "${global}${chnlist}" ] && TUN_DNS=${china_ng_gfw} + msg="dns2socks" + elif [ "$DNS_MODE" = "https-dns-proxy" ]; then + msg="https-dns-proxy(DoH)" + elif [ "$DNS_MODE" = "udp" ]; then + use_udp_node_resolve_dns=1 + if [ -z "${returnhome}" ]; then + china_ng_gfw="${DNS_FORWARD}" + else + china_ng_chn="${DNS_FORWARD}" + fi + msg="udp" + elif [ "$DNS_MODE" = "custom" ]; then + custom_dns=$(config_t_get global custom_dns) + china_ng_gfw="$(echo ${custom_dns} | sed 's/:/#/g')" + msg="自定义DNS" + fi + chnlist_param= + [ "$USE_CHNLIST" = "1" ] && { + cp -a "${RULES_PATH}/chnlist" "${TMP_PATH}/chnlist" + if [ -z "${returnhome}" ]; then + cat "${RULES_PATH}/direct_host" >> "${TMP_PATH}/chnlist" + echolog " | - [$?](chinadns-ng) 域名白名单合并到中国域名表" + cat "${RULES_PATH}/proxy_host" >> "${TMP_PATH}/gfwlist.txt" + echolog " | - [$?](chinadns-ng) 代理域名表合并到防火墙域名表" + gfwlist_param="${TMP_PATH}/gfwlist.txt" + else + echolog " | - (chinadns-ng) 白名单不与中国域名表合并" + cat "${RULES_PATH}/proxy_host" >> "${TMP_PATH}/chnlist" + echolog " | - [$?](chinadns-ng) 忽略防火墙域名表,代理域名表合并到中国域名表" + fi + chnlist_param="${TMP_PATH}/chnlist" + chnlist_param=${chnlist_param:+-m "${chnlist_param}" -M} + } + [ "$(config_t_get global fair_mode 1)" = "1" ] && extra_mode="-f" + ln_start_bin "$(first_type chinadns-ng)" chinadns-ng -l "${dns_listen_port}" ${china_ng_chn:+-c "${china_ng_chn}"} ${chnlist_param} ${china_ng_gfw:+-t "${china_ng_gfw}"} ${gfwlist_param:+-g "${gfwlist_param}"} $extra_mode + echolog " + 过滤服务:ChinaDNS-NG(:${dns_listen_port}${extra_mode}) + ${msg}:中国域名列表:${china_ng_chn:-D114.114.114.114},防火墙域名列表:${china_ng_gfw:-D8.8.8.8}" + #[ -n "${global}${chnlist}" ] && [ -z "${returnhome}" ] && TUN_DNS="${china_ng_gfw}" + dns_listen_port=${other_port} + } + case "$DNS_MODE" in nonuse) echolog " - 被禁用,设置为非 '默认DNS' 并开启广告过滤可以按本插件内置的广告域名表进行过滤..." @@ -675,11 +724,7 @@ start_dns() { ;; pdnsd) up_trust_pdnsd_dns=$(config_t_get global up_trust_pdnsd_dns "nil") - if [ "$up_trust_pdnsd_dns" = "dns2socks" ]; then - [ -n "${returnhome}" ] && pdnsd_forward=${china_ng_chn} || pdnsd_forward=${china_ng_gfw} - dns2socks_listen=${pdnsd_forward} - msg="dns2socks" - elif [ "$up_trust_pdnsd_dns" = "udp" ]; then + if [ "$up_trust_pdnsd_dns" = "udp" ]; then use_udp_node_resolve_dns=1 msg="UDP节点" elif [ "${up_trust_pdnsd_dns}" = "nil" ]; then @@ -687,82 +732,50 @@ start_dns() { fi echolog " - 域名解析:pdnsd + 使用(${msg})解析域名..." ;; - chinadns-ng) - up_trust_chinadns_ng_dns=$(config_t_get global up_trust_chinadns_ng_dns "pdnsd") - echolog " | - (chinadns-ng) 只支持2~4级的域名过滤..." - [ -z "${global}${chnlist}" ] && echolog " | - (chinadns-ng) 此模式下,列表外的域名查询会同时发送给本地DNS(可切换到Pdnsd + TCP节点模式解决)..." - [ -n "${returnhome}" ] && msg="本地" || msg="代理" - [ -z "${global}${chnlist}" ] && echolog " | - (chinadns-ng) 列表外域名查询的结果,不在中国IP段内(chnroute/chnroute6)时,只采信${msg} DNS 的应答..." - echolog " | - (chinadns-ng) 上游 DNS (${china_ng_gfw}) 有一定概率会比 DNS (${china_ng_chn}) 先返回的话(比如 DNS 的本地查询缓存),启用 '公平模式' 可以优先接受${msg} DNS 的中国IP段内(chnroute/chnroute6)的应答..." - if [ "$up_trust_chinadns_ng_dns" = "pdnsd" ]; then - pdnsd_port=${other_port} - msg="pdnsd" - elif [ "$up_trust_chinadns_ng_dns" = "dns2socks" ]; then - dns2socks_listen=${china_ng_gfw} - #[ -n "${global}${chnlist}" ] && TUN_DNS="${dns2socks_listen}" - msg="dns2socks" - elif [ "$up_trust_chinadns_ng_dns" = "https-dns-proxy" ]; then - doh_port=${other_port} - msg="https-dns-proxy(DoH)" - elif [ "$up_trust_chinadns_ng_dns" = "udp" ]; then - use_udp_node_resolve_dns=1 - if [ -z "${returnhome}" ]; then - china_ng_gfw=${DNS_FORWARD} - else - china_ng_chn="${DNS_FORWARD}" - fi - msg="udp" - fi - chnlist_param= - [ "$USE_CHNLIST" = "1" ] && { - cp -a "${RULES_PATH}/chnlist" "${TMP_PATH}/chnlist" - if [ -z "${returnhome}" ]; then - cat "${RULES_PATH}/direct_host" >> "${TMP_PATH}/chnlist" - echolog " | - [$?](chinadns-ng) 域名白名单合并到中国域名表" - cat "${RULES_PATH}/proxy_host" >> "${TMP_PATH}/gfwlist.txt" - echolog " | - [$?](chinadns-ng) 代理域名表合并到防火墙域名表" - gfwlist_param="${TMP_PATH}/gfwlist.txt" - else - echolog " | - (chinadns-ng) 白名单不与中国域名表合并" - cat "${RULES_PATH}/proxy_host" >> "${TMP_PATH}/chnlist" - echolog " | - [$?](chinadns-ng) 忽略防火墙域名表,代理域名表合并到中国域名表" - fi - chnlist_param="${TMP_PATH}/chnlist" - chnlist_param=${chnlist_param:+-m "${chnlist_param}" -M} - } - [ "$(config_t_get global fair_mode 1)" = "1" ] && extra_mode="-f" - ln_start_bin "$(first_type chinadns-ng)" chinadns-ng -l "${DNS_PORT}" ${china_ng_chn:+-c "${china_ng_chn}"} ${chnlist_param} ${china_ng_gfw:+-t "${china_ng_gfw}"} ${gfwlist_param:+-g "${gfwlist_param}"} $extra_mode - echolog " + 过滤服务:ChinaDNS-NG(:${DNS_PORT}${extra_mode}) + ${msg}:中国域名列表:${china_ng_chn:-D114.114.114.114},防火墙域名列表:${china_ng_gfw:-D8.8.8.8}" - #[ -n "${global}${chnlist}" ] && [ -z "${returnhome}" ] && TUN_DNS="${china_ng_gfw}" + udp) + use_udp_node_resolve_dns=1 + msg="直接使用UDP节点请求DNS" ;; - *) - TUN_DNS="$(echo ${DNS_MODE} | sed 's/:/#/g')" - DNS_MODE="other_dns" - echolog " - 域名解析:指定DNS服务器(支持UDP查询)解析域名:${TUN_DNS}" + custom) + [ "$CHINADNS_NG" != "1" ] && { + custom_dns=$(config_t_get global custom_dns) + TUN_DNS="$(echo ${custom_dns} | sed 's/:/#/g')" + echolog " - 域名解析 直接使用UDP协议自定义DNS($TUN_DNS)解析..." + } ;; esac - if [ -n "$(echo ${DNS_MODE}${up_trust_chinadns_ng_dns} | grep pdnsd)" ]; then - gen_pdnsd_config "${pdnsd_port}" "${pdnsd_forward}" + if [ -n "$(echo ${DNS_MODE} | grep pdnsd)" ]; then + gen_pdnsd_config "${dns_listen_port}" "${pdnsd_forward}" ln_start_bin "$(first_type pdnsd)" pdnsd --daemon -c "${TMP_PATH}/pdnsd/pdnsd.conf" -d fi - if [ -n "$(echo ${DNS_MODE}${up_trust_chinadns_ng_dns} | grep 'https-dns-proxy')" ]; then - doh_url=$(config_t_get global doh_url "https://dns.google/dns-query") - doh_bootstrap=$(config_t_get global doh_bootstrap "8.8.4.4") + if [ -n "$(echo ${DNS_MODE} | grep 'https-dns-proxy')" ]; then + up_trust_doh=$(config_t_get global up_trust_doh "https://dns.google/dns-query,8.8.8.8,8.8.4.4") + _doh_url=$(echo $up_trust_doh | awk -F ',' '{print $1}') + _doh_bootstrap=$(echo $up_trust_doh | cut -d ',' -sf 2-) up_trust_doh_dns=$(config_t_get global up_trust_doh_dns "tcp") if [ "$up_trust_doh_dns" = "socks" ]; then socks_server=$(echo $(config_t_get global socks_server 127.0.0.1:9050) | sed "s/#/:/g") - ln_start_bin "$(first_type https-dns-proxy)" https-dns-proxy -a 127.0.0.1 -p "${doh_port}" -b "${doh_bootstrap}" -r "${doh_url}" -4 -t socks5h://${socks_server} + ln_start_bin "$(first_type https-dns-proxy)" https-dns-proxy -a 127.0.0.1 -p "${dns_listen_port}" -b "${_doh_bootstrap}" -r "${_doh_url}" -4 -t socks5h://${socks_server} elif [ "${up_trust_doh_dns}" = "tcp" ]; then - DNS_FORWARD=${doh_bootstrap}:443 - ln_start_bin "$(first_type https-dns-proxy)" https-dns-proxy -a 127.0.0.1 -p "${doh_port}" -b "${doh_bootstrap}" -r "${doh_url}" -4 + DNS_FORWARD="" + _doh_bootstrap_dns=$(echo $_doh_bootstrap | sed "s/,/ /g") + for _dns in $_doh_bootstrap_dns; do + _dns=$(echo $_dns | awk -F ':' '{print $1}'):443 + [ -n "$DNS_FORWARD" ] && DNS_FORWARD=${DNS_FORWARD},${_dns} || DNS_FORWARD=${_dns} + done + ln_start_bin "$(first_type https-dns-proxy)" https-dns-proxy -a 127.0.0.1 -p "${dns_listen_port}" -b "${_doh_bootstrap}" -r "${_doh_url}" -4 + unset _dns _doh_bootstrap_dns fi + unset _doh_url _doh_bootstrap fi - if [ -n "$(echo ${DNS_MODE}${up_trust_chinadns_ng_dns}${up_trust_pdnsd_dns} | grep dns2socks)" ]; then - dns2socks_listen=$(echo "${dns2socks_listen}" | sed 's/#/:/g') - ln_start_bin "$(first_type dns2socks)" dns2socks "$dns2socks_socks_server" "$dns2socks_forward" "$dns2socks_listen" $dns2sock_cache - echolog " - dns2sock(${dns2socks_listen}${dns2sock_cache}),${dns2socks_socks_server:-127.0.0.1:9050} -> ${dns2socks_forward-D46.182.19.48:53}" - #[ "${DNS_MODE}" = "chinadns-ng" ] && [ -n "${global}${chnlist}" ] && [ -z "${returnhome}" ] && TUN_DNS=$(echo "${dns2socks_listen}" | sed 's/:/#/g') + if [ -n "$(echo ${DNS_MODE}${up_trust_pdnsd_dns} | grep dns2socks)" ]; then + local dns2socks_socks_server=$(echo $(config_t_get global socks_server 127.0.0.1:9050) | sed "s/#/:/g") + local dns2socks_forward=$(get_first_dns DNS_FORWARD 53 | sed 's/#/:/g') + [ "$DNS_CACHE" == "0" ] && local dns2sock_cache="/d" + ln_start_bin "$(first_type dns2socks)" dns2socks "$dns2socks_socks_server" "$dns2socks_forward" "127.0.0.1:$dns_listen_port" $dns2sock_cache + echolog " - dns2sock(127.0.0.1:${dns_listen_port}${dns2sock_cache}),${dns2socks_socks_server:-127.0.0.1:9050} -> ${dns2socks_forward-D46.182.19.48:53}" + #[ "$CHINADNS_NG" = "1" ] && [ -n "${global}${chnlist}" ] && [ -z "${returnhome}" ] && TUN_DNS=$(echo "${dns_listen_port}" | sed 's/:/#/g') fi [ "${use_udp_node_resolve_dns}" = "1" ] && echolog " * 要求代理 DNS 请求,如上游 DNS 非直连地址,确保 UDP 代理打开,并且已经正确转发" [ "${use_tcp_node_resolve_dns}" = "1" ] && echolog " * 请确认上游 DNS 支持 TCP 查询,如非直连地址,确保 TCP 代理打开,并且已经正确转发" @@ -798,7 +811,7 @@ add_dnsmasq() { #始终用国内DNS解析直连(白名单)列表 fwd_dns="${LOCAL_DNS}" #如果使用Chinadns-NG直接交给Chinadns-NG处理 - [ "${DNS_MODE}" = "chinadns-ng" ] && unset fwd_dns + [ "$CHINADNS_NG" = "1" ] && unset fwd_dns #如果没使用chnlist直接使用默认DNS [ "${USE_CHNLIST}" = "0" ] && unset fwd_dns sort -u "${RULES_PATH}/direct_host" | gen_dnsmasq_items "whitelist" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/direct_host.conf" @@ -810,7 +823,7 @@ add_dnsmasq() { [ -n "${returnhome}" ] || [ -n "${chnlist}" ] && { [ -n "${global}" ] && unset fwd_dns #如果使用Chinadns-NG直接交给Chinadns-NG处理 - [ "${DNS_MODE}" = "chinadns-ng" ] && unset fwd_dns + [ "$CHINADNS_NG" = "1" ] && unset fwd_dns #如果使用回国模式,设置dns为远程DNS。 [ -n "${returnhome}" ] && fwd_dns="${TUN_DNS}" sort -u "${RULES_PATH}/chnlist" | gen_dnsmasq_items "chnroute" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/chinalist_host.conf" @@ -821,7 +834,7 @@ add_dnsmasq() { #始终使用远程DNS解析代理(黑名单)列表 fwd_dns="${TUN_DNS}" #如果使用Chinadns-NG直接交给Chinadns-NG处理 - [ "${DNS_MODE}" = "chinadns-ng" ] && unset fwd_dns + [ "$CHINADNS_NG" = "1" ] && unset fwd_dns #如果使用chnlist直接使用默认DNS [ "${USE_CHNLIST}" = "1" ] && unset fwd_dns sort -u "${RULES_PATH}/proxy_host" | gen_dnsmasq_items "blacklist" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/proxy_host.conf" @@ -831,7 +844,7 @@ add_dnsmasq() { [ -z "${returnhome}" ] && { fwd_dns="${TUN_DNS}" #如果使用Chinadns-NG直接交给Chinadns-NG处理 - [ "${DNS_MODE}" = "chinadns-ng" ] && unset fwd_dns + [ "$CHINADNS_NG" = "1" ] && unset fwd_dns #如果使用chnlist直接使用默认DNS [ "${USE_CHNLIST}" = "1" ] && unset fwd_dns sort -u "${TMP_PATH}/gfwlist.txt" | gen_dnsmasq_items "gfwlist" "${fwd_dns}" "${TMP_DNSMASQ_PATH}/gfwlist.conf" @@ -843,7 +856,7 @@ add_dnsmasq() { [ "$(config_t_get global_subscribe subscribe_proxy 0)" = "1" ] && { fwd_dns="${TUN_DNS}" #如果使用Chinadns-NG直接交给Chinadns-NG处理 - [ "${DNS_MODE}" = "chinadns-ng" ] && unset fwd_dns + [ "$CHINADNS_NG" = "1" ] && unset fwd_dns #如果使用chnlist直接使用默认DNS [ "${USE_CHNLIST}" = "1" ] && unset fwd_dns items=$(get_enabled_anonymous_secs "@subscribe_list") @@ -865,7 +878,7 @@ add_dnsmasq() { [ -n "${chnlist}" ] && msg="中国列表以外" [ -n "${returnhome}" ] && msg="中国列表" [ -n "${global}" ] && msg="全局" - if [ "${DNS_MODE}" = "chinadns-ng" ]; then + if [ "$CHINADNS_NG" = "1" ]; then #直接交给Chinadns-ng处理 servers="${TUN_DNS}" && msg="chinadns-ng" else @@ -1009,7 +1022,7 @@ start_haproxy() { sort_items="${sort_items}${IFS}${lport} ${item}" done - items=$(echo "${sort_items}" | sort -n | cut -d' ' -sf 2) + items=$(echo "${sort_items}" | sort -n | cut -d ' ' -sf 2) unset lport local haproxy_port lbss lbort lbweight export backup @@ -1017,7 +1030,7 @@ start_haproxy() { for item in ${items}; do unset haproxy_port lbort bbackup - eval $(uci -q show "${CONFIG}.${item}" | cut -d'.' -sf 3-) + eval $(uci -q show "${CONFIG}.${item}" | cut -d '.' -sf 3-) get_ip_port_from "$lbss" bip bport [ "$lbort" = "default" ] && lbort=$bport || bport=$lbort diff --git a/package/lienol/luci-app-passwall/root/usr/share/passwall/monitor.sh b/package/lienol/luci-app-passwall/root/usr/share/passwall/monitor.sh index 9e925426d4..877beed6c6 100755 --- a/package/lienol/luci-app-passwall/root/usr/share/passwall/monitor.sh +++ b/package/lienol/luci-app-passwall/root/usr/share/passwall/monitor.sh @@ -75,7 +75,7 @@ do done #dns - if [ "$dns_mode" != "nonuse" ]; then + if [ "$dns_mode" != "nonuse" ] && [ "$dns_mode" != "custom" ]; then icount=$(netstat -apn | grep 7913 | wc -l) if [ $icount = 0 ]; then /etc/init.d/passwall restart diff --git a/package/lienol/luci-app-passwall/root/usr/share/passwall/rule_update.lua b/package/lienol/luci-app-passwall/root/usr/share/passwall/rule_update.lua index 600a41be89..9c6896e4b3 100644 --- a/package/lienol/luci-app-passwall/root/usr/share/passwall/rule_update.lua +++ b/package/lienol/luci-app-passwall/root/usr/share/passwall/rule_update.lua @@ -55,8 +55,7 @@ end local log = function(...) if arg1 then - local result = os.date("%Y-%m-%d %H:%M:%S: ") .. - table.concat({...}, " ") + local result = os.date("%Y-%m-%d %H:%M:%S: ") .. table.concat({...}, " ") if arg1 == "log" then local f, err = io.open("/var/log/passwall.log", "a") if f and err == nil then diff --git a/package/utils/policycoreutils/Makefile b/package/utils/policycoreutils/Makefile index 0cebec7ece..34c186e62e 100644 --- a/package/utils/policycoreutils/Makefile +++ b/package/utils/policycoreutils/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=policycoreutils PKG_VERSION:=3.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710 @@ -22,6 +22,7 @@ PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk define Package/policycoreutils SECTION:=utils diff --git a/tools/Makefile b/tools/Makefile index ff773c1ff0..435161182e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -21,65 +21,62 @@ ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_b43legacy-firmwar BUILD_B43_TOOLS = y endif -tools-$(BUILD_TOOLCHAIN) += gmp mpfr mpc libelf expat -tools-y += m4 libtool autoconf autoconf-archive automake flex bison pkg-config mklibs zlib -tools-y += sstrip make-ext4fs e2fsprogs mtd-utils mkimage -tools-y += firmware-utils patch-image quilt padjffs2 -tools-y += mm-macros missing-macros cmake bc findutils gengetopt patchelf -tools-y += mtools dosfstools libressl fakeroot -tools-y += ucl upx -tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2 -tools-$(CONFIG_TARGET_x86) += qemu -tools-$(CONFIG_TARGET_mxs) += elftosb sdimage -tools-$(CONFIG_TARGET_ar71xx) += lzma-old -tools-$(CONFIG_TARGET_ar71xx)$(CONFIG_TARGET_ath79) += squashfs -tools-$(CONFIG_USES_MINOR) += kernel2minor -tools-y += lzma squashfskit4 zip zstd +tools-y += autoconf autoconf-archive automake bc bison cmake dosfstools +tools-y += e2fsprogs fakeroot findutils firmware-utils flex gengetopt +tools-y += libressl libtool lzma m4 make-ext4fs missing-macros mkimage +tools-y += mklibs mm-macros mtd-utils mtools padjffs2 patch-image patchelf +tools-y += pkg-config quilt squashfskit4 sstrip ucl upx zip zlib zstd tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_ISL) += isl -tools-$(CONFIG_USE_SPARSE) += sparse +tools-$(BUILD_TOOLCHAIN) += expat gmp libelf mpc mpfr tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs +tools-$(CONFIG_TARGET_ar71xx) += lzma-old +tools-$(CONFIG_TARGET_ar71xx)$(CONFIG_TARGET_ath79) += squashfs +tools-$(CONFIG_TARGET_mxs) += elftosb sdimage +tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2 tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs +tools-$(CONFIG_TARGET_x86) += qemu +tools-$(CONFIG_USES_MINOR) += kernel2minor +tools-$(CONFIG_USE_SPARSE) += sparse # builddir dependencies -$(curdir)/upx/compile := $(curdir)/ucl/compile -$(curdir)/bison/compile := $(curdir)/flex/compile -$(curdir)/flex/compile := $(curdir)/libtool/compile -$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile -$(curdir)/squashfs/compile := $(curdir)/lzma-old/compile -$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile -$(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile $(curdir)/autoconf/compile := $(curdir)/m4/compile $(curdir)/automake/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/pkg-config/compile $(curdir)/xz/compile +$(curdir)/b43-tools/compile := $(curdir)/bison/compile +$(curdir)/bc/compile := $(curdir)/bison/compile +$(curdir)/bison/compile := $(curdir)/flex/compile +$(curdir)/cbootimage/compile += $(curdir)/automake/compile +$(curdir)/cmake/compile += $(curdir)/libressl/compile +$(curdir)/dosfstools/compile := $(curdir)/autoconf/compile $(curdir)/automake/compile +$(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile +$(curdir)/findutils/compile := $(curdir)/bison/compile +$(curdir)/firmware-utils/compile += $(curdir)/libressl/compile $(curdir)/zlib/compile +$(curdir)/flex/compile := $(curdir)/libtool/compile +$(curdir)/gengetopt/compile := $(curdir)/libtool/compile $(curdir)/gmp/compile := $(curdir)/libtool/compile +$(curdir)/isl/compile := $(curdir)/gmp/compile +$(curdir)/libelf/compile := $(curdir)/libtool/compile +$(curdir)/libressl/compile := $(curdir)/pkg-config/compile +$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile +$(curdir)/lzma-old/compile := $(curdir)/zlib/compile +$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile +$(curdir)/missing-macros/compile := $(curdir)/autoconf/compile +$(curdir)/mkimage/compile += $(curdir)/libressl/compile +$(curdir)/mklibs/compile := $(curdir)/libtool/compile +$(curdir)/mm-macros/compile := $(curdir)/libtool/compile $(curdir)/mpc/compile := $(curdir)/mpfr/compile $(curdir)/gmp/compile $(curdir)/mpfr/compile := $(curdir)/gmp/compile $(curdir)/mtd-utils/compile := $(curdir)/libtool/compile $(curdir)/e2fsprogs/compile $(curdir)/zlib/compile -$(curdir)/mklibs/compile := $(curdir)/libtool/compile -$(curdir)/qemu/compile := $(curdir)/e2fsprogs/compile $(curdir)/zlib/compile -$(curdir)/upslug2/compile := $(curdir)/libtool/compile -$(curdir)/mm-macros/compile := $(curdir)/libtool/compile -$(curdir)/missing-macros/compile := $(curdir)/autoconf/compile -$(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile -$(curdir)/libelf/compile := $(curdir)/libtool/compile -$(curdir)/sdcc/compile := $(curdir)/bison/compile -$(curdir)/b43-tools/compile := $(curdir)/bison/compile $(curdir)/padjffs2/compile := $(curdir)/findutils/compile -$(curdir)/isl/compile := $(curdir)/gmp/compile -$(curdir)/bc/compile := $(curdir)/bison/compile -$(curdir)/findutils/compile := $(curdir)/bison/compile -$(curdir)/gengetopt/compile := $(curdir)/libtool/compile $(curdir)/patchelf/compile := $(curdir)/libtool/compile -$(curdir)/dosfstools/compile := $(curdir)/autoconf/compile $(curdir)/automake/compile -$(curdir)/libressl/compile := $(curdir)/pkg-config/compile -$(curdir)/mkimage/compile += $(curdir)/libressl/compile -$(curdir)/firmware-utils/compile += $(curdir)/libressl/compile $(curdir)/zlib/compile -$(curdir)/cmake/compile += $(curdir)/libressl/compile -$(curdir)/zlib/compile := $(curdir)/cmake/compile +$(curdir)/qemu/compile := $(curdir)/e2fsprogs/compile $(curdir)/zlib/compile +$(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile +$(curdir)/sdcc/compile := $(curdir)/bison/compile +$(curdir)/squashfs/compile := $(curdir)/lzma-old/compile +$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile +$(curdir)/upx/compile := $(curdir)/ucl/compile $(curdir)/wrt350nv2-builder/compile := $(curdir)/zlib/compile -$(curdir)/lzma-old/compile := $(curdir)/zlib/compile -$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile -$(curdir)/cbootimage/compile += $(curdir)/automake/compile +$(curdir)/zlib/compile := $(curdir)/cmake/compile ifneq ($(HOST_OS),Linux) $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile @@ -140,7 +137,11 @@ $(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build mkdir -p $(BUILD_DIR_HOST)/stamp $(STAGING_DIR_HOST)/include/sys $(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/ $(INSTALL_DATA) $(TOPDIR)/tools/include/sys/*.h $(STAGING_DIR_HOST)/include/sys/ - ln -sf lib $(STAGING_DIR_HOST)/lib64 +ifneq ($(HOST_OS),Linux) + mkdir -p $(STAGING_DIR_HOST)/include/asm + $(INSTALL_DATA) $(TOPDIR)/tools/include/asm/*.h $(STAGING_DIR_HOST)/include/asm/ +endif + ln -snf lib $(STAGING_DIR_HOST)/lib64 touch $@ endif