diff --git a/package/ctcgfw/luci-app-vssr/Makefile b/package/ctcgfw/luci-app-vssr/Makefile index 018b406118..9052fd6428 100644 --- a/package/ctcgfw/luci-app-vssr/Makefile +++ b/package/ctcgfw/luci-app-vssr/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-vssr -PKG_VERSION:=1.14 -PKG_RELEASE:=20200824 +PKG_VERSION:=1.15 +PKG_RELEASE:=20200825 include $(INCLUDE_DIR)/package.mk diff --git a/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua b/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua index 5c48e2f4ca..3ac6f8cf26 100644 --- a/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua +++ b/package/ctcgfw/luci-app-vssr/luasrc/controller/vssr.lua @@ -2,6 +2,7 @@ -- Licensed to the public under the GNU General Public License v3. module("luci.controller.vssr", package.seeall) + function index() if not nixio.fs.access("/etc/config/vssr") then return end @@ -47,7 +48,7 @@ function index() entry({"admin", "services", "vssr", "checkport"}, call("check_port")) -- 检测单个端口并返回Ping entry({"admin", "services", "vssr", "run"}, call("act_status")) -- 检测全局服务器状态 entry({"admin", "services", "vssr", "change"}, call("change_node")) -- 切换节点 - --entry({"admin", "services", "vssr", "allserver"}, call("get_servers")) -- 获取所有节点Json + entry({"admin", "services", "vssr", "allserver"}, call("get_servers")) -- 获取所有节点Json entry({"admin", "services", "vssr", "subscribe"}, call("get_subscribe")) -- 执行订阅 entry({"admin", "services", "vssr", "flag"}, call("get_flag")) -- 获取节点国旗 iso code entry({"admin", "services", "vssr", "ip"}, call("check_ip")) -- 获取ip情况 @@ -56,37 +57,26 @@ end -- 执行订阅 function get_subscribe() - local cjson = require "luci.jsonc" local e = {} + local name = "vssr" local uci = luci.model.uci.cursor() local auto_update = luci.http.formvalue("auto_update") local auto_update_time = luci.http.formvalue("auto_update_time") local proxy = luci.http.formvalue("proxy") local subscribe_url = luci.http.formvalue("subscribe_url") if subscribe_url ~= "[]" then - local cmd1 = 'uci set vssr.@server_subscribe[0].auto_update="' .. - auto_update .. '"' - local cmd2 = 'uci set vssr.@server_subscribe[0].auto_update_time="' .. - auto_update_time .. '"' - local cmd3 = 'uci set vssr.@server_subscribe[0].proxy="' .. proxy .. '"' - luci.sys.call('uci delete vssr.@server_subscribe[0].subscribe_url ') - luci.sys.call(cmd1) - luci.sys.call(cmd2) - luci.sys.call(cmd3) - for k, v in ipairs(cjson.parse(subscribe_url)) do - luci.sys.call( - 'uci add_list vssr.@server_subscribe[0].subscribe_url="' .. v .. - '"') - end - luci.sys.call('uci commit vssr') - luci.sys.call( - "nohup /usr/bin/lua /usr/share/vssr/subscribe.lua >/www/check_update.htm 2>/dev/null &") + uci:delete(name,"@server_subscribe[0]",subscribe_url) + uci:set(name,"@server_subscribe[0]","auto_update",auto_update) + uci:set(name,"@server_subscribe[0]","auto_update_time",auto_update_time) + uci:set(name,"@server_subscribe[0]","proxy",proxy) + uci:set_list(name,"@server_subscribe[0]","subscribe_url",cjson.parse(subscribe_url)) + uci:commit(name) + luci.sys.exec("nohup /usr/bin/lua /usr/share/vssr/subscribe.lua >/www/check_update.htm 2>/dev/null &") e.error = 0 else e.error = 1 end - luci.http.prepare_content("application/json") luci.http.write_json(e) @@ -110,12 +100,16 @@ function change_node() local e = {} local uci = luci.model.uci.cursor() local sid = luci.http.formvalue("set") + local server = luci.http.formvalue("server") e.status = false e.sid = sid - if sid ~= "" then - uci:set("vssr", '@global[0]', 'global_server', sid) + if sid ~= "" and server ~= "" then + uci:set("vssr", '@global[0]', server..'_server', sid) + if( server ~= "global" ) then + uci:set("vssr", '@global[0]', 'v2ray_flow', "1") + end uci:commit("vssr") - luci.sys.exec("/etc/init.d/vssr reload") + luci.sys.exec("/etc/init.d/vssr restart") e.status = true end luci.http.prepare_content("application/json") @@ -128,14 +122,14 @@ function switch() local uci = luci.model.uci.cursor() local sid = luci.http.formvalue("node") local isSwitch = uci:get("vssr", sid, "switch_enable") + local toSwitch = (isSwitch == "1") and "0" or "1" + uci:set("vssr", sid, "switch_enable",toSwitch) + uci:commit("vssr") if isSwitch == "1" then - uci:set("vssr", sid, "switch_enable","0") e.switch = false else - uci:set("vssr", sid, "switch_enable","1") e.switch = true end - uci:commit("vssr") e.status = true luci.http.prepare_content("application/json") luci.http.write_json(e) @@ -146,22 +140,73 @@ function act_status() math.randomseed(os.time()) local e = {} -- 全局服务器 - e.global = luci.sys.call( - "busybox ps -w | grep vssr_t | grep -v grep >/dev/null") == 0 + e.global = luci.sys.call("busybox ps -w | grep vssr_t | grep -v grep >/dev/null") == 0 -- 检测PDNSD状态 e.pdnsd = luci.sys.call("pidof pdnsd >/dev/null") == 0 -- 检测游戏模式状态 - e.game = luci.sys.call( - "busybox ps -w | grep vssr_u | grep -v grep >/dev/null") == 0 - + e.game = luci.sys.call("busybox ps -w | grep vssr_u | grep -v grep >/dev/null") == 0 -- 检测Socks5 - e.socks5 = luci.sys.call( - "busybox ps -w | grep vssr_s | grep -v grep >/dev/null") == 0 - + e.socks5 = luci.sys.call("busybox ps -w | grep vssr_s | grep -v grep >/dev/null") == 0 luci.http.prepare_content("application/json") luci.http.write_json(e) end + + + +-- 检测单个节点状态并返回连接速度 +function check_port() + local sockets = require "socket" + local vssr = require "vssrutil" + local set = luci.http.formvalue("host") + local port = luci.http.formvalue("port") + local retstring = "" + local t0 = sockets.gettime() + ret = vssr.check_site(set, port) + local t1 = sockets.gettime() + retstring = tostring(ret) == "true" and "1" or "0" + local tt = t1 - t0 + luci.http.prepare_content("application/json") + luci.http.write_json({ret = retstring , used = math.floor(tt*1000 + 0.5)}) +end + + + +-- 获取当前代理状态 与节点ip +function check_ip() + local e = {} + local d = {} + local mm = require 'maxminddb' + local vssr = require "vssrutil" + local db = mm.open('/usr/share/vssr/GeoLite2-Country.mmdb') + local ip = vssr.wget("http://api.ipify.org/") + local res = db:lookup(ip) + local port = 80 + d.flag = string.lower(res:get("country", "iso_code")) + d.country = res:get("country", "names", "zh-CN") + e.outboard = ip + e.outboardip = d + e.baidu = vssr.check_site("www.baidu.com",port) + e.taobao = vssr.check_site("www.taobao.com",port) + e.google = vssr.check_site("www.google.com",port) + e.youtube = vssr.check_site("www.youtube.com",port) + luci.http.prepare_content("application/json") + luci.http.write_json(e) +end + +-- 获取节点国旗 iso code +function get_flag() + local e = {} + local vssr = require "vssrutil" + local host = luci.http.formvalue("host") + local remark = luci.http.formvalue("remark") + e.host = host + e.flag = vssr.get_flag(remark,host) + luci.http.prepare_content("application/json") + luci.http.write_json(e) +end + + -- 刷新检测文件 function refresh_data() local set = luci.http.formvalue("set") @@ -253,86 +298,4 @@ function refresh_data() end luci.http.prepare_content("application/json") luci.http.write_json({ret = retstring, retcount = icount}) -end - --- 检测单个节点状态并返回连接速度 -function check_port() - - local sockets = require "socket" - local set = luci.http.formvalue("host") - local port = luci.http.formvalue("port") - local retstring = "" - local iret = 1 - iret = luci.sys.call(" ipset add ss_spec_wan_ac " .. set .. " 2>/dev/null") - socket = nixio.socket("inet", "stream") - socket:setopt("socket", "rcvtimeo", 2) - socket:setopt("socket", "sndtimeo", 2) - local t0 = sockets.gettime() - ret = socket:connect(set, port) - socket:close() - local t1 = sockets.gettime() - if tostring(ret) == "true" then - retstring = "1" - else - retstring = "0" - end - if iret == 0 then - luci.sys.call(" ipset del ss_spec_wan_ac " .. set) - end - - local tt = t1 - t0 - luci.http.prepare_content("application/json") - luci.http.write_json({ret = retstring , used = math.floor(tt*1000 + 0.5)}) - -end - - --- 检测 当前节点ip 和 网站访问情况 -function check_ip() - - -- 获取当前的ip和国家 - local e = {} - local d = {} - local mm = require 'maxminddb' - local db = mm.open('/usr/share/vssr/GeoLite2-Country.mmdb') - local http = require "luci.sys" - local ip = string.gsub(http.httpget("https://api.ip.sb/ip"), "\n", "") - local res = db:lookup(ip) - d.flag = string.lower(res:get("country", "iso_code")) - d.country = res:get("country", "names", "zh-CN") - e.outboard = ip - e.outboardip = d - - -- 检测国内通道 - e.baidu = false - sret1 = luci.sys.call("/usr/bin/ssr-check www.baidu.com 80 3 1") - if sret1 == 0 then e.baidu = true end - - e.taobao = false - sret2 = luci.sys.call("/usr/bin/ssr-check www.taobao.com 80 3 1") - if sret2 == 0 then e.taobao = true end - - -- 检测国外通道 - e.google = false - sret3 = luci.sys.call("/usr/bin/ssr-check www.google.com 80 3 1") - if sret3 == 0 then e.google = true end - - e.youtube = false - sret4 = luci.sys.call("/usr/bin/ssr-check www.youtube.com 80 3 1") - if sret4 == 0 then e.youtube = true end - - luci.http.prepare_content("application/json") - luci.http.write_json(e) -end - --- 获取节点国旗 iso code -function get_flag() - local e = {} - local host = luci.http.formvalue("host") - local remark = luci.http.formvalue("remark") - local cmd = '/usr/share/vssr/getflag.sh "' .. remark .. '" ' .. host - e.host = host - e.flag = luci.sys.exec(cmd) - luci.http.prepare_content("application/json") - luci.http.write_json(e) -end +end \ No newline at end of file diff --git a/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua b/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua index fa1e84e409..70a8a611f0 100644 --- a/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua +++ b/package/ctcgfw/luci-app-vssr/luasrc/model/cbi/vssr/client.lua @@ -6,8 +6,6 @@ local m, s, sec, o, kcp_enable local vssr = "vssr" local gfwmode=0 - - if nixio.fs.access("/etc/dnsmasq.ssr/gfw_list.conf") then gfwmode=1 end @@ -19,13 +17,30 @@ m = Map(vssr) m:section(SimpleSection).template = "vssr/status_top" local server_table = {} - +local tw_table = {} +local tvb_table = {} uci:foreach(vssr, "servers", function(s) if s.alias then server_table[s[".name"]] = "[%s]:%s" %{string.upper(s.type), s.alias} elseif s.server and s.server_port then server_table[s[".name"]] = "[%s]:%s:%s" %{string.upper(s.type), s.server, s.server_port} end + + if s.flag == "tw" then + if s.alias then + tw_table[s[".name"]] = "[%s]:%s" %{string.upper(s.type), s.alias} + elseif s.server and s.server_port then + tw_table[s[".name"]] = "[%s]:%s:%s" %{string.upper(s.type), s.server, s.server_port} + end + end + + if s.flag == "hk" then + if s.alias then + tvb_table[s[".name"]] = "[%s]:%s" %{string.upper(s.type), s.alias} + elseif s.server and s.server_port then + tvb_table[s[".name"]] = "[%s]:%s:%s" %{string.upper(s.type), s.server, s.server_port} + end + end end) @@ -34,8 +49,21 @@ for key,_ in pairs(server_table) do table.insert(key_table,key) end -table.sort(key_table) +local key_table_tw = {} +for key,_ in pairs(tw_table) do + table.insert(key_table_tw,key) +end +local key_table_tvb = {} +for key,_ in pairs(tvb_table) do + table.insert(key_table_tvb,key) +end + + + +table.sort(key_table) +table.sort(key_table_tw) +table.sort(key_table_tvb) local route_name = {"youtube_server","tw_video_server","netflix_server","disney_server","prime_server","tvb_server","custom_server"} local route_label = {"Youtube Proxy","TaiWan Video Proxy","Netflix Proxy","Diseny+ Proxy","Prime Video Proxy","TVB Video Proxy","Custom Proxy"} @@ -61,7 +89,13 @@ o.description = translate("When open v2ray routed,Apply may take more time.") for i,v in pairs(route_name) do o = s:option(ListValue, v, translate(route_label[i])) o:value("nil", translate("Same as Main Server")) - for _,key in pairs(key_table) do o:value(key,server_table[key]) end + if(v == "tw_video_server") then + for _,key in pairs(key_table_tw) do o:value(key,tw_table[key]) end + elseif(v == "tvb_server") then + for _,key in pairs(key_table_tvb) do o:value(key,tvb_table[key]) end + else + for _,key in pairs(key_table) do o:value(key,server_table[key]) end + end o:depends("v2ray_flow", "1") o.default = "nil" end diff --git a/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/status_bottom.htm b/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/status_bottom.htm index 7ebe6fb0b0..1e47c7d522 100644 --- a/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/status_bottom.htm +++ b/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/status_bottom.htm @@ -20,7 +20,7 @@
@@ -59,8 +60,9 @@ const GAME_MODE = '<%:Game Mode%>'; const RUNNING = '<%:Running%>'; const NOT_RUNNING = '<%:Not Running%>'; + const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[vssr]], [[ip]])%>'; - XHR.poll(5, STATUS1_URL, null, + XHR.poll(2, STATUS1_URL, null, function (x, data) { if (data) { if (data.global) { diff --git a/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/tblsection.htm b/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/tblsection.htm index 4986946b79..874bad2c63 100644 --- a/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/tblsection.htm +++ b/package/ctcgfw/luci-app-vssr/luasrc/view/vssr/tblsection.htm @@ -1,8 +1,7 @@ - + + +
总计 @@ -19,7 +18,7 @@ -%>
-
+
@@ -95,7 +94,10 @@ const SWITCH_NODE_URL = '<%=luci.dispatcher.build_url("admin", "services", "vssr","switch")%>'; var servers = JSON.parse('<%= self.servers%>'.replace(/\t/g, "")); + var iploaded = false; var ajaxArray = new Array(); + var currentCheckCount = 0; + //渲染节点列表 $.each(servers, function (i, val) { @@ -104,6 +106,7 @@ $(id).addClass("fast"); } val.flag = (val.flag == undefined) ? "un" : val.flag; + $(id).attr("data-flag",val.flag); $(id).find(".type .tp").text(val.type); $(id).find(".type").addClass("flag-icon-" + val.flag); $(id).find(".alias").text(val.alias); @@ -119,19 +122,73 @@ //转换节点名称的Emoji显示 $(".alias").emoji(); //适配方框的大小 + $(".flag-icon").each(function (index, el) { - if ($(el).height < 60) { - $(el).parent.height(60); - $(el).width(60) - } else { - $(el).width($(el).height()); - } - }); + if ($(el).height < 60) { + $(el).parent.height(60); + $(el).width(60) + } else { + $(el).width($(el).height()); + } + }); + //切换节点 function apply_node(node) { - $("#cbi-apply-vssr1").show(); //显示应用中 - $.each(ajaxArray, function (n, value) { value.abort(); }) //中断所有的ajax请求 - $.get(CHANGE_NODE_URL, { set: node }, + //$("#cbi-apply-vssr1").show(); //显示应用中 + + var $html = ""; + $html +='
'; + $html +='
'; + $html +='
'; + if($('#cbi-' + CONFIG + '-' +node).attr("data-flag") == "tw"){ + $html +='
'; + } + $html +='
'; + $html +='
'; + $html +='
'; + if($('#cbi-' + CONFIG + '-' +node).attr("data-flag") =="hk"){ + $html +='
'; + } + $html +='
'; + $html +='
'; + Swal.fire({ + title: '请选择应用于', + html:$html, + focusConfirm: false, + confirmButtonText:'关闭', + onRender: (toast) => { + $(".change-node").click(function(){ + var dataServer = $(this).attr("data-server"); + XHR.halt(); + $.each(ajaxArray, function (n, value) { value.abort(); }) //中断所有的ajax请求 + Swal.fire({ + title: '正在应用中', + allowOutsideClick:false, + onBeforeOpen: () => { + Swal.showLoading() + } + }) + $.get(CHANGE_NODE_URL, { set: node,server:dataServer }, + function (data, status) { + $("#cbi-apply-vssr1").hide(); //隐藏应用中 + if (data.status) { + var id = '#cbi-<%=self.config%>-' + node; + if(dataServer == "global"){ + $(".cbi-section-table-row").removeClass("fast"); + $(id).addClass("fast"); + } + + Swal.close(); + XHR.run(); + } + }); + }) + } + }) + + + + /*$.get(CHANGE_NODE_URL, { set: node }, function (data, status) { $("#cbi-apply-vssr1").hide(); //隐藏应用中 if (data.status) { @@ -139,8 +196,10 @@ $(".cbi-section-table-row").removeClass("fast"); $(id).addClass("fast"); } - }); + });*/ } + + //设定自动切换台 $(".incon").click(function () { @@ -163,12 +222,18 @@ //检测所有节点延迟 function check() { $(".host_con").html(""); + $.each(ajaxArray, function (n, value) { value.abort(); }) //中断所有的ajax请求 ajaxArray = []; + currentCheckCount = 0; + XHR.halt(); $(".pure-u-1-5").each(function () { host = $(this).find(".cbi-section-table-row ").attr("server"); port = $(this).find(".cbi-section-table-row ").attr("server_port"); $(".host_con").text(""); - check_port(host, port, this); + if(host != undefined){ + check_port(host, port, this); + } + }); } @@ -177,6 +242,7 @@ $.ajaxSettings.async = true; var axhr = $.get(CHECK_PING_URL, { host: hosts, port: ports }, function (data, status) { + currentCheckCount ++ var host_con = $(target).find(".host_con"); host_con.removeClass("fast"); host_con.removeClass("middle"); @@ -200,12 +266,24 @@ host_con.addClass("nopass"); host_con.text("Error"); } + + if(currentCheckCount == ajaxArray.length){ + XHR.run(); + } }); ajaxArray.push(axhr); } $(document).ready(function () { - setTimeout(function () { check(); }, 500); //延迟500MS开始检测 + //setTimeout(function () { check(); }, 500); //延迟500MS开始检测 + + $( "body" ).on( "iploaded", function( event, param1 ) { + if(!iploaded){ + iploaded = true; + check(); + } + }); + $(".cbi-page-actions").hide(); //隐藏底部保存提交按钮 $(".cbi-button-check").click(function () { check(); diff --git a/package/ctcgfw/luci-app-vssr/root/etc/config/black.list b/package/ctcgfw/luci-app-vssr/root/etc/config/black.list index 66cd4b9f23..56df0f1829 100644 --- a/package/ctcgfw/luci-app-vssr/root/etc/config/black.list +++ b/package/ctcgfw/luci-app-vssr/root/etc/config/black.list @@ -1,4 +1,4 @@ -api.ip.sb +api.ipify.org fast.com netflix.ca netflix.com diff --git a/package/ctcgfw/luci-app-vssr/root/usr/share/lua/vssrutil.lua b/package/ctcgfw/luci-app-vssr/root/usr/share/lua/vssrutil.lua new file mode 100644 index 0000000000..226e1c3780 --- /dev/null +++ b/package/ctcgfw/luci-app-vssr/root/usr/share/lua/vssrutil.lua @@ -0,0 +1,136 @@ +#!/usr/bin/lua + +------------------------------------------------ +-- This file is converter ip to country iso code +-- @author Jerryk +------------------------------------------------ +local _M = {} + +-- Get country iso code with remark or host +-- Return String:iso_code +function _M.get_flag(remark, host) + local nixio = require "nixio" + local ip = require "luci.ip" + local mm = require 'maxminddb' + local db = mm.open('/usr/share/vssr/GeoLite2-Country.mmdb') + local iso_table = { + "AC", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", + "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", + "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", + "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", + "CN", "CO", "CP", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DG", + "DJ", "DK", "DM", "DO", "DZ", "EA", "EC", "EE", "EG", "EH", "ER", "ES", + "ET", "EU", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", + "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", + "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "IC", "ID", "IE", + "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", + "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", + "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", + "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", + "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", + "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", + "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", + "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", + "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", + "SX", "SY", "SZ", "TA", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", + "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "UN", + "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", + "XK", "YE", "YT", "ZA", "ZM", "ZW", "US", "HK", "TW", "JP", "GB", "GB", + "DE", "FR", "IN", "TR", "SG", "KR", "RU", "IE" + } + + local emoji_table = { + "🇦🇨", "🇦🇩", "🇦🇪", "🇦🇫", "🇦🇬", "🇦🇮", + "🇦🇱", "🇦🇲", "🇦🇴", "🇦🇶", "🇦🇷", "🇦🇸", + "🇦🇹", "🇦🇺", "🇦🇼", "🇦🇽", "🇦🇿", "🇧🇦", + "🇧🇧", "🇧🇩", "🇧🇪", "🇧🇫", "🇧🇬", "🇧🇭", + "🇧🇮", "🇧🇯", "🇧🇱", "🇧🇲", "🇧🇳", "🇧🇴", + "🇧🇶", "🇧🇷", "🇧🇸", "🇧🇹", "🇧🇻", "🇧🇼", + "🇧🇾", "🇧🇿", "🇨🇦", "🇨🇨", "🇨🇩", "🇨🇫", + "🇨🇬", "🇨🇭", "🇨🇮", "🇨🇰", "🇨🇱", "🇨🇲", + "🇨🇳", "🇨🇴", "🇨🇵", "🇨🇷", "🇨🇺", "🇨🇻", + "🇨🇼", "🇨🇽", "🇨🇾", "🇨🇿", "🇩🇪", "🇩🇬", + "🇩🇯", "🇩🇰", "🇩🇲", "🇩🇴", "🇩🇿", "🇪🇦", + "🇪🇨", "🇪🇪", "🇪🇬", "🇪🇭", "🇪🇷", "🇪🇸", + "🇪🇹", "🇪🇺", "🇫🇮", "🇫🇯", "🇫🇰", "🇫🇲", + "🇫🇴", "🇫🇷", "🇬🇦", "🇬🇧", "🇬🇩", "🇬🇪", + "🇬🇫", "🇬🇬", "🇬🇭", "🇬🇮", "🇬🇱", "🇬🇲", + "🇬🇳", "🇬🇵", "🇬🇶", "🇬🇷", "🇬🇸", "🇬🇹", + "🇬🇺", "🇬🇼", "🇬🇾", "🇭🇰", "🇭🇲", "🇭🇳", + "🇭🇷", "🇭🇹", "🇭🇺", "🇮🇨", "🇮🇩", "🇮🇪", + "🇮🇱", "🇮🇲", "🇮🇳", "🇮🇴", "🇮🇶", "🇮🇷", + "🇮🇸", "🇮🇹", "🇯🇪", "🇯🇲", "🇯🇴", "🇯🇵", + "🇰🇪", "🇰🇬", "🇰🇭", "🇰🇮", "🇰🇲", "🇰🇳", + "🇰🇵", "🇰🇷", "🇰🇼", "🇰🇾", "🇰🇿", "🇱🇦", + "🇱🇧", "🇱🇨", "🇱🇮", "🇱🇰", "🇱🇷", "🇱🇸", + "🇱🇹", "🇱🇺", "🇱🇻", "🇱🇾", "🇲🇦", "🇲🇨", + "🇲🇩", "🇲🇪", "🇲🇫", "🇲🇬", "🇲🇭", "🇲🇰", + "🇲🇱", "🇲🇲", "🇲🇳", "🇲🇴", "🇲🇵", "🇲🇶", + "🇲🇷", "🇲🇸", "🇲🇹", "🇲🇺", "🇲🇻", "🇲🇼", + "🇲🇽", "🇲🇾", "🇲🇿", "🇳🇦", "🇳🇨", "🇳🇪", + "🇳🇫", "🇳🇬", "🇳🇮", "🇳🇱", "🇳🇴", "🇳🇵", + "🇳🇷", "🇳🇺", "🇳🇿", "🇴🇲", "🇵🇦", "🇵🇪", + "🇵🇫", "🇵🇬", "🇵🇭", "🇵🇰", "🇵🇱", "🇵🇲", + "🇵🇳", "🇵🇷", "🇵🇸", "🇵🇹", "🇵🇼", "🇵🇾", + "🇶🇦", "🇷🇪", "🇷🇴", "🇷🇸", "🇷🇺", "🇷🇼", + "🇸🇦", "🇸🇧", "🇸🇨", "🇸🇩", "🇸🇪", "🇸🇬", + "🇸🇭", "🇸🇮", "🇸🇯", "🇸🇰", "🇸🇱", "🇸🇲", + "🇸🇳", "🇸🇴", "🇸🇷", "🇸🇸", "🇸🇹", "🇸🇻", + "🇸🇽", "🇸🇾", "🇸🇿", "🇹🇦", "🇹🇨", "🇹🇩", + "🇹🇫", "🇹🇬", "🇹🇭", "🇹🇯", "🇹🇰", "🇹🇱", + "🇹🇲", "🇹🇳", "🇹🇴", "🇹🇷", "🇹🇹", "🇹🇻", + "🇹🇼", "🇹🇿", "🇺🇦", "🇺🇬", "🇺🇲", "🇺🇳", + "🇺🇸", "🇺🇾", "🇺🇿", "🇻🇦", "🇻🇨", "🇻🇪", + "🇻🇬", "🇻🇮", "🇻🇳", "🇻🇺", "🇼🇫", "🇼🇸", + "🇽🇰", "🇾🇪", "🇾🇹", "🇿🇦", "🇿🇲", "🇿🇼", + "美国", "香港", "台湾", "日本", "英国", "UK", "德国", + "法国", "印度", "土耳其", "新加坡", "韩国", "俄罗斯", + "爱尔兰" + } + + local iso_code = nil + if (remark ~= nil) then + for i, v in pairs(emoji_table) do + if (string.find(remark, v)) then + iso_code = string.lower(iso_table[i]) + break + end + end + end + + if (iso_code == nil) then + local ret = nixio.getaddrinfo(host, "any") + local hostip = ret[1].address + local res = db:lookup(hostip) + iso_code = string.lower(res:get("country", "iso_code")) + end + return string.gsub(iso_code, '\n', '') +end + +-- Get status of conncet to any site with host and port +-- Return String:true or nil +function _M.check_site(host, port) + local nixio = require "nixio" + local socket = nixio.socket("inet", "stream") + socket:setopt("socket", "rcvtimeo", 2) + socket:setopt("socket", "sndtimeo", 2) + local ret = socket:connect(host, port) + socket:close() + return ret +end + + +function _M.trim(text) + if not text or text == "" then + return "" + end + return (string.gsub(text, "^%s*(.-)%s*$", "%1")) +end + +function _M.wget(url) + local stdout = luci.sys.exec('wget-ssl -q --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --no-check-certificate -t 3 -T 10 -O- "' .. url .. '"') + return _M.trim(stdout) +end + +return _M + diff --git a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/getflag.sh b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/getflag.sh deleted file mode 100755 index c3b24981ea..0000000000 --- a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/getflag.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# Copyright (C) 2019 Jerryk -lua=/usr/bin/lua -name="$1" -host=$2 -code='' -iso_array=(AC AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CP CR CU CV CW CX CY CZ DE DG DJ DK DM DO DZ EA EC EE EG EH ER ES ET EU FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU IC ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TA TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM UN US UY UZ VA VC VE VG VI VN VU WF WS XK YE YT ZA ZM ZW US HK TW JP GB GB DE FR IN TR SG KR RU IE) - -emoji_array=(🇦🇨 🇦🇩 🇦🇪 🇦🇫 🇦🇬 🇦🇮 🇦🇱 🇦🇲 🇦🇴 🇦🇶 🇦🇷 🇦🇸 🇦🇹 🇦🇺 🇦🇼 🇦🇽 🇦🇿 🇧🇦 🇧🇧 🇧🇩 🇧🇪 🇧🇫 🇧🇬 🇧🇭 🇧🇮 🇧🇯 🇧🇱 🇧🇲 🇧🇳 🇧🇴 🇧🇶 🇧🇷 🇧🇸 🇧🇹 🇧🇻 🇧🇼 🇧🇾 🇧🇿 🇨🇦 🇨🇨 🇨🇩 🇨🇫 🇨🇬 🇨🇭 🇨🇮 🇨🇰 🇨🇱 🇨🇲 🇨🇳 🇨🇴 🇨🇵 🇨🇷 🇨🇺 🇨🇻 🇨🇼 🇨🇽 🇨🇾 🇨🇿 🇩🇪 🇩🇬 🇩🇯 🇩🇰 🇩🇲 🇩🇴 🇩🇿 🇪🇦 🇪🇨 🇪🇪 🇪🇬 🇪🇭 🇪🇷 🇪🇸 🇪🇹 🇪🇺 🇫🇮 🇫🇯 🇫🇰 🇫🇲 🇫🇴 🇫🇷 🇬🇦 🇬🇧 🇬🇩 🇬🇪 🇬🇫 🇬🇬 🇬🇭 🇬🇮 🇬🇱 🇬🇲 🇬🇳 🇬🇵 🇬🇶 🇬🇷 🇬🇸 🇬🇹 🇬🇺 🇬🇼 🇬🇾 🇭🇰 🇭🇲 🇭🇳 🇭🇷 🇭🇹 🇭🇺 🇮🇨 🇮🇩 🇮🇪 🇮🇱 🇮🇲 🇮🇳 🇮🇴 🇮🇶 🇮🇷 🇮🇸 🇮🇹 🇯🇪 🇯🇲 🇯🇴 🇯🇵 🇰🇪 🇰🇬 🇰🇭 🇰🇮 🇰🇲 🇰🇳 🇰🇵 🇰🇷 🇰🇼 🇰🇾 🇰🇿 🇱🇦 🇱🇧 🇱🇨 🇱🇮 🇱🇰 🇱🇷 🇱🇸 🇱🇹 🇱🇺 🇱🇻 🇱🇾 🇲🇦 🇲🇨 🇲🇩 🇲🇪 🇲🇫 🇲🇬 🇲🇭 🇲🇰 🇲🇱 🇲🇲 🇲🇳 🇲🇴 🇲🇵 🇲🇶 🇲🇷 🇲🇸 🇲🇹 🇲🇺 🇲🇻 🇲🇼 🇲🇽 🇲🇾 🇲🇿 🇳🇦 🇳🇨 🇳🇪 🇳🇫 🇳🇬 🇳🇮 🇳🇱 🇳🇴 🇳🇵 🇳🇷 🇳🇺 🇳🇿 🇴🇲 🇵🇦 🇵🇪 🇵🇫 🇵🇬 🇵🇭 🇵🇰 🇵🇱 🇵🇲 🇵🇳 🇵🇷 🇵🇸 🇵🇹 🇵🇼 🇵🇾 🇶🇦 🇷🇪 🇷🇴 🇷🇸 🇷🇺 🇷🇼 🇸🇦 🇸🇧 🇸🇨 🇸🇩 🇸🇪 🇸🇬 🇸🇭 🇸🇮 🇸🇯 🇸🇰 🇸🇱 🇸🇲 🇸🇳 🇸🇴 🇸🇷 🇸🇸 🇸🇹 🇸🇻 🇸🇽 🇸🇾 🇸🇿 🇹🇦 🇹🇨 🇹🇩 🇹🇫 🇹🇬 🇹🇭 🇹🇯 🇹🇰 🇹🇱 🇹🇲 🇹🇳 🇹🇴 🇹🇷 🇹🇹 🇹🇻 🇹🇼 🇹🇿 🇺🇦 🇺🇬 🇺🇲 🇺🇳 🇺🇸 🇺🇾 🇺🇿 🇻🇦 🇻🇨 🇻🇪 🇻🇬 🇻🇮 🇻🇳 🇻🇺 🇼🇫 🇼🇸 🇽🇰 🇾🇪 🇾🇹 🇿🇦 🇿🇲 🇿🇼 美国 香港 台湾 日本 英国 UK 德国 法国 印度 土耳其 新加坡 韩国 俄罗斯 爱尔兰) - - -for i in "${!emoji_array[@]}"; do - if [[ $name == *${emoji_array[$i]}* ]]; then - code=${iso_array[$i]} - break - fi -done - -if [ ! -z $code ]; then - echo $code | tr "[A-Z]" "[a-z]" -else - - - if echo $host | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then - hostip=${host} - elif [ "$host" != "${host#*:[0-9a-fA-F]}" ]; then - hostip=${host} - else - hostip=$(nslookup ${host} | grep 'Address 1' | sed 's/Address 1: //g') - if echo $hostip | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then - hostip=${hostip} - else - hostip=$(cat /etc/ssr_ip) - fi - fi - lua /usr/share/vssr/iso_code.lua $hostip -fi diff --git a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/iso_code.lua b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/iso_code.lua deleted file mode 100644 index c7d6c37953..0000000000 --- a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/iso_code.lua +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/lua ------------------------------------------------- --- This file is converter ip to country iso code --- @author Jerryk ------------------------------------------------- - -local mm = require 'maxminddb' -local db = mm.open('/usr/share/vssr/GeoLite2-Country.mmdb') -local res = db:lookup(arg[1]) -print(string.lower(res:get("country", "iso_code"))) \ No newline at end of file diff --git a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/subscribe.lua b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/subscribe.lua index 422adc3f1d..cac3dc6508 100644 --- a/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/subscribe.lua +++ b/package/ctcgfw/luci-app-vssr/root/usr/share/vssr/subscribe.lua @@ -9,6 +9,7 @@ require 'luci.util' require 'luci.jsonc' require 'luci.sys' + -- these global functions are accessed all the time by the event handler -- so caching them is worth the effort local luci = luci @@ -261,19 +262,15 @@ local function processData(szType, content) result.hashkey = md5(jsonStringify(result)) result.alias = alias result.switch_enable = switch_enable - - local flag = luci.sys.exec('/usr/share/' .. name .. '/getflag.sh "' .. - result.alias .. '" ' .. result.server) - result.flag = string.gsub(flag, '\n', '') + local vssrutil = require "vssrutil" + result.flag = vssrutil.get_flag(result.alias,result.server) return result end -- wget local function wget(url) - local stdout = luci.sys.exec( - 'wget-ssl --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36" --no-check-certificate -t 3 -T 10 -O- "' .. - url .. '"') - return trim(stdout) + local stdout = luci.sys.exec('wget-ssl -q --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --no-check-certificate -t 3 -T 10 -O- "' .. url .. '"') + return trim(stdout) end local execute = function() diff --git a/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/css/sweetalert2.css b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/css/sweetalert2.css new file mode 100644 index 0000000000..3b8c2842fb --- /dev/null +++ b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/css/sweetalert2.css @@ -0,0 +1,1462 @@ +@charset "UTF-8"; +@-webkit-keyframes swal2-show { + 0% { + -webkit-transform: scale(0.7); + transform: scale(0.7); + } + 45% { + -webkit-transform: scale(1.05); + transform: scale(1.05); + } + 80% { + -webkit-transform: scale(0.95); + transform: scale(0.95); + } + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + -webkit-transform: scale(0.7); + transform: scale(0.7); + } + 45% { + -webkit-transform: scale(1.05); + transform: scale(1.05); + } + 80% { + -webkit-transform: scale(0.95); + transform: scale(0.95); + } + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; + } + 100% { + -webkit-transform: scale(0.5); + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; + } + 100% { + -webkit-transform: scale(0.5); + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.875em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.875em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + } + 5% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + } + 12% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); + } + 100% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + } + 5% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + } + 12% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); + } + 100% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + -webkit-transform: scale(1.15); + transform: scale(1.15); + } + 100% { + margin-top: 0; + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + -webkit-transform: scale(1.15); + transform: scale(1.15); + } + 100% { + margin-top: 0; + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + -webkit-transform: rotateX(100deg); + transform: rotateX(100deg); + opacity: 0; + } + 100% { + -webkit-transform: rotateX(0deg); + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + -webkit-transform: rotateX(100deg); + transform: rotateX(100deg); + opacity: 0; + } + 100% { + -webkit-transform: rotateX(0deg); + transform: rotateX(0deg); + opacity: 1; + } +} +body.swal2-toast-shown .swal2-container { + background-color: transparent; +} +body.swal2-toast-shown .swal2-container.swal2-shown { + background-color: transparent; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} +body.swal2-toast-column .swal2-toast { + flex-direction: column; + align-items: stretch; +} +body.swal2-toast-column .swal2-toast .swal2-actions { + flex: 1; + align-self: stretch; + height: 2.2em; + margin-top: 0.3125em; +} +body.swal2-toast-column .swal2-toast .swal2-loading { + justify-content: center; +} +body.swal2-toast-column .swal2-toast .swal2-input { + height: 2em; + margin: 0.3125em auto; + font-size: 1em; +} +body.swal2-toast-column .swal2-toast .swal2-validation-message { + font-size: 1em; +} + +.swal2-popup.swal2-toast { + flex-direction: row; + align-items: center; + width: auto; + padding: 0.625em; + overflow-y: hidden; + box-shadow: 0 0 0.625em #d9d9d9; +} +.swal2-popup.swal2-toast .swal2-header { + flex-direction: row; +} +.swal2-popup.swal2-toast .swal2-title { + flex-grow: 1; + justify-content: flex-start; + margin: 0 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + position: static; + width: 0.8em; + height: 0.8em; + line-height: 0.8; +} +.swal2-popup.swal2-toast .swal2-content { + justify-content: flex-start; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-icon { + width: 2em; + min-width: 2em; + height: 2em; + margin: 0; +} +.swal2-popup.swal2-toast .swal2-icon::before { + display: flex; + align-items: center; + font-size: 2em; + font-weight: bold; +} +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .swal2-popup.swal2-toast .swal2-icon::before { + font-size: 0.25em; + } +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + flex-basis: auto !important; + height: auto; + margin: 0 0.3125em; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0 0.3125em; + padding: 0.3125em 0.625em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 0.0625em #fff, 0 0 0 0.125em rgba(50, 100, 150, 0.4); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 2em 2em; + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + -webkit-transform-origin: 0 1.5em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} +.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + -webkit-transform: translateY(-0.625em) rotateZ(2deg); + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + -webkit-transform: translateY(0) rotateZ(-2deg); + transform: translateY(0) rotateZ(-2deg); + } + 66% { + -webkit-transform: translateY(0.3125em) rotateZ(2deg); + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + -webkit-transform: translateY(0) rotateZ(0); + transform: translateY(0) rotateZ(0); + } +} + +@keyframes swal2-toast-show { + 0% { + -webkit-transform: translateY(-0.625em) rotateZ(2deg); + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + -webkit-transform: translateY(0) rotateZ(-2deg); + transform: translateY(0) rotateZ(-2deg); + } + 66% { + -webkit-transform: translateY(0.3125em) rotateZ(2deg); + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + -webkit-transform: translateY(0) rotateZ(0); + transform: translateY(0) rotateZ(0); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + -webkit-transform: rotateZ(1deg); + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + -webkit-transform: rotateZ(1deg); + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-shown { + top: auto; + right: auto; + bottom: auto; + left: auto; + max-width: calc(100% - 0.625em * 2); + background-color: transparent; +} +body.swal2-no-backdrop .swal2-shown > .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +body.swal2-no-backdrop .swal2-shown.swal2-top { + top: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); +} +body.swal2-no-backdrop .swal2-shown.swal2-top-start, body.swal2-no-backdrop .swal2-shown.swal2-top-left { + top: 0; + left: 0; +} +body.swal2-no-backdrop .swal2-shown.swal2-top-end, body.swal2-no-backdrop .swal2-shown.swal2-top-right { + top: 0; + right: 0; +} +body.swal2-no-backdrop .swal2-shown.swal2-center { + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} +body.swal2-no-backdrop .swal2-shown.swal2-center-start, body.swal2-no-backdrop .swal2-shown.swal2-center-left { + top: 50%; + left: 0; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +body.swal2-no-backdrop .swal2-shown.swal2-center-end, body.swal2-no-backdrop .swal2-shown.swal2-center-right { + top: 50%; + right: 0; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +body.swal2-no-backdrop .swal2-shown.swal2-bottom { + bottom: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); +} +body.swal2-no-backdrop .swal2-shown.swal2-bottom-start, body.swal2-no-backdrop .swal2-shown.swal2-bottom-left { + bottom: 0; + left: 0; +} +body.swal2-no-backdrop .swal2-shown.swal2-bottom-end, body.swal2-no-backdrop .swal2-shown.swal2-bottom-right { + right: 0; + bottom: 0; +} + +.swal2-container { + display: flex; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 0.625em; + overflow-x: hidden; + background-color: transparent; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-top { + align-items: flex-start; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-top-left { + align-items: flex-start; + justify-content: flex-start; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-top-right { + align-items: flex-start; + justify-content: flex-end; +} +.swal2-container.swal2-center { + align-items: center; +} +.swal2-container.swal2-center-start, .swal2-container.swal2-center-left { + align-items: center; + justify-content: flex-start; +} +.swal2-container.swal2-center-end, .swal2-container.swal2-center-right { + align-items: center; + justify-content: flex-end; +} +.swal2-container.swal2-bottom { + align-items: flex-end; +} +.swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left { + align-items: flex-end; + justify-content: flex-start; +} +.swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right { + align-items: flex-end; + justify-content: flex-end; +} +.swal2-container.swal2-bottom > :first-child, .swal2-container.swal2-bottom-start > :first-child, .swal2-container.swal2-bottom-left > :first-child, .swal2-container.swal2-bottom-end > :first-child, .swal2-container.swal2-bottom-right > :first-child { + margin-top: auto; +} +.swal2-container.swal2-grow-fullscreen > .swal2-modal { + display: flex !important; + flex: 1; + align-self: stretch; + justify-content: center; +} +.swal2-container.swal2-grow-row > .swal2-modal { + display: flex !important; + flex: 1; + align-content: center; + justify-content: center; +} +.swal2-container.swal2-grow-column { + flex: 1; + flex-direction: column; +} +.swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom { + align-items: center; +} +.swal2-container.swal2-grow-column.swal2-top-start, .swal2-container.swal2-grow-column.swal2-center-start, .swal2-container.swal2-grow-column.swal2-bottom-start, .swal2-container.swal2-grow-column.swal2-top-left, .swal2-container.swal2-grow-column.swal2-center-left, .swal2-container.swal2-grow-column.swal2-bottom-left { + align-items: flex-start; +} +.swal2-container.swal2-grow-column.swal2-top-end, .swal2-container.swal2-grow-column.swal2-center-end, .swal2-container.swal2-grow-column.swal2-bottom-end, .swal2-container.swal2-grow-column.swal2-top-right, .swal2-container.swal2-grow-column.swal2-center-right, .swal2-container.swal2-grow-column.swal2-bottom-right { + align-items: flex-end; +} +.swal2-container.swal2-grow-column > .swal2-modal { + display: flex !important; + flex: 1; + align-content: center; + justify-content: center; +} +.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen) > .swal2-modal { + margin: auto; +} +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .swal2-container .swal2-modal { + margin: 0 !important; + } +} +.swal2-container.swal2-fade { + transition: background-color 0.1s; +} +.swal2-container.swal2-shown { + background-color: rgba(0, 0, 0, 0.4); +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + flex-direction: column; + justify-content: center; + width: 26em; + max-width: 100%; + padding: 1.25em; + border: none; + border-radius: 0.3125em; + background: #fff; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-header { + display: flex; + flex-direction: column; + align-items: center; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0 0 0.4em; + padding: 0; + color: #595959; + font-size: 1.2em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + z-index: 1; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: 100%; + margin: 1.25em auto 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} +.swal2-actions.swal2-loading .swal2-styled.swal2-confirm { + box-sizing: border-box; + width: 2.5em; + height: 2.5em; + margin: 0.46875em; + padding: 0; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border: 0.25em solid transparent; + border-radius: 100%; + border-color: transparent; + background-color: transparent !important; + color: transparent; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-actions.swal2-loading .swal2-styled.swal2-cancel { + margin-right: 30px; + margin-left: 30px; +} +.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after { + content: ""; + display: inline-block; + width: 15px; + height: 15px; + margin-left: 5px; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border: 3px solid #999999; + border-radius: 50%; + border-right-color: transparent; + box-shadow: 1px 1px 1px #fff; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 2em; + box-shadow: none; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #f0ad4e; + color: #fff; + font-size: 1.0625em; +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #aaa; + color: #fff; + font-size: 1.0625em; +} +.swal2-styled:focus { + outline: none; + box-shadow: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1.25em 0 0; + padding: 1em 0 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-image { + max-width: 100%; + margin: 1.25em auto; +} + +.swal2-close { + position: absolute; + top: 0; + right: 0; + justify-content: center; + width: 1.2em; + height: 1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s ease-out; + border: none; + border-radius: 0; + outline: initial; + background: transparent; + color: #cccccc; + font-family: serif; + font-size: 2.5em; + line-height: 1.2; + cursor: pointer; +} +.swal2-close:hover { + -webkit-transform: none; + transform: none; + background: transparent; + color: #f27474; +} + +> .swal2-input, +> .swal2-file, +> .swal2-textarea, +> .swal2-select, +> .swal2-radio, +> .swal2-checkbox { + display: none; +} + +.swal2-content { + z-index: 1; + justify-content: center; + margin: 0; + padding: 0; + color: #545454; + font-size: 1.125em; + font-weight: 300; + line-height: normal; + word-wrap: break-word; +} + +#swal2-content { + text-align: center; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em auto; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: 100%; + transition: border-color 0.3s, box-shadow 0.3s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06); + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: 0 0 3px #c4e6f5; +} +.swal2-input::-webkit-input-placeholder, +.swal2-file::-webkit-input-placeholder, +.swal2-textarea::-webkit-input-placeholder { + color: #cccccc; +} +.swal2-input::-moz-placeholder, +.swal2-file::-moz-placeholder, +.swal2-textarea::-moz-placeholder { + color: #cccccc; +} +.swal2-input:-ms-input-placeholder, +.swal2-file:-ms-input-placeholder, +.swal2-textarea:-ms-input-placeholder { + color: #cccccc; +} +.swal2-input::-ms-input-placeholder, +.swal2-file::-ms-input-placeholder, +.swal2-textarea::-ms-input-placeholder { + color: #cccccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #cccccc; +} + +.swal2-range { + margin: 1em auto; + background: inherit; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} +.swal2-input[type=number] { + max-width: 10em; +} + +.swal2-file { + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: inherit; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + margin: 0 0.4em; +} + +.swal2-validation-message { + display: none; + align-items: center; + justify-content: center; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + zoom: normal; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +@supports (-ms-accelerator: true) { + .swal2-range input { + width: 100% !important; + } + .swal2-range output { + display: none; + } +} +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .swal2-range input { + width: 100% !important; + } + .swal2-range output { + display: none; + } +} +@-moz-document url-prefix() { + .swal2-close:focus { + outline: 2px solid rgba(50, 100, 150, 0.4); + } +} +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 1.25em auto 1.875em; + zoom: normal; + border: 0.25em solid transparent; + border-radius: 50%; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon::before { + display: flex; + align-items: center; + height: 92%; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-warning::before { + content: "!"; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-info::before { + content: "i"; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-question::before { + content: "?"; +} +.swal2-icon.swal2-question.swal2-arabic-question-mark::before { + content: "؟"; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 3.75em 3.75em; + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 0 3.75em; + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.875em; + width: 1.5625em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} + +.swal2-progress-steps { + align-items: center; + margin: 0 0 1.25em; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + width: 2em; + height: 2em; + border-radius: 2em; + background: #3085d6; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #3085d6; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #3085d6; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} +.swal2-show.swal2-noanimation { + -webkit-animation: none; + animation: none; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} +.swal2-hide.swal2-noanimation { + -webkit-animation: none; + animation: none; +} + +.swal2-rtl .swal2-close { + right: auto; + left: 0; +} + +.swal2-animate-success-icon .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-animate-success-icon .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-animate-success-icon .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-animate-error-icon { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-animate-error-icon .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} + +@-webkit-keyframes swal2-rotate-loading { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes swal2-rotate-loading { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} + + @media (prefers-color-scheme: dark) { + .swal2-popup{ + background:#1e1e1e; + } + .swal2-title{ + color: #ccc !important; + background: transparent !important; + } + .swal2-styled.swal2-confirm{ + background-color:darkorange; + } + } \ No newline at end of file diff --git a/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/css/vssr.css b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/css/vssr.css index 9d7d98dfd4..0cb10e4750 100644 --- a/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/css/vssr.css +++ b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/css/vssr.css @@ -1,5 +1,5 @@ @import url("flag-icon.min.css"); - +@import url("sweetalert2.css?v=2"); /*! Pure v1.0.1 Copyright 2013 Yahoo! @@ -225,7 +225,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md } .pure-u-23-24 { - width: 95.8333% + width: 95.8333% } .pure-u-1, @@ -251,7 +251,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md overflow-y: hidden; border: 1px solid rgba(0, 0, 0, .05); border-radius: .375rem; - background-color: #fff; + background-color:#fff; box-shadow: 0 0 2rem 0 rgba(136, 152, 170, .15); } @@ -372,23 +372,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md color: #fb6340; } -.loadings { - position: absolute; - width: 100%; - height: 100%; - background: rgba(255, 255, 255, 0.7); - border-radius: .5rem; - left: 0; - top: 0; - z-index: 10; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - justify-content: center; - align-items: center; - font-size: 30px; - transition: all 0.3s; -} + .loadings.hide { opacity: 0; @@ -415,7 +399,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md position: absolute; left: 0; top: 0; - width: 61px; + width: 64px; height: 100%; border: 0; border-right: #d1dfed 1px solid; @@ -543,6 +527,13 @@ footer.mobile-hide{ text-align: right; } +.choose_node .gap{ + margin:0.5rem 1rem; + position:relative; +} +.choose_node .gap .cbi-button{ + width:100% !important; +} @media screen and (max-width: 2000px) { .pure-u-1-5 { width: 25%; @@ -598,6 +589,9 @@ footer.mobile-hide{ border-color: #fb6340 !important; box-shadow: 0 0 1rem 0 rgba(136, 152, 170, .75); } + .choose_node .pure-u-1-2{ + width:50%; + } } .modals-bg { @@ -697,4 +691,24 @@ footer.mobile-hide{ height: 2.5em; text-align: right; } -} \ No newline at end of file +} + + @media (prefers-color-scheme: dark) { + .block { + background-color: #3c3c3c !important; + box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.35); + } + + .cbi-section-table-row { + color: #ccc; + background-color: #3c3c3c !important; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.35); + } + .incon:nth-child(2) { + border-right: #1e1e1e 1px solid; +} + +.ssr-button { + color: #ccc; +} + } \ No newline at end of file diff --git a/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/polyfill.js b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/polyfill.js new file mode 100644 index 0000000000..14e9eedafd --- /dev/null +++ b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/polyfill.js @@ -0,0 +1,301 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory() : + typeof define === 'function' && define.amd ? define(factory) : + (factory()); +}(this, (function () { 'use strict'; + +/** + * @this {Promise} + */ +function finallyConstructor(callback) { + var constructor = this.constructor; + return this.then( + function(value) { + // @ts-ignore + return constructor.resolve(callback()).then(function() { + return value; + }); + }, + function(reason) { + // @ts-ignore + return constructor.resolve(callback()).then(function() { + // @ts-ignore + return constructor.reject(reason); + }); + } + ); +} + +// Store setTimeout reference so promise-polyfill will be unaffected by +// other code modifying setTimeout (like sinon.useFakeTimers()) +var setTimeoutFunc = setTimeout; + +function isArray(x) { + return Boolean(x && typeof x.length !== 'undefined'); +} + +function noop() {} + +// Polyfill for Function.prototype.bind +function bind(fn, thisArg) { + return function() { + fn.apply(thisArg, arguments); + }; +} + +/** + * @constructor + * @param {Function} fn + */ +function Promise(fn) { + if (!(this instanceof Promise)) + throw new TypeError('Promises must be constructed via new'); + if (typeof fn !== 'function') throw new TypeError('not a function'); + /** @type {!number} */ + this._state = 0; + /** @type {!boolean} */ + this._handled = false; + /** @type {Promise|undefined} */ + this._value = undefined; + /** @type {!Array} */ + this._deferreds = []; + + doResolve(fn, this); +} + +function handle(self, deferred) { + while (self._state === 3) { + self = self._value; + } + if (self._state === 0) { + self._deferreds.push(deferred); + return; + } + self._handled = true; + Promise._immediateFn(function() { + var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected; + if (cb === null) { + (self._state === 1 ? resolve : reject)(deferred.promise, self._value); + return; + } + var ret; + try { + ret = cb(self._value); + } catch (e) { + reject(deferred.promise, e); + return; + } + resolve(deferred.promise, ret); + }); +} + +function resolve(self, newValue) { + try { + // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure + if (newValue === self) + throw new TypeError('A promise cannot be resolved with itself.'); + if ( + newValue && + (typeof newValue === 'object' || typeof newValue === 'function') + ) { + var then = newValue.then; + if (newValue instanceof Promise) { + self._state = 3; + self._value = newValue; + finale(self); + return; + } else if (typeof then === 'function') { + doResolve(bind(then, newValue), self); + return; + } + } + self._state = 1; + self._value = newValue; + finale(self); + } catch (e) { + reject(self, e); + } +} + +function reject(self, newValue) { + self._state = 2; + self._value = newValue; + finale(self); +} + +function finale(self) { + if (self._state === 2 && self._deferreds.length === 0) { + Promise._immediateFn(function() { + if (!self._handled) { + Promise._unhandledRejectionFn(self._value); + } + }); + } + + for (var i = 0, len = self._deferreds.length; i < len; i++) { + handle(self, self._deferreds[i]); + } + self._deferreds = null; +} + +/** + * @constructor + */ +function Handler(onFulfilled, onRejected, promise) { + this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null; + this.onRejected = typeof onRejected === 'function' ? onRejected : null; + this.promise = promise; +} + +/** + * Take a potentially misbehaving resolver function and make sure + * onFulfilled and onRejected are only called once. + * + * Makes no guarantees about asynchrony. + */ +function doResolve(fn, self) { + var done = false; + try { + fn( + function(value) { + if (done) return; + done = true; + resolve(self, value); + }, + function(reason) { + if (done) return; + done = true; + reject(self, reason); + } + ); + } catch (ex) { + if (done) return; + done = true; + reject(self, ex); + } +} + +Promise.prototype['catch'] = function(onRejected) { + return this.then(null, onRejected); +}; + +Promise.prototype.then = function(onFulfilled, onRejected) { + // @ts-ignore + var prom = new this.constructor(noop); + + handle(this, new Handler(onFulfilled, onRejected, prom)); + return prom; +}; + +Promise.prototype['finally'] = finallyConstructor; + +Promise.all = function(arr) { + return new Promise(function(resolve, reject) { + if (!isArray(arr)) { + return reject(new TypeError('Promise.all accepts an array')); + } + + var args = Array.prototype.slice.call(arr); + if (args.length === 0) return resolve([]); + var remaining = args.length; + + function res(i, val) { + try { + if (val && (typeof val === 'object' || typeof val === 'function')) { + var then = val.then; + if (typeof then === 'function') { + then.call( + val, + function(val) { + res(i, val); + }, + reject + ); + return; + } + } + args[i] = val; + if (--remaining === 0) { + resolve(args); + } + } catch (ex) { + reject(ex); + } + } + + for (var i = 0; i < args.length; i++) { + res(i, args[i]); + } + }); +}; + +Promise.resolve = function(value) { + if (value && typeof value === 'object' && value.constructor === Promise) { + return value; + } + + return new Promise(function(resolve) { + resolve(value); + }); +}; + +Promise.reject = function(value) { + return new Promise(function(resolve, reject) { + reject(value); + }); +}; + +Promise.race = function(arr) { + return new Promise(function(resolve, reject) { + if (!isArray(arr)) { + return reject(new TypeError('Promise.race accepts an array')); + } + + for (var i = 0, len = arr.length; i < len; i++) { + Promise.resolve(arr[i]).then(resolve, reject); + } + }); +}; + +// Use polyfill for setImmediate for performance gains +Promise._immediateFn = + // @ts-ignore + (typeof setImmediate === 'function' && + function(fn) { + // @ts-ignore + setImmediate(fn); + }) || + function(fn) { + setTimeoutFunc(fn, 0); + }; + +Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) { + if (typeof console !== 'undefined' && console) { + console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console + } +}; + +/** @suppress {undefinedVars} */ +var globalNS = (function() { + // the only reliable means to get the global object is + // `Function('return this')()` + // However, this causes CSP violations in Chrome apps. + if (typeof self !== 'undefined') { + return self; + } + if (typeof window !== 'undefined') { + return window; + } + if (typeof global !== 'undefined') { + return global; + } + throw new Error('unable to locate global object'); +})(); + +if (!('Promise' in globalNS)) { + globalNS['Promise'] = Promise; +} else if (!globalNS.Promise.prototype['finally']) { + globalNS.Promise.prototype['finally'] = finallyConstructor; +} + +}))); diff --git a/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/sweetalert.js b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/sweetalert.js new file mode 100644 index 0000000000..6079cb0fef --- /dev/null +++ b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/sweetalert.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;nt.clientHeight)}function ct(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0\n
\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g,""),yt=function(t){var e,n,o,i,r,a,c,s,u,l,d,p,f,m,h,g=!!(e=Q())&&(e.parentNode.removeChild(e),ht([document.documentElement,document.body],[Y["no-backdrop"],Y["toast-shown"],Y["has-column"]]),!0);ut()?F("SweetAlert2 requires document to initialize"):((n=document.createElement("div")).className=Y.container,g&&mt(n,Y["no-transition"]),H(n,bt),(o="string"==typeof(i=t.target)?document.querySelector(i):i).appendChild(n),r=t,(a=$()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),c=o,"rtl"===window.getComputedStyle(c).direction&&mt(Q(),Y.rtl),s=P(),u=gt(s,Y.input),l=gt(s,Y.file),d=s.querySelector(".".concat(Y.range," input")),p=s.querySelector(".".concat(Y.range," output")),f=gt(s,Y.select),m=s.querySelector(".".concat(Y.checkbox," input")),h=gt(s,Y.textarea),u.oninput=lt,l.onchange=lt,f.onchange=lt,m.onchange=lt,h.oninput=lt,d.oninput=function(t){lt(t),p.value=d.value},d.onchange=function(t){lt(t),d.nextSibling.value=d.value})},wt=function(t,e){t.jquery?Ct(e,t):H(e,t.toString())},Ct=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},kt=function(){if(ut())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function xt(t,e,n){var o;rt(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),H(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=Y[e],N(t,n,"".concat(e,"Button")),mt(t,n["".concat(e,"ButtonClass")])}function Pt(t,e){var n,o,i,r,a,c,s,u,l=Q();l&&(n=l,"string"==typeof(o=e.backdrop)?n.style.background=o:o||mt([document.documentElement,document.body],Y["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&_('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),i=l,(r=e.position)in Y?mt(i,Y[r]):(_('The "position" parameter is not valid, defaulting to "center"'),mt(i,Y.center)),a=l,!(c=e.grow)||"string"!=typeof c||(s="grow-".concat(c))in Y&&mt(a,Y[s]),N(l,e,"container"),(u=document.body.getAttribute("data-swal2-queue-step"))&&(l.setAttribute("data-queue-step",u),document.body.removeAttribute("data-swal2-queue-step")))}function At(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var Bt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},St=["input","file","range","select","radio","checkbox","textarea"],Et=function(t){if(!jt[t.input])return F('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=Lt(t.input),n=jt[t.input](e,t);ot(n),setTimeout(function(){tt(n)})},Ot=function(t,e){var n=G(P(),t);if(n)for(var o in!function(t){for(var e=0;e=s.progressSteps.length&&_("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),s.progressSteps.forEach(function(t,e){var n,o,i,r,a,c=(n=t,o=document.createElement("li"),mt(o,Y["progress-step"]),H(o,n),o);u.appendChild(c),e===l&&mt(c,Y["active-progress-step"]),e!==s.progressSteps.length-1&&(r=s,a=document.createElement("li"),mt(a,Y["progress-step-line"]),r.progressStepsDistance&&(a.style.width=r.progressStepsDistance),i=a,u.appendChild(i))})}function Mt(t,e){var n,o,i,r,a,c,s,u,l=L();N(l,e,"header"),Vt(0,e),n=t,o=e,(r=Bt.innerParams.get(n))&&o.icon===r.icon&&k()?N(k(),o,"icon"):(Dt(),o.icon&&(-1!==Object.keys(Z).indexOf(o.icon)?(i=C(".".concat(Y.icon,".").concat(Z[o.icon])),ot(i),Ut(i,o),Nt(),N(i,o,"icon"),mt(i,o.showClass.icon)):F('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(o.icon,'"')))),function(t){var e=A();if(!t.imageUrl)return it(e);ot(e,""),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),nt(e,"width",t.imageWidth),nt(e,"height",t.imageHeight),e.className=Y.image,N(e,t,"image")}(e),a=e,c=x(),rt(c,a.title||a.titleText),a.title&&dt(a.title,c),a.titleText&&(c.innerText=a.titleText),N(c,a,"title"),s=e,u=I(),H(u,s.closeButtonHtml),N(u,s,"closeButton"),rt(u,s.showCloseButton),u.setAttribute("aria-label",s.closeButtonAriaLabel)}function Rt(t,e){var n,o,i,r;n=e,o=$(),nt(o,"width",n.width),nt(o,"padding",n.padding),n.background&&(o.style.background=n.background),zt(o,n),Pt(0,e),Mt(t,e),qt(t,e),pt(0,e),i=e,r=j(),rt(r,i.footer),i.footer&&dt(i.footer,r),N(r,i,"footer"),"function"==typeof e.onRender&&e.onRender($())}function Ht(){return E()&&E().click()}var Dt=function(){for(var t=n(),e=0;e
    \n \n
    \n
    \n '):"error"===e.icon?H(t,'\n \n \n \n \n '):H(t,_t({question:"?",warning:"!",info:"i"}[e.icon]))},_t=function(t){return'
    ').concat(t,"
    ")},Ft=[],zt=function(t,e){t.className="".concat(Y.popup," ").concat(vt(t)?e.showClass.popup:""),e.toast?(mt([document.documentElement,document.body],Y["toast-shown"]),mt(t,Y.toast)):mt(t,Y.modal),N(t,e,"popup"),"string"==typeof e.customClass&&mt(t,e.customClass),e.icon&&mt(t,Y["icon-".concat(e.icon)])};function Wt(){var t=$();t||sn.fire(),t=$();var e=T(),n=E();ot(e),ot(n,"inline-block"),mt([t,e],Y.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Kt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;Xt.restoreFocusTimeout=setTimeout(function(){Xt.previousActiveElement&&Xt.previousActiveElement.focus?(Xt.previousActiveElement.focus(),Xt.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Yt(){if(Xt.timeout)return function(){var t=q(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),Xt.timeout.stop()}function Zt(){if(Xt.timeout){var t=Xt.timeout.start();return st(t),t}}function Qt(t){return Object.prototype.hasOwnProperty.call(Gt,t)}function $t(t){return ee[t]}function Jt(t){for(var e in t)Qt(i=e)||_('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==ne.indexOf(o)&&_('The parameter "'.concat(o,'" is incompatible with toasts'))),$t(n=e)&&g(n,$t(n));var n,o,i}var Xt={},Gt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},te=["title","titleText","text","html","footer","icon","hideClass","customClass","allowOutsideClick","allowEscapeKey","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","showCloseButton","closeButtonHtml","closeButtonAriaLabel","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep","onClose","onAfterClose","onDestroy"],ee={animation:'showClass" and "hideClass'},ne=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],oe=Object.freeze({isValidParameter:Qt,isUpdatableParameter:function(t){return-1!==te.indexOf(t)},isDeprecatedParameter:$t,argsToParams:function(o){var i={};return"object"!==r(o[0])||w(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||w(n)?i[t]=n:void 0!==n&&F("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):s(i,o[0]),i},isVisible:function(){return vt($())},clickConfirm:Ht,clickCancel:function(){return O()&&O().click()},getContainer:Q,getPopup:$,getTitle:x,getContent:P,getHtmlContainer:function(){return e(Y["html-container"])},getImage:A,getIcon:k,getIcons:n,getCloseButton:I,getActions:T,getConfirmButton:E,getCancelButton:O,getHeader:L,getFooter:j,getTimerProgressBar:q,getFocusableElements:V,getValidationMessage:S,isLoading:R,fire:function(){for(var t=arguments.length,e=new Array(t),n=0;nwindow.innerHeight&&(X.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(X.previousBodyPadding+function(){var t=document.createElement("div");t.className=Y["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function ae(){return!!window.MSInputMethodContext&&!!document.documentMode}function ce(){var t=Q(),e=$();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var se=function(){navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||$().scrollHeight>window.innerHeight-44&&(Q().style.paddingBottom="".concat(44,"px"))},ue=function(){var e,t=Q();t.ontouchstart=function(t){e=le(t.target)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},le=function(t){var e=Q();return t===e||!(at(e)||"INPUT"===t.tagName||at(P())&&P().contains(t))},de={swalPromiseResolve:new WeakMap};function pe(t,e,n,o){var i;n?he(t,o):(Kt().then(function(){return he(t,o)}),Xt.keydownTarget.removeEventListener("keydown",Xt.keydownHandler,{capture:Xt.keydownListenerCapture}),Xt.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),M()&&(null!==X.previousBodyPadding&&(document.body.style.paddingRight="".concat(X.previousBodyPadding,"px"),X.previousBodyPadding=null),D(document.body,Y.iosfix)&&(i=parseInt(document.body.style.top,10),ht(document.body,Y.iosfix),document.body.style.top="",document.body.scrollTop=-1*i),"undefined"!=typeof window&&ae()&&window.removeEventListener("resize",ce),h(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})),ht([document.documentElement,document.body],[Y.shown,Y["height-auto"],Y["no-backdrop"],Y["toast-shown"],Y["toast-column"]])}function fe(t){var e,n,o,i=$();i&&(e=Bt.innerParams.get(this))&&!D(i,e.hideClass.popup)&&(n=de.swalPromiseResolve.get(this),ht(i,e.showClass.popup),mt(i,e.hideClass.popup),o=Q(),ht(o,e.showClass.backdrop),mt(o,e.hideClass.backdrop),function(t,e,n){var o=Q(),i=kt&&ct(e),r=n.onClose,a=n.onAfterClose;if(r!==null&&typeof r==="function"){r(e)}if(i){me(t,e,o,a)}else{pe(t,o,J(),a)}}(this,i,e),void 0!==t?(t.isDismissed=void 0!==t.dismiss,t.isConfirmed=void 0===t.dismiss):t={isDismissed:!0,isConfirmed:!1},n(t||{}))}var me=function(t,e,n,o){Xt.swalCloseEventFinishedCallback=pe.bind(null,t,n,J(),o),e.addEventListener(kt,function(t){t.target===e&&(Xt.swalCloseEventFinishedCallback(),delete Xt.swalCloseEventFinishedCallback)})},he=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function ge(t,e,n){var o=Bt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function ve(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o")),yt(t)}function Ce(t){var e=Q(),n=$();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n);var o=window.getComputedStyle(document.body).overflowY;je(e,n,t),Te(e,n),M()&&(Le(e,t.scrollbarPadding,o),h(document.body.children).forEach(function(t){t===Q()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,Q())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})),J()||Xt.previousActiveElement||(Xt.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)}),ht(e,Y["no-transition"])}function ke(t){var e,n=$();t.target===n&&(e=Q(),n.removeEventListener(kt,ke),e.style.overflowY="auto")}function xe(t,e){"select"===e.input||"radio"===e.input?Me(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&(v(e.inputValue)||y(e.inputValue))&&Re(t,e)}function Pe(t,e){t.disableButtons(),e.input?Ne(t,e):Ue(t,e,!0)}function Ae(t,e){t.disableButtons(),e(K.cancel)}function Be(t,e){t.closePopup({value:e})}function Se(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return ze(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:$(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function Ee(t,e,n){var o=V(),i=0;if(i:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-actions.swal2-loading .swal2-styled.swal2-confirm{box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent!important;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{content:\"\";display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff}.swal2-styled{margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:.3125em;border-bottom-left-radius:.3125em}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:0;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-validation-message{display:none;align-items:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#3085d6}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}"); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/vssr.js b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/vssr.js index a81dd8f80b..3164226bed 100644 --- a/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/vssr.js +++ b/package/ctcgfw/luci-app-vssr/root/www/luci-static/vssr/vssr.js @@ -8,7 +8,7 @@ var Vssr = { $(document).ready(function () { - Royal.init(); + Vssr.init(); }); $(window).load(function () {