commit 19bfc7311a0825475bdbceae87fe122ebf7e3504 Author: m3tam3re Date: Thu Oct 12 14:01:05 2023 +0200 redesign 2023 diff --git a/.forestry/settings.yml b/.forestry/settings.yml new file mode 100644 index 0000000..3ab76d4 --- /dev/null +++ b/.forestry/settings.yml @@ -0,0 +1,31 @@ +--- +new_page_extension: md +auto_deploy: false +admin_path: +webhook_url: +sections: +- type: directory + path: content + label: Pages + create: all + match: "*" +- type: directory + path: content/posts + label: Posts + create: all + match: "**/*" +upload_dir: static/uploads +public_path: "/uploads" +front_matter_path: '' +use_front_matter_path: false +file_template: ":filename:" +build: + preview_env: + - HUGO_ENV=staging + - HUGO_VERSION=0.71.1 + preview_output_directory: public + preview_docker_image: forestryio/hugo:latest + mount_path: "/srv" + working_dir: "/srv" + instant_preview_command: hugo server -D -E -F --renderToDisk -d public +version: 0.71.1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..981f31a --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.env +.DS_Store +.idea/ +/vendor +/public diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..019ac69 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "themes/FixIt"] + path = themes/FixIt + url = https://github.com/hugo-fixit/FixIt.git +[submodule "themes/themes/FixIt"] + path = themes/themes/FixIt + url = https://github.com/hugo-fixit/FixIt.git diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..30c1d5f --- /dev/null +++ b/config.toml @@ -0,0 +1,1005 @@ +baseURL = "https://www.m3tam3re.com" +title = "m3tam3re" +languageCode = "en" +defaultContentLanguage = "en" +theme = "FixIt" +relativeUrls = false +paginate = 12 +enableEmoji = true +enableRobotsTXT = true +disqusShortname = "m3tam3re" + +[sitemap] + changefreq = "weekly" + filename = "sitemap.xml" + priority = 0.5 + +[blackfriday] + hrefTargetBlank = true + nofollowLinks = true + noreferrerLinks = true + +[Permalinks] + posts = "/:year/:filename/" + +[taxonomies] + archive = "archive" + tutorials = "tutorials" + shopify = "shopify" + automation = "automation" + tag = "tags" + datamanagement = "datamanagement" + +[outputs] + home = ["HTML", "RSS", "JSON"] + +[params] + # FixIt 0.2.15 | CHANGED FixIt theme version + version = "0.2.X" # e.g. "0.2.X", "0.2.15", "v0.2.15" etc. + # site description + description = "" + # site keywords + keywords = ["Hugo", "FixIt"] + # site default theme ["light", "dark", "auto"] + defaultTheme = "auto" + # public git repo url only then enableGitInfo is true + gitRepo = "" + # FixIt 0.1.1 | NEW which hash function used for SRI, when empty, no SRI is used + # ["sha256", "sha384", "sha512", "md5"] + fingerprint = "" + # FixIt 0.2.0 | NEW date format + dateFormat = "2006-01-02" + # website images for Open Graph and Twitter Cards + images = [] + # FixIt 0.2.12 | NEW enable PWA + enablePWA = false + # FixIt 0.2.14 | NEW whether to add external Icon for external links automatically + externalIcon = false + # FixIt 0.2.14 | NEW FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. + # You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise. + disableThemeInject = false + + # FixIt 0.2.0 | NEW App icon config + [params.app] + # optional site title override for the app when added to an iOS home screen or Android launcher + title = "FixIt" + # whether to omit favicon resource links + noFavicon = false + # modern SVG favicon to use in place of older style .png and .ico files + svgFavicon = "" + # Safari mask icon color + iconColor = "#5bbad5" + # Windows v8-10 tile color + tileColor = "#da532c" + # FixIt 0.2.12 | CHANGED Android browser theme color + [params.app.themeColor] + light = "#f8f8f8" + dark = "#211836" + + # FixIt 0.2.0 | NEW Search config + [params.search] + enable = true + # type of search engine ["lunr", "algolia", "fuse"] + type = "fuse" + # max index length of the chunked content + contentLength = 4000 + # placeholder of the search bar + placeholder = "" + # FixIt 0.2.1 | NEW max number of results length + maxResultLength = 10 + # FixIt 0.2.3 | NEW snippet length of the result + snippetLength = 30 + # FixIt 0.2.1 | NEW HTML tag name of the highlight part in results + highlightTag = "em" + # FixIt 0.2.4 | NEW whether to use the absolute URL based on the baseURL in search index + absoluteURL = false + [params.search.algolia] + index = "" + appID = "" + searchKey = "" + [params.search.fuse] + # FixIt 0.2.17 | NEW https://fusejs.io/api/options.html + isCaseSensitive = false + minMatchCharLength = 2 + findAllMatches = false + location = 0 + threshold = 0.3 + distance = 100 + ignoreLocation = false + useExtendedSearch = false + ignoreFieldNorm = false + + # Header config + [params.header] + # FixIt 0.2.13 | CHANGED desktop header mode ["sticky", "normal", "auto"] + desktopMode = "sticky" + # FixIt 0.2.13 | CHANGED mobile header mode ["sticky", "normal", "auto"] + mobileMode = "auto" + # FixIt 0.2.0 | NEW Header title config + [params.header.title] + # URL of the LOGO + logo = "/logo.png" + # title name + name = "m3tam3re.com" + # you can add extra information before the name (HTML format is supported), such as icons + pre = "" + # you can add extra information after the name (HTML format is supported), such as icons + post = "" + # FixIt 0.2.5 | NEW whether to use typeit animation for title name + typeit = false + # FixIt 0.2.12 | NEW Header subtitle config + [params.header.subtitle] + # subtitle name + name = "tech, automation, shopify" + # whether to use typeit animation for subtitle name + typeit = true + + # FixIt 0.2.18 | NEW Breadcrumb config + [params.breadcrumb] + enable = true + sticky = false + showHome = false + + # Footer config + [params.footer] + enable = true + # FixIt 0.2.17 | CHANGED Custom content (HTML format is supported) + # For advanced use, see parameter `params.customFilePath.footer` + custom = "Please enjoy a cookie-free experience" + # FixIt 0.2.0 | NEW whether to show Hugo and theme info + hugo = true + # FixIt 0.2.0 | NEW whether to show copyright info + copyright = true + # FixIt 0.2.0 | NEW whether to show the author + author = true + # Site creation year + since = "" + # FixIt 0.2.14 | NEW whether to show total word count of site content + wordCount = true + # FixIt 0.2.12 | NEW Public network security only in China (HTML format is supported) + gov = "" + # ICP info only in China (HTML format is supported) + icp = "" + # license info (HTML format is supported) + license = "" + # FixIt 0.2.17 | CHANGED Site creation time + [params.footer.siteTime] + enable = false + animate = true + icon = "fa-solid fa-heartbeat" + pre = "A truly cookie-free experience since" + value = "2021" # e.g. "2021-12-18T16:15:22+08:00" + # FixIt 0.2.17 | NEW footer lines order, optional values: ["first", 0, 1, 2, 3, 4, 5, "last"] + [params.footer.order] + powered = 0 + copyright = 0 + statistics = 0 + visitor = 0 + beian = 0 + + # FixIt 0.2.0 | NEW Section (all posts) page config + [params.section] + # special amount of posts in each section page + paginate = 20 + # date format (month and day) + dateFormat = "01-02" + # amount of RSS pages + rss = 10 + # FixIt 0.2.13 | NEW recently updated posts settings + [params.section.recentlyUpdated] + enable = false + rss = false + days = 30 + maxCount = 10 + + # FixIt 0.2.0 | NEW List (category or tag) page config + [params.list] + # special amount of posts in each list page + paginate = 20 + # date format (month and day) + dateFormat = "01-02" + # amount of RSS pages + rss = 10 + + # FixIt 0.2.17 | NEW TagCloud config for tags page + [params.tagcloud] + enable = false + min = 14 # Minimum font size in px + max = 32 # Maximum font size in px + peakCount = 10 # Maximum count of posts per tag + orderby = "name" # Order of tags, optional values: ["name", "count"] + + # Home page config + [params.home] + # FixIt 0.2.0 | NEW amount of RSS pages + rss = 10 + # Home page profile + [params.home.profile] + enable = true + # Gravatar Email for preferred avatar in home page + gravatarEmail = "" + # URL of avatar shown in home page + avatarURL = "https://seccdn.libravatar.org/avatar/bf60b71028dd4dc3b97b3281a3e3a843?s=160&d=404" + # FixIt 0.2.17 | NEW identifier of avatar menu link + avatarMenu = "" + # FixIt 0.2.7 | CHANGED title shown in home page (HTML format is supported) + title = "Hey my name is Sascha." + # subtitle shown in home page + subtitle = "On this website I will show you how I automate our e-commerce business." + # whether to use typeit animation for subtitle + typeit = true + # whether to show social links + social = true + # FixIt 0.2.0 | NEW disclaimer (HTML format is supported) + disclaimer = "" + # Home page posts + [params.home.posts] + enable = true + # special amount of posts in each home posts page + paginate = 6 + + # FixIt 0.2.16 | CHANGED Social config about the author + [params.social] + GitHub = "" + Linkedin = "m3tam3re" + Twitter = "m3tam3re" + Instagram = "m3tam3re" + Facebook = "" + Telegram = "" + Medium = "" + Gitlab = "" + Youtubelegacy = "" + Youtubecustom = "" + Youtubechannel = "" + Tumblr = "" + Quora = "" + Keybase = "" + Pinterest = "" + Reddit = "" + Codepen = "" + FreeCodeCamp = "" + Bitbucket = "" + Stackoverflow = "" + Weibo = "" + Odnoklassniki = "" + VK = "" + Flickr = "" + Xing = "" + Snapchat = "" + Soundcloud = "" + Spotify = "" + Bandcamp = "" + Paypal = "" + Fivehundredpx = "" + Mix = "" + Goodreads = "" + Lastfm = "" + Foursquare = "" + Hackernews = "" + Kickstarter = "" + Patreon = "" + Steam = "" + Twitch = "" + Strava = "" + Skype = "" + Whatsapp = "" + Zhihu = "" + Douban = "" + Angellist = "" + Slidershare = "" + Jsfiddle = "" + Deviantart = "" + Behance = "" + Dribbble = "" + Wordpress = "" + Vine = "" + Googlescholar = "" + Researchgate = "" + Mastodon = "@m3tam3re" + Thingiverse = "" + Devto = "" + Gitea = "https://code.m3tam3re.com/m3tam3re" + XMPP = "" + Matrix = "" + Bilibili = "" + ORCID = "" + Liberapay = "m3tam3re" + Ko-Fi = "m3tam3re" + BuyMeaCoffee = "" + Linktree = "#" + QQ = "" + QQGroup = "" # https://qun.qq.com/join.html + Diaspora = "" + CSDN = "" + Discord = "" + DiscordInvite = "" + RevoltInvite = "V0cMYR9T" + Lichess = "" + Pleroma = "" + Kaggle = "" + MediaWiki= "" + Plume = "" + HackTheBox = "" + RootMe = "" + Feishu = "" + TryHackMe = "" + Douyin = "" + TikTok = "" + Phone = "" + Email = "" + RSS = true + + # FixIt 0.2.0 | CHANGED Page config + [params.page] + # FixIt 0.2.18 | NEW whether to enable the author's avatar of the post + authorAvatar = true + # FixIt 0.2.0 | NEW whether to hide a page from home page + hiddenFromHomePage = false + # FixIt 0.2.0 | NEW whether to hide a page from search results + hiddenFromSearch = false + # FixIt 0.2.0 | NEW whether to enable twemoji + twemoji = false + # whether to enable lightgallery + # FixIt 0.2.18 | CHANGED if set to "force", images in the content will be forced to shown as the gallery. + lightgallery = "force" + # FixIt 0.2.0 | NEW whether to enable the ruby extended syntax + ruby = true + # FixIt 0.2.0 | NEW whether to enable the fraction extended syntax + fraction = true + # FixIt 0.2.0 | NEW whether to enable the fontawesome extended syntax + fontawesome = true + # license info (HTML format is supported) + license = 'CC BY-NC 4.0' + # whether to show link to Raw Markdown content of the content + linkToMarkdown = true + # FixIt 0.2.4 | NEW whether to show the full text content in RSS + rssFullText = false + # FixIt 0.2.13 | NEW Page style ["narrow", "normal", "wide", ...] + pageStyle = "narrow" + # FixIt 0.2.17 | CHANGED Auto Bookmark Support + # If true, save the reading progress when closing the page. + autoBookmark = true + # FixIt 0.2.17 | NEW whether to enable wordCount + wordCount = true + # FixIt 0.2.17 | NEW whether to enable readingTime + readingTime = true + # FixIt 0.2.17 | NEW end of post flag + endFlag = "" + # FixIt 0.2.18 | NEW whether to enable instant.page + instantPage = false + + # FixIt 0.2.15 | NEW Repost config + [params.page.repost] + enable = false + url = "" + # FixIt 0.2.0 | NEW Table of the contents config + [params.page.toc] + # whether to enable the table of the contents + enable = true + # FixIt 0.2.9 | NEW whether to keep the static table of the contents in front of the post + keepStatic = false + # whether to make the table of the contents in the sidebar automatically collapsed + auto = true + # FixIt 0.2.13 | NEW position of TOC ["left", "right"] + position = "right" + # FixIt 0.2.13 | NEW Display a message at the beginning of an article to warn the reader that its content might be expired + [params.page.expirationReminder] + enable = false + # Display the reminder if the last modified time is more than 90 days ago + reminder = 90 + # Display warning if the last modified time is more than 180 days ago + warning = 180 + # If the article expires, close the comment or not + closeComment = false + # FixIt 0.2.16 | CHANGED KaTeX mathematical formulas (https://katex.org) + [params.page.math] + enable = true + # default inline delimiter is $ ... $ and \( ... \) + inlineLeftDelimiter = "" + inlineRightDelimiter = "" + # default block delimiter is $$ ... $$, \[ ... \], \begin{equation} ... \end{equation} and some other functions + blockLeftDelimiter = "" + blockRightDelimiter = "" + # KaTeX extension copy_tex + copyTex = true + # KaTeX extension mhchem + mhchem = true + # FixIt 0.2.0 | NEW Code config + [params.page.code] + # whether to show the copy button of the code block + copy = true + # FixIt 0.2.13 | NEW whether to show the edit button of the code block + edit = true + # the maximum number of lines of displayed code by default + maxShownLines = 10 + # FixIt 0.2.14 | NEW Post edit + [params.page.edit] + enable = false + # FixIt 0.2.15 | CHANGED Link for fork & edit + # url = "/edit/branch-name/subdirectory-name" # base on `params.gitRepo` + # url = "https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name" # full url + url = "" + # FixIt 0.2.0 | NEW Mapbox GL JS config (https://docs.mapbox.com/mapbox-gl-js) + [params.page.mapbox] + # access token of Mapbox GL JS + accessToken = "" + # style for the light theme + lightStyle = "mapbox://styles/mapbox/light-v9" + # style for the dark theme + darkStyle = "mapbox://styles/mapbox/dark-v9" + # whether to add NavigationControl + navigation = true + # whether to add GeolocateControl + geolocate = true + # whether to add ScaleControl + scale = true + # whether to add FullscreenControl + fullscreen = true + # FixIt 0.2.17 | NEW Donate (Sponsor) settings + [params.page.reward] + enable = false + animation = false + # position relative to post footer, optional values: ["before", "after"] + position = "after" + # comment = "Buy me a coffee" + # FixIt 0.2.18 | NEW display mode of QR code images, optional values: ["static", "fixed"], default: `static` + mode = "static" + [params.page.reward.ways] + # wechatpay = "/images/wechatpay.png" + # alipay = "/images/alipay.png" + # paypal = "/images/paypal.png" + # bitcoin = "/images/bitcoin.png" + # FixIt 0.2.0 | CHANGED social share links in post page + [params.page.share] + enable = true + Twitter = true + Facebook = true + Linkedin = true + Whatsapp = false + Pinterest = false + Tumblr = false + HackerNews = false + Reddit = true + VK = false + Buffer = false + Xing = false + Line = false + Instapaper = true + Pocket = true + Digg = false + Stumbleupon = false + Flipboard = false + Weibo = true + Renren = false + Myspace = false + Blogger = false + Baidu = false + Odnoklassniki = false + Evernote = false + Skype = false + Trello = false + Mix = false + # FixIt 0.2.15 | CHANGED Comment config + [params.page.comment] + enable = true + # FixIt 0.2.13 | NEW Artalk comment config (https://artalk.js.org/) + [params.page.comment.artalk] + enable = false + server = "https://yourdomain/api/" + site = "默认站点" + placeholder = "" + noComment = "" + sendBtn = "" + editorTravel = true + flatMode = "auto" + # FixIt 0.2.17 | CHANGED enable lightgallery support + lightgallery = false + locale = "" # FixIt 0.2.15 | NEW + # FixIt 0.2.18 | NEW + emoticons = "" + nestMax = 2 + nestSort = "DATE_ASC" # ["DATE_ASC", "DATE_DESC", "VOTE_UP_DESC"] + vote = true + voteDown = false + uaBadge = true + listSort = true + imgUpload = true + preview = true + versionCheck = true + # FixIt 0.1.1 | NEW Disqus comment config (https://disqus.com) + [params.page.comment.disqus] + enable = false + # Disqus shortname to use Disqus in posts + shortname = "" + # FixIt 0.1.1 | NEW Gitalk comment config (https://github.com/gitalk/gitalk) + [params.page.comment.gitalk] + enable = false + owner = "" + repo = "" + clientId = "" + clientSecret = "" + # Valine comment config (https://github.com/xCss/Valine) + [params.page.comment.valine] + enable = false + appId = "" + appKey = "" + placeholder = "" + avatar = "mp" + meta = "" + requiredFields = "" + pageSize = 10 + lang = "" + visitor = true + recordIP = true + highlight = true + enableQQ = false + serverURLs = "" + # FixIt 0.2.6 | NEW emoji data file name, default is "google.yml" + # ["apple.yml", "google.yml", "facebook.yml", "twitter.yml"] + # located in "themes/FixIt/assets/lib/valine/emoji/" directory + # you can store your own data files in the same path under your project: + # "assets/lib/valine/emoji/" + emoji = "" + commentCount = true # FixIt 0.2.13 | NEW + # FixIt 0.2.16 | CHANGED Waline comment config (https://waline.js.org) + [params.page.comment.waline] + enable = false + serverURL = "" + pageview = false # FixIt 0.2.15 | NEW + emoji = ["//unpkg.com/@waline/emojis@1.1.0/weibo"] + meta = ["nick", "mail", "link"] + requiredMeta = [] + login = "enable" + wordLimit = 0 + pageSize = 10 + imageUploader = false # FixIt 0.2.15 | NEW + highlighter = false # FixIt 0.2.15 | NEW + comment = false # FixIt 0.2.15 | NEW + texRenderer = false # FixIt 0.2.16 | NEW + search = false # FixIt 0.2.16 | NEW + recaptchaV3Key = "" # FixIt 0.2.16 | NEW + reaction = false # FixIt 0.2.18 | NEW + # Facebook comment config (https://developers.facebook.com/docs/plugins/comments) + [params.page.comment.facebook] + enable = false + width = "100%" + numPosts = 10 + appId = "" + languageCode = "" + # FixIt 0.2.0 | NEW Telegram comments config (https://comments.app) + [params.page.comment.telegram] + enable = false + siteID = "" + limit = 5 + height = "" + color = "" + colorful = true + dislikes = false + outlined = false + # FixIt 0.2.0 | NEW Commento comment config (https://commento.io) + [params.page.comment.commento] + enable = false + # FixIt 0.2.5 | NEW Utterances comment config (https://utteranc.es) + [params.page.comment.utterances] + enable = false + # owner/repo + repo = "" + issueTerm = "pathname" + label = "" + lightTheme = "github-light" + darkTheme = "github-dark" + # FixIt 0.2.13 | NEW Twikoo comment config (https://twikoo.js.org/) + [params.page.comment.twikoo] + enable = false + envId = "" + region = "" + path = "" + visitor = true + commentCount = true + # FixIt 0.2.17 | CHANGED enable lightgallery support + lightgallery = false + # FixIt 0.2.17 | NEW enable Katex support + katex = false + # FixIt 0.2.14 | NEW Giscus comments config + [params.page.comment.giscus] + enable = false + repo = "" + repoId = "" + category = "" + categoryId = "" + mapping = "" + strict = "0" # FixIt NEW | 0.2.18 + term = "" + reactionsEnabled = "1" + emitMetadata = "0" + inputPosition = "bottom" # ["top", "bottom"] + lightTheme = "light" + darkTheme = "dark" + lazyLoad = true + # FixIt 0.2.7 | NEW Third-party library config + [params.page.library] + [params.page.library.css] + # someCSS = "some.css" + # located in "assets/" + # Or + # someCSS = "https://cdn.example.com/some.css" + [params.page.library.js] + # someJavascript = "some.js" + # located in "assets/" + # Or + # someJavascript = "https://cdn.example.com/some.js" + # FixIt 0.2.10 | CHANGED Page SEO config + [params.page.seo] + # image URL + images = [] + # Publisher info + [params.page.seo.publisher] + name = "Sascha" + logoUrl = "https://www.m3tam3re.com/logo.png" + + # FixIt 0.2.5 | NEW TypeIt config + [params.typeit] + # typing speed between each step (measured in milliseconds) + speed = 100 + # blinking speed of the cursor (measured in milliseconds) + cursorSpeed = 1000 + # character used for the cursor (HTML format is supported) + cursorChar = "|" + # cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited) + duration = -1 + # FixIt 0.2.18 | NEW whether your strings will continuously loop after completing + loop = false + + # FixIt 0.2.15 | NEW Mermaid config + [params.mermaid] + # For values, see https://mermaid.js.org/config/theming.html#available-themes + themes = ["default", "dark"] + + # FixIt 0.2.12 | NEW PanguJS config + [params.pangu] + # For Chinese writing + enable = false + selector = "article" # FixIt 0.2.17 | NEW + + # FixIt 0.2.12 | NEW Watermark config + # Detail config see https://github.com/Lruihao/watermark#readme + [params.watermark] + enable = false + # watermark's text (HTML format is supported) + content = "" + # watermark's transparency + opacity = 0.1 + # parent of watermark's container + appendTo = ".wrapper>main" + # watermark's width. unit: px + width = 150 + # watermark's height. unit: px + height = 20 + # row spacing of watermarks. unit: px + rowSpacing = 60 + # col spacing of watermarks. unit: px + colSpacing = 30 + # watermark's tangent angle. unit: deg + rotate = 15 + # watermark's fontSize. unit: rem + fontSize = 0.85 + # FixIt 0.2.13 | NEW watermark's fontFamily + fontFamily = "inherit" + + # FixIt 0.2.12 | NEW Busuanzi count + [params.ibruce] + enable = false + # Enable in post meta + enablePost = false + + # Site verification code config for Google/Bing/Yandex/Pinterest/Baidu/360/Sogou + [params.verification] + google = "" + bing = "" + yandex = "" + pinterest = "" + baidu = "" + so = "" + sogou = "" + + # FixIt 0.2.10 | NEW Site SEO config + [params.seo] + # image URL + image = "" + # thumbnail URL + thumbnailUrl = "" + + # FixIt 0.2.0 | NEW Analytics config + [params.analytics] + enable = false + # Google Analytics + [params.analytics.google] + id = "" + # whether to anonymize IP + anonymizeIP = true + # Fathom Analytics + [params.analytics.fathom] + id = "" + # server url for your tracker if you're self hosting + server = "" + + # FixIt 0.2.7 | NEW Cookie consent config + [params.cookieconsent] + enable = false + # text strings used for Cookie consent banner + [params.cookieconsent.content] + message = "This website is absolutely cookie free." + dismiss = "Close" + link = "" + + # FixIt 0.2.7 | CHANGED CDN config for third-party library files + [params.cdn] + # CDN data file name, disabled by default ["jsdelivr.yml", "unpkg.yml", ...] + # located in "themes/FixIt/assets/data/cdn/" directory + # you can store your own data files in the same path under your project: "assets/data/cdn/" + data = "" + + # FixIt 0.2.8 | NEW Compatibility config + [params.compatibility] + # whether to use Polyfill.io to be compatible with older browsers + polyfill = false + # whether to use object-fit-images to be compatible with older browsers + objectFit = false + + # FixIt 0.2.14 | NEW GitHub banner in the top-right or top-left corner + [params.githubCorner] + enable = false + permalink = "https://github.com/hugo-fixit/FixIt" + title = "View source on GitHub" + position = "right" # ["left", "right"] + + # FixIt 0.2.14 | NEW Gravatar config + [params.gravatar] + # FixIt 0.2.18 | NEW Depends on the author's email, if the author's email is not set, the local avatar will be used + enable = false + # Gravatar host, default: "www.gravatar.com" + host = "www.gravatar.com" # ["cn.gravatar.com", "gravatar.loli.net", ...] + style = "" # ["", "mp", "identicon", "monsterid", "wavatar", "retro", "blank", "robohash"] + + # FixIt 0.2.16 | NEW Back to top + [params.backToTop] + enable = true + # Scroll percent label in b2t button + scrollpercent = false + + # FixIt 0.2.16 | NEW Reading progress bar + [params.readingProgress] + enable = true + # Available values: ["left", "right"] + start = "left" + # Available values: ["top", "bottom"] + position = "top" + reversed = false + light = "#ba0066" + dark = "#EC008C" + height = "2px" + + # FixIt 0.2.17 | NEW Progress bar in the top during page loading. + # For more information: https://github.com/CodeByZach/pace + [params.pace] + enable = false + # All available colors: + # ["black", "blue", "green", "orange", "pink", "purple", "red", "silver", "white", "yellow"] + color = "blue" + # All available themes: + # ["barber-shop", "big-counter", "bounce", "center-atom", "center-circle", "center-radar", "center-simple", + # "corner-indicator", "fill-left", "flash", "flat-top", "loading-bar", "mac-osx", "material", "minimal"] + theme = "minimal" + + # FixIt 0.2.17 | NEW Define custom file paths + # Create your custom files in site directory `layouts/partials/custom` and uncomment needed files below + [params.customFilePath] + # aside = "custom/aside.html" + # profile = "custom/profile.html" + # footer = "custom/footer.html" + + # FixIt 0.2.15 | NEW Developer options + [params.dev] + enable = false + # Check for updates + c4u = false + # Please do not expose to public! + githubToken = "" + # Mobile Devtools config + [params.dev.mDevtools] + enable = false + # "vConsole", "eruda" supported + type = "vConsole" + +# ------------------------------------------------------------------------------------- +# Modules Configuration +# See: https://gohugo.io/hugo-modules/configuration/#module-config-imports +# ------------------------------------------------------------------------------------- +[module] + [module.hugoVersion] + extended = true + min = "0.109.0" + + +# Markup related config in Hugo +[markup] +# Syntax Highlighting +[markup.highlight] +codeFences = true +guessSyntax = true +lineNos = true +lineNumbersInTable = true +# false is a necessary configuration +# (https://github.com/dillonzq/LoveIt/issues/158) +noClasses = false +# Goldmark is from Hugo 0.60 the default library used for Markdown +[markup.goldmark] +[markup.goldmark.extensions] +definitionList = true +footnote = true +linkify = true +strikethrough = true +table = true +taskList = true +typographer = true +[markup.goldmark.renderer] +# whether to use HTML tags directly in the document +unsafe = true +# Table Of Contents settings +[markup.tableOfContents] +startLevel = 2 +endLevel = 6 + +# Author config +[author] +name = "Sascha" +email = "m@m3tam3re.com" +link = "" + +[languages] +[languages.de] +languageName = "Deutsch" + +[languages.de.params] + license= 'Lizenz zur Weiterverwendung: CC BY-NC 4.0' +[[languages.de.menu.main]] + name = "Blog" + url = "/de/posts/" + weight = 1 + [languages.de.menu.main.params] + icon = "fa-solid fa-newspaper" + +[[languages.de.menu.main]] + name = "Kategorien" + url = "#" + weight = 2 + [languages.de.menu.main.params] + icon = "fa-solid fa-list" + +[[languages.de.menu.main]] + name = "Über mich" + parent = "Kategorien" + url = "/de/about/" + weight = 1 + [languages.de.menu.main.params] + icon = "fa-solid fa-address-card" + +[[languages.de.menu.main]] + name = "Impressum" + parent = "Kategorien" + url = "/de/legal/" + weight = 100 + [languages.de.menu.main.params] + icon = "fa-solid fa-circle-info" + +[[languages.de.menu.main]] + name = "Archiv" + url = "/archive" + parent = "Kategorien" + weight = 99 + [languages.de.menu.main.params] + icon = "fa-solid fa-archive" + +[[languages.de.menu.main]] + name = "Tutorials" + url = "/de/tutorials/" + weight = 3 + [languages.de.menu.main.params] + icon = "fa-solid fa-book fa-fw fa-sm" + +[[languages.de.menu.main]] + name = "Automatisierung" + url = "/automation" + parent = "Tutorials" + weight = 3 + [languages.de.menu.main.params] + icon = "fa-solid fa-square-share-nodes" + +[[languages.de.menu.main]] + name = "Shopify" + url = "/shopify" + parent = "Tutorials" + weight = 2 + [languages.de.menu.main.params] + icon = "fa-brands fa-shopify fa-fw" + +[[languages.de.menu.main]] + name = "Datenverwaltung" + url = "/datamanagement" + parent = "Tutorials" + weight = 4 + [languages.de.menu.main.params] + icon = "fa-solid fa-table" + +[languages.en] +languageName = "English" +[languages.en.params] + license= 'Released under CC BY-NC 4.0' +[[languages.en.menu.main]] + name = "Blog" + url = "/posts/" + weight = 1 + [languages.en.menu.main.params] + icon = "fa-solid fa-newspaper" + +[[languages.en.menu.main]] + name = "Categories" + url = "#" + weight = 2 + [languages.en.menu.main.params] + icon = "fa-solid fa-list" + +[[languages.en.menu.main]] + name = "About me" + parent = "Categories" + url = "/about/" + weight = 4 + [languages.en.menu.main.params] + icon = "fa-solid fa-address-card" + +[[languages.en.menu.main]] + name = "Legal Notice" + parent = "Categories" + url = "/legal/" + weight = 100 + [languages.en.menu.main.params] + icon = "fa-solid fa-circle-info" + +[[languages.en.menu.main]] + name = "Archive" + url = "/archive" + parent = "Categories" + weight = 99 + [languages.en.menu.main.params] + icon = "fa-solid fa-archive" + +[[languages.en.menu.main]] + name = "Tutorials" + url = "/tutorials/" + weight = 3 + [languages.en.menu.main.params] + icon = "fa-solid fa-book fa-fw fa-sm" + +[[languages.en.menu.main]] + name = "Automation" + url = "/automation" + parent = "Tutorials" + weight = 3 + [languages.en.menu.main.params] + icon = "fa-solid fa-square-share-nodes" + +[[languages.en.menu.main]] + name = "Data Management" + url = "/datamanagement" + parent = "Tutorials" + weight = 4 + [languages.en.menu.main.params] + icon = "fa-solid fa-table" + +[[languages.en.menu.main]] + name = "Shopify" + url = "/shopify" + parent = "Tutorials" + weight = 2 + [languages.en.menu.main.params] + icon = "fa-brands fa-shopify fa-fw" diff --git a/content-org/base.org b/content-org/base.org new file mode 100644 index 0000000..a1ef11e --- /dev/null +++ b/content-org/base.org @@ -0,0 +1,423 @@ +#+hugo_base_dir: ../ +#+hugo_section: ./ +#+options: author:nil + +* EN + +** Base Pages + +All the basic stuff. + +*** Legal Notice & Privacy Policy +:PROPERTIES: +:EXPORT_FILE_NAME: legal.en.md +:EXPORT_DATE: 2000-01-01 +:END: + +Welcome to the my Legal Notice page. Here, you'll find all the necessary legal information about my company and our privacy policy. I know legal details can be cumbersome, but it's essential to get these particulars squared away so we can focus on what we both love - technology! + +**** Legal Notice + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Germany + +Email: ping@m3tam3re.com + +Website: www.m3tam3re.com + +**** Privacy Policy + +Privacy Policy +We are very delighted that you have shown interest in our enterprise. Data protection is of a particularly high priority for the management of Sascha König. The use of the Internet pages of Sascha König is possible without any indication of personal data; however, if a data subject wants to use special enterprise services via our website, processing of personal data could become necessary. If the processing of personal data is necessary and there is no statutory basis for such processing, we generally obtain consent from the data subject. + +The processing of personal data, such as the name, address, e-mail address, or telephone number of a data subject shall always be in line with the General Data Protection Regulation (GDPR), and in accordance with the country-specific data protection regulations applicable to Sascha König. By means of this data protection declaration, our enterprise would like to inform the general public of the nature, scope, and purpose of the personal data we collect, use and process. Furthermore, data subjects are informed, by means of this data protection declaration, of the rights to which they are entitled. + +As the controller, Sascha König has implemented numerous technical and organizational measures to ensure the most complete protection of personal data processed through this website. However, Internet-based data transmissions may in principle have security gaps, so absolute protection may not be guaranteed. For this reason, every data subject is free to transfer personal data to us via alternative means, e.g. by telephone. + +***** 1. Definitions +The data protection declaration of Sascha König is based on the terms used by the European legislator for the adoption of the General Data Protection Regulation (GDPR). Our data protection declaration should be legible and understandable for the general public, as well as our customers and business partners. To ensure this, we would like to first explain the terminology used. + +In this data protection declaration, we use, inter alia, the following terms: + +****** a) Personal data +Personal data means any information relating to an identified or identifiable natural person (“data subject”). An identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier or to one or more factors specific to the physical, physiological, genetic, mental, economic, cultural or social identity of that natural person. + +****** b) Data subject +Data subject is any identified or identifiable natural person, whose personal data is processed by the controller responsible for the processing. + +****** c) Processing +Processing is any operation or set of operations which is performed on personal data or on sets of personal data, whether or not by automated means, such as collection, recording, organisation, structuring, storage, adaptation or alteration, retrieval, consultation, use, disclosure by transmission, dissemination or otherwise making available, alignment or combination, restriction, erasure or destruction. + +****** d) Restriction of processing +Restriction of processing is the marking of stored personal data with the aim of limiting their processing in the future. + +****** e) Profiling +Profiling means any form of automated processing of personal data consisting of the use of personal data to evaluate certain personal aspects relating to a natural person, in particular to analyse or predict aspects concerning that natural person's performance at work, economic situation, health, personal preferences, interests, reliability, behaviour, location or movements. + +****** f)Pseudonymisation +Pseudonymisation is the processing of personal data in such a manner that the personal data can no longer be attributed to a specific data subject without the use of additional information, provided that such additional information is kept separately and is subject to technical and organisational measures to ensure that the personal data are not attributed to an identified or identifiable natural person. + +****** g) Controller or controller responsible for the processing +Controller or controller responsible for the processing is the natural or legal person, public authority, agency or other body which, alone or jointly with others, determines the purposes and means of the processing of personal data; where the purposes and means of such processing are determined by Union or Member State law, the controller or the specific criteria for its nomination may be provided for by Union or Member State law. + +****** h) Processor +Processor is a natural or legal person, public authority, agency or other body which processes personal data on behalf of the controller. + +****** i) Recipient +Recipient is a natural or legal person, public authority, agency or another body, to which the personal data are disclosed, whether a third party or not. However, public authorities which may receive personal data in the framework of a particular inquiry in accordance with Union or Member State law shall not be regarded as recipients; the processing of those data by those public authorities shall be in compliance with the applicable data protection rules according to the purposes of the processing. + +****** j) Third party +Third party is a natural or legal person, public authority, agency or body other than the data subject, controller, processor and persons who, under the direct authority of the controller or processor, are authorised to process personal data. + +****** k) Consent +Consent of the data subject is any freely given, specific, informed and unambiguous indication of the data subject's wishes by which he or she, by a statement or by a clear affirmative action, signifies agreement to the processing of personal data relating to him or her. + +***** 2. Name and Address of the controller +Controller for the purposes of the General Data Protection Regulation (GDPR), other data protection laws applicable in Member states of the European Union and other provisions related to data protection is: + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Deutschland + +Email: ping@m3tam3re.com + +Website: www.m3tam3re.com + +***** 3. Collection of general data and information +The website of Sascha König collects a series of general data and information when a data subject or automated system calls up the website. This general data and information are stored in the server log files. Collected may be (1) the browser types and versions used, (2) the operating system used by the accessing system, (3) the website from which an accessing system reaches our website (so-called referrers), (4) the sub-websites, (5) the date and time of access to the Internet site, (6) an Internet protocol address (IP address), (7) the Internet service provider of the accessing system, and (8) any other similar data and information that may be used in the event of attacks on our information technology systems. + +When using these general data and information, Sascha König does not draw any conclusions about the data subject. Rather, this information is needed to (1) deliver the content of our website correctly, (2) optimize the content of our website as well as its advertisement, (3) ensure the long-term viability of our information technology systems and website technology, and (4) provide law enforcement authorities with the information necessary for criminal prosecution in case of a cyber-attack. Therefore, Sascha König analyzes anonymously collected data and information statistically, with the aim of increasing the data protection and data security of our enterprise, and to ensure an optimal level of protection for the personal data we process. The anonymous data of the server log files are stored separately from all personal data provided by a data subject. + +***** 4. Subscription to our newsletters +On the website of Sascha König, users are given the opportunity to subscribe to our enterprise's newsletter. The input mask used for this purpose determines what personal data are transmitted, as well as when the newsletter is ordered from the controller. + +The Sascha König informs its customers and business partners regularly by means of a newsletter about enterprise offers. The enterprise's newsletter may only be received by the data subject if (1) the data subject has a valid e-mail address and (2) the data subject registers for the newsletter shipping. A confirmation e-mail will be sent to the e-mail address registered by a data subject for the first time for newsletter shipping, for legal reasons, in the double opt-in procedure. This confirmation e-mail is used to prove whether the owner of the e-mail address as the data subject is authorized to receive the newsletter. + +During the registration for the newsletter, we also store the IP address of the computer system assigned by the Internet service provider (ISP) and used by the data subject at the time of the registration, as well as the date and time of the registration. The collection of this data is necessary in order to understand the (possible) misuse of the e-mail address of a data subject at a later date, and it therefore serves the aim of the legal protection of the controller. + +The personal data collected as part of a registration for the newsletter will only be used to send our newsletter. In addition, subscribers to the newsletter may be informed by e-mail, as long as this is necessary for the operation of the newsletter service or a registration in question, as this could be the case in the event of modifications to the newsletter offer, or in the event of a change in technical circumstances. There will be no transfer of personal data collected by the newsletter service to third parties. The subscription to our newsletter may be terminated by the data subject at any time. The consent to the storage of personal data, which the data subject has given for shipping the newsletter, may be revoked at any time. For the purpose of revocation of consent, a corresponding link is found in each newsletter. It is also possible to unsubscribe from the newsletter at any time directly on the website of the controller, or to communicate this to the controller in a different way. + +***** 5. Newsletter-Tracking +The newsletter of Sascha König contains so-called tracking pixels. A tracking pixel is a miniature graphic embedded in such e-mails, which are sent in HTML format to enable log file recording and analysis. This allows a statistical analysis of the success or failure of online marketing campaigns. Based on the embedded tracking pixel, Sascha König may see if and when an e-mail was opened by a data subject, and which links in the e-mail were called up by data subjects. + +Such personal data collected in the tracking pixels contained in the newsletters are stored and analyzed by the controller in order to optimize the shipping of the newsletter, as well as to adapt the content of future newsletters even better to the interests of the data subject. These personal data will not be passed on to third parties. Data subjects are at any time entitled to revoke the respective separate declaration of consent issued by means of the double-opt-in procedure. After a revocation, these personal data will be deleted by the controller. The Sascha König automatically regards a withdrawal from the receipt of the newsletter as a revocation. + +***** 6. Comments function in the blog on the website +The Sascha König offers users the possibility to leave individual comments on individual blog contributions on a blog, which is on the website of the controller. A blog is a web-based, publicly-accessible portal, through which one or more people called bloggers or web-bloggers may post articles or write down thoughts in so-called blogposts. Blogposts may usually be commented by third parties. + +If a data subject leaves a comment on the blog published on this website, the comments made by the data subject are also stored and published, as well as information on the date of the commentary and on the user's (pseudonym) chosen by the data subject. In addition, the IP address assigned by the Internet service provider (ISP) to the data subject is also logged. This storage of the IP address takes place for security reasons, and in case the data subject violates the rights of third parties, or posts illegal content through a given comment. The storage of these personal data is, therefore, in the own interest of the data controller, so that he can exculpate in the event of an infringement. This collected personal data will not be passed to third parties, unless such a transfer is required by law or serves the aim of the defense of the data controller. + +***** 7. Routine erasure and blocking of personal data +The data controller shall process and store the personal data of the data subject only for the period necessary to achieve the purpose of storage, or as far as this is granted by the European legislator or other legislators in laws or regulations to which the controller is subject to. + +If the storage purpose is not applicable, or if a storage period prescribed by the European legislator or another competent legislator expires, the personal data are routinely blocked or erased in accordance with legal requirements. + +***** 8. Rights of the data subject +****** a) Right of confirmation +Each data subject shall have the right granted by the European legislator to obtain from the controller the confirmation as to whether or not personal data concerning him or her are being processed. If a data subject wishes to avail himself of this right of confirmation, he or she may, at any time, contact any employee of the controller. + +****** b) Right of access +Each data subject shall have the right granted by the European legislator to obtain from the controller free information about his or her personal data stored at any time and a copy of this information. Furthermore, the European directives and regulations grant the data subject access to the following information: + +the purposes of the processing; +the categories of personal data concerned; +the recipients or categories of recipients to whom the personal data have been or will be disclosed, in particular recipients in third countries or international organisations; +where possible, the envisaged period for which the personal data will be stored, or, if not possible, the criteria used to determine that period; +the existence of the right to request from the controller rectification or erasure of personal data, or restriction of processing of personal data concerning the data subject, or to object to such processing; +the existence of the right to lodge a complaint with a supervisory authority; +where the personal data are not collected from the data subject, any available information as to their source; +the existence of automated decision-making, including profiling, referred to in Article 22(1) and (4) of the GDPR and, at least in those cases, meaningful information about the logic involved, as well as the significance and envisaged consequences of such processing for the data subject. +Furthermore, the data subject shall have a right to obtain information as to whether personal data are transferred to a third country or to an international organisation. Where this is the case, the data subject shall have the right to be informed of the appropriate safeguards relating to the transfer. + +If a data subject wishes to avail himself of this right of access, he or she may, at any time, contact any employee of the controller. + +****** c) Right to rectification +Each data subject shall have the right granted by the European legislator to obtain from the controller without undue delay the rectification of inaccurate personal data concerning him or her. Taking into account the purposes of the processing, the data subject shall have the right to have incomplete personal data completed, including by means of providing a supplementary statement. + +If a data subject wishes to exercise this right to rectification, he or she may, at any time, contact any employee of the controller. + +****** d) Right to erasure (Right to be forgotten) +Each data subject shall have the right granted by the European legislator to obtain from the controller the erasure of personal data concerning him or her without undue delay, and the controller shall have the obligation to erase personal data without undue delay where one of the following grounds applies, as long as the processing is not necessary: + +The personal data are no longer necessary in relation to the purposes for which they were collected or otherwise processed. +The data subject withdraws consent to which the processing is based according to point (a) of Article 6(1) of the GDPR, or point (a) of Article 9(2) of the GDPR, and where there is no other legal ground for the processing. +The data subject objects to the processing pursuant to Article 21(1) of the GDPR and there are no overriding legitimate grounds for the processing, or the data subject objects to the processing pursuant to Article 21(2) of the GDPR. +The personal data have been unlawfully processed. +The personal data must be erased for compliance with a legal obligation in Union or Member State law to which the controller is subject. +The personal data have been collected in relation to the offer of information society services referred to in Article 8(1) of the GDPR. +If one of the aforementioned reasons applies, and a data subject wishes to request the erasure of personal data stored by Sascha König, he or she may, at any time, contact any employee of the controller. An employee of Sascha König shall promptly ensure that the erasure request is complied with immediately. + +Where the controller has made personal data public and is obliged pursuant to Article 17(1) to erase the personal data, the controller, taking account of available technology and the cost of implementation, shall take reasonable steps, including technical measures, to inform other controllers processing the personal data that the data subject has requested erasure by such controllers of any links to, or copy or replication of, those personal data, as far as processing is not required. An employees of Sascha König will arrange the necessary measures in individual cases. + +****** e) Right of restriction of processing +Each data subject shall have the right granted by the European legislator to obtain from the controller restriction of processing where one of the following applies: + +The accuracy of the personal data is contested by the data subject, for a period enabling the controller to verify the accuracy of the personal data. +The processing is unlawful and the data subject opposes the erasure of the personal data and requests instead the restriction of their use instead. +The controller no longer needs the personal data for the purposes of the processing, but they are required by the data subject for the establishment, exercise or defence of legal claims. +The data subject has objected to processing pursuant to Article 21(1) of the GDPR pending the verification whether the legitimate grounds of the controller override those of the data subject. +If one of the aforementioned conditions is met, and a data subject wishes to request the restriction of the processing of personal data stored by Sascha König, he or she may at any time contact any employee of the controller. The employee of Sascha König will arrange the restriction of the processing. + +****** f) Right to data portability +Each data subject shall have the right granted by the European legislator, to receive the personal data concerning him or her, which was provided to a controller, in a structured, commonly used and machine-readable format. He or she shall have the right to transmit those data to another controller without hindrance from the controller to which the personal data have been provided, as long as the processing is based on consent pursuant to point (a) of Article 6(1) of the GDPR or point (a) of Article 9(2) of the GDPR, or on a contract pursuant to point (b) of Article 6(1) of the GDPR, and the processing is carried out by automated means, as long as the processing is not necessary for the performance of a task carried out in the public interest or in the exercise of official authority vested in the controller. + +Furthermore, in exercising his or her right to data portability pursuant to Article 20(1) of the GDPR, the data subject shall have the right to have personal data transmitted directly from one controller to another, where technically feasible and when doing so does not adversely affect the rights and freedoms of others. + +In order to assert the right to data portability, the data subject may at any time contact any employee of Sascha König. + +****** g) Right to object +Each data subject shall have the right granted by the European legislator to object, on grounds relating to his or her particular situation, at any time, to processing of personal data concerning him or her, which is based on point (e) or (f) of Article 6(1) of the GDPR. This also applies to profiling based on these provisions. + +The Sascha König shall no longer process the personal data in the event of the objection, unless we can demonstrate compelling legitimate grounds for the processing which override the interests, rights and freedoms of the data subject, or for the establishment, exercise or defence of legal claims. + +If Sascha König processes personal data for direct marketing purposes, the data subject shall have the right to object at any time to processing of personal data concerning him or her for such marketing. This applies to profiling to the extent that it is related to such direct marketing. If the data subject objects to Sascha König to the processing for direct marketing purposes, Sascha König will no longer process the personal data for these purposes. + +In addition, the data subject has the right, on grounds relating to his or her particular situation, to object to processing of personal data concerning him or her by Sascha König for scientific or historical research purposes, or for statistical purposes pursuant to Article 89(1) of the GDPR, unless the processing is necessary for the performance of a task carried out for reasons of public interest. + +In order to exercise the right to object, the data subject may contact any employee of Sascha König. In addition, the data subject is free in the context of the use of information society services, and notwithstanding Directive 2002/58/EC, to use his or her right to object by automated means using technical specifications. + +****** h) Automated individual decision-making, including profiling +Each data subject shall have the right granted by the European legislator not to be subject to a decision based solely on automated processing, including profiling, which produces legal effects concerning him or her, or similarly significantly affects him or her, as long as the decision (1) is not is necessary for entering into, or the performance of, a contract between the data subject and a data controller, or (2) is not authorised by Union or Member State law to which the controller is subject and which also lays down suitable measures to safeguard the data subject's rights and freedoms and legitimate interests, or (3) is not based on the data subject's explicit consent. + +If the decision (1) is necessary for entering into, or the performance of, a contract between the data subject and a data controller, or (2) it is based on the data subject's explicit consent, Sascha König shall implement suitable measures to safeguard the data subject's rights and freedoms and legitimate interests, at least the right to obtain human intervention on the part of the controller, to express his or her point of view and contest the decision. + +If the data subject wishes to exercise the rights concerning automated individual decision-making, he or she may, at any time, contact any employee of Sascha König. + +****** i) Right to withdraw data protection consent +Each data subject shall have the right granted by the European legislator to withdraw his or her consent to processing of his or her personal data at any time. + +If the data subject wishes to exercise the right to withdraw the consent, he or she may, at any time, contact any employee of Sascha König. + +***** 9. Legal basis for the processing +Art. 6(1) lit. a GDPR serves as the legal basis for processing operations for which we obtain consent for a specific processing purpose. If the processing of personal data is necessary for the performance of a contract to which the data subject is party, as is the case, for example, when processing operations are necessary for the supply of goods or to provide any other service, the processing is based on Article 6(1) lit. b GDPR. The same applies to such processing operations which are necessary for carrying out pre-contractual measures, for example in the case of inquiries concerning our products or services. Is our company subject to a legal obligation by which processing of personal data is required, such as for the fulfillment of tax obligations, the processing is based on Art. 6(1) lit. c GDPR. In rare cases, the processing of personal data may be necessary to protect the vital interests of the data subject or of another natural person. This would be the case, for example, if a visitor were injured in our company and his name, age, health insurance data or other vital information would have to be passed on to a doctor, hospital or other third party. Then the processing would be based on Art. 6(1) lit. d GDPR. Finally, processing operations could be based on Article 6(1) lit. f GDPR. This legal basis is used for processing operations which are not covered by any of the abovementioned legal grounds, if processing is necessary for the purposes of the legitimate interests pursued by our company or by a third party, except where such interests are overridden by the interests or fundamental rights and freedoms of the data subject which require protection of personal data. Such processing operations are particularly permissible because they have been specifically mentioned by the European legislator. He considered that a legitimate interest could be assumed if the data subject is a client of the controller (Recital 47 Sentence 2 GDPR). + +***** 10. The legitimate interests pursued by the controller or by a third party +Where the processing of personal data is based on Article 6(1) lit. f GDPR our legitimate interest is to carry out our business in favor of the well-being of all our employees and the shareholders. + +***** 11. Period for which the personal data will be stored +The criteria used to determine the period of storage of personal data is the respective statutory retention period. After expiration of that period, the corresponding data is routinely deleted, as long as it is no longer necessary for the fulfillment of the contract or the initiation of a contract. + +***** 12. Provision of personal data as statutory or contractual requirement; Requirement necessary to enter into a contract; Obligation of the data subject to provide the personal data; possible consequences of failure to provide such data +We clarify that the provision of personal data is partly required by law (e.g. tax regulations) or can also result from contractual provisions (e.g. information on the contractual partner). Sometimes it may be necessary to conclude a contract that the data subject provides us with personal data, which must subsequently be processed by us. The data subject is, for example, obliged to provide us with personal data when our company signs a contract with him or her. The non-provision of the personal data would have the consequence that the contract with the data subject could not be concluded. Before personal data is provided by the data subject, the data subject must contact any employee. The employee clarifies to the data subject whether the provision of the personal data is required by law or contract or is necessary for the conclusion of the contract, whether there is an obligation to provide the personal data and the consequences of non-provision of the personal data. + +***** 13. Existence of automated decision-making +As a responsible company, we do not use automatic decision-making or profiling. + +Developed by the specialists for LegalTech at Willing & Able that also developed the system for data protection training. The legal texts contained in our privacy policy generator have been provided and published by Prof. Dr. h.c. Heiko Jonny Maniero from the German Association for Data Protection and Christian Solmecke from WBS law. + + +* DE + +*** Impressum & Datenschutzerklärung +:PROPERTIES: +:EXPORT_FILE_NAME: legal.de.md +:EXPORT_DATE: 2000-10-03 +:END: + +Willkommen auf dieser Seite, die die rechtlichen Unternehmensdetails und Datenschutzbestimmungen von Sascha König enthält. Es ist wichtig, dass wir die rechtlichen Aspekte klären, um Transparenz und Vertrauen zu gewährleisten. Vielen Dank für Ihr Verständnis und Ihre Zusammenarbeit. + +**** Impressum + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Deutschland + +Email: ping@m3tam3re.com + +Website: www.m3tam3re.com + +**** Datenschutzerklärung + +Wir freuen uns sehr über Ihr Interesse an unserem Unternehmen. Datenschutz hat einen besonders hohen Stellenwert für die Geschäftsleitung der Sascha König. Eine Nutzung der Internetseiten der Sascha König ist grundsätzlich ohne jede Angabe personenbezogener Daten möglich. Sofern eine betroffene Person besondere Services unseres Unternehmens über unsere Internetseite in Anspruch nehmen möchte, könnte jedoch eine Verarbeitung personenbezogener Daten erforderlich werden. Ist die Verarbeitung personenbezogener Daten erforderlich und besteht für eine solche Verarbeitung keine gesetzliche Grundlage, holen wir generell eine Einwilligung der betroffenen Person ein. + +Die Verarbeitung personenbezogener Daten, beispielsweise des Namens, der Anschrift, E-Mail-Adresse oder Telefonnummer einer betroffenen Person, erfolgt stets im Einklang mit der Datenschutz-Grundverordnung und in Übereinstimmung mit den für Sascha König geltenden landesspezifischen Datenschutzbestimmungen. Mittels dieser Datenschutzerklärung möchte unser Unternehmen die Öffentlichkeit über Art, Umfang und Zweck der von uns erhobenen, genutzten und verarbeiteten personenbezogenen Daten informieren. Ferner werden betroffene Personen mittels dieser Datenschutzerklärung über die ihnen zustehenden Rechte aufgeklärt. + +Sascha König hat als für die Verarbeitung Verantwortlicher zahlreiche technische und organisatorische Maßnahmen umgesetzt, um einen möglichst lückenlosen Schutz der über diese Internetseite verarbeiteten personenbezogenen Daten sicherzustellen. Dennoch können Internetbasierte Datenübertragungen grundsätzlich Sicherheitslücken aufweisen, sodass ein absoluter Schutz nicht gewährleistet werden kann. Aus diesem Grund steht es jeder betroffenen Person frei, personenbezogene Daten auch auf alternativen Wegen, beispielsweise telefonisch, an uns zu übermitteln. + +***** 1. Begriffsbestimmungen +Die Datenschutzerklärung der Sascha König beruht auf den Begrifflichkeiten, die durch den Europäischen Richtlinien- und Verordnungsgeber beim Erlass der Datenschutz-Grundverordnung (DS-GVO) verwendet wurden. Unsere Datenschutzerklärung soll sowohl für die Öffentlichkeit als auch für unsere Kunden und Geschäftspartner einfach lesbar und verständlich sein. Um dies zu gewährleisten, möchten wir vorab die verwendeten Begrifflichkeiten erläutern. + +Wir verwenden in dieser Datenschutzerklärung unter anderem die folgenden Begriffe: + +****** a) personenbezogene Daten +Personenbezogene Daten sind alle Informationen, die sich auf eine identifizierte oder identifizierbare natürliche Person (im Folgenden „betroffene Person“) beziehen. Als identifizierbar wird eine natürliche Person angesehen, die direkt oder indirekt, insbesondere mittels Zuordnung zu einer Kennung wie einem Namen, zu einer Kennnummer, zu Standortdaten, zu einer Online-Kennung oder zu einem oder mehreren besonderen Merkmalen, die Ausdruck der physischen, physiologischen, genetischen, psychischen, wirtschaftlichen, kulturellen oder sozialen Identität dieser natürlichen Person sind, identifiziert werden kann. + +****** b) betroffene Person +Betroffene Person ist jede identifizierte oder identifizierbare natürliche Person, deren personenbezogene Daten von dem für die Verarbeitung Verantwortlichen verarbeitet werden. + +****** c) Verarbeitung +Verarbeitung ist jeder mit oder ohne Hilfe automatisierter Verfahren ausgeführte Vorgang oder jede solche Vorgangsreihe im Zusammenhang mit personenbezogenen Daten wie das Erheben, das Erfassen, die Organisation, das Ordnen, die Speicherung, die Anpassung oder Veränderung, das Auslesen, das Abfragen, die Verwendung, die Offenlegung durch Übermittlung, Verbreitung oder eine andere Form der Bereitstellung, den Abgleich oder die Verknüpfung, die Einschränkung, das Löschen oder die Vernichtung. + +****** d) Einschränkung der Verarbeitung +Einschränkung der Verarbeitung ist die Markierung gespeicherter personenbezogener Daten mit dem Ziel, ihre künftige Verarbeitung einzuschränken. + +****** e) Profiling +Profiling ist jede Art der automatisierten Verarbeitung personenbezogener Daten, die darin besteht, dass diese personenbezogenen Daten verwendet werden, um bestimmte persönliche Aspekte, die sich auf eine natürliche Person beziehen, zu bewerten, insbesondere, um Aspekte bezüglich Arbeitsleistung, wirtschaftlicher Lage, Gesundheit, persönlicher Vorlieben, Interessen, Zuverlässigkeit, Verhalten, Aufenthaltsort oder Ortswechsel dieser natürlichen Person zu analysieren oder vorherzusagen. + +****** f) Pseudonymisierung +Pseudonymisierung ist die Verarbeitung personenbezogener Daten in einer Weise, auf welche die personenbezogenen Daten ohne Hinzuziehung zusätzlicher Informationen nicht mehr einer spezifischen betroffenen Person zugeordnet werden können, sofern diese zusätzlichen Informationen gesondert aufbewahrt werden und technischen und organisatorischen Maßnahmen unterliegen, die gewährleisten, dass die personenbezogenen Daten nicht einer identifizierten oder identifizierbaren natürlichen Person zugewiesen werden. + +****** g) Verantwortlicher oder für die Verarbeitung Verantwortlicher +Verantwortlicher oder für die Verarbeitung Verantwortlicher ist die natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle, die allein oder gemeinsam mit anderen über die Zwecke und Mittel der Verarbeitung von personenbezogenen Daten entscheidet. Sind die Zwecke und Mittel dieser Verarbeitung durch das Unionsrecht oder das Recht der Mitgliedstaaten vorgegeben, so kann der Verantwortliche beziehungsweise können die bestimmten Kriterien seiner Benennung nach dem Unionsrecht oder dem Recht der Mitgliedstaaten vorgesehen werden. + +****** h) Auftragsverarbeiter +Auftragsverarbeiter ist eine natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle, die personenbezogene Daten im Auftrag des Verantwortlichen verarbeitet. + +****** i) Empfänger +Empfänger ist eine natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle, der personenbezogene Daten offengelegt werden, unabhängig davon, ob es sich bei ihr um einen Dritten handelt oder nicht. Behörden, die im Rahmen eines bestimmten Untersuchungsauftrags nach dem Unionsrecht oder dem Recht der Mitgliedstaaten möglicherweise personenbezogene Daten erhalten, gelten jedoch nicht als Empfänger. + +****** j) Dritter +Dritter ist eine natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle außer der betroffenen Person, dem Verantwortlichen, dem Auftragsverarbeiter und den Personen, die unter der unmittelbaren Verantwortung des Verantwortlichen oder des Auftragsverarbeiters befugt sind, die personenbezogenen Daten zu verarbeiten. + +****** k) Einwilligung +Einwilligung ist jede von der betroffenen Person freiwillig für den bestimmten Fall in informierter Weise und unmissverständlich abgegebene Willensbekundung in Form einer Erklärung oder einer sonstigen eindeutigen bestätigenden Handlung, mit der die betroffene Person zu verstehen gibt, dass sie mit der Verarbeitung der sie betreffenden personenbezogenen Daten einverstanden ist. + +***** 2. Name und Anschrift des für die Verarbeitung Verantwortlichen +Verantwortlicher im Sinne der Datenschutz-Grundverordnung, sonstiger in den Mitgliedstaaten der Europäischen Union geltenden Datenschutzgesetze und anderer Bestimmungen mit datenschutzrechtlichem Charakter ist die: + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Deutschland + +E-Mail: ping@m3tam3re.com + +Website: www.m3tam3re.com + +***** 3. Erfassung von allgemeinen Daten und Informationen + Die Internetseite Sascha König erfasst mit jedem Aufruf der Internetseite durch eine betroffene Person oder ein automatisiertes System eine Reihe von allgemeinen Daten und Informationen. Diese allgemeinen Daten und Informationen werden in den Logfiles des Servers gespeichert. Erfasst werden können die (1) verwendeten Browsertypen und Versionen, (2) das vom zugreifenden System verwendete Betriebssystem, (3) die Internetseite, von welcher ein zugreifendes System auf unsere Internetseite gelangt (sogenannte Referrer), (4) die Unterwebseiten, welche über ein zugreifendes System auf unserer Internetseite angesteuert werden, (5) das Datum und die Uhrzeit eines Zugriffs auf die Internetseite, (6) eine Internet-Protokoll-Adresse (IP-Adresse), (7) der Internet-Service-Provider des zugreifenden Systems und (8) sonstige ähnliche Daten und Informationen, die der Gefahrenabwehr im Falle von Angriffen auf unsere informationstechnologischen Systeme dienen. + +Bei der Nutzung dieser allgemeinen Daten und Informationen zieht Sascha König keine Rückschlüsse auf die betroffene Person. Diese Informationen werden vielmehr benötigt, um (1) die Inhalte unserer Internetseite korrekt auszuliefern, (2) die Inhalte unserer Internetseite sowie die Werbung für diese zu optimieren, (3) die dauerhafte Funktionsfähigkeit unserer informationstechnologischen Systeme und der Technik unserer Internetseite zu gewährleisten sowie (4) um Strafverfolgungsbehörden im Falle eines Cyberangriffes die zur Strafverfolgung notwendigen Informationen bereitzustellen. Diese anonym erhobenen Daten und Informationen werden durch Sascha König daher einerseits statistisch und ferner mit dem Ziel ausgewertet, den Datenschutz und die Datensicherheit in unserem Unternehmen zu erhöhen, um letztlich ein optimales Schutzniveau für die von uns verarbeiteten personenbezogenen Daten sicherzustellen. Die anonymen Daten der Server-Logfiles werden getrennt von allen durch eine betroffene Person angegebenen personenbezogenen Daten gespeichert. + +***** 4. Abonnement unseres Newsletters +Auf der Internetseite der Sascha König wird den Benutzern die Möglichkeit eingeräumt, den Newsletter unseres Unternehmens zu abonnieren. Welche personenbezogenen Daten bei der Bestellung des Newsletters an den für die Verarbeitung Verantwortlichen übermittelt werden, ergibt sich aus der hierzu verwendeten Eingabemaske. + +Sascha König informiert ihre Kunden und Geschäftspartner in regelmäßigen Abständen im Wege eines Newsletters über Angebote des Unternehmens. Der Newsletter unseres Unternehmens kann von der betroffenen Person grundsätzlich nur dann empfangen werden, wenn (1) die betroffene Person über eine gültige E-Mail-Adresse verfügt und (2) die betroffene Person sich für den Newsletterversand registriert. An die von einer betroffenen Person erstmalig für den Newsletterversand eingetragene E-Mail-Adresse wird aus rechtlichen Gründen eine Bestätigungsmail im Double-Opt-In-Verfahren versendet. Diese Bestätigungsmail dient der Überprüfung, ob der Inhaber der E-Mail-Adresse als betroffene Person den Empfang des Newsletters autorisiert hat. + +Bei der Anmeldung zum Newsletter speichern wir ferner die vom Internet-Service-Provider (ISP) vergebene IP-Adresse des von der betroffenen Person zum Zeitpunkt der Anmeldung verwendeten Computersystems sowie das Datum und die Uhrzeit der Anmeldung. Die Erhebung dieser Daten ist erforderlich, um den(möglichen) Missbrauch der E-Mail-Adresse einer betroffenen Person zu einem späteren Zeitpunkt nachvollziehen zu können und dient deshalb der rechtlichen Absicherung des für die Verarbeitung Verantwortlichen. + +Die im Rahmen einer Anmeldung zum Newsletter erhobenen personenbezogenen Daten werden ausschließlich zum Versand unseres Newsletters verwendet. Ferner könnten Abonnenten des Newsletters per E-Mail informiert werden, sofern dies für den Betrieb des Newsletter-Dienstes oder eine diesbezügliche Registrierung erforderlich ist, wie dies im Falle von Änderungen am Newsletterangebot oder bei der Veränderung der technischen Gegebenheiten der Fall sein könnte. Es erfolgt keine Weitergabe der im Rahmen des Newsletter-Dienstes erhobenen personenbezogenen Daten an Dritte. Das Abonnement unseres Newsletters kann durch die betroffene Person jederzeit gekündigt werden. Die Einwilligung in die Speicherung personenbezogener Daten, die die betroffene Person uns für den Newsletterversand erteilt hat, kann jederzeit widerrufen werden. Zum Zwecke des Widerrufs der Einwilligung findet sich in jedem Newsletter ein entsprechender Link. Ferner besteht die Möglichkeit, sich jederzeit auch direkt auf der Internetseite des für die Verarbeitung Verantwortlichen vom Newsletterversand abzumelden oder dies dem für die Verarbeitung Verantwortlichen auf andere Weise mitzuteilen. + +***** 5. Newsletter-Tracking +Die Newsletter der Sascha König enthalten sogenannte Zählpixel. Ein Zählpixel ist eine Miniaturgrafik, die in solche E-Mails eingebettet wird, welche im HTML-Format versendet werden, um eine Logdatei-Aufzeichnung und eine Logdatei-Analyse zu ermöglichen. Dadurch kann eine statistische Auswertung des Erfolges oder Misserfolges von Online-Marketing-Kampagnen durchgeführt werden. Anhand des eingebetteten Zählpixels kann Sascha König erkennen, ob und wann eine E-Mail von einer betroffenen Person geöffnet wurde und welche in der E-Mail befindlichen Links von der betroffenen Person aufgerufen wurden. + +Solche über die in den Newslettern enthaltenen Zählpixel erhobenen personenbezogenen Daten, werden von dem für die Verarbeitung Verantwortlichen gespeichert und ausgewertet, um den Newsletterversand zu optimieren und den Inhalt zukünftiger Newsletter noch besser den Interessen der betroffenen Person anzupassen. Diese personenbezogenen Daten werden nicht an Dritte weitergegeben. Betroffene Personen sind jederzeit berechtigt, die diesbezügliche gesonderte, über das Double-Opt-In-Verfahren abgegebene Einwilligungserklärung zu widerrufen. Nach einem Widerruf werden diese personenbezogenen Daten von dem für die Verarbeitung Verantwortlichen gelöscht. Eine Abmeldung vom Erhalt des Newsletters deutet Sascha König automatisch als Widerruf. + +***** 6. Kommentarfunktion im Blog auf der Internetseite +Sascha König bietet den Nutzern auf einem Blog, der sich auf der Internetseite des für die Verarbeitung Verantwortlichen befindet, die Möglichkeit, individuelle Kommentare zu einzelnen Blog-Beiträgen zu hinterlassen. Ein Blog ist ein auf einer Internetseite geführtes, in der Regel öffentlich einsehbares Portal, in welchem eine oder mehrere Personen, die Blogger oder Web-Blogger genannt werden, Artikel posten oder Gedanken in sogenannten Blogposts niederschreiben können. Die Blogposts können in der Regel von Dritten kommentiert werden. + +Hinterlässt eine betroffene Person einen Kommentar in dem auf dieser Internetseite veröffentlichten Blog, werden neben den von der betroffenen Person hinterlassenen Kommentaren auch Angaben zum Zeitpunkt der Kommentareingabe sowie zu dem von der betroffenen Person gewählten Nutzernamen (Pseudonym) gespeichert und veröffentlicht. Ferner wird die vom Internet-Service-Provider (ISP) der betroffenen Person vergebene IP-Adresse mitprotokolliert. Diese Speicherung der IP-Adresse erfolgt aus Sicherheitsgründen und für den Fall, dass die betroffene Person durch einen abgegebenen Kommentar die Rechte Dritter verletzt oder rechtswidrige Inhalte postet. Die Speicherung dieser personenbezogenen Daten erfolgt daher im eigenen Interesse des für die Verarbeitung Verantwortlichen, damit sich dieser im Falle einer Rechtsverletzung gegebenenfalls exkulpieren könnte. Es erfolgt keine Weitergabe dieser erhobenen personenbezogenen Daten an Dritte, sofern eine solche Weitergabe nicht gesetzlich vorgeschrieben ist oder der Rechtsverteidigung des für die Verarbeitung Verantwortlichen dient. + +***** 7. Routinemäßige Löschung und Sperrung von personenbezogenen Daten +Der für die Verarbeitung Verantwortliche verarbeitet und speichert personenbezogene Daten der betroffenen Person nur für den Zeitraum, der zur Erreichung des Speicherungszwecks erforderlich ist oder sofern dies durch den Europäischen Richtlinien- und Verordnungsgeber oder einen anderen Gesetzgeber in Gesetzen oder Vorschriften, welchen der für die Verarbeitung Verantwortliche unterliegt, vorgesehen wurde. + +Entfällt der Speicherungszweck oder läuft eine vom Europäischen Richtlinien- und Verordnungsgeber oder einem anderen zuständigen Gesetzgeber vorgeschriebene Speicherfrist ab, werden die personenbezogenen Daten routinemäßig und entsprechend den gesetzlichen Vorschriften gesperrt oder gelöscht. + +***** 8. Rechte der betroffenen Person +****** a) Recht auf Bestätigung +Jede betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber eingeräumte Recht, von dem für die Verarbeitung Verantwortlichen eine Bestätigung darüber zu verlangen, ob sie betreffende personenbezogene Daten verarbeitet werden. Möchte eine betroffene Person dieses Bestätigungsrecht in Anspruch nehmen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + +****** b) Recht auf Auskunft +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, jederzeit von dem für die Verarbeitung Verantwortlichen unentgeltliche Auskunft über die zu seiner Person gespeicherten personenbezogenen Daten und eine Kopie dieser Auskunft zu erhalten. Ferner hat der Europäische Richtlinien- und Verordnungsgeber der betroffenen Person Auskunft über folgende Informationen zugestanden: + +die Verarbeitungszwecke +die Kategorien personenbezogener Daten, die verarbeitet werden +die Empfänger oder Kategorien von Empfängern, gegenüber denen die personenbezogenen Daten offengelegt worden sind oder noch offengelegt werden, insbesondere bei Empfängern in Drittländern oder bei internationalen Organisationen +falls möglich die geplante Dauer, für die die personenbezogenen Daten gespeichert werden, oder, falls dies nicht möglich ist, die Kriterien für die Festlegung dieser Dauer +das Bestehen eines Rechts auf Berichtigung oder Löschung der sie betreffenden personenbezogenen Daten oder auf Einschränkung der Verarbeitung durch den Verantwortlichen oder eines Widerspruchsrechts gegen diese Verarbeitung +das Bestehen eines Beschwerderechts bei einer Aufsichtsbehörde +wenn die personenbezogenen Daten nicht bei der betroffenen Person erhoben werden: Alle verfügbaren Informationen über die Herkunft der Daten +das Bestehen einer automatisierten Entscheidungsfindung einschließlich Profiling gemäß Artikel 22 Abs.1 und 4 DS-GVO und — zumindest in diesen Fällen — aussagekräftige Informationen über die involvierte Logik sowie die Tragweite und die angestrebten Auswirkungen einer derartigen Verarbeitung für die betroffene Person +Ferner steht der betroffenen Person ein Auskunftsrecht darüber zu, ob personenbezogene Daten an ein Drittland oder an eine internationale Organisation übermittelt wurden. Sofern dies der Fall ist, so steht der betroffenen Person im Übrigen das Recht zu, Auskunft über die geeigneten Garantien im Zusammenhang mit der Übermittlung zu erhalten. + +Möchte eine betroffene Person dieses Auskunftsrecht in Anspruch nehmen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + +****** c) Recht auf Berichtigung +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, die unverzügliche Berichtigung sie betreffender unrichtiger personenbezogener Daten zu verlangen. Ferner steht der betroffenen Person das Recht zu, unter Berücksichtigung der Zwecke der Verarbeitung, die Vervollständigung unvollständiger personenbezogener Daten — auch mittels einer ergänzenden Erklärung — zu verlangen. + +Möchte eine betroffene Person dieses Berichtigungsrecht in Anspruch nehmen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + +****** d) Recht auf Löschung (Recht auf Vergessen werden) +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, von dem Verantwortlichen zu verlangen, dass die sie betreffenden personenbezogenen Daten unverzüglich gelöscht werden, sofern einer der folgenden Gründe zutrifft und soweit die Verarbeitung nicht erforderlich ist: + +Die personenbezogenen Daten wurden für solche Zwecke erhoben oder auf sonstige Weise verarbeitet, für welche sie nicht mehr notwendig sind. +Die betroffene Person widerruft ihre Einwilligung, auf die sich die Verarbeitung gemäß Art. 6 Abs. 1 Buchstabe a DS-GVO oder Art. 9 Abs. 2 Buchstabe a DS-GVO stützte, und es fehlt an einer anderweitigen Rechtsgrundlage für die Verarbeitung. +Die betroffene Person legt gemäß Art. 21 Abs. 1 DS-GVO Widerspruch gegen die Verarbeitung ein, und es liegen keine vorrangigen berechtigten Gründe für die Verarbeitung vor, oder die betroffene Person legt gemäß Art. 21 Abs. 2 DS-GVO Widerspruch gegen die Verarbeitung ein. +Die personenbezogenen Daten wurden unrechtmäßig verarbeitet. +Die Löschung der personenbezogenen Daten ist zur Erfüllung einer rechtlichen Verpflichtung nach dem Unionsrecht oder dem Recht der Mitgliedstaaten erforderlich, dem der Verantwortliche unterliegt. +Die personenbezogenen Daten wurden in Bezug auf angebotene Dienste der Informationsgesellschaft gemäß Art. 8 Abs. 1 DS-GVO erhoben. +Sofern einer der oben genannten Gründe zutrifft und eine betroffene Person die Löschung von personenbezogenen Daten, die bei der Sascha König gespeichert sind, veranlassen möchte, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. Der Mitarbeiter der Sascha König wird veranlassen, dass dem Löschverlangen unverzüglich nachgekommen wird. + +Wurden die personenbezogenen Daten von der Sascha König öffentlich gemacht und ist unser Unternehmen als Verantwortlicher gemäß Art. 17 Abs. 1 DS-GVO zur Löschung der personenbezogenen Daten verpflichtet, so trifft Sascha König unter Berücksichtigung der verfügbaren Technologie und der Implementierungskosten angemessene Maßnahmen, auch technischer Art, um andere für die Datenverarbeitung Verantwortliche, welche die veröffentlichten personenbezogenen Daten verarbeiten, darüber in Kenntnis zu setzen, dass die betroffene Person von diesen anderen für die Datenverarbeitung Verantwortlichen die Löschung sämtlicher Links zu diesen personenbezogenen Daten oder von Kopien oder Replikationen dieser personenbezogenen Daten verlangt hat, soweit die Verarbeitung nicht erforderlich ist. Der Mitarbeiter der Sascha König wird im Einzelfall das Notwendige veranlassen. + +****** e) Recht auf Einschränkung der Verarbeitung +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, von dem Verantwortlichen die Einschränkung der Verarbeitung zu verlangen, wenn eine der folgenden Voraussetzungen gegeben ist: + +Die Richtigkeit der personenbezogenen Daten wird von der betroffenen Person bestritten, und zwar für eine Dauer, die es dem Verantwortlichen ermöglicht, die Richtigkeit der personenbezogenen Daten zu überprüfen. +Die Verarbeitung ist unrechtmäßig, die betroffene Person lehnt die Löschung der personenbezogenen Daten ab und verlangt stattdessen die Einschränkung der Nutzung der personenbezogenen Daten. +Der Verantwortliche benötigt die personenbezogenen Daten für die Zwecke der Verarbeitung nicht länger, die betroffene Person benötigt sie jedoch zur Geltendmachung, Ausübung oder Verteidigung von Rechtsansprüchen. +Die betroffene Person hat Widerspruch gegen die Verarbeitung gem. Art. 21 Abs. 1 DS-GVO eingelegt und es steht noch nicht fest, ob die berechtigten Gründe des Verantwortlichen gegenüber denen der betroffenen Person überwiegen. +Sofern eine der oben genannten Voraussetzungen gegeben ist und eine betroffene Person die Einschränkung von personenbezogenen Daten, die bei der Sascha König gespeichert sind, verlangen möchte, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. Der Mitarbeiter der Sascha König wird die Einschränkung der Verarbeitung veranlassen. + +****** f) Recht auf Datenübertragbarkeit +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, die sie betreffenden personenbezogenen Daten, welche durch die betroffene Person einem Verantwortlichen bereitgestellt wurden, in einem strukturierten, gängigen und maschinenlesbaren Format zu erhalten. Sie hat außerdem das Recht, diese Daten einem anderen Verantwortlichen ohne Behinderung durch den Verantwortlichen, dem die personenbezogenen Daten bereitgestellt wurden, zu übermitteln, sofern die Verarbeitung auf der Einwilligung gemäß Art. 6 Abs. 1 Buchstabe a DS-GVO oder Art. 9 Abs. 2 Buchstabe a DS-GVO oder auf einem Vertrag gemäß Art. 6 Abs. 1 Buchstabe b DS-GVO beruht und die Verarbeitung mithilfe automatisierter Verfahren erfolgt, sofern die Verarbeitung nicht für die Wahrnehmung einer Aufgabe erforderlich ist, die im öffentlichen Interesse liegt oder in Ausübung öffentlicher Gewalt erfolgt, welche dem Verantwortlichen übertragen wurde. + +Ferner hat die betroffene Person bei der Ausübung ihres Rechts auf Datenübertragbarkeit gemäß Art. 20 Abs. 1 DS-GVO das Recht, zu erwirken, dass die personenbezogenen Daten direkt von einem Verantwortlichen an einen anderen Verantwortlichen übermittelt werden, soweit dies technisch machbar ist und sofern hiervon nicht die Rechte und Freiheiten anderer Personen beeinträchtigt werden. + +Zur Geltendmachung des Rechts auf Datenübertragbarkeit kann sich die betroffene Person jederzeit an einen Mitarbeiter der Sascha König wenden. + +****** g) Recht auf Widerspruch +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, aus Gründen, die sich aus ihrer besonderen Situation ergeben, jederzeit gegen die Verarbeitung sie betreffender personenbezogener Daten, die aufgrund von Art. 6 Abs. 1 Buchstaben e oder f DS-GVO erfolgt, Widerspruch einzulegen. Dies gilt auch für ein auf diese Bestimmungen gestütztes Profiling. + +Sascha König verarbeitet die personenbezogenen Daten im Falle des Widerspruchs nicht mehr, es sei denn, wir können zwingende schutzwürdige Gründe für die Verarbeitung nachweisen, die den Interessen, Rechten und Freiheiten der betroffenen Person überwiegen, oder die Verarbeitung dient der Geltendmachung, Ausübung oder Verteidigung von Rechtsansprüchen. + +Verarbeitet Sascha König personenbezogene Daten, um Direktwerbung zu betreiben, so hat die betroffene Person das Recht, jederzeit Widerspruch gegen die Verarbeitung der personenbezogenen Daten zum Zwecke derartiger Werbung einzulegen. Dies gilt auch für das Profiling, soweit es mit solcher Direktwerbung in Verbindung steht. Widerspricht die betroffene Person gegenüber der Sascha König der Verarbeitung für Zwecke der Direktwerbung, so wird Sascha König die personenbezogenen Daten nicht mehr für diese Zwecke verarbeiten. + +Zudem hat die betroffene Person das Recht, aus Gründen, die sich aus ihrer besonderen Situation ergeben, gegen die sie betreffende Verarbeitung personenbezogener Daten, die bei der Sascha König zu wissenschaftlichen oder historischen Forschungszwecken oder zu statistischen Zwecken gemäß Art. 89 Abs. 1 DS-GVO erfolgen, Widerspruch einzulegen, es sei denn, eine solche Verarbeitung ist zur Erfüllung einer im öffentlichen Interesse liegenden Aufgabe erforderlich. + +Zur Ausübung des Rechts auf Widerspruch kann sich die betroffene Person direkt an jeden Mitarbeiter der Sascha König oder einen anderen Mitarbeiter wenden. Der betroffenen Person steht es ferner frei, im Zusammenhang mit der Nutzung von Diensten der Informationsgesellschaft, ungeachtet der Richtlinie 2002/58/EG, ihr Widerspruchsrecht mittels automatisierter Verfahren auszuüben, bei denen technische Spezifikationen verwendet werden. + +****** h) Automatisierte Entscheidungen im Einzelfall einschließlich Profiling +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, nicht einer ausschließlich auf einer automatisierten Verarbeitung — einschließlich Profiling — beruhenden Entscheidung unterworfen zu werden, die ihr gegenüber rechtliche Wirkung entfaltet oder sie in ähnlicher Weise erheblich beeinträchtigt, sofern die Entscheidung (1) nicht für den Abschluss oder die Erfüllung eines Vertrags zwischen der betroffenen Person und dem Verantwortlichen erforderlich ist, oder (2) aufgrund von Rechtsvorschriften der Union oder der Mitgliedstaaten, denen der Verantwortliche unterliegt, zulässig ist und diese Rechtsvorschriften angemessene Maßnahmen zur Wahrung der Rechte und Freiheiten sowie der berechtigten Interessen der betroffenen Person enthalten oder (3) mit ausdrücklicher Einwilligung der betroffenen Person erfolgt. + +Ist die Entscheidung (1) für den Abschluss oder die Erfüllung eines Vertrags zwischen der betroffenen Person und dem Verantwortlichen erforderlich oder (2) erfolgt sie mit ausdrücklicher Einwilligung der betroffenen Person, trifft Sascha König angemessene Maßnahmen, um die Rechte und Freiheiten sowie die berechtigten Interessen der betroffenen Person zu wahren, wozu mindestens das Recht auf Erwirkung des Eingreifens einer Person seitens des Verantwortlichen, auf Darlegung des eigenen Standpunkts und auf Anfechtung der Entscheidung gehört. + +Möchte die betroffene Person Rechte mit Bezug auf automatisierte Entscheidungen geltend machen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + +****** i) Recht auf Widerruf einer datenschutzrechtlichen Einwilligung +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, eine Einwilligung zur Verarbeitung personenbezogener Daten jederzeit zu widerrufen. + +Möchte die betroffene Person ihr Recht auf Widerruf einer Einwilligung geltend machen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + +***** 9. Rechtsgrundlage der Verarbeitung +Art. 6 I lit. a DS-GVO dient unserem Unternehmen als Rechtsgrundlage für Verarbeitungsvorgänge, bei denen wir eine Einwilligung für einen bestimmten Verarbeitungszweck einholen. Ist die Verarbeitung personenbezogener Daten zur Erfüllung eines Vertrags, dessen Vertragspartei die betroffene Person ist, erforderlich, wie dies beispielsweise bei Verarbeitungsvorgängen der Fall ist, die für eine Lieferung von Waren oder die Erbringung einer sonstigen Leistung oder Gegenleistung notwendig sind, so beruht die Verarbeitung auf Art. 6 I lit. b DS-GVO. Gleiches gilt für solche Verarbeitungsvorgänge die zur Durchführung vorvertraglicher Maßnahmen erforderlich sind, etwa in Fällen von Anfragen zur unseren Produkten oder Leistungen. Unterliegt unser Unternehmen einer rechtlichen Verpflichtung durch welche eine Verarbeitung von personenbezogenen Daten erforderlich wird, wie beispielsweise zur Erfüllung steuerlicher Pflichten, so basiert die Verarbeitung auf Art. 6 I lit. c DS-GVO. In seltenen Fällen könnte die Verarbeitung von personenbezogenen Daten erforderlich werden, um lebenswichtige Interessen der betroffenen Person oder einer anderen natürlichen Person zu schützen. Dies wäre beispielsweise der Fall, wenn ein Besucher in unserem Betrieb verletzt werden würde und daraufhin sein Name, sein Alter, seine Krankenkassendaten oder sonstige lebenswichtige Informationen an einen Arzt, ein Krankenhaus oder sonstige Dritte weitergegeben werden müssten. Dann würde die Verarbeitung auf Art. 6 I lit. d DS-GVO beruhen. Letztlich könnten Verarbeitungsvorgänge auf Art. 6 I lit. f DS-GVO beruhen. Auf dieser Rechtsgrundlage basieren Verarbeitungsvorgänge, die von keiner der vorgenannten Rechtsgrundlagen erfasst werden, wenn die Verarbeitung zur Wahrung eines berechtigten Interesses unseres Unternehmens oder eines Dritten erforderlich ist, sofern die Interessen, Grundrechte und Grundfreiheiten des Betroffenen nicht überwiegen. Solche Verarbeitungsvorgänge sind uns insbesondere deshalb gestattet, weil sie durch den Europäischen Gesetzgeber besonders erwähnt wurden. Er vertrat insoweit die Auffassung, dass ein berechtigtes Interesse anzunehmen sein könnte, wenn die betroffene Person ein Kunde des Verantwortlichen ist (Erwägungsgrund 47 Satz 2 DS-GVO). + +***** 10. Berechtigte Interessen an der Verarbeitung, die von dem Verantwortlichen oder einem Dritten verfolgt werden +Basiert die Verarbeitung personenbezogener Daten auf Artikel 6 I lit. f DS-GVO ist unser berechtigtes Interesse die Durchführung unserer Geschäftstätigkeit zugunsten des Wohlergehens all unserer Mitarbeiter und unserer Anteilseigner. + +***** 11. Dauer, für die die personenbezogenen Daten gespeichert werden +Das Kriterium für die Dauer der Speicherung von personenbezogenen Daten ist die jeweilige gesetzliche Aufbewahrungsfrist. Nach Ablauf der Frist werden die entsprechenden Daten routinemäßig gelöscht, sofern sie nicht mehr zur Vertragserfüllung oder Vertragsanbahnung erforderlich sind. + +***** 12. Gesetzliche oder vertragliche Vorschriften zur Bereitstellung der personenbezogenen Daten; Erforderlichkeit für den Vertragsabschluss; Verpflichtung der betroffenen Person, die personenbezogenen Daten bereitzustellen; mögliche Folgen der Nichtbereitstellung +Wir klären Sie darüber auf, dass die Bereitstellung personenbezogener Daten zum Teil gesetzlich vorgeschrieben ist (z.B. Steuervorschriften) oder sich auch aus vertraglichen Regelungen (z.B. Angaben zum Vertragspartner) ergeben kann. Mitunter kann es zu einem Vertragsschluss erforderlich sein, dass eine betroffene Person uns personenbezogene Daten zur Verfügung stellt, die in der Folge durch uns verarbeitet werden müssen. Die betroffene Person ist beispielsweise verpflichtet uns personenbezogene Daten bereitzustellen, wenn unser Unternehmen mit ihr einen Vertrag abschließt. Eine Nichtbereitstellung der personenbezogenen Daten hätte zur Folge, dass der Vertrag mit dem Betroffenen nicht geschlossen werden könnte. Vor einer Bereitstellung personenbezogener Daten durch den Betroffenen muss sich der Betroffene an einen unserer Mitarbeiter wenden. Unser Mitarbeiter klärt den Betroffenen einzelfallbezogen darüber auf, ob die Bereitstellung der personenbezogenen Daten gesetzlich oder vertraglich vorgeschrieben oder für den Vertragsabschluss erforderlich ist, ob eine Verpflichtung besteht, die personenbezogenen Daten bereitzustellen, und welche Folgen die Nichtbereitstellung der personenbezogenen Daten hätte. + +***** 13. Bestehen einer automatisierten Entscheidungsfindung +Als verantwortungsbewusstes Unternehmen verzichten wir auf eine automatische Entscheidungsfindung oder ein Profiling. + +Diese Datenschutzerklärung wurde durch den Datenschutzerklärungs-Generator der DGD Deutsche Gesellschaft für Datenschutz GmbH, die als Externer Datenschutzbeauftragter Köln tätig ist, in Kooperation mit dem Kölner Anwalt für Datenschutzrecht Christian Solmecke erstellt. diff --git a/content-org/datamanagement.org b/content-org/datamanagement.org new file mode 100644 index 0000000..a634ff6 --- /dev/null +++ b/content-org/datamanagement.org @@ -0,0 +1,251 @@ +#+hugo_base_dir: ../ +#+hugo_section: ./posts/datamanagement +#+options: author:nil + +* EN + +** Baserow +*** Game Changer: How Baserow Transformed Our Approach to Data Management +:PROPERTIES: +:EXPORT_FILE_NAME: why-choose-baserow-to-manage-product-data.en.md +:EXPORT_DATE: 2023-10-12 +:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :tutorials '("Data Management") :datamanagement '("Baserow") :featuredImage /img/tutorials/baserow/baserow-excel-title.png +:EXPORT_HUGO_PAIRED_SHORTCODES: admonition link +:END: + +**** Introduction +For over a decade, my journey through the world of e-commerce has been an evolving adventure. Alongside my dedicated team, we have painstakingly built, refined, and iterated numerous versions of our online storefronts, transitioning from earlier solutions like Magento to Shopify over the years. Beyond grappling with the design intricacies and aligning the user experience with each iteration, I’ve come to realize how crucial our approach to product data management truly is. + +Whether we were streamlining the user interface on our Shopify store or making amendments to our product listings, effective and efficient management of our product data emerged as a game-changer. It has truly made the difference between tedious, protracted projects and quick, manageable tasks, saving us dozens of hours in project time that we've been able to direct towards other business growth activities. + +As our storefronts evolved, so did our approach to managing data. Like many others, we began with a simplistic approach, listing products individually via the store's backend. However, we quickly discovered the inefficiency in this method. We transitioned to spreadsheets, gaining the ability to set up multiple products at once. Yet, the limitations of standard spreadsheets prompted a search for an even more efficient solution. This search concluded when we discovered Airtable. Now, Baserow functions as our central repository for all product data. It feeds into all storefronts, various sales channels and our Enterprise Resource Planning (ERP) system, providing a cohesive, streamlined data management system that has scaled elegantly with our growing business. + +The purpose of this journey is not just to share my own e-commerce journey. I want to share basic concepts for data management which can save huge amounts of working hours for e-commerce businesses. I will hopefully give you an introduction on how to build a lasting and efficient solution for data management and free lots of working hourse for more important business tasks like interacting with your customers or building great products. I don't know where you are on your e-commerce journey, but chances are that you face similar challenges like I do. + +**** The state of tools +#+ATTR_HTML: :alt Excel just doesn’t cut it :title Excel just doesn’t cut it +[[file:/img/tutorials/baserow/spreadsheet-cyberpunk.png]] + +Throughout my entrepreneurial journey, I've grappled with numerous challenges, a significant one being effective product data management. Using traditional tools like Excel, while initially straightforward, soon exposed issues. Excel has limitations on data size, lacks real-time collaboration features, and struggles with complexity as data grows. In short, it doesn’t scale particularly well, especially as an e-commerce business expands its product range and customer base. + +With the growth of my own Shopify business, the limitations of Excel became increasingly apparent. As we expanded our product range, each with numerous attributes like SKU codes, colors, sizes, and prices, the spreadsheets became enormously complex. This complexity was not just hard to manage, but it significantly increased the risk of human error. Information was scattered across different sheets and files, making it difficult for team members to collaborate effectively and efficiently. In essence, Excel was unable to keep up with the increasing data demands of our growing business. + +#+attr_shortcode: :type danger :title 10.000 products in a spreadsheet :open true +#+begin_admonition +We had times where we had around 10.000 SKUs to manage across 4-5 platforms in 5 different languages. Managing this in a spreadsheet would have been an endless nightmare 🙈 +#+end_admonition + +The upshot of these complexities and inefficiencies were hours lost - hours that could have been better spent on growing the business, strategizing, or improving customer experience. The frequent errors due to the unwieldy nature of our spreadsheets added up to a considerable amount of time spent on rectification, not to mention disruption of workflow. Instead of assisting in our operations, the limitations of tools like Excel were creating bottlenecks in our product data management process, slowing us down instead of propelling us forward. + +**** Intoducing Baserow + +In the midst of Excel's limitations, I stumbled upon Baserow. This innovative tool, which combines the features of a database and a spreadsheet, offered a fresh perspective on managing our growing product data. + +Baserow's strength lies in its flexibility and customizability, with the capacity to store information in a non-linear way. It presents information beyond the conventional rows and columns, including capability for linked records, multiple views, and rich field types like checkboxes, dropdowns, attachments, and more. + +My initial encounter with Baserow marked the beginning of a transformative journey in data management. Compared to Excel, it seemed more aligned with the needs of a dynamic, rapidly scaling e-commerce business like ours. The question was - could this be the game-changing tool we've been searching for? The potential was definitely there and it was high time for us to dive in and explore. + +**** Baserow as a Solution + +At its core, Baserow shines when it comes to handling large amounts of product data. Unlike Excel, which often becomes slower and more difficult to use with really large lists, Baserow is built specifically to handle big datasets. This means as our product range grew, Baserow could easily keep up. + +One great thing about Baserow is that it lets everyone on the team work together in the same place, in real time. No more juggling multiple versions of the same Excel file - in Baserow, everyone always sees the most up-to-date information. This makes teamwork a lot smoother, and means less chance of mistakes happening. + +#+ATTR_HTML: :alt In Baserow you can view your data from different perspectives :title In Baserow you can view your data from different perspectives +[[file:/img/tutorials/baserow/baserow-views.png]] + +Additionally, Baserow provides various views of your data. You can customize multiple grid views to display selected subsets only. Other view options include Gallery for quick overview, Kanban for managing actionable items and Calendar for deadline tracking. + +Switching from Excel to Baserow has vastly improved our data management. Where we once struggled with disorganized product information, Baserow has provided a neat and easily accessible format. The transition to Baserow has saved us significant time and reduced errors, resulting in a more streamlined and manageable workday. + +**** Baserow - A Single Source of Truth + +#+ATTR_HTML: :alt There is not one truth, just the truth :title There is not one truth, just the truth +[[file:/img/tutorials/baserow/baserow-single-source-of-truth.png]] + +With Baserow's robust features, our product data no longer exists scattered across disparate platforms, channels, and files. It's gathered in one place - in Airtable. This feature gave us a reliable "single source of truth" that everyone in the team can access, reducing inconsistencies and confusion. + +Baserow allows us to see all our data at a glance. And it’s not just viewing; it provides rich insights which help in decision-making. In the past, cross-referencing data across multiple Excel sheets was a nightmare. Now, it's a simple task. It's like having a magnifying glass on your data that can zoom in on the tiniest detail and zoom out to give you an overview in an instant. + +The biggest advantage for our product data manageent is to connect data and tables. This gives us the ability to manage one central repository of peoduct data as a single source of truth. From this we derive various specialized tables for platforms like Shopify and Amazon which can be easily exported. That makes it very easy to handle small and even large scale changes. + + +#+attr_shortcode: :type tip :title Pro Tip :open true +#+begin_admonition +When you put some effort and care into the structure of your product data even large changes will be very easy. It will not matter if you want to push a price change for 5 or 5.000 🚀🚀🚀 products to Shopify. +#+end_admonition + + + +**** The Potential of Baserow + +One of the biggest wins with Baserow is how much time it saves us. Because it keeps all our data in one easy-to-use place, we're not wasting hours digging through messy information anymore. This has made our daily tasks faster and more efficient. Depending on the task you can easily 10x or 20x or productivity. + +But the time saving doesn't stop there. When you connect Baserow's powerful API to a workflow automation tool like [[https://www.n8n.io][n8n]] you can go very very far. Just some examples what we are dong when it comes to automation: + +#+attr_shortcode: :type tip :title Push changes :open true +#+begin_admonition +🚀 Create new products of push changes in products automatically to Shopify +#+end_admonition + +#+attr_shortcode: :type tip :title AI🧠 powered produt desriptions :open true +#+begin_admonition +🚀 Create product descriptions with AI🧠 based on product attributes automatially 🧙 +#+end_admonition + +#+attr_shortcode: :type tip :title Translations :open true +#+begin_admonition +🚀 Create translations for descriptions and other attributes with AI🧠 +#+end_admonition + + +#+attr_shortcode: :type tip :title 🧙 Magic :open true +#+begin_admonition +🚀 Do all of the above each time a new product row is added 😉 🤖 +#+end_admonition + + +The impact Baserow has on our working hours and overall satisfaction can't be overstated. + +**** Conclusion + +Looking back on my journey, transitioning to Baserow has undoubtedly been one of the best decisions I’ve made for my e-commerce business. It's more than a tool; it's a time-saving, stress-reducing companion that's streamlined our operations and boosted our produtivity. + +If you're an e-commerce business owner struggling with product data management, I wholeheartedly recommend considering Baserow. It may take a some effort to set up initially, but the benefits you'll reap - efficiency, accuracy, and precious time saved - will be well worth it. + +At the end of the day, running a successful e-commerce business isn’t just about having a wide range of products or a sophisticated marketing strategy; it’s also about using the right tools to manage your operations effectively, and for product data management, I've found Airtable to be the right tool. + +#+attr_shortcode: :type tip :title What about Airtable? :open true +#+begin_admonition +Some of you might be aware of *Airtable* as a similar solution. Although Airtable is a very good product I personally prefer free and open source solutions. +#+end_admonition + +#+attr_shortcode: :type success :title Knowledge is power 🤓 :open true +#+begin_admonition +Share this post with someone for whom it's helpful. +#+end_admonition + + +* DE + +** Baserow +*** Game Changer: Wie Baserow unseren Ansatz zur Datenverwaltung verändert hat +:PROPERTIES: +:EXPORT_FILE_NAME: why-choose-baserow-to-manage-product-data.de.md +:EXPORT_DATE: 2023-10-12 +:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :tutorials '("Datenverwaltung") :datamanagement '("Baserow") :featuredImage /img/tutorials/baserow/baserow-excel-title.png +:EXPORT_HUGO_PAIRED_SHORTCODES: admonition link +:END: + +**** Einführung + +Seit über einem Jahrzehnt ist meine Reise durch die Welt des E-Commerce ein sich ständig weiterentwickelndes Abenteuer. Zusammen mit meinem großartigen Team haben wir zahlreiche Versionen unserer Online-Shops sorgfältig erstellt, verfeinert und iteriert, und sind im Laufe der Jahre von früheren Lösungen wie Magento zu Shopify übergegangen. Neben der Auseinandersetzung mit den gestalterischen Feinheiten und der Abstimmung der Benutzererfahrung mit jeder Iteration habe ich erkannt, wie entscheidend unser Ansatz zur Produkt-Datenverwaltung tatsächlich ist. + +#+attr_shortcode: :type tip :title 🧙 Dieser Artikel ist KI-übersetzt :open false +#+begin_admonition +🚀 Auch wenn Deutsch meine Muttersprache ist, habe ich Englisch in diesem Blog und auch auf anderen Plattformen den Vorzug. Mein Ziel ist es mein Wissen mit so vielen Menschen wie möglich zu teilen, da komme ich mit der englischen Sprache einfach weiter. Die deutsche Version wurde daher mit Hilfe von KI übersetzt 😉 🤖, wenn Du Fehler findest, darfst Du sie gerne behalten. +#+end_admonition + +Ob wir die Benutzeroberfläche in unserem Shopify-Shop optimierten oder Änderungen an unseren Produktlisten vornahmen, die effektive und effiziente Verwaltung unserer Produktdaten hat sich als Game-Changer erwiesen. Sie hat wirklich den Unterschied ausgemacht zwischen mühsamen, langwierigen Projekten und schnellen, handhabbaren Aufgaben, wodurch wir Dutzende von Stunden an Projektzeit sparen konnten, die wir in anderen Aktivitäten zur Geschäftserweiterung sinnvoller nutzen konnten. + +Mit der Weiterentwicklung unserer Shops hat sich auch unser Ansatz zur Datenverwaltung verändert. Wie viele andere begannen wir mit einem simplen Ansatz, indem wir Produkte einzeln über das Backend des Shops eintrugen. Wir stellten jedoch schnell fest, dass diese Methode ineffizient war. Wir wechselten zu Tabellenkalkulationen, was es uns ermöglichte, mehrere Produkte auf einmal anzulegen. Doch die Beschränkungen der Standardtabellenkalkulationen erforderten eine Suche nach einer noch effizienteren Lösung. Diese Suche endete, als wir Baserow entdeckten. Jetzt fungiert Baserow als unser zentrales Repository für alle Produktdaten. Es speist alle Shops, verschiedene Verkaufskanäle und unser ERP-System, was ein kohärentes, straffes Datenverwaltungssystem bietet, das elegant mit unserem wachsenden Geschäft skaliert. + +Der Zweck dieser Artikel ist nicht nur, meine eigene E-Commerce-Reise zu teilen. Ich möchte grundlegende Konzepte für die Datenverwaltung teilen, die riesige Mengen an Arbeitsstunden für E-Commerce-Unternehmen sparen können. Ich hoffe, Dir eine Einführung zu geben, wie Du eine dauerhafte und effiziente Lösung für die Datenverwaltung aufbauen und viel Arbeitszeit für wichtigere Geschäftsaufgaben, wie die Interaktion mit Deinen Kunden oder die Erstellung großartiger Produkte, frei machen kannst. Ich weiß nicht, wo Du Dich auf Deiner E-Commerce-Reise befindest, aber die Chancen stehen gut, dass Du ähnliche Herausforderungen wie ich hast. + +**** Der Stand der Werkzeuge +#+ATTR_HTML: :alt Excel bringt es einfach nicht :title Excel bringt Ves einfach nicht +[[file:/img/tutorials/baserow/spreadsheet-cyberpunk.png]] + +Während meiner unternehmerischen Reise bin ich auf zahlreiche Herausforderungen gestoßen, eine bedeutende davon war eine effektive Produkt-Datenverwaltung. Die Verwendung herkömmlicher Werkzeuge wie Excel, die zunächst unkompliziert erschien, offenbarte bald Probleme. Excel hat Beschränkungen hinsichtlich der Datengröße, es fehlen Funktionen für die Echtzeit-Zusammenarbeit, und es hat Schwierigkeiten mit der Komplexität, wenn die Datenmenge wächst. Kurz gesagt, es skaliert nicht besonders gut, besonders wenn ein E-Commerce-Unternehmen sein Produktangebot und seine Kundenbasis erweitert. + +Mit dem Wachstum meines eigenen Shopify-Geschäfts wurden die Einschränkungen von Excel immer offensichtlicher. Als wir unser Produktangebot erweiterten, jeweils mit zahlreichen Attributen wie SKU-Codes, Farben, Größen und Preisen, wurden die Tabellenkalkulationen enorm komplex. Diese Komplexität war nicht nur schwierig zu handhaben, sondern sie erhöhte auch signifikant das Risiko menschlicher Fehler. Informationen waren über verschiedene Blätter und Dateien verstreut, was es den Teammitgliedern erschwerte, effektiv und effizient zusammenzuarbeiten. Im Grunde konnte Excel mit den steigenden Datenanforderungen unseres wachsenden Geschäfts nicht mithalten. + +#+attr_shortcode: :type danger :title 10.000 Produkte in einer Tabelle :open true +#+begin_admonition +Wir hatten Zeiten, in denen wir etwa 10.000 SKUs über 4-5 Plattformen in 5 verschiedenen Sprachen verwalten mussten. Dies in einer Tabelle zu verwalten, wäre ein endloser Alptraum gewesen 🙈 +#+end_admonition + +Das Ergebnis dieser Komplexitäten und Ineffizienzen waren verlorene Stunden - Stunden, die besser hätten genutzt werden können, um das Geschäft zu erweitern, Strategien zu entwerfen oder das Kundenerlebnis zu verbessern. Die häufigen Fehler aufgrund der unhandlichen Natur unserer Tabellen summierten sich zu einer erheblichen Menge an Zeit, die für Korrekturen aufgewendet werden musste, ganz zu schweigen von der Unterbrechung des Arbeitsablaufs. Anstatt uns bei unseren Operationen zu unterstützen, schufen die Einschränkungen von Werkzeugen wie Excel Engpässe in unserem Produkt-Datenverwaltungsprozess und bremsten uns aus, anstatt uns voranzutreiben. + +**** Einführung von Baserow + +Inmitten der Einschränkungen von Excel stieß ich auf Baserow. Dieses innovative Werkzeug, das die Funktionen einer Datenbank und einer Tabelle kombiniert, bot eine frische Perspektive auf die Verwaltung unserer wachsenden Produktdaten. + +Die Stärke von Baserow liegt in seiner Flexibilität und Anpassungsfähigkeit, mit der Fähigkeit, Informationen auf nicht-lineare Weise zu speichern. Es präsentiert Informationen über die herkömmlichen Zeilen und Spalten hinaus, einschließlich der Möglichkeit für verknüpfte Datensätze, mehrere Ansichten und umfangreiche Felddaten wie Kontrollkästchen, Dropdowns, Anhänge und mehr. + +Meine erste Begegnung mit Baserow markierte den Beginn einer transformierenden Reise in der Datenverwaltung. Im Vergleich zu Excel schien es mehr auf die Bedürfnisse eines dynamischen, schnell skalierenden E-Commerce-Unternehmens wie unserem abgestimmt zu sein. Die Frage war - könnte dies das bahnbrechende Werkzeug sein, das wir gesucht haben? Das Potenzial war definitiv da und es war höchste Zeit für uns, einzutauchen und zu erkunden. + +**** Baserow als Lösung + +Im Kern glänzt Baserow, wenn es um die Handhabung großer Mengen an Produkt-Daten geht. Im Gegensatz zu Excel, das oft langsamer und schwieriger zu bedienen wird, wenn die Listen wirklich groß werden, ist Baserow speziell dafür konzipiert, große Datenmengen zu handhaben. Das bedeutet, dass Baserow problemlos mithalten konnte, als unser Produktangebot wuchs. + +Eines der tollen Dinge an Baserow ist, dass es jedem im Team erlaubt, gemeinsam am selben Ort, in Echtzeit zusammenzuarbeiten. Kein Jonglieren mehr mit mehreren Versionen derselben Excel-Datei - in Baserow sieht jeder immer die aktuellsten Informationen. Das macht die Teamarbeit viel leichter und bedeutet weniger Fehlerchancen. + +#+ATTR_HTML: :alt In Baserow kannst Du Deine Daten aus mehreren Blickwinkeln betrachten :title In Baserow kannst Du Deine Daten aus mehreren Blickwinkeln betrachten +[[file:/img/tutorials/baserow/baserow-views.png]] + +Darüber hinaus bietet Baserow verschiedene Ansichten Deiner Daten. Du kannst mehrere Rasteransichten anpassen, um nur ausgewählte Teilmengen an Informationen anzuzeigen. Weitere Ansichtsoptionen beinhalten die Galerie für eine schnelle Übersicht, Kanban für die Verwaltung von Aktionselementen und den Kalender für die Verfolgung von Fristen. + +Der Wechsel von Excel zu Baserow hat unsere Datenverwaltung erheblich verbessert. Wo wir einst mit unorganisierten Produktinformationen zu kämpfen hatten, hat Baserow uns ein ordentliches und leicht zugängliches Format zur Verfügung gestellt. Der Übergang zu Baserow hat uns erhebliche Zeit gespart und Fehler reduziert, was zu einem strafferem und besser handhabbarem Arbeitstag führte. + +**** Baserow - Eine einzelne Quelle der Wahrheit + +#+ATTR_HTML: :alt Es gibt nicht eine Wahrheit, nur die Wahrheit :title Es gibt nicht eine Wahrheit, nur die Wahrheit +[[file:/img/tutorials/baserow/baserow-single-source-of-truth.png]] + +Mit den robusten Funktionen von Baserow existieren unsere Produktdaten nicht mehr verstreut über verschiedene Plattformen, Kanäle und Dateien. Sie sind an einem Ort gesammelt - in Airtable. Diese Funktion gab uns eine zuverlässige "einzige Quelle der Wahrheit", auf die jeder im Team zugreifen kann, was Inkonsistenzen und Verwirrung reduziert. + +Baserow ermöglicht es uns, alle unsere Daten auf einen Blick zu sehen. Und es geht nicht nur ums Ansehen; es liefert reichhaltige Einblicke, die bei der Entscheidungsfindung helfen. In der Vergangenheit war es ein Alptraum, Daten über mehrere Excel-Tabellen hinweg zu referenzieren. Jetzt ist es eine einfache Aufgabe. Es ist, als hätte man eine Lupe auf die Daten, die auf das kleinste Detail zoomen und Ihnen in einem Augenblick eine Übersicht geben kann. + +Der größte Vorteil für unsere Produkt-Datenverwaltung besteht darin, Daten und Tabellen zu verbinden. Dies gibt uns die Fähigkeit, ein zentrales Repository von Produkt-Daten als einzelne Quelle der Wahrheit zu verwalten. Aus diesem leiten wir verschiedene spezialisierte Tabellen für Plattformen wie Shopify und Amazon ab, die leicht exportiert werden können. Das macht es sehr einfach, kleine und sogar große Veränderungen zu handhaben. + +#+attr_shortcode: :type tip :title Pro Tipp :open true +#+begin_admonition +Wenn Du etwas Mühe und Sorgfalt in die Struktur Deiner Produktdaten steckst, werden selbst große Änderungen sehr einfach sein. Es wird keine Rolle spielen, ob Du z.B. eine Preisänderung für 5 oder 5.000 Produkte 🚀🚀🚀 auf Shopify durchführen wollen. Der Aufwand wird nahezu unabhängig von der Anzahl der Datansätze sein. +#+end_admonition + +**** Das Potenzial von Baserow + +Eine der größten Gewinne mit Baserow ist, wie viel Zeit es uns spart. Da es alle unsere Daten an einem leicht zu bedienenden Ort aufbewahrt, verschwenden wir keine Stunden mehr damit, durch chaotische Informationen zu wühlen. Dies hat unsere täglichen Aufgaben schneller und effizienter gemacht. Je nach Aufgabe kannst Du Deine Produktivität leicht verzehn- oder zwanzigfachen. + +Aber die Zeitersparnis hört nicht dort auf. Wenn Du die leistungsstarke API von Baserow mit einem Tool zur Workflow-Automatisierung wie [[https://www.n8n.io][n8n]] verbindest, kannst Du sehr, sehr weit gehen. Nur einige Beispiele dafür, was wir in Bezug auf Automatisierung tun: + +#+attr_shortcode: :type tip :title Änderungen durchführen :open true +#+begin_admonition +🚀 Bei Erstellung oder Änderung von Produkten automatisch die Produkte in Shopify anlegen oder ändern +#+end_admonition + +#+attr_shortcode: :type tip :title KI🧠 gestützte Produktbeschreibungen :open true +#+begin_admonition +🚀 Produktbeschreibungen mit KI🧠 auf Basis von Produktattributen automatisch erstellen 🧙 +#+end_admonition + +#+attr_shortcode: :type tip :title Übersetzungen :open true +#+begin_admonition +🚀 Übersetzungen für Beschreibungen und andere Attribute mit KI🧠 erstellen +#+end_admonition + +#+attr_shortcode: :type tip :title 🧙 Magie :open true +#+begin_admonition +🚀 Alles von den oben stehenden Punkten auf einmal, sobald eine neue Produktzeile hinzugefügt wird 😉 🤖 +#+end_admonition + +Die Auswirkungen, die Baserow auf unsere Arbeitsstunden und die allgemeine Zufriedenheit hat, können nicht hoch genug eingeschätzt werden. + +**** Schlussfolgerung + +Wenn ich auf meine Reise zurückblicke, war der Übergang zu Baserow zweifellos eine der besten Entscheidungen, die ich für mein E-Commerce-Geschäft getroffen habe. Es ist mehr als ein Werkzeug; es ist ein zeitsparender, stressreduzierender Begleiter, der unsere Abläufe optimiert und unsere Produktivität gesteigert hat. + +Wenn Du ein E-Commerce-Unternehmen besitzt und mit der Produkt-Datenverwaltung zu kämpfen hast, empfehle ich Dir von ganzem Herzen, Baserow in Betracht zu ziehen. Es mag etwas Aufwand bedeuten, es zunächst einzurichten, aber die Vorteile, die Du erzielen kannst - Effizienz, Genauigkeit und gesparte wertvolle Zeit - werden es wert sein. + +Am Ende des Tages geht es beim Betrieb eines erfolgreichen E-Commerce-Geschäfts nicht nur darum, ein breites Sortiment an Produkten oder eine ausgeklügelte Marketingstrategie zu haben; es geht auch darum, die richtigen Werkzeuge zu verwenden, um Deine Abläufe effektiv zu verwalten, und für die Produkt-Datenverwaltung habe ich Baserow als das richtige Werkzeug gefunden. + +#+attr_shortcode: :type tip :title Was ist mit Airtable? :open true +#+begin_admonition +Einige von Euch könnten *Airtable* als ähnliche Lösung kennen. Obwohl Airtable ein sehr gutes Produkt ist, bevorzuge ich persönlich freie und Open-Source-Lösungen. +#+end_admonition + +#+attr_shortcode: :type success :title Wissen ist Macht 🤓 :open true +#+begin_admonition +Teile diesen Betrag mit jemandem, für den er hilfreich ist. +#+end_admonition diff --git a/content-org/tutorials.org b/content-org/tutorials.org new file mode 100644 index 0000000..56253a6 --- /dev/null +++ b/content-org/tutorials.org @@ -0,0 +1,251 @@ +#+hugo_base_dir: ../ +#+hugo_section: ./posts/tutorials +#+options: author:nil + +* EN + +All english posts + +** Shopify + +All the Shopify posts + +*** TODO Example :hugo:bob:chris: +:PROPERTIES: +:EXPORT_FILE_NAME: hello.en.md +:EXPORT_DATE: 2023-10-03 +:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :tutorials '(Shopify) :shopify '("Shopify für alle") +:END: +lkasdölkalösdklöaksdöl löskdlö aslökdlö +**** Test Headline 23 +#+begin_ai +[SYS]: You are a helpful assistant. + +[ME]: +#+end_ai + +#+begin_src rust + fn main() { + + + + } +#+end_src +lölasdlklöasklö laskdlök öalsk +#+begin_src rust + + + ,#+begin_ai :image :size 256x256 + + ,#+end_ai + ,#+CAPTION: Hello Bob + ,#+ATTR_HTML: :alt alt text + [[file:/img/n8n/2023-03-17_12-10.png]] + + ,#+DOWNLOADED: screenshot @ 2023-03-17 12:03:23 + [[file:../../../../../../wiki/attachments/Headline/2023-03-17_12-03-23_screenshot.png]] + + hg-im + ,#+begin_src javascript +#+end_src + + +#+begin_src golang + +#+begin_src json + +#+end_src + +#+CAPTION: TITLE +#+ATTR_HTML: :alt ALT TEXT +[[file:/img/yt-1/n8n-admin.png]] + + + + +** Automation + +* DE + +** Shopify + +Alle Shopify Posts + +*** TODO Beispiel :hugo:bob:chris: +:PROPERTIES: +:EXPORT_FILE_NAME: hello.de.md +:EXPORT_DATE: 2023-10-03 +:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :tutorials '(Shopify) :shopify '("Shopify für alle") +:END: +lkasdölkalösdklöaksdöl löskdlö aslökdlö +**** Test Headline 23 +#+begin_ai +[SYS]: You are a helpful assistant. + +[ME]: +#+end_ai + +#+begin_src rust + fn main() { + + + + } +#+end_src +lölasdlklöasklö laskdlök öalsk +#+begin_src rust + + + ,#+begin_ai :image :size 256x256 + + ,#+end_ai + ,#+CAPTION: Hello Bob + ,#+ATTR_HTML: :alt alt text + [[file:/img/n8n/2023-03-17_12-10.png]] + + ,#+DOWNLOADED: screenshot @ 2023-03-17 12:03:23 + [[file:../../../../../../wiki/attachments/Headline/2023-03-17_12-03-23_screenshot.png]] + + hg-im + ,#+begin_src javascript +#+end_src + + +#+begin_src golang + +#+begin_src json + +#+end_src + +#+CAPTION: TITLE +#+ATTR_HTML: :alt ALT TEXT +[[file:/img/yt-1/n8n-admin.png]] + + + + + + +** Automatisierung + +** Baserow +*** Game Changer: Wie Baserow unseren Ansatz zur Datenverwaltung verändert hat +:PROPERTIES: +:EXPORT_FILE_NAME: why-choose-baserow-to-manage-product-data.de.md +:EXPORT_DATE: 2023-10-12 +:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :tutorials '("Datenverwaltung") :datamanagement '("Baserow") :featuredImage /img/tutorials/baserow/baserow-excel-title.png +:EXPORT_HUGO_PAIRED_SHORTCODES: admonition link +:END: + +**** Einführung + +Seit über einem Jahrzehnt ist meine Reise durch die Welt des E-Commerce ein sich ständig weiterentwickelndes Abenteuer. Zusammen mit meinem großartigen Team haben wir zahlreiche Versionen unserer Online-Shops sorgfältig erstellt, verfeinert und iteriert, und sind im Laufe der Jahre von früheren Lösungen wie Magento zu Shopify übergegangen. Neben der Auseinandersetzung mit den gestalterischen Feinheiten und der Abstimmung der Benutzererfahrung mit jeder Iteration habe ich erkannt, wie entscheidend unser Ansatz zur Produkt-Datenverwaltung tatsächlich ist. + +#+attr_shortcode: :type tip :title 🧙 Dieser Artikel ist KI-übersetzt :open false +#+begin_admonition +🚀 Auch wenn Deutsch meine Muttersprache ist, habe ich Englisch in diesem Blog und auch auf anderen Plattformen den Vorzug. Mein Ziel ist es mein Wissen mit so vielen Menschen wie möglich zu teilen, da komme ich mit der englischen Sprache einfach weiter. Die deutsche Version wurde daher mit Hilfe von KI übersetzt 😉 🤖, wenn Du Fehler findest, darfst Du sie gerne behalten. +#+end_admonition + +Ob wir die Benutzeroberfläche in unserem Shopify-Shop optimierten oder Änderungen an unseren Produktlisten vornahmen, die effektive und effiziente Verwaltung unserer Produktdaten hat sich als Game-Changer erwiesen. Sie hat wirklich den Unterschied ausgemacht zwischen mühsamen, langwierigen Projekten und schnellen, handhabbaren Aufgaben, wodurch wir Dutzende von Stunden an Projektzeit sparen konnten, die wir in anderen Aktivitäten zur Geschäftserweiterung sinnvoller nutzen konnten. + +Mit der Weiterentwicklung unserer Shops hat sich auch unser Ansatz zur Datenverwaltung verändert. Wie viele andere begannen wir mit einem simplen Ansatz, indem wir Produkte einzeln über das Backend des Shops eintrugen. Wir stellten jedoch schnell fest, dass diese Methode ineffizient war. Wir wechselten zu Tabellenkalkulationen, was es uns ermöglichte, mehrere Produkte auf einmal anzulegen. Doch die Beschränkungen der Standardtabellenkalkulationen erforderten eine Suche nach einer noch effizienteren Lösung. Diese Suche endete, als wir Baserow entdeckten. Jetzt fungiert Baserow als unser zentrales Repository für alle Produktdaten. Es speist alle Shops, verschiedene Verkaufskanäle und unser ERP-System, was ein kohärentes, straffes Datenverwaltungssystem bietet, das elegant mit unserem wachsenden Geschäft skaliert. + +Der Zweck dieser Artikel ist nicht nur, meine eigene E-Commerce-Reise zu teilen. Ich möchte grundlegende Konzepte für die Datenverwaltung teilen, die riesige Mengen an Arbeitsstunden für E-Commerce-Unternehmen sparen können. Ich hoffe, Dir eine Einführung zu geben, wie Du eine dauerhafte und effiziente Lösung für die Datenverwaltung aufbauen und viel Arbeitszeit für wichtigere Geschäftsaufgaben, wie die Interaktion mit Deinen Kunden oder die Erstellung großartiger Produkte, frei machen kannst. Ich weiß nicht, wo Du Dich auf Deiner E-Commerce-Reise befindest, aber die Chancen stehen gut, dass Du ähnliche Herausforderungen wie ich hast. + +**** Der Stand der Werkzeuge +#+ATTR_HTML: :alt Excel bringt es einfach nicht :title Excel bringt Ves einfach nicht +[[file:/img/tutorials/baserow/spreadsheet-cyberpunk.png]] + +Während meiner unternehmerischen Reise bin ich auf zahlreiche Herausforderungen gestoßen, eine bedeutende davon war eine effektive Produkt-Datenverwaltung. Die Verwendung herkömmlicher Werkzeuge wie Excel, die zunächst unkompliziert erschien, offenbarte bald Probleme. Excel hat Beschränkungen hinsichtlich der Datengröße, es fehlen Funktionen für die Echtzeit-Zusammenarbeit, und es hat Schwierigkeiten mit der Komplexität, wenn die Datenmenge wächst. Kurz gesagt, es skaliert nicht besonders gut, besonders wenn ein E-Commerce-Unternehmen sein Produktangebot und seine Kundenbasis erweitert. + +Mit dem Wachstum meines eigenen Shopify-Geschäfts wurden die Einschränkungen von Excel immer offensichtlicher. Als wir unser Produktangebot erweiterten, jeweils mit zahlreichen Attributen wie SKU-Codes, Farben, Größen und Preisen, wurden die Tabellenkalkulationen enorm komplex. Diese Komplexität war nicht nur schwierig zu handhaben, sondern sie erhöhte auch signifikant das Risiko menschlicher Fehler. Informationen waren über verschiedene Blätter und Dateien verstreut, was es den Teammitgliedern erschwerte, effektiv und effizient zusammenzuarbeiten. Im Grunde konnte Excel mit den steigenden Datenanforderungen unseres wachsenden Geschäfts nicht mithalten. + +#+attr_shortcode: :type danger :title 10.000 Produkte in einer Tabelle :open true +#+begin_admonition +Wir hatten Zeiten, in denen wir etwa 10.000 SKUs über 4-5 Plattformen in 5 verschiedenen Sprachen verwalten mussten. Dies in einer Tabelle zu verwalten, wäre ein endloser Alptraum gewesen 🙈 +#+end_admonition + +Das Ergebnis dieser Komplexitäten und Ineffizienzen waren verlorene Stunden - Stunden, die besser hätten genutzt werden können, um das Geschäft zu erweitern, Strategien zu entwerfen oder das Kundenerlebnis zu verbessern. Die häufigen Fehler aufgrund der unhandlichen Natur unserer Tabellen summierten sich zu einer erheblichen Menge an Zeit, die für Korrekturen aufgewendet werden musste, ganz zu schweigen von der Unterbrechung des Arbeitsablaufs. Anstatt uns bei unseren Operationen zu unterstützen, schufen die Einschränkungen von Werkzeugen wie Excel Engpässe in unserem Produkt-Datenverwaltungsprozess und bremsten uns aus, anstatt uns voranzutreiben. + +**** Einführung von Baserow + +Inmitten der Einschränkungen von Excel stieß ich auf Baserow. Dieses innovative Werkzeug, das die Funktionen einer Datenbank und einer Tabelle kombiniert, bot eine frische Perspektive auf die Verwaltung unserer wachsenden Produktdaten. + +Die Stärke von Baserow liegt in seiner Flexibilität und Anpassungsfähigkeit, mit der Fähigkeit, Informationen auf nicht-lineare Weise zu speichern. Es präsentiert Informationen über die herkömmlichen Zeilen und Spalten hinaus, einschließlich der Möglichkeit für verknüpfte Datensätze, mehrere Ansichten und umfangreiche Felddaten wie Kontrollkästchen, Dropdowns, Anhänge und mehr. + +Meine erste Begegnung mit Baserow markierte den Beginn einer transformierenden Reise in der Datenverwaltung. Im Vergleich zu Excel schien es mehr auf die Bedürfnisse eines dynamischen, schnell skalierenden E-Commerce-Unternehmens wie unserem abgestimmt zu sein. Die Frage war - könnte dies das bahnbrechende Werkzeug sein, das wir gesucht haben? Das Potenzial war definitiv da und es war höchste Zeit für uns, einzutauchen und zu erkunden. + +**** Baserow als Lösung + +Im Kern glänzt Baserow, wenn es um die Handhabung großer Mengen an Produkt-Daten geht. Im Gegensatz zu Excel, das oft langsamer und schwieriger zu bedienen wird, wenn die Listen wirklich groß werden, ist Baserow speziell dafür konzipiert, große Datenmengen zu handhaben. Das bedeutet, dass Baserow problemlos mithalten konnte, als unser Produktangebot wuchs. + +Eines der tollen Dinge an Baserow ist, dass es jedem im Team erlaubt, gemeinsam am selben Ort, in Echtzeit zusammenzuarbeiten. Kein Jonglieren mehr mit mehreren Versionen derselben Excel-Datei - in Baserow sieht jeder immer die aktuellsten Informationen. Das macht die Teamarbeit viel leichter und bedeutet weniger Fehlerchancen. + +#+ATTR_HTML: :alt In Baserow kannst Du Deine Daten aus mehreren Blickwinkeln betrachten :title In Baserow kannst Du Deine Daten aus mehreren Blickwinkeln betrachten +[[file:/img/tutorials/baserow/baserow-views.png]] + +Darüber hinaus bietet Baserow verschiedene Ansichten Deiner Daten. Du kannst mehrere Rasteransichten anpassen, um nur ausgewählte Teilmengen an Informationen anzuzeigen. Weitere Ansichtsoptionen beinhalten die Galerie für eine schnelle Übersicht, Kanban für die Verwaltung von Aktionselementen und den Kalender für die Verfolgung von Fristen. + +Der Wechsel von Excel zu Baserow hat unsere Datenverwaltung erheblich verbessert. Wo wir einst mit unorganisierten Produktinformationen zu kämpfen hatten, hat Baserow uns ein ordentliches und leicht zugängliches Format zur Verfügung gestellt. Der Übergang zu Baserow hat uns erhebliche Zeit gespart und Fehler reduziert, was zu einem strafferem und besser handhabbarem Arbeitstag führte. + +**** Baserow - Eine einzelne Quelle der Wahrheit + +#+ATTR_HTML: :alt Es gibt nicht eine Wahrheit, nur die Wahrheit :title Es gibt nicht eine Wahrheit, nur die Wahrheit +[[file:/img/tutorials/baserow/baserow-single-source-of-truth.png]] + +Mit den robusten Funktionen von Baserow existieren unsere Produktdaten nicht mehr verstreut über verschiedene Plattformen, Kanäle und Dateien. Sie sind an einem Ort gesammelt - in Airtable. Diese Funktion gab uns eine zuverlässige "einzige Quelle der Wahrheit", auf die jeder im Team zugreifen kann, was Inkonsistenzen und Verwirrung reduziert. + +Baserow ermöglicht es uns, alle unsere Daten auf einen Blick zu sehen. Und es geht nicht nur ums Ansehen; es liefert reichhaltige Einblicke, die bei der Entscheidungsfindung helfen. In der Vergangenheit war es ein Alptraum, Daten über mehrere Excel-Tabellen hinweg zu referenzieren. Jetzt ist es eine einfache Aufgabe. Es ist, als hätte man eine Lupe auf die Daten, die auf das kleinste Detail zoomen und Ihnen in einem Augenblick eine Übersicht geben kann. + +Der größte Vorteil für unsere Produkt-Datenverwaltung besteht darin, Daten und Tabellen zu verbinden. Dies gibt uns die Fähigkeit, ein zentrales Repository von Produkt-Daten als einzelne Quelle der Wahrheit zu verwalten. Aus diesem leiten wir verschiedene spezialisierte Tabellen für Plattformen wie Shopify und Amazon ab, die leicht exportiert werden können. Das macht es sehr einfach, kleine und sogar große Veränderungen zu handhaben. + +#+attr_shortcode: :type tip :title Pro Tipp :open true +#+begin_admonition +Wenn Du etwas Mühe und Sorgfalt in die Struktur Deiner Produktdaten steckst, werden selbst große Änderungen sehr einfach sein. Es wird keine Rolle spielen, ob Du z.B. eine Preisänderung für 5 oder 5.000 Produkte 🚀🚀🚀 auf Shopify durchführen wollen. Der Aufwand wird nahezu unabhängig von der Anzahl der Datansätze sein. +#+end_admonition + +**** Das Potenzial von Baserow + +Eine der größten Gewinne mit Baserow ist, wie viel Zeit es uns spart. Da es alle unsere Daten an einem leicht zu bedienenden Ort aufbewahrt, verschwenden wir keine Stunden mehr damit, durch chaotische Informationen zu wühlen. Dies hat unsere täglichen Aufgaben schneller und effizienter gemacht. Je nach Aufgabe kannst Du Deine Produktivität leicht verzehn- oder zwanzigfachen. + +Aber die Zeitersparnis hört nicht dort auf. Wenn Du die leistungsstarke API von Baserow mit einem Tool zur Workflow-Automatisierung wie [[https://www.n8n.io][n8n]] verbindest, kannst Du sehr, sehr weit gehen. Nur einige Beispiele dafür, was wir in Bezug auf Automatisierung tun: + +#+attr_shortcode: :type tip :title Änderungen durchführen :open true +#+begin_admonition +🚀 Bei Erstellung oder Änderung von Produkten automatisch die Produkte in Shopify anlegen oder ändern +#+end_admonition + +#+attr_shortcode: :type tip :title KI🧠 gestützte Produktbeschreibungen :open true +#+begin_admonition +🚀 Produktbeschreibungen mit KI🧠 auf Basis von Produktattributen automatisch erstellen 🧙 +#+end_admonition + +#+attr_shortcode: :type tip :title Übersetzungen :open true +#+begin_admonition +🚀 Übersetzungen für Beschreibungen und andere Attribute mit KI🧠 erstellen +#+end_admonition + +#+attr_shortcode: :type tip :title 🧙 Magie :open true +#+begin_admonition +🚀 Alles von den oben stehenden Punkten auf einmal, sobald eine neue Produktzeile hinzugefügt wird 😉 🤖 +#+end_admonition + +Die Auswirkungen, die Baserow auf unsere Arbeitsstunden und die allgemeine Zufriedenheit hat, können nicht hoch genug eingeschätzt werden. + +**** Schlussfolgerung + +Wenn ich auf meine Reise zurückblicke, war der Übergang zu Baserow zweifellos eine der besten Entscheidungen, die ich für mein E-Commerce-Geschäft getroffen habe. Es ist mehr als ein Werkzeug; es ist ein zeitsparender, stressreduzierender Begleiter, der unsere Abläufe optimiert und unsere Produktivität gesteigert hat. + +Wenn Du ein E-Commerce-Unternehmen besitzt und mit der Produkt-Datenverwaltung zu kämpfen hast, empfehle ich Dir von ganzem Herzen, Baserow in Betracht zu ziehen. Es mag etwas Aufwand bedeuten, es zunächst einzurichten, aber die Vorteile, die Du erzielen kannst - Effizienz, Genauigkeit und gesparte wertvolle Zeit - werden es wert sein. + +Am Ende des Tages geht es beim Betrieb eines erfolgreichen E-Commerce-Geschäfts nicht nur darum, ein breites Sortiment an Produkten oder eine ausgeklügelte Marketingstrategie zu haben; es geht auch darum, die richtigen Werkzeuge zu verwenden, um Deine Abläufe effektiv zu verwalten, und für die Produkt-Datenverwaltung habe ich Baserow als das richtige Werkzeug gefunden. + +#+attr_shortcode: :type tip :title Was ist mit Airtable? :open true +#+begin_admonition +Einige von Euch könnten *Airtable* als ähnliche Lösung kennen. Obwohl Airtable ein sehr gutes Produkt ist, bevorzuge ich persönlich freie und Open-Source-Lösungen. +#+end_admonition + +#+attr_shortcode: :type success :title Wissen ist Macht 🤓 :open true +#+begin_admonition +Teile diesen Betrag mit jemandem, für den er hilfreich ist. +#+end_admonition diff --git a/content/about.de.md b/content/about.de.md new file mode 100644 index 0000000..0d4d72b --- /dev/null +++ b/content/about.de.md @@ -0,0 +1,46 @@ +--- +title: "Über mich" +date: 2019-09-04T14:32:51+02:00 +draft: false +author: "Sascha" +--- +# Hey! + +Ich bin Sascha. Für heute habe ich mir leider vorgenommen etwas über mich selbst zu schreiben 😱. Vielleicht fange ich mal am Anfang an: + +Ich mit Computern vor Jahrzenten angefangen, was mitunter auch daran liegen kann, dass ich auch nicht mehr der jüngste bin. Als Teenager habe ich mir nichts sehnlicher gewünscht als einen C64. Ich wollte im Grunde einfach nur zocken können und meinen Spaß damit haben. Meine Eltern dachten sich, dass so ein Computer nützlich für die Schule sein sollte. Sie ließen sich beraten und haben mir einen sündhaft teuren 286er mit 640KB RAM angeschleppt. +Da saß ich nun. Keine Spiele, keine Ahnung und MS-DOS Version 5 oder so. Wie enttäuschend 😣. + +![Never stop learning](/img/laptop-cyber.png "Never stop learning") + +Ich habe viel gebastelt und viel ausprobiert und unheimlich viel gelernt, auch wenn ich nicht spielen konnte wie beabsichtigt. Irgendwann habe ich in der Schule einen Informatikurs gemacht und später Informatik in der Schule auch als Fach gewählt. Da ging es tatsächlich um wirklich interessante Sachen. Die meiste Zeit haben wir hier mit Turbo Pascal programmiert. Das war Mega interessant. + +Trotzdem habe ich mich nach der Schule erst einmal für einen anderen Weg entschieden. Ich habe mich damals für Grafikdesign entschieden, anschließend landete ich in der Druckindustrie als Spezialist für Druckvorstufe, Workflow Automatisierung und vor allem Colormanagement. + +Während all dieser Zeit habe ich mich immer mit Computern und neuen Technologien befasst. Einfach weil es super interessant war 😎 + +Als ich meine Frau kennenlernte musste ich seßhaft werden. Sie assimilierte mich in ihre Firma, wo ich bis heute mitarbeite und unterstütze. Natürlich mache ich alles was mit Technik, Automatisierung etc. zu tun hat. Das Thema Colormanagement und Druckmaschinenkalibierung habe ich aber mittlerweile in die vertrauensvollen Hände unserer Grafikmitarbeiter gegeben 😁. + +Heute bin ich neben der gemeinsamen Leitung der Firma mit meiner Frau hauptsächlich für Technologie und Automatisierung in unserem Unternehmen zuständig. + +## Wir nutzen bei uns folgende Technologien: + +* NixOS - wenn schon Linux, dann richtig +* Docker / Podman - ohne Container geht heute nix mehr +* Shopify - einfach und leistungsstark und wenn Du die API nutzt kannst Du fast alles damit machen +* n8n - wer nicht automatisiert ist selber schuld +* Baserow - Excel bringt's einfach nicht +* Metabase - KPIs mal richtig +* ... + +## Und sonst so? + +* Ich programmiere fast jeden Tag +* Ich laufe ca. 25km in der Woche +* 2-3 Tage pro Woche / 1 Stunde HIIT Training muss einfach sein +* Ich zocke gerne (natürlich auf Linux) und das beste ist meine Frau auch 🥰 +* Ich ernähre mich Paleo +* Ich fahre Motorrad und liebe meine Ducati, sie heißt Polly 😘 +* Ich benutze Linux, weil ich wert auf Autonomie und Privatsphäre lege 😜 + +TBC diff --git a/content/about.en.md b/content/about.en.md new file mode 100644 index 0000000..83434ef --- /dev/null +++ b/content/about.en.md @@ -0,0 +1,46 @@ +--- +title: "About me" +date: 2019-09-04T14:32:51+02:00 +draft: false +author: "Sascha" +--- +# Hey! + +I am Sascha. Unfortunately, I've made a plan for today to write something about myself 😱. Maybe I should start at the beginning: + +I started with computers a long time ago, which may be because I am not the youngest anymore. As a teenager, I longed for a C64 nothing else. Essentially, I just wanted to be able to play games and have fun with it. My parents thought such a computer should be useful for school. They sought advice and bought me a sinfully expensive 286er with 640KB RAM. +So there I was. No games, no idea, and MS-DOS version 5 or something. How disappointing 😣. + +![Never stop learning](/img/laptop-cyber.png "Never stop learning") + +I tinkered a lot, tried a lot out and learnt an incredible amount, even though I couldn't play as intended. At some point, I took a computer science course at school and later chose it as a subject. There we actually dealt with really interesting stuff. Most of the time we programmed with Turbo Pascal. It was mega interesting. + +Still, after school I decided to go a different way initially. I chose graphic design, and then ended up in the print industry as a specialist for prepress, workflow automation and especially color management. + +During all this time, I always dealt with computers and new technologies. Simply because it was super interesting 😎. + +When I met my wife, I had to settle down. She assimilated me into her company, where I am still working and supporting. Of course, I do everything that has to do with technology, automation, etc. However, I have now handed over the topic of color management and printing machine calibration to the trusting hands of our graphic designers 😁. + +Today, in addition to jointly managing the company with my wife, I am primarily responsible for technology and automation in our company. + +## We use the following technologies: + +* NixOS - if Linux, then declarative +* Docker / Podman - can't do without containers these days +* Shopify - simple and powerful and if you use the API you can do almost anything with it +* n8n - you're at fault if you don't automate +* Baserow - Excel just doesn't cut it +* Metabase - KPIs done right +* ... + +## And what else? + +* I program almost every day +* I run approximately 14.9 miles in a week +* 2-3 days per week / 1 hour of HIIT training is a must +* I love to game (of course on Linux) and the best part is my wife does too 🥰 +* I follow the Paleo diet +* I ride a motorcycle and love my Ducati, her name is Polly 😘 +* I use Linux, because I value autonomy and privacy 😜 + +TBC diff --git a/content/automation/_index.de.md b/content/automation/_index.de.md new file mode 100644 index 0000000..e1dfe9f --- /dev/null +++ b/content/automation/_index.de.md @@ -0,0 +1,3 @@ +--- +title: "Automatisierung" +--- diff --git a/content/automation/_index.en.md b/content/automation/_index.en.md new file mode 100644 index 0000000..b98bf39 --- /dev/null +++ b/content/automation/_index.en.md @@ -0,0 +1,3 @@ +--- +title: "Automation" +--- diff --git a/content/datamanagement/_index.de.md b/content/datamanagement/_index.de.md new file mode 100644 index 0000000..02bb9eb --- /dev/null +++ b/content/datamanagement/_index.de.md @@ -0,0 +1,3 @@ +--- +title: "Datenverwaltung" +--- diff --git a/content/datamanagement/_index.en.md b/content/datamanagement/_index.en.md new file mode 100644 index 0000000..66df319 --- /dev/null +++ b/content/datamanagement/_index.en.md @@ -0,0 +1,3 @@ +--- +title: "Data Management" +--- diff --git a/content/legal.de.md b/content/legal.de.md new file mode 100644 index 0000000..46df9f4 --- /dev/null +++ b/content/legal.de.md @@ -0,0 +1,272 @@ ++++ +title = "Impressum & Datenschutzerklärung" +date = 2000-10-03 +draft = false ++++ + +Willkommen auf dieser Seite, die die rechtlichen Unternehmensdetails und Datenschutzbestimmungen von Sascha König enthält. Es ist wichtig, dass wir die rechtlichen Aspekte klären, um Transparenz und Vertrauen zu gewährleisten. Vielen Dank für Ihr Verständnis und Ihre Zusammenarbeit. + + +## Impressum {#impressum} + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Deutschland + +Email: ping@m3tam3re.com + +Website: www.m3tam3re.com + + +## Datenschutzerklärung {#datenschutzerklärung} + +Wir freuen uns sehr über Ihr Interesse an unserem Unternehmen. Datenschutz hat einen besonders hohen Stellenwert für die Geschäftsleitung der Sascha König. Eine Nutzung der Internetseiten der Sascha König ist grundsätzlich ohne jede Angabe personenbezogener Daten möglich. Sofern eine betroffene Person besondere Services unseres Unternehmens über unsere Internetseite in Anspruch nehmen möchte, könnte jedoch eine Verarbeitung personenbezogener Daten erforderlich werden. Ist die Verarbeitung personenbezogener Daten erforderlich und besteht für eine solche Verarbeitung keine gesetzliche Grundlage, holen wir generell eine Einwilligung der betroffenen Person ein. + +Die Verarbeitung personenbezogener Daten, beispielsweise des Namens, der Anschrift, E-Mail-Adresse oder Telefonnummer einer betroffenen Person, erfolgt stets im Einklang mit der Datenschutz-Grundverordnung und in Übereinstimmung mit den für Sascha König geltenden landesspezifischen Datenschutzbestimmungen. Mittels dieser Datenschutzerklärung möchte unser Unternehmen die Öffentlichkeit über Art, Umfang und Zweck der von uns erhobenen, genutzten und verarbeiteten personenbezogenen Daten informieren. Ferner werden betroffene Personen mittels dieser Datenschutzerklärung über die ihnen zustehenden Rechte aufgeklärt. + +Sascha König hat als für die Verarbeitung Verantwortlicher zahlreiche technische und organisatorische Maßnahmen umgesetzt, um einen möglichst lückenlosen Schutz der über diese Internetseite verarbeiteten personenbezogenen Daten sicherzustellen. Dennoch können Internetbasierte Datenübertragungen grundsätzlich Sicherheitslücken aufweisen, sodass ein absoluter Schutz nicht gewährleistet werden kann. Aus diesem Grund steht es jeder betroffenen Person frei, personenbezogene Daten auch auf alternativen Wegen, beispielsweise telefonisch, an uns zu übermitteln. + + +### 1. Begriffsbestimmungen {#1-dot-begriffsbestimmungen} + +Die Datenschutzerklärung der Sascha König beruht auf den Begrifflichkeiten, die durch den Europäischen Richtlinien- und Verordnungsgeber beim Erlass der Datenschutz-Grundverordnung (DS-GVO) verwendet wurden. Unsere Datenschutzerklärung soll sowohl für die Öffentlichkeit als auch für unsere Kunden und Geschäftspartner einfach lesbar und verständlich sein. Um dies zu gewährleisten, möchten wir vorab die verwendeten Begrifflichkeiten erläutern. + +Wir verwenden in dieser Datenschutzerklärung unter anderem die folgenden Begriffe: + + +#### a) personenbezogene Daten {#a-personenbezogene-daten} + +Personenbezogene Daten sind alle Informationen, die sich auf eine identifizierte oder identifizierbare natürliche Person (im Folgenden „betroffene Person“) beziehen. Als identifizierbar wird eine natürliche Person angesehen, die direkt oder indirekt, insbesondere mittels Zuordnung zu einer Kennung wie einem Namen, zu einer Kennnummer, zu Standortdaten, zu einer Online-Kennung oder zu einem oder mehreren besonderen Merkmalen, die Ausdruck der physischen, physiologischen, genetischen, psychischen, wirtschaftlichen, kulturellen oder sozialen Identität dieser natürlichen Person sind, identifiziert werden kann. + + +#### b) betroffene Person {#b-betroffene-person} + +Betroffene Person ist jede identifizierte oder identifizierbare natürliche Person, deren personenbezogene Daten von dem für die Verarbeitung Verantwortlichen verarbeitet werden. + + +#### c) Verarbeitung {#c-verarbeitung} + +Verarbeitung ist jeder mit oder ohne Hilfe automatisierter Verfahren ausgeführte Vorgang oder jede solche Vorgangsreihe im Zusammenhang mit personenbezogenen Daten wie das Erheben, das Erfassen, die Organisation, das Ordnen, die Speicherung, die Anpassung oder Veränderung, das Auslesen, das Abfragen, die Verwendung, die Offenlegung durch Übermittlung, Verbreitung oder eine andere Form der Bereitstellung, den Abgleich oder die Verknüpfung, die Einschränkung, das Löschen oder die Vernichtung. + + +#### d) Einschränkung der Verarbeitung {#d-einschränkung-der-verarbeitung} + +Einschränkung der Verarbeitung ist die Markierung gespeicherter personenbezogener Daten mit dem Ziel, ihre künftige Verarbeitung einzuschränken. + + +#### e) Profiling {#e-profiling} + +Profiling ist jede Art der automatisierten Verarbeitung personenbezogener Daten, die darin besteht, dass diese personenbezogenen Daten verwendet werden, um bestimmte persönliche Aspekte, die sich auf eine natürliche Person beziehen, zu bewerten, insbesondere, um Aspekte bezüglich Arbeitsleistung, wirtschaftlicher Lage, Gesundheit, persönlicher Vorlieben, Interessen, Zuverlässigkeit, Verhalten, Aufenthaltsort oder Ortswechsel dieser natürlichen Person zu analysieren oder vorherzusagen. + + +#### f) Pseudonymisierung {#f-pseudonymisierung} + +Pseudonymisierung ist die Verarbeitung personenbezogener Daten in einer Weise, auf welche die personenbezogenen Daten ohne Hinzuziehung zusätzlicher Informationen nicht mehr einer spezifischen betroffenen Person zugeordnet werden können, sofern diese zusätzlichen Informationen gesondert aufbewahrt werden und technischen und organisatorischen Maßnahmen unterliegen, die gewährleisten, dass die personenbezogenen Daten nicht einer identifizierten oder identifizierbaren natürlichen Person zugewiesen werden. + + +#### g) Verantwortlicher oder für die Verarbeitung Verantwortlicher {#g-verantwortlicher-oder-für-die-verarbeitung-verantwortlicher} + +Verantwortlicher oder für die Verarbeitung Verantwortlicher ist die natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle, die allein oder gemeinsam mit anderen über die Zwecke und Mittel der Verarbeitung von personenbezogenen Daten entscheidet. Sind die Zwecke und Mittel dieser Verarbeitung durch das Unionsrecht oder das Recht der Mitgliedstaaten vorgegeben, so kann der Verantwortliche beziehungsweise können die bestimmten Kriterien seiner Benennung nach dem Unionsrecht oder dem Recht der Mitgliedstaaten vorgesehen werden. + + +#### h) Auftragsverarbeiter {#h-auftragsverarbeiter} + +Auftragsverarbeiter ist eine natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle, die personenbezogene Daten im Auftrag des Verantwortlichen verarbeitet. + + +#### i) Empfänger {#i-empfänger} + +Empfänger ist eine natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle, der personenbezogene Daten offengelegt werden, unabhängig davon, ob es sich bei ihr um einen Dritten handelt oder nicht. Behörden, die im Rahmen eines bestimmten Untersuchungsauftrags nach dem Unionsrecht oder dem Recht der Mitgliedstaaten möglicherweise personenbezogene Daten erhalten, gelten jedoch nicht als Empfänger. + + +#### j) Dritter {#j-dritter} + +Dritter ist eine natürliche oder juristische Person, Behörde, Einrichtung oder andere Stelle außer der betroffenen Person, dem Verantwortlichen, dem Auftragsverarbeiter und den Personen, die unter der unmittelbaren Verantwortung des Verantwortlichen oder des Auftragsverarbeiters befugt sind, die personenbezogenen Daten zu verarbeiten. + + +#### k) Einwilligung {#k-einwilligung} + +Einwilligung ist jede von der betroffenen Person freiwillig für den bestimmten Fall in informierter Weise und unmissverständlich abgegebene Willensbekundung in Form einer Erklärung oder einer sonstigen eindeutigen bestätigenden Handlung, mit der die betroffene Person zu verstehen gibt, dass sie mit der Verarbeitung der sie betreffenden personenbezogenen Daten einverstanden ist. + + +### 2. Name und Anschrift des für die Verarbeitung Verantwortlichen {#2-dot-name-und-anschrift-des-für-die-verarbeitung-verantwortlichen} + +Verantwortlicher im Sinne der Datenschutz-Grundverordnung, sonstiger in den Mitgliedstaaten der Europäischen Union geltenden Datenschutzgesetze und anderer Bestimmungen mit datenschutzrechtlichem Charakter ist die: + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Deutschland + +E-Mail: ping@m3tam3re.com + +Website: www.m3tam3re.com + + +### 3. Erfassung von allgemeinen Daten und Informationen {#3-dot-erfassung-von-allgemeinen-daten-und-informationen} + +Die Internetseite Sascha König erfasst mit jedem Aufruf der Internetseite durch eine betroffene Person oder ein automatisiertes System eine Reihe von allgemeinen Daten und Informationen. Diese allgemeinen Daten und Informationen werden in den Logfiles des Servers gespeichert. Erfasst werden können die (1) verwendeten Browsertypen und Versionen, (2) das vom zugreifenden System verwendete Betriebssystem, (3) die Internetseite, von welcher ein zugreifendes System auf unsere Internetseite gelangt (sogenannte Referrer), (4) die Unterwebseiten, welche über ein zugreifendes System auf unserer Internetseite angesteuert werden, (5) das Datum und die Uhrzeit eines Zugriffs auf die Internetseite, (6) eine Internet-Protokoll-Adresse (IP-Adresse), (7) der Internet-Service-Provider des zugreifenden Systems und (8) sonstige ähnliche Daten und Informationen, die der Gefahrenabwehr im Falle von Angriffen auf unsere informationstechnologischen Systeme dienen. + +Bei der Nutzung dieser allgemeinen Daten und Informationen zieht Sascha König keine Rückschlüsse auf die betroffene Person. Diese Informationen werden vielmehr benötigt, um (1) die Inhalte unserer Internetseite korrekt auszuliefern, (2) die Inhalte unserer Internetseite sowie die Werbung für diese zu optimieren, (3) die dauerhafte Funktionsfähigkeit unserer informationstechnologischen Systeme und der Technik unserer Internetseite zu gewährleisten sowie (4) um Strafverfolgungsbehörden im Falle eines Cyberangriffes die zur Strafverfolgung notwendigen Informationen bereitzustellen. Diese anonym erhobenen Daten und Informationen werden durch Sascha König daher einerseits statistisch und ferner mit dem Ziel ausgewertet, den Datenschutz und die Datensicherheit in unserem Unternehmen zu erhöhen, um letztlich ein optimales Schutzniveau für die von uns verarbeiteten personenbezogenen Daten sicherzustellen. Die anonymen Daten der Server-Logfiles werden getrennt von allen durch eine betroffene Person angegebenen personenbezogenen Daten gespeichert. + + +### 4. Abonnement unseres Newsletters {#4-dot-abonnement-unseres-newsletters} + +Auf der Internetseite der Sascha König wird den Benutzern die Möglichkeit eingeräumt, den Newsletter unseres Unternehmens zu abonnieren. Welche personenbezogenen Daten bei der Bestellung des Newsletters an den für die Verarbeitung Verantwortlichen übermittelt werden, ergibt sich aus der hierzu verwendeten Eingabemaske. + +Sascha König informiert ihre Kunden und Geschäftspartner in regelmäßigen Abständen im Wege eines Newsletters über Angebote des Unternehmens. Der Newsletter unseres Unternehmens kann von der betroffenen Person grundsätzlich nur dann empfangen werden, wenn (1) die betroffene Person über eine gültige E-Mail-Adresse verfügt und (2) die betroffene Person sich für den Newsletterversand registriert. An die von einer betroffenen Person erstmalig für den Newsletterversand eingetragene E-Mail-Adresse wird aus rechtlichen Gründen eine Bestätigungsmail im Double-Opt-In-Verfahren versendet. Diese Bestätigungsmail dient der Überprüfung, ob der Inhaber der E-Mail-Adresse als betroffene Person den Empfang des Newsletters autorisiert hat. + +Bei der Anmeldung zum Newsletter speichern wir ferner die vom Internet-Service-Provider (ISP) vergebene IP-Adresse des von der betroffenen Person zum Zeitpunkt der Anmeldung verwendeten Computersystems sowie das Datum und die Uhrzeit der Anmeldung. Die Erhebung dieser Daten ist erforderlich, um den(möglichen) Missbrauch der E-Mail-Adresse einer betroffenen Person zu einem späteren Zeitpunkt nachvollziehen zu können und dient deshalb der rechtlichen Absicherung des für die Verarbeitung Verantwortlichen. + +Die im Rahmen einer Anmeldung zum Newsletter erhobenen personenbezogenen Daten werden ausschließlich zum Versand unseres Newsletters verwendet. Ferner könnten Abonnenten des Newsletters per E-Mail informiert werden, sofern dies für den Betrieb des Newsletter-Dienstes oder eine diesbezügliche Registrierung erforderlich ist, wie dies im Falle von Änderungen am Newsletterangebot oder bei der Veränderung der technischen Gegebenheiten der Fall sein könnte. Es erfolgt keine Weitergabe der im Rahmen des Newsletter-Dienstes erhobenen personenbezogenen Daten an Dritte. Das Abonnement unseres Newsletters kann durch die betroffene Person jederzeit gekündigt werden. Die Einwilligung in die Speicherung personenbezogener Daten, die die betroffene Person uns für den Newsletterversand erteilt hat, kann jederzeit widerrufen werden. Zum Zwecke des Widerrufs der Einwilligung findet sich in jedem Newsletter ein entsprechender Link. Ferner besteht die Möglichkeit, sich jederzeit auch direkt auf der Internetseite des für die Verarbeitung Verantwortlichen vom Newsletterversand abzumelden oder dies dem für die Verarbeitung Verantwortlichen auf andere Weise mitzuteilen. + + +### 5. Newsletter-Tracking {#5-dot-newsletter-tracking} + +Die Newsletter der Sascha König enthalten sogenannte Zählpixel. Ein Zählpixel ist eine Miniaturgrafik, die in solche E-Mails eingebettet wird, welche im HTML-Format versendet werden, um eine Logdatei-Aufzeichnung und eine Logdatei-Analyse zu ermöglichen. Dadurch kann eine statistische Auswertung des Erfolges oder Misserfolges von Online-Marketing-Kampagnen durchgeführt werden. Anhand des eingebetteten Zählpixels kann Sascha König erkennen, ob und wann eine E-Mail von einer betroffenen Person geöffnet wurde und welche in der E-Mail befindlichen Links von der betroffenen Person aufgerufen wurden. + +Solche über die in den Newslettern enthaltenen Zählpixel erhobenen personenbezogenen Daten, werden von dem für die Verarbeitung Verantwortlichen gespeichert und ausgewertet, um den Newsletterversand zu optimieren und den Inhalt zukünftiger Newsletter noch besser den Interessen der betroffenen Person anzupassen. Diese personenbezogenen Daten werden nicht an Dritte weitergegeben. Betroffene Personen sind jederzeit berechtigt, die diesbezügliche gesonderte, über das Double-Opt-In-Verfahren abgegebene Einwilligungserklärung zu widerrufen. Nach einem Widerruf werden diese personenbezogenen Daten von dem für die Verarbeitung Verantwortlichen gelöscht. Eine Abmeldung vom Erhalt des Newsletters deutet Sascha König automatisch als Widerruf. + + +### 6. Kommentarfunktion im Blog auf der Internetseite {#6-dot-kommentarfunktion-im-blog-auf-der-internetseite} + +Sascha König bietet den Nutzern auf einem Blog, der sich auf der Internetseite des für die Verarbeitung Verantwortlichen befindet, die Möglichkeit, individuelle Kommentare zu einzelnen Blog-Beiträgen zu hinterlassen. Ein Blog ist ein auf einer Internetseite geführtes, in der Regel öffentlich einsehbares Portal, in welchem eine oder mehrere Personen, die Blogger oder Web-Blogger genannt werden, Artikel posten oder Gedanken in sogenannten Blogposts niederschreiben können. Die Blogposts können in der Regel von Dritten kommentiert werden. + +Hinterlässt eine betroffene Person einen Kommentar in dem auf dieser Internetseite veröffentlichten Blog, werden neben den von der betroffenen Person hinterlassenen Kommentaren auch Angaben zum Zeitpunkt der Kommentareingabe sowie zu dem von der betroffenen Person gewählten Nutzernamen (Pseudonym) gespeichert und veröffentlicht. Ferner wird die vom Internet-Service-Provider (ISP) der betroffenen Person vergebene IP-Adresse mitprotokolliert. Diese Speicherung der IP-Adresse erfolgt aus Sicherheitsgründen und für den Fall, dass die betroffene Person durch einen abgegebenen Kommentar die Rechte Dritter verletzt oder rechtswidrige Inhalte postet. Die Speicherung dieser personenbezogenen Daten erfolgt daher im eigenen Interesse des für die Verarbeitung Verantwortlichen, damit sich dieser im Falle einer Rechtsverletzung gegebenenfalls exkulpieren könnte. Es erfolgt keine Weitergabe dieser erhobenen personenbezogenen Daten an Dritte, sofern eine solche Weitergabe nicht gesetzlich vorgeschrieben ist oder der Rechtsverteidigung des für die Verarbeitung Verantwortlichen dient. + + +### 7. Routinemäßige Löschung und Sperrung von personenbezogenen Daten {#7-dot-routinemäßige-löschung-und-sperrung-von-personenbezogenen-daten} + +Der für die Verarbeitung Verantwortliche verarbeitet und speichert personenbezogene Daten der betroffenen Person nur für den Zeitraum, der zur Erreichung des Speicherungszwecks erforderlich ist oder sofern dies durch den Europäischen Richtlinien- und Verordnungsgeber oder einen anderen Gesetzgeber in Gesetzen oder Vorschriften, welchen der für die Verarbeitung Verantwortliche unterliegt, vorgesehen wurde. + +Entfällt der Speicherungszweck oder läuft eine vom Europäischen Richtlinien- und Verordnungsgeber oder einem anderen zuständigen Gesetzgeber vorgeschriebene Speicherfrist ab, werden die personenbezogenen Daten routinemäßig und entsprechend den gesetzlichen Vorschriften gesperrt oder gelöscht. + + +### 8. Rechte der betroffenen Person {#8-dot-rechte-der-betroffenen-person} + + +#### a) Recht auf Bestätigung {#a-recht-auf-bestätigung} + +Jede betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber eingeräumte Recht, von dem für die Verarbeitung Verantwortlichen eine Bestätigung darüber zu verlangen, ob sie betreffende personenbezogene Daten verarbeitet werden. Möchte eine betroffene Person dieses Bestätigungsrecht in Anspruch nehmen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + + +#### b) Recht auf Auskunft {#b-recht-auf-auskunft} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, jederzeit von dem für die Verarbeitung Verantwortlichen unentgeltliche Auskunft über die zu seiner Person gespeicherten personenbezogenen Daten und eine Kopie dieser Auskunft zu erhalten. Ferner hat der Europäische Richtlinien- und Verordnungsgeber der betroffenen Person Auskunft über folgende Informationen zugestanden: + +die Verarbeitungszwecke +die Kategorien personenbezogener Daten, die verarbeitet werden +die Empfänger oder Kategorien von Empfängern, gegenüber denen die personenbezogenen Daten offengelegt worden sind oder noch offengelegt werden, insbesondere bei Empfängern in Drittländern oder bei internationalen Organisationen +falls möglich die geplante Dauer, für die die personenbezogenen Daten gespeichert werden, oder, falls dies nicht möglich ist, die Kriterien für die Festlegung dieser Dauer +das Bestehen eines Rechts auf Berichtigung oder Löschung der sie betreffenden personenbezogenen Daten oder auf Einschränkung der Verarbeitung durch den Verantwortlichen oder eines Widerspruchsrechts gegen diese Verarbeitung +das Bestehen eines Beschwerderechts bei einer Aufsichtsbehörde +wenn die personenbezogenen Daten nicht bei der betroffenen Person erhoben werden: Alle verfügbaren Informationen über die Herkunft der Daten +das Bestehen einer automatisierten Entscheidungsfindung einschließlich Profiling gemäß Artikel 22 Abs.1 und 4 DS-GVO und — zumindest in diesen Fällen — aussagekräftige Informationen über die involvierte Logik sowie die Tragweite und die angestrebten Auswirkungen einer derartigen Verarbeitung für die betroffene Person +Ferner steht der betroffenen Person ein Auskunftsrecht darüber zu, ob personenbezogene Daten an ein Drittland oder an eine internationale Organisation übermittelt wurden. Sofern dies der Fall ist, so steht der betroffenen Person im Übrigen das Recht zu, Auskunft über die geeigneten Garantien im Zusammenhang mit der Übermittlung zu erhalten. + +Möchte eine betroffene Person dieses Auskunftsrecht in Anspruch nehmen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + + +#### c) Recht auf Berichtigung {#c-recht-auf-berichtigung} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, die unverzügliche Berichtigung sie betreffender unrichtiger personenbezogener Daten zu verlangen. Ferner steht der betroffenen Person das Recht zu, unter Berücksichtigung der Zwecke der Verarbeitung, die Vervollständigung unvollständiger personenbezogener Daten — auch mittels einer ergänzenden Erklärung — zu verlangen. + +Möchte eine betroffene Person dieses Berichtigungsrecht in Anspruch nehmen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + + +#### d) Recht auf Löschung (Recht auf Vergessen werden) {#d-recht-auf-löschung--recht-auf-vergessen-werden} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, von dem Verantwortlichen zu verlangen, dass die sie betreffenden personenbezogenen Daten unverzüglich gelöscht werden, sofern einer der folgenden Gründe zutrifft und soweit die Verarbeitung nicht erforderlich ist: + +Die personenbezogenen Daten wurden für solche Zwecke erhoben oder auf sonstige Weise verarbeitet, für welche sie nicht mehr notwendig sind. +Die betroffene Person widerruft ihre Einwilligung, auf die sich die Verarbeitung gemäß Art. 6 Abs. 1 Buchstabe a DS-GVO oder Art. 9 Abs. 2 Buchstabe a DS-GVO stützte, und es fehlt an einer anderweitigen Rechtsgrundlage für die Verarbeitung. +Die betroffene Person legt gemäß Art. 21 Abs. 1 DS-GVO Widerspruch gegen die Verarbeitung ein, und es liegen keine vorrangigen berechtigten Gründe für die Verarbeitung vor, oder die betroffene Person legt gemäß Art. 21 Abs. 2 DS-GVO Widerspruch gegen die Verarbeitung ein. +Die personenbezogenen Daten wurden unrechtmäßig verarbeitet. +Die Löschung der personenbezogenen Daten ist zur Erfüllung einer rechtlichen Verpflichtung nach dem Unionsrecht oder dem Recht der Mitgliedstaaten erforderlich, dem der Verantwortliche unterliegt. +Die personenbezogenen Daten wurden in Bezug auf angebotene Dienste der Informationsgesellschaft gemäß Art. 8 Abs. 1 DS-GVO erhoben. +Sofern einer der oben genannten Gründe zutrifft und eine betroffene Person die Löschung von personenbezogenen Daten, die bei der Sascha König gespeichert sind, veranlassen möchte, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. Der Mitarbeiter der Sascha König wird veranlassen, dass dem Löschverlangen unverzüglich nachgekommen wird. + +Wurden die personenbezogenen Daten von der Sascha König öffentlich gemacht und ist unser Unternehmen als Verantwortlicher gemäß Art. 17 Abs. 1 DS-GVO zur Löschung der personenbezogenen Daten verpflichtet, so trifft Sascha König unter Berücksichtigung der verfügbaren Technologie und der Implementierungskosten angemessene Maßnahmen, auch technischer Art, um andere für die Datenverarbeitung Verantwortliche, welche die veröffentlichten personenbezogenen Daten verarbeiten, darüber in Kenntnis zu setzen, dass die betroffene Person von diesen anderen für die Datenverarbeitung Verantwortlichen die Löschung sämtlicher Links zu diesen personenbezogenen Daten oder von Kopien oder Replikationen dieser personenbezogenen Daten verlangt hat, soweit die Verarbeitung nicht erforderlich ist. Der Mitarbeiter der Sascha König wird im Einzelfall das Notwendige veranlassen. + + +#### e) Recht auf Einschränkung der Verarbeitung {#e-recht-auf-einschränkung-der-verarbeitung} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, von dem Verantwortlichen die Einschränkung der Verarbeitung zu verlangen, wenn eine der folgenden Voraussetzungen gegeben ist: + +Die Richtigkeit der personenbezogenen Daten wird von der betroffenen Person bestritten, und zwar für eine Dauer, die es dem Verantwortlichen ermöglicht, die Richtigkeit der personenbezogenen Daten zu überprüfen. +Die Verarbeitung ist unrechtmäßig, die betroffene Person lehnt die Löschung der personenbezogenen Daten ab und verlangt stattdessen die Einschränkung der Nutzung der personenbezogenen Daten. +Der Verantwortliche benötigt die personenbezogenen Daten für die Zwecke der Verarbeitung nicht länger, die betroffene Person benötigt sie jedoch zur Geltendmachung, Ausübung oder Verteidigung von Rechtsansprüchen. +Die betroffene Person hat Widerspruch gegen die Verarbeitung gem. Art. 21 Abs. 1 DS-GVO eingelegt und es steht noch nicht fest, ob die berechtigten Gründe des Verantwortlichen gegenüber denen der betroffenen Person überwiegen. +Sofern eine der oben genannten Voraussetzungen gegeben ist und eine betroffene Person die Einschränkung von personenbezogenen Daten, die bei der Sascha König gespeichert sind, verlangen möchte, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. Der Mitarbeiter der Sascha König wird die Einschränkung der Verarbeitung veranlassen. + + +#### f) Recht auf Datenübertragbarkeit {#f-recht-auf-datenübertragbarkeit} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, die sie betreffenden personenbezogenen Daten, welche durch die betroffene Person einem Verantwortlichen bereitgestellt wurden, in einem strukturierten, gängigen und maschinenlesbaren Format zu erhalten. Sie hat außerdem das Recht, diese Daten einem anderen Verantwortlichen ohne Behinderung durch den Verantwortlichen, dem die personenbezogenen Daten bereitgestellt wurden, zu übermitteln, sofern die Verarbeitung auf der Einwilligung gemäß Art. 6 Abs. 1 Buchstabe a DS-GVO oder Art. 9 Abs. 2 Buchstabe a DS-GVO oder auf einem Vertrag gemäß Art. 6 Abs. 1 Buchstabe b DS-GVO beruht und die Verarbeitung mithilfe automatisierter Verfahren erfolgt, sofern die Verarbeitung nicht für die Wahrnehmung einer Aufgabe erforderlich ist, die im öffentlichen Interesse liegt oder in Ausübung öffentlicher Gewalt erfolgt, welche dem Verantwortlichen übertragen wurde. + +Ferner hat die betroffene Person bei der Ausübung ihres Rechts auf Datenübertragbarkeit gemäß Art. 20 Abs. 1 DS-GVO das Recht, zu erwirken, dass die personenbezogenen Daten direkt von einem Verantwortlichen an einen anderen Verantwortlichen übermittelt werden, soweit dies technisch machbar ist und sofern hiervon nicht die Rechte und Freiheiten anderer Personen beeinträchtigt werden. + +Zur Geltendmachung des Rechts auf Datenübertragbarkeit kann sich die betroffene Person jederzeit an einen Mitarbeiter der Sascha König wenden. + + +#### g) Recht auf Widerspruch {#g-recht-auf-widerspruch} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, aus Gründen, die sich aus ihrer besonderen Situation ergeben, jederzeit gegen die Verarbeitung sie betreffender personenbezogener Daten, die aufgrund von Art. 6 Abs. 1 Buchstaben e oder f DS-GVO erfolgt, Widerspruch einzulegen. Dies gilt auch für ein auf diese Bestimmungen gestütztes Profiling. + +Sascha König verarbeitet die personenbezogenen Daten im Falle des Widerspruchs nicht mehr, es sei denn, wir können zwingende schutzwürdige Gründe für die Verarbeitung nachweisen, die den Interessen, Rechten und Freiheiten der betroffenen Person überwiegen, oder die Verarbeitung dient der Geltendmachung, Ausübung oder Verteidigung von Rechtsansprüchen. + +Verarbeitet Sascha König personenbezogene Daten, um Direktwerbung zu betreiben, so hat die betroffene Person das Recht, jederzeit Widerspruch gegen die Verarbeitung der personenbezogenen Daten zum Zwecke derartiger Werbung einzulegen. Dies gilt auch für das Profiling, soweit es mit solcher Direktwerbung in Verbindung steht. Widerspricht die betroffene Person gegenüber der Sascha König der Verarbeitung für Zwecke der Direktwerbung, so wird Sascha König die personenbezogenen Daten nicht mehr für diese Zwecke verarbeiten. + +Zudem hat die betroffene Person das Recht, aus Gründen, die sich aus ihrer besonderen Situation ergeben, gegen die sie betreffende Verarbeitung personenbezogener Daten, die bei der Sascha König zu wissenschaftlichen oder historischen Forschungszwecken oder zu statistischen Zwecken gemäß Art. 89 Abs. 1 DS-GVO erfolgen, Widerspruch einzulegen, es sei denn, eine solche Verarbeitung ist zur Erfüllung einer im öffentlichen Interesse liegenden Aufgabe erforderlich. + +Zur Ausübung des Rechts auf Widerspruch kann sich die betroffene Person direkt an jeden Mitarbeiter der Sascha König oder einen anderen Mitarbeiter wenden. Der betroffenen Person steht es ferner frei, im Zusammenhang mit der Nutzung von Diensten der Informationsgesellschaft, ungeachtet der Richtlinie 2002/58/EG, ihr Widerspruchsrecht mittels automatisierter Verfahren auszuüben, bei denen technische Spezifikationen verwendet werden. + + +#### h) Automatisierte Entscheidungen im Einzelfall einschließlich Profiling {#h-automatisierte-entscheidungen-im-einzelfall-einschließlich-profiling} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, nicht einer ausschließlich auf einer automatisierten Verarbeitung — einschließlich Profiling — beruhenden Entscheidung unterworfen zu werden, die ihr gegenüber rechtliche Wirkung entfaltet oder sie in ähnlicher Weise erheblich beeinträchtigt, sofern die Entscheidung (1) nicht für den Abschluss oder die Erfüllung eines Vertrags zwischen der betroffenen Person und dem Verantwortlichen erforderlich ist, oder (2) aufgrund von Rechtsvorschriften der Union oder der Mitgliedstaaten, denen der Verantwortliche unterliegt, zulässig ist und diese Rechtsvorschriften angemessene Maßnahmen zur Wahrung der Rechte und Freiheiten sowie der berechtigten Interessen der betroffenen Person enthalten oder (3) mit ausdrücklicher Einwilligung der betroffenen Person erfolgt. + +Ist die Entscheidung (1) für den Abschluss oder die Erfüllung eines Vertrags zwischen der betroffenen Person und dem Verantwortlichen erforderlich oder (2) erfolgt sie mit ausdrücklicher Einwilligung der betroffenen Person, trifft Sascha König angemessene Maßnahmen, um die Rechte und Freiheiten sowie die berechtigten Interessen der betroffenen Person zu wahren, wozu mindestens das Recht auf Erwirkung des Eingreifens einer Person seitens des Verantwortlichen, auf Darlegung des eigenen Standpunkts und auf Anfechtung der Entscheidung gehört. + +Möchte die betroffene Person Rechte mit Bezug auf automatisierte Entscheidungen geltend machen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + + +#### i) Recht auf Widerruf einer datenschutzrechtlichen Einwilligung {#i-recht-auf-widerruf-einer-datenschutzrechtlichen-einwilligung} + +Jede von der Verarbeitung personenbezogener Daten betroffene Person hat das vom Europäischen Richtlinien- und Verordnungsgeber gewährte Recht, eine Einwilligung zur Verarbeitung personenbezogener Daten jederzeit zu widerrufen. + +Möchte die betroffene Person ihr Recht auf Widerruf einer Einwilligung geltend machen, kann sie sich hierzu jederzeit an einen Mitarbeiter des für die Verarbeitung Verantwortlichen wenden. + + +### 9. Rechtsgrundlage der Verarbeitung {#9-dot-rechtsgrundlage-der-verarbeitung} + +Art. 6 I lit. a DS-GVO dient unserem Unternehmen als Rechtsgrundlage für Verarbeitungsvorgänge, bei denen wir eine Einwilligung für einen bestimmten Verarbeitungszweck einholen. Ist die Verarbeitung personenbezogener Daten zur Erfüllung eines Vertrags, dessen Vertragspartei die betroffene Person ist, erforderlich, wie dies beispielsweise bei Verarbeitungsvorgängen der Fall ist, die für eine Lieferung von Waren oder die Erbringung einer sonstigen Leistung oder Gegenleistung notwendig sind, so beruht die Verarbeitung auf Art. 6 I lit. b DS-GVO. Gleiches gilt für solche Verarbeitungsvorgänge die zur Durchführung vorvertraglicher Maßnahmen erforderlich sind, etwa in Fällen von Anfragen zur unseren Produkten oder Leistungen. Unterliegt unser Unternehmen einer rechtlichen Verpflichtung durch welche eine Verarbeitung von personenbezogenen Daten erforderlich wird, wie beispielsweise zur Erfüllung steuerlicher Pflichten, so basiert die Verarbeitung auf Art. 6 I lit. c DS-GVO. In seltenen Fällen könnte die Verarbeitung von personenbezogenen Daten erforderlich werden, um lebenswichtige Interessen der betroffenen Person oder einer anderen natürlichen Person zu schützen. Dies wäre beispielsweise der Fall, wenn ein Besucher in unserem Betrieb verletzt werden würde und daraufhin sein Name, sein Alter, seine Krankenkassendaten oder sonstige lebenswichtige Informationen an einen Arzt, ein Krankenhaus oder sonstige Dritte weitergegeben werden müssten. Dann würde die Verarbeitung auf Art. 6 I lit. d DS-GVO beruhen. Letztlich könnten Verarbeitungsvorgänge auf Art. 6 I lit. f DS-GVO beruhen. Auf dieser Rechtsgrundlage basieren Verarbeitungsvorgänge, die von keiner der vorgenannten Rechtsgrundlagen erfasst werden, wenn die Verarbeitung zur Wahrung eines berechtigten Interesses unseres Unternehmens oder eines Dritten erforderlich ist, sofern die Interessen, Grundrechte und Grundfreiheiten des Betroffenen nicht überwiegen. Solche Verarbeitungsvorgänge sind uns insbesondere deshalb gestattet, weil sie durch den Europäischen Gesetzgeber besonders erwähnt wurden. Er vertrat insoweit die Auffassung, dass ein berechtigtes Interesse anzunehmen sein könnte, wenn die betroffene Person ein Kunde des Verantwortlichen ist (Erwägungsgrund 47 Satz 2 DS-GVO). + + +### 10. Berechtigte Interessen an der Verarbeitung, die von dem Verantwortlichen oder einem Dritten verfolgt werden {#10-dot-berechtigte-interessen-an-der-verarbeitung-die-von-dem-verantwortlichen-oder-einem-dritten-verfolgt-werden} + +Basiert die Verarbeitung personenbezogener Daten auf Artikel 6 I lit. f DS-GVO ist unser berechtigtes Interesse die Durchführung unserer Geschäftstätigkeit zugunsten des Wohlergehens all unserer Mitarbeiter und unserer Anteilseigner. + + +### 11. Dauer, für die die personenbezogenen Daten gespeichert werden {#11-dot-dauer-für-die-die-personenbezogenen-daten-gespeichert-werden} + +Das Kriterium für die Dauer der Speicherung von personenbezogenen Daten ist die jeweilige gesetzliche Aufbewahrungsfrist. Nach Ablauf der Frist werden die entsprechenden Daten routinemäßig gelöscht, sofern sie nicht mehr zur Vertragserfüllung oder Vertragsanbahnung erforderlich sind. + + +### 12. Gesetzliche oder vertragliche Vorschriften zur Bereitstellung der personenbezogenen Daten; Erforderlichkeit für den Vertragsabschluss; Verpflichtung der betroffenen Person, die personenbezogenen Daten bereitzustellen; mögliche Folgen der Nichtbereitstellung {#12-dot-gesetzliche-oder-vertragliche-vorschriften-zur-bereitstellung-der-personenbezogenen-daten-erforderlichkeit-für-den-vertragsabschluss-verpflichtung-der-betroffenen-person-die-personenbezogenen-daten-bereitzustellen-mögliche-folgen-der-nichtbereitstellung} + +Wir klären Sie darüber auf, dass die Bereitstellung personenbezogener Daten zum Teil gesetzlich vorgeschrieben ist (z.B. Steuervorschriften) oder sich auch aus vertraglichen Regelungen (z.B. Angaben zum Vertragspartner) ergeben kann. Mitunter kann es zu einem Vertragsschluss erforderlich sein, dass eine betroffene Person uns personenbezogene Daten zur Verfügung stellt, die in der Folge durch uns verarbeitet werden müssen. Die betroffene Person ist beispielsweise verpflichtet uns personenbezogene Daten bereitzustellen, wenn unser Unternehmen mit ihr einen Vertrag abschließt. Eine Nichtbereitstellung der personenbezogenen Daten hätte zur Folge, dass der Vertrag mit dem Betroffenen nicht geschlossen werden könnte. Vor einer Bereitstellung personenbezogener Daten durch den Betroffenen muss sich der Betroffene an einen unserer Mitarbeiter wenden. Unser Mitarbeiter klärt den Betroffenen einzelfallbezogen darüber auf, ob die Bereitstellung der personenbezogenen Daten gesetzlich oder vertraglich vorgeschrieben oder für den Vertragsabschluss erforderlich ist, ob eine Verpflichtung besteht, die personenbezogenen Daten bereitzustellen, und welche Folgen die Nichtbereitstellung der personenbezogenen Daten hätte. + + +### 13. Bestehen einer automatisierten Entscheidungsfindung {#13-dot-bestehen-einer-automatisierten-entscheidungsfindung} + +Als verantwortungsbewusstes Unternehmen verzichten wir auf eine automatische Entscheidungsfindung oder ein Profiling. + +Diese Datenschutzerklärung wurde durch den Datenschutzerklärungs-Generator der DGD Deutsche Gesellschaft für Datenschutz GmbH, die als Externer Datenschutzbeauftragter Köln tätig ist, in Kooperation mit dem Kölner Anwalt für Datenschutzrecht Christian Solmecke erstellt. diff --git a/content/legal.en.md b/content/legal.en.md new file mode 100644 index 0000000..2799fd8 --- /dev/null +++ b/content/legal.en.md @@ -0,0 +1,273 @@ ++++ +title = "Legal Notice & Privacy Policy" +date = 2000-01-01 +draft = false ++++ + +Welcome to the my Legal Notice page. Here, you'll find all the necessary legal information about my company and our privacy policy. I know legal details can be cumbersome, but it's essential to get these particulars squared away so we can focus on what we both love - technology! + + +## Legal Notice {#legal-notice} + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Germany + +Email: ping@m3tam3re.com + +Website: www.m3tam3re.com + + +## Privacy Policy {#privacy-policy} + +Privacy Policy +We are very delighted that you have shown interest in our enterprise. Data protection is of a particularly high priority for the management of Sascha König. The use of the Internet pages of Sascha König is possible without any indication of personal data; however, if a data subject wants to use special enterprise services via our website, processing of personal data could become necessary. If the processing of personal data is necessary and there is no statutory basis for such processing, we generally obtain consent from the data subject. + +The processing of personal data, such as the name, address, e-mail address, or telephone number of a data subject shall always be in line with the General Data Protection Regulation (GDPR), and in accordance with the country-specific data protection regulations applicable to Sascha König. By means of this data protection declaration, our enterprise would like to inform the general public of the nature, scope, and purpose of the personal data we collect, use and process. Furthermore, data subjects are informed, by means of this data protection declaration, of the rights to which they are entitled. + +As the controller, Sascha König has implemented numerous technical and organizational measures to ensure the most complete protection of personal data processed through this website. However, Internet-based data transmissions may in principle have security gaps, so absolute protection may not be guaranteed. For this reason, every data subject is free to transfer personal data to us via alternative means, e.g. by telephone. + + +### 1. Definitions {#1-dot-definitions} + +The data protection declaration of Sascha König is based on the terms used by the European legislator for the adoption of the General Data Protection Regulation (GDPR). Our data protection declaration should be legible and understandable for the general public, as well as our customers and business partners. To ensure this, we would like to first explain the terminology used. + +In this data protection declaration, we use, inter alia, the following terms: + + +#### a) Personal data {#a-personal-data} + +Personal data means any information relating to an identified or identifiable natural person (“data subject”). An identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier or to one or more factors specific to the physical, physiological, genetic, mental, economic, cultural or social identity of that natural person. + + +#### b) Data subject {#b-data-subject} + +Data subject is any identified or identifiable natural person, whose personal data is processed by the controller responsible for the processing. + + +#### c) Processing {#c-processing} + +Processing is any operation or set of operations which is performed on personal data or on sets of personal data, whether or not by automated means, such as collection, recording, organisation, structuring, storage, adaptation or alteration, retrieval, consultation, use, disclosure by transmission, dissemination or otherwise making available, alignment or combination, restriction, erasure or destruction. + + +#### d) Restriction of processing {#d-restriction-of-processing} + +Restriction of processing is the marking of stored personal data with the aim of limiting their processing in the future. + + +#### e) Profiling {#e-profiling} + +Profiling means any form of automated processing of personal data consisting of the use of personal data to evaluate certain personal aspects relating to a natural person, in particular to analyse or predict aspects concerning that natural person's performance at work, economic situation, health, personal preferences, interests, reliability, behaviour, location or movements. + + +#### f)Pseudonymisation {#fpseudonymisation} + +Pseudonymisation is the processing of personal data in such a manner that the personal data can no longer be attributed to a specific data subject without the use of additional information, provided that such additional information is kept separately and is subject to technical and organisational measures to ensure that the personal data are not attributed to an identified or identifiable natural person. + + +#### g) Controller or controller responsible for the processing {#g-controller-or-controller-responsible-for-the-processing} + +Controller or controller responsible for the processing is the natural or legal person, public authority, agency or other body which, alone or jointly with others, determines the purposes and means of the processing of personal data; where the purposes and means of such processing are determined by Union or Member State law, the controller or the specific criteria for its nomination may be provided for by Union or Member State law. + + +#### h) Processor {#h-processor} + +Processor is a natural or legal person, public authority, agency or other body which processes personal data on behalf of the controller. + + +#### i) Recipient {#i-recipient} + +Recipient is a natural or legal person, public authority, agency or another body, to which the personal data are disclosed, whether a third party or not. However, public authorities which may receive personal data in the framework of a particular inquiry in accordance with Union or Member State law shall not be regarded as recipients; the processing of those data by those public authorities shall be in compliance with the applicable data protection rules according to the purposes of the processing. + + +#### j) Third party {#j-third-party} + +Third party is a natural or legal person, public authority, agency or body other than the data subject, controller, processor and persons who, under the direct authority of the controller or processor, are authorised to process personal data. + + +#### k) Consent {#k-consent} + +Consent of the data subject is any freely given, specific, informed and unambiguous indication of the data subject's wishes by which he or she, by a statement or by a clear affirmative action, signifies agreement to the processing of personal data relating to him or her. + + +### 2. Name and Address of the controller {#2-dot-name-and-address-of-the-controller} + +Controller for the purposes of the General Data Protection Regulation (GDPR), other data protection laws applicable in Member states of the European Union and other provisions related to data protection is: + +Sascha König + +Bahnhofstrasse 4 + +09514 Lengefeld + +Deutschland + +Email: ping@m3tam3re.com + +Website: www.m3tam3re.com + + +### 3. Collection of general data and information {#3-dot-collection-of-general-data-and-information} + +The website of Sascha König collects a series of general data and information when a data subject or automated system calls up the website. This general data and information are stored in the server log files. Collected may be (1) the browser types and versions used, (2) the operating system used by the accessing system, (3) the website from which an accessing system reaches our website (so-called referrers), (4) the sub-websites, (5) the date and time of access to the Internet site, (6) an Internet protocol address (IP address), (7) the Internet service provider of the accessing system, and (8) any other similar data and information that may be used in the event of attacks on our information technology systems. + +When using these general data and information, Sascha König does not draw any conclusions about the data subject. Rather, this information is needed to (1) deliver the content of our website correctly, (2) optimize the content of our website as well as its advertisement, (3) ensure the long-term viability of our information technology systems and website technology, and (4) provide law enforcement authorities with the information necessary for criminal prosecution in case of a cyber-attack. Therefore, Sascha König analyzes anonymously collected data and information statistically, with the aim of increasing the data protection and data security of our enterprise, and to ensure an optimal level of protection for the personal data we process. The anonymous data of the server log files are stored separately from all personal data provided by a data subject. + + +### 4. Subscription to our newsletters {#4-dot-subscription-to-our-newsletters} + +On the website of Sascha König, users are given the opportunity to subscribe to our enterprise's newsletter. The input mask used for this purpose determines what personal data are transmitted, as well as when the newsletter is ordered from the controller. + +The Sascha König informs its customers and business partners regularly by means of a newsletter about enterprise offers. The enterprise's newsletter may only be received by the data subject if (1) the data subject has a valid e-mail address and (2) the data subject registers for the newsletter shipping. A confirmation e-mail will be sent to the e-mail address registered by a data subject for the first time for newsletter shipping, for legal reasons, in the double opt-in procedure. This confirmation e-mail is used to prove whether the owner of the e-mail address as the data subject is authorized to receive the newsletter. + +During the registration for the newsletter, we also store the IP address of the computer system assigned by the Internet service provider (ISP) and used by the data subject at the time of the registration, as well as the date and time of the registration. The collection of this data is necessary in order to understand the (possible) misuse of the e-mail address of a data subject at a later date, and it therefore serves the aim of the legal protection of the controller. + +The personal data collected as part of a registration for the newsletter will only be used to send our newsletter. In addition, subscribers to the newsletter may be informed by e-mail, as long as this is necessary for the operation of the newsletter service or a registration in question, as this could be the case in the event of modifications to the newsletter offer, or in the event of a change in technical circumstances. There will be no transfer of personal data collected by the newsletter service to third parties. The subscription to our newsletter may be terminated by the data subject at any time. The consent to the storage of personal data, which the data subject has given for shipping the newsletter, may be revoked at any time. For the purpose of revocation of consent, a corresponding link is found in each newsletter. It is also possible to unsubscribe from the newsletter at any time directly on the website of the controller, or to communicate this to the controller in a different way. + + +### 5. Newsletter-Tracking {#5-dot-newsletter-tracking} + +The newsletter of Sascha König contains so-called tracking pixels. A tracking pixel is a miniature graphic embedded in such e-mails, which are sent in HTML format to enable log file recording and analysis. This allows a statistical analysis of the success or failure of online marketing campaigns. Based on the embedded tracking pixel, Sascha König may see if and when an e-mail was opened by a data subject, and which links in the e-mail were called up by data subjects. + +Such personal data collected in the tracking pixels contained in the newsletters are stored and analyzed by the controller in order to optimize the shipping of the newsletter, as well as to adapt the content of future newsletters even better to the interests of the data subject. These personal data will not be passed on to third parties. Data subjects are at any time entitled to revoke the respective separate declaration of consent issued by means of the double-opt-in procedure. After a revocation, these personal data will be deleted by the controller. The Sascha König automatically regards a withdrawal from the receipt of the newsletter as a revocation. + + +### 6. Comments function in the blog on the website {#6-dot-comments-function-in-the-blog-on-the-website} + +The Sascha König offers users the possibility to leave individual comments on individual blog contributions on a blog, which is on the website of the controller. A blog is a web-based, publicly-accessible portal, through which one or more people called bloggers or web-bloggers may post articles or write down thoughts in so-called blogposts. Blogposts may usually be commented by third parties. + +If a data subject leaves a comment on the blog published on this website, the comments made by the data subject are also stored and published, as well as information on the date of the commentary and on the user's (pseudonym) chosen by the data subject. In addition, the IP address assigned by the Internet service provider (ISP) to the data subject is also logged. This storage of the IP address takes place for security reasons, and in case the data subject violates the rights of third parties, or posts illegal content through a given comment. The storage of these personal data is, therefore, in the own interest of the data controller, so that he can exculpate in the event of an infringement. This collected personal data will not be passed to third parties, unless such a transfer is required by law or serves the aim of the defense of the data controller. + + +### 7. Routine erasure and blocking of personal data {#7-dot-routine-erasure-and-blocking-of-personal-data} + +The data controller shall process and store the personal data of the data subject only for the period necessary to achieve the purpose of storage, or as far as this is granted by the European legislator or other legislators in laws or regulations to which the controller is subject to. + +If the storage purpose is not applicable, or if a storage period prescribed by the European legislator or another competent legislator expires, the personal data are routinely blocked or erased in accordance with legal requirements. + + +### 8. Rights of the data subject {#8-dot-rights-of-the-data-subject} + + +#### a) Right of confirmation {#a-right-of-confirmation} + +Each data subject shall have the right granted by the European legislator to obtain from the controller the confirmation as to whether or not personal data concerning him or her are being processed. If a data subject wishes to avail himself of this right of confirmation, he or she may, at any time, contact any employee of the controller. + + +#### b) Right of access {#b-right-of-access} + +Each data subject shall have the right granted by the European legislator to obtain from the controller free information about his or her personal data stored at any time and a copy of this information. Furthermore, the European directives and regulations grant the data subject access to the following information: + +the purposes of the processing; +the categories of personal data concerned; +the recipients or categories of recipients to whom the personal data have been or will be disclosed, in particular recipients in third countries or international organisations; +where possible, the envisaged period for which the personal data will be stored, or, if not possible, the criteria used to determine that period; +the existence of the right to request from the controller rectification or erasure of personal data, or restriction of processing of personal data concerning the data subject, or to object to such processing; +the existence of the right to lodge a complaint with a supervisory authority; +where the personal data are not collected from the data subject, any available information as to their source; +the existence of automated decision-making, including profiling, referred to in Article 22(1) and (4) of the GDPR and, at least in those cases, meaningful information about the logic involved, as well as the significance and envisaged consequences of such processing for the data subject. +Furthermore, the data subject shall have a right to obtain information as to whether personal data are transferred to a third country or to an international organisation. Where this is the case, the data subject shall have the right to be informed of the appropriate safeguards relating to the transfer. + +If a data subject wishes to avail himself of this right of access, he or she may, at any time, contact any employee of the controller. + + +#### c) Right to rectification {#c-right-to-rectification} + +Each data subject shall have the right granted by the European legislator to obtain from the controller without undue delay the rectification of inaccurate personal data concerning him or her. Taking into account the purposes of the processing, the data subject shall have the right to have incomplete personal data completed, including by means of providing a supplementary statement. + +If a data subject wishes to exercise this right to rectification, he or she may, at any time, contact any employee of the controller. + + +#### d) Right to erasure (Right to be forgotten) {#d-right-to-erasure--right-to-be-forgotten} + +Each data subject shall have the right granted by the European legislator to obtain from the controller the erasure of personal data concerning him or her without undue delay, and the controller shall have the obligation to erase personal data without undue delay where one of the following grounds applies, as long as the processing is not necessary: + +The personal data are no longer necessary in relation to the purposes for which they were collected or otherwise processed. +The data subject withdraws consent to which the processing is based according to point (a) of Article 6(1) of the GDPR, or point (a) of Article 9(2) of the GDPR, and where there is no other legal ground for the processing. +The data subject objects to the processing pursuant to Article 21(1) of the GDPR and there are no overriding legitimate grounds for the processing, or the data subject objects to the processing pursuant to Article 21(2) of the GDPR. +The personal data have been unlawfully processed. +The personal data must be erased for compliance with a legal obligation in Union or Member State law to which the controller is subject. +The personal data have been collected in relation to the offer of information society services referred to in Article 8(1) of the GDPR. +If one of the aforementioned reasons applies, and a data subject wishes to request the erasure of personal data stored by Sascha König, he or she may, at any time, contact any employee of the controller. An employee of Sascha König shall promptly ensure that the erasure request is complied with immediately. + +Where the controller has made personal data public and is obliged pursuant to Article 17(1) to erase the personal data, the controller, taking account of available technology and the cost of implementation, shall take reasonable steps, including technical measures, to inform other controllers processing the personal data that the data subject has requested erasure by such controllers of any links to, or copy or replication of, those personal data, as far as processing is not required. An employees of Sascha König will arrange the necessary measures in individual cases. + + +#### e) Right of restriction of processing {#e-right-of-restriction-of-processing} + +Each data subject shall have the right granted by the European legislator to obtain from the controller restriction of processing where one of the following applies: + +The accuracy of the personal data is contested by the data subject, for a period enabling the controller to verify the accuracy of the personal data. +The processing is unlawful and the data subject opposes the erasure of the personal data and requests instead the restriction of their use instead. +The controller no longer needs the personal data for the purposes of the processing, but they are required by the data subject for the establishment, exercise or defence of legal claims. +The data subject has objected to processing pursuant to Article 21(1) of the GDPR pending the verification whether the legitimate grounds of the controller override those of the data subject. +If one of the aforementioned conditions is met, and a data subject wishes to request the restriction of the processing of personal data stored by Sascha König, he or she may at any time contact any employee of the controller. The employee of Sascha König will arrange the restriction of the processing. + + +#### f) Right to data portability {#f-right-to-data-portability} + +Each data subject shall have the right granted by the European legislator, to receive the personal data concerning him or her, which was provided to a controller, in a structured, commonly used and machine-readable format. He or she shall have the right to transmit those data to another controller without hindrance from the controller to which the personal data have been provided, as long as the processing is based on consent pursuant to point (a) of Article 6(1) of the GDPR or point (a) of Article 9(2) of the GDPR, or on a contract pursuant to point (b) of Article 6(1) of the GDPR, and the processing is carried out by automated means, as long as the processing is not necessary for the performance of a task carried out in the public interest or in the exercise of official authority vested in the controller. + +Furthermore, in exercising his or her right to data portability pursuant to Article 20(1) of the GDPR, the data subject shall have the right to have personal data transmitted directly from one controller to another, where technically feasible and when doing so does not adversely affect the rights and freedoms of others. + +In order to assert the right to data portability, the data subject may at any time contact any employee of Sascha König. + + +#### g) Right to object {#g-right-to-object} + +Each data subject shall have the right granted by the European legislator to object, on grounds relating to his or her particular situation, at any time, to processing of personal data concerning him or her, which is based on point (e) or (f) of Article 6(1) of the GDPR. This also applies to profiling based on these provisions. + +The Sascha König shall no longer process the personal data in the event of the objection, unless we can demonstrate compelling legitimate grounds for the processing which override the interests, rights and freedoms of the data subject, or for the establishment, exercise or defence of legal claims. + +If Sascha König processes personal data for direct marketing purposes, the data subject shall have the right to object at any time to processing of personal data concerning him or her for such marketing. This applies to profiling to the extent that it is related to such direct marketing. If the data subject objects to Sascha König to the processing for direct marketing purposes, Sascha König will no longer process the personal data for these purposes. + +In addition, the data subject has the right, on grounds relating to his or her particular situation, to object to processing of personal data concerning him or her by Sascha König for scientific or historical research purposes, or for statistical purposes pursuant to Article 89(1) of the GDPR, unless the processing is necessary for the performance of a task carried out for reasons of public interest. + +In order to exercise the right to object, the data subject may contact any employee of Sascha König. In addition, the data subject is free in the context of the use of information society services, and notwithstanding Directive 2002/58/EC, to use his or her right to object by automated means using technical specifications. + + +#### h) Automated individual decision-making, including profiling {#h-automated-individual-decision-making-including-profiling} + +Each data subject shall have the right granted by the European legislator not to be subject to a decision based solely on automated processing, including profiling, which produces legal effects concerning him or her, or similarly significantly affects him or her, as long as the decision (1) is not is necessary for entering into, or the performance of, a contract between the data subject and a data controller, or (2) is not authorised by Union or Member State law to which the controller is subject and which also lays down suitable measures to safeguard the data subject's rights and freedoms and legitimate interests, or (3) is not based on the data subject's explicit consent. + +If the decision (1) is necessary for entering into, or the performance of, a contract between the data subject and a data controller, or (2) it is based on the data subject's explicit consent, Sascha König shall implement suitable measures to safeguard the data subject's rights and freedoms and legitimate interests, at least the right to obtain human intervention on the part of the controller, to express his or her point of view and contest the decision. + +If the data subject wishes to exercise the rights concerning automated individual decision-making, he or she may, at any time, contact any employee of Sascha König. + + +#### i) Right to withdraw data protection consent {#i-right-to-withdraw-data-protection-consent} + +Each data subject shall have the right granted by the European legislator to withdraw his or her consent to processing of his or her personal data at any time. + +If the data subject wishes to exercise the right to withdraw the consent, he or she may, at any time, contact any employee of Sascha König. + + +### 9. Legal basis for the processing {#9-dot-legal-basis-for-the-processing} + +Art. 6(1) lit. a GDPR serves as the legal basis for processing operations for which we obtain consent for a specific processing purpose. If the processing of personal data is necessary for the performance of a contract to which the data subject is party, as is the case, for example, when processing operations are necessary for the supply of goods or to provide any other service, the processing is based on Article 6(1) lit. b GDPR. The same applies to such processing operations which are necessary for carrying out pre-contractual measures, for example in the case of inquiries concerning our products or services. Is our company subject to a legal obligation by which processing of personal data is required, such as for the fulfillment of tax obligations, the processing is based on Art. 6(1) lit. c GDPR. In rare cases, the processing of personal data may be necessary to protect the vital interests of the data subject or of another natural person. This would be the case, for example, if a visitor were injured in our company and his name, age, health insurance data or other vital information would have to be passed on to a doctor, hospital or other third party. Then the processing would be based on Art. 6(1) lit. d GDPR. Finally, processing operations could be based on Article 6(1) lit. f GDPR. This legal basis is used for processing operations which are not covered by any of the abovementioned legal grounds, if processing is necessary for the purposes of the legitimate interests pursued by our company or by a third party, except where such interests are overridden by the interests or fundamental rights and freedoms of the data subject which require protection of personal data. Such processing operations are particularly permissible because they have been specifically mentioned by the European legislator. He considered that a legitimate interest could be assumed if the data subject is a client of the controller (Recital 47 Sentence 2 GDPR). + + +### 10. The legitimate interests pursued by the controller or by a third party {#10-dot-the-legitimate-interests-pursued-by-the-controller-or-by-a-third-party} + +Where the processing of personal data is based on Article 6(1) lit. f GDPR our legitimate interest is to carry out our business in favor of the well-being of all our employees and the shareholders. + + +### 11. Period for which the personal data will be stored {#11-dot-period-for-which-the-personal-data-will-be-stored} + +The criteria used to determine the period of storage of personal data is the respective statutory retention period. After expiration of that period, the corresponding data is routinely deleted, as long as it is no longer necessary for the fulfillment of the contract or the initiation of a contract. + + +### 12. Provision of personal data as statutory or contractual requirement; Requirement necessary to enter into a contract; Obligation of the data subject to provide the personal data; possible consequences of failure to provide such data {#12-dot-provision-of-personal-data-as-statutory-or-contractual-requirement-requirement-necessary-to-enter-into-a-contract-obligation-of-the-data-subject-to-provide-the-personal-data-possible-consequences-of-failure-to-provide-such-data} + +We clarify that the provision of personal data is partly required by law (e.g. tax regulations) or can also result from contractual provisions (e.g. information on the contractual partner). Sometimes it may be necessary to conclude a contract that the data subject provides us with personal data, which must subsequently be processed by us. The data subject is, for example, obliged to provide us with personal data when our company signs a contract with him or her. The non-provision of the personal data would have the consequence that the contract with the data subject could not be concluded. Before personal data is provided by the data subject, the data subject must contact any employee. The employee clarifies to the data subject whether the provision of the personal data is required by law or contract or is necessary for the conclusion of the contract, whether there is an obligation to provide the personal data and the consequences of non-provision of the personal data. + + +### 13. Existence of automated decision-making {#13-dot-existence-of-automated-decision-making} + +As a responsible company, we do not use automatic decision-making or profiling. + +Developed by the specialists for LegalTech at Willing & Able that also developed the system for data protection training. The legal texts contained in our privacy policy generator have been provided and published by Prof. Dr. h.c. Heiko Jonny Maniero from the German Association for Data Protection and Christian Solmecke from WBS law. diff --git a/content/posts/#v1-docker-n8n-setup.de.md# b/content/posts/#v1-docker-n8n-setup.de.md# new file mode 100644 index 0000000..17a0515 --- /dev/null +++ b/content/posts/#v1-docker-n8n-setup.de.md# @@ -0,0 +1,375 @@ +--- +title: "#1: Docker, Portainer und n8n installieren" +date: 2022-03-28 +draft: false +series: ["YouTube", "n8n"] +categories: ["Tutorials"] +tags: ["docker", "n8n", "caddy", "portainer", "installation", "tutorial"] +--- + +Ich will mich jetzt nicht allzu lange mit einer Einführung aufhalten. Ich denke es gibt viele gute Videos zu den Themen, die ich hier besprechen werde. Ich möchte Euch hier gar nicht zeigen, wie man Tools wie Docker oder ähnliches benutzt. Viel mehr zeige ich hier ein paar konkrete Lösungsansätze, die ich so oder in abgewandelter Form auch tatsächlich in unserer Firma einsetze. + +Für einen großen Teil der hier gezeigten Videos wird ein Setup aus **Docker, Caddy, Portainer und n8n** notwendig sein. Ich werde mich hier was die Installation und Konfiguration auf das wesentliche beschränken. Ich denke es gibt mehr als genug Tutorials und Videos zu jedem dieser Themen 😉 + +## Subdomains & DNS einrichten + +Da ich später Portainer und n8n über separate Subdomains aufrufen möchte und es manchmal ein wenig dauert bis Änderungen an Domains angewendet sind mache ich die Einstellung der Subdomains zuerst. Ich zeige das hier am Beispiel von GoDaddy, weil ich hier meine Domains registriert habe. + +### DNS Einträge erstellen + +Ihr müsst in der Verwaltung Eurer Domain in de DNS Einstellungen gehen. Im Fall von GoDaddy nach dem Login einfach oben rechts auf Euren Namen klicken und dann **Meine Produkte** wählen. Anschließend könnt Ihr Eure Domain verwalten: + +![Domain verwalten](/img/yt-1/godaddy-dns1.png "Domain verwalten") + +Jetzt entweder auf das Menü bei der Domain Karte klicken oder unten auf DNS. + +Die DNS Einstellung ist denkbar einfach. Ihr müsst hier einen _A-Record_ und lediglich das Prefix für die Subdomain und die IP-Adresse Eures Servers angeben. Den TTL Wert könnt Ihr so einstellen, wie es für Euch Sinn macht, ich nehme hier immer 600 Sekunden. + +![Domain verwalten](/img/yt-1/godaddy-dns2.png "DNS einstellen") + +#vata=# Installation von Docker + +```bash +# Unter Arch Linux, Manjaro etc: +sudo pacman -S docker docker-compose + +# Unter Debian, Ubuntu etc: +sudo apt-get update && apt-get install docker docker-compose +``` + +```sh +sudo groupadd docker # Optional: bei den meisten Distributionen wird die Gruppe bei der Installation angelegt +sudo systemctl enable --now docker +``` + +### Berechtigungen und Ordner erstellen + +Ich mache es gerne so, dass ich meinen Hauptbenutzer der _docker_ Gruppe hinzufüge, dadurch muss ich beim ausführen von Docker-Befehlen nicht immer das Admin-Kennwort eingeben. +Je nachdem welche Shell Ihr einsetzt ist der Befehl ein klein wenig anders. Wenn Ihr nicht wisst welche Shell Ihr nutzt wird das mit Sicherheit _Bash_ sein: + +**Bash** + +```sh +sudo usermod -a -G docker "$(whoami)" +``` + +Oder **Fish** + +```sh +sudo usermod -a -G docker (whoami) +``` + +Jetzt den Ordner erstellen wo Docker Konfigurationen etc. abgelegt werden sollen. Ich habe mich hier für den Ordner _/opt/docker-services_ entschieden. + +```sh +sudo mkdir -m 775 /opt/docker-services +``` + +Und nun die Berechtigungen einstellen: + +**Bash** + +```sh +sudo chown $(whoami):docker /opt/docker-services +``` + +**Fish** + +```sh +sudo chown (whoami):docker /opt/docker-services +``` + +## Repository für Caddy, Portainer und n8 klonen und anpassen + +Um die Installation einfacher zu machen habe ich ein Repository vorbereitet wodurch eigentlich nur noch ein paar Werte angepasst werden müssen und wir dann direkt loslegen können: + +```sh +git clone git@git.sr.ht:~m3tam3re/yt1-docker-caddy-portainer-n8n /opt/docker-services +``` + +Hier eventuell den letzten Teil durch den Ordner ersetzen in dem Du die Daten für Deine Docker Services ablegen möchtest. Das ganze sollte dann von der Struktur her so aussehen: + +```sh +/opt/docker-services: +├── LICENSE +├── n8n +│   ├── docker-compose.yml +│   ├── DockerFile +│   └── README.md +├── portainer-caddy +│   ├── Caddyfile +│   └── docker-compose.yml +└── README.md +``` + +## Installation von Caddy und Portainer + +Caddy und Portainer sind die Basis für unser Setup. Dabei nutzen wir Caddy als Reverse-Proxy,der dafür zuständig Anfragen an jeweils entsprechenden Docker Container weiterzuleiten. Alternativ könnte man hier auch Traefik oder NGINX einsetzen, aber Caddy ist hier im Vergleich wesentlich einfacher zu konfigurieren. + +Portainer ist ein Webinterface, dass die Verwaltung von Docker Containern sehr einfach macht. Portainer ist im Grunde optional und eine gute Alternative für alle, die ungern mit dem Terminal arbeiten. + +### Caddy installieren + +Die Caddy Installation ist relativ einfach. Da mein Server Arch Linux als Betriebssystem hat wird Caddy über pacman installiert: + +```sh +sudo pacman -Syu caddy +``` + +In Ubuntu oder anderen Debian basierten Distributionen ist die Installation ein klein wenig umständlicher: + +```sh +sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo tee /etc/apt/trusted.gpg.d/caddy-stable.asc + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list + +sudo apt update + +sudo apt install caddy +``` + +Eigentlich wird Caddy nach der Installation automatisch gestartet, falls nicht einfach nochmal: + +``` +caddy start +``` + +Sollte Caddy schon laufen kommt hier ein Fehler. Den könnt Ihr einfach ignorieren. + +### Caddy und Portainer einrichten + +Ich hatte ja ganz oben unter der Überschrift [Subdomains & DNS einrichten](#subdomains--dns-einrichten) darüber gesprochen, dass ich Portainer und n8n über separate Subdomains aufrufen möchte. Damit das funktioniert müssen wir Caddy als Reverse-Proxy konfigurieren. Dazu bearbeiten wir das Caddyfile. In meinem Setup habe ich die Domain _ca.m3tam3re.com_ für Portainer eingeplant und _io.m3tam3re.com_ für n8n. Das Caddyfile sieht dann so aus: + +```json +ca.m3tam3re.com { + reverse_proxy localhost:9000 +} +io.m3tam3re.com { + reverse_proxy localhost:5678 +} +``` + +Wie man sieht ist die Caddy Konfiguration denkbar einfach. Hier solltet Ihr natürlich Eure eigenen Domains verwenden 😄 + +### Conatiner Stack starten + +Jetzt können wir die Container erstellen und starten. Dazu erstmal das Verzechnis wechseln wo sich die Datei _docker-compose.yml_ aus dem Repository befindet: + +```sh +cd /opt/docker-services/portainer-caddy +``` + +Da ich in der _docker-compose.yml_ ein externes Netzwerk angelegt habe muss das Netzwerk _web_ noch angelegt werden: + +```sh +docker network create web +``` + +Jetzt den Container Stack starten: + +```sh +docker-compose up -d +``` + +Wenn Ihr jetzt **docker ps** eingebt sollte das ungefähr so aussehen: + +```sh +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f4b9f9302962 portainer/portainer-ce:latest "/portainer -H unix:…" 4 minutes ago Up 4 minutes 8000/tcp, 9443/tcp, 127.0.0.1:9000->9000/tcp portainer-caddy-portainer-1 +``` + +### Caddy Konfiguration für den Container Stack laden + +Das _Caddyfile_, dass wir zuvor angepasst haben kann jetzt von caddy geladen werden: + +```sh +caddy reload +``` + +### Eventuell Caddy Berechtigungen einstellen + +Je nachdem wie das Betriebssystem konfiguriert ist kann es sein, dass Caddy erst die Berechtigung braucht um die Ports 80 und 443 an sich zu binden. Wenn Ihr **caddy reload** im Terminal ausführt wird Caddy das als Fehler ausgeben. + +```sh +tcp :443: bind: permission denied +``` + +Die Berechtigung setzt Ihr wie folgt: + +**Bash** + +```sh +sudo setcap CAP_NET_BIND_SERVICE=+eip $(which caddy) +``` + +**Fish** + +```sh +sudo setcap CAP_NET_BIND_SERVICE=+eip (which caddy) +``` + +Also nochmal: + +```sh +caddy reload +``` + +Das schöne an Caddy ist übrigens, dass ich in verschiedenen Ordnern _Caddyfiles_ mit unterschiedlichen Einstellungen haben kann und per _caddy reload_ einfach laden kann ohne Neustart des Serverdienstes. + +## Grundeinrichtung von Portainer + +Da jetzt alles laufen sollte 🚀 könnt Ihr jetzt Portainer im Browser ausfrufen. In meinem Fall ist das _ca.m3tam3re.com_. + +Ihr solltet jetzt Eure Administrator Daten für Portainer setzen können: +![Portainer - Admin Konto erstellen](/img/yt-1/portainer-admin.png "Admin Konto erstellen") + +Wenn Ihr Euer Admin-Konto eingerichtet habt werden Ihr auch direkt angemeldet und wir sind jetzt startklar für 🚀 n8n 🚀. + +![Portainer - erstes Login](/img/yt-1/portainer-start.png "erstes Login") + +## Installation von n8n + +Jetzt wo das grundsätzliche Setup fertig ist können wir endlich unseren ersten Container starten. Ich zeige hier zwei Möglichkeiten, welche Ihr davon nehmt ist Euch überlassen. + +### 1. Mit docker-compose über das Terminal + +Auch wenn wir gerade Portainer installiert haben, habe ich das Repository so vorbereitet, dass das ganze auch ohne Portainer einfach einzurichten ist. Also los geht's: + +#### Umgebungsvariablen anpassen + +Zuerst müssen wir in den Ordner **n8n** unseres Repositories wechseln: + +```sh +cd ../n8n +``` + +Das Verzeichnis sollte so aussehen. + +```sh +/opt/docker-services/n8n +├── docker-compose.yml +├── DockerFile +└── .env +``` + +Öffnet die Datei **.env** und passt die Werte entsprechend an. Bei mir sieht das z.B. so aus: + +```sh +# TLD - Deine Hauptdomain auf der n8n laufen wird +DOMAIN_NAME=m3tam3re.com + +# Die Subdomain für n8n +SUBDOMAIN=io + +# DOMAIN_NAME und SUBDOMAIN bestimmen in Kombination wie n8n erreichbar sein wird +# im oben stehende Beispiel wäre das: https://n8n.deine-domain-hier.com + +# Der Benutzername für die Anmeldung - BITTE ÄNDERN! +N8N_BASIC_AUTH_USER=admin + +# Das Kennwort für die Anmeldung - BITTE ÄNDERN! +N8N_BASIC_AUTH_PASSWORD=gehtDichNixAn0815 + +# Hier kannst Du die Zeitzone setzen, das ist z.B. für CRON Aufgaben wichtig +# Wenn nicht gesetzt wird New York gesetzt +GENERIC_TIMEZONE=Europe/Berlin + +# Erlaubt das Importieren und Nutzen von internen Modulen in Funktions-Nodes +NODE_FUNCTION_ALLOW_BUILTIN=* + +# Erlaubt das Importieren und Nutzen von externen Modulen in Funktions-Nodes +NODE_FUNCTION_ALLOW_EXTERNAL=* +``` + +Da n8n in dieser Konstellation Probleme mit den Berechtigungen bei regulären Docker Volumes bekommt müssen wir noch einen Ordner für die permanente Speicherung der Daten von n8n anlegen: + +```sh +mkdir n8n-data +``` + +**Bash:** + +```sh +chown $(whoami):docker n8n-data +``` + +**Fish:** + +```sh +chown (whoami):docker n8n-data +``` + +Das war es auch schon. Jetzt können wir den Stack starten: + +```sh +docker-compose up -d +``` + +### 2. n8n über Portainer einrichten + +#### Ordner für die permanente Speicherung von Daten anlegen + +Zuerst müssen wir auch bei dieser Variante in den Ordner **n8n** unseres Repositories wechseln: + +```sh +cd ../n8n +``` + +```sh +mkdir n8n-data +``` + +**Bash:** + +```sh +chown $(whoami):docker n8n-data +``` + +**Fish:** + +```sh +chown (whoami):docker n8n-data +``` + +#### Den n8n Stack in Portainer erstellen + +![Portainer - n8n Stack erstellen](/img/yt-1/n8n-stack-erstellen.png "n8n Stack erstellen") + +Wenn Ihr auf **Add stack** geklickt habt bekommt Ihr das Konfigurationsfenster für den Stack angezeigt: +![Portainer - n8n Stack konfigurieren](/img/yt-1/n8n-stack-config.png "n8n Stack konfigurieren") + +Hier gibt es eigentlich nur ein paar Dinge einzustellen: + +1. Den Namen für den Stack festlegen +2. Den Inhalt der Datei **n8n/docker-compose.yml** in den Webeditor kopieren oder die Datei über den **Upload** Tab hochladen +3. Die Datei **n8n/.env** hochladen + +![Portainer - n8n Umgebungsvariablen setzen](/img/yt-1/n8n-stack-env.png "Umgebungsvariablen setzen") + +Ihr braucht die Datei _.env_ nicht vorher anpassen. Portainer erlaubt Euch hier zuvor die Werte anzupassen. +Jetzt mit einem Klick auf **Deploy the stack** den Stack starten. + +### n8n einrichten + +Endlich geschafft 🚀 😄. Ich muss zugeben, dass mir auch so langsam die Puste ausgeht. Das alles einmal aufzuschreiben dauert doch sehr viel länger als ich dachte 🤣. + +Jetzt könnt Ihr die Domain für n8n aufrufen. In meinem Beispiel ist das **io.m3tam3re.com** und den admin Account einrichten: + +![n8n - Admin erstellen](/img/yt-1/n8n-admin.png "n8n Admin erstellen") + +Jetzt könnt Ihr Euch anmelden und landet auf der Seite für die Workflowerstellung. Wer möchte kann hier einfach einmal in den Templates stöbern. n8n bietet jede Menge fertige Vorlagen für die Automatisierng von Aufgaben 😄 + +![n8n - Templates](/img/yt-1/n8n-templates.png "n8n Templates") + +Das war's 🚀 + +## Abschluss + +Noch ein paar abschließende Kommentare 😄: + +1. In vielen Videos wird derzeit sehr oft die Kombination Docker und Traefik gezeigt und angepriesen. Traefik ist ein großartiges Programm und ich würde es bedenkenlos jedem empfehlen. Der Grund warum ich aber hier stattdessen Caddy verwende ist, dass Caddy sehr viel einfacher zu konfigurieren ist und auch viele Dinge einfacher macht. Z.B. werden über Caddy automatisch gültige SSL-Zertifikate für die Domains erstellt, was bei Traefik für jede Domain konfiguriert werde muss. + Im Produktiveinsatz macht es natürlich Sinn Caddy als Service zu starten und die Konfiguration über die REST-Api von Caddy vorzunehmen. Für dieses und auch noch folgende Beispiele ist die hier gezeigte Einstellung aber vollkommen ausreichend 😄 + +2. Ich setze ganz bewusst das Image n8n-debian ein. Ich weiß, dass Alpine-basierte Container wesentlich kleiner sind, aber es kommt hier gerade nicht auf den Speicherplatz an. Mit dem Debian Image habe ich Zugriff auf eine riesige Datenbank von Binaries die ich im Handumdrehen installieren und nutzen kann. Würde ich den Alpine Container nehmen müsste ich wahrscheinlich so einiges aus dem Quellcode kompilieren, weil es sehr viel weniger Pakete gibt. diff --git a/content/posts/100days.de.md b/content/posts/100days.de.md new file mode 100644 index 0000000..f68b7eb --- /dev/null +++ b/content/posts/100days.de.md @@ -0,0 +1,37 @@ +--- +title: "Der Weg zurück in den Alltag" +date: 2020-08-17 +draft: true +tags: ["blabla","life","misc"] +series: ["#100DaysToOffload"] +--- +# Es geht wieder los + +Nachdem ich letzte Woche Urlaub hatte, kommt es mir gerade unermesslich schwer vor wieder in meinen Arbeitsalltag zu finden. +Eigentlich sollte ich jetzt hier sitzen und an dem Backend für einen GRPC Service für unsere Buchhaltung arbeiten. Ich habe auch +brav meinen Code Editor geöffnet und wollte motiviert loslegen, aber finde nicht wirklich ran. + +Mich dazu zu zwingen bringt mich gerade nicht wirklich weiter, also habe ich mich entschieden bei [#100DaysToOffload](https://100daystooffload.com) mitzumachen. +Das hilft mir nicht beim Fertigstellen meines Projektes, aber bestimmt dabei regelmäßig etwas zu schreiben. + +## Es waren doch nur 5 Tage + +Eigentlich hatte ich mir für meinen Urlaub vorgenommen ein privates Coding Projekt voranzubringen. Leider kamen 2 Dinge dazwischen: + +1. Meine Frau wollte renovieren ... na juhu +2. In der Zeit wo ich nicht renoviert habe, habe ich mich in Dead by Daylight festgebissen + +Normalerweise spiele ich zurzeit nur noch 1x die Woche. Stattdessen investiere ich durchaus einiges in andere Aktivitäten, wie lernen, Sport etc. +Trotzdem glaube ich, dass die Ausnahme gut und notwendig war...und Spaß hat es ja auch gemacht 😎 + +## Ab morgen wieder anders + +Ich hatte gestern Abend den festen Entschluss heute "so richtig loszulegen". Das hat anfänglich gut funktioniert. Ich bin um 4:45 Uhr aufgestanden und hatte ca. gegen 7:00 Uhr alles abgearbeitet was sich im Urlaub angesammelt hat. +Was dann passiert ist, habe ich ja schon geschrieben 😅 + +Für morgen sieht der Plan dann wieder anders aus: +* konzentriert für mindestens 4 Stunden an meinem Projekt coden ++ idealerweise gleich den zweiten Post für #100DaysToOffload schreiben +* wir werden sehen ... + +Dieser Beitrag ist **Teil 1** von 100 Days To Offload. Wenn Du mitmachen willst besuche https://100daystooffload.com diff --git a/content/posts/100days.en.md b/content/posts/100days.en.md new file mode 100644 index 0000000..2b3e324 --- /dev/null +++ b/content/posts/100days.en.md @@ -0,0 +1,36 @@ +--- +title: "Back to business" +date: 2020-08-17 +draft: true +tags: ["blabla","life","misc"] +series: ["#100DaysToOffload"] +--- +# Let's get started + +After taking vacation last week, it is just now immeasurably difficult to find my way back into my daily work. +Actually, I should be sitting here now and working on the backend for a GRPC service for our accounting. I opened my code editor and wanted to get started with motivation, but couldn't really find into the code. + +Forcing myself to do it doesn't really help me right now, so I decided to take part in [# 100DaysToOffload] (https://100daystooffload.com). +It doesn't help me finish my project, but it certainly helps me to write something regularly. + +## Only 5 days of vacation + +Actually, I had planned to advance a private coding project for my vacation. Unfortunately, 2 things came up: + +1. My wife wanted to renovate ... oh yeah +2. During the time I wasn't renovating, I got sucked into Dead by Daylight + +Usually I play videogames only once or twice a week at the moment. Instead, I invest quite a bit in other activities, such as learning, sports, etc. +Nevertheless, I believe that the exception was good and necessary ... and it was fun too 😎 + +## Try again from tomorrow + +Yesterday evening I made the decision to "really get started" today. That worked well initially. I got up at 4:45 a.m. and around 7:00 a.m. worked through everything that had accumulated on vacation. +I've already written what happened then 😅 + +For tomorrow the plan looks different again: +* Coding my project for at least 4 hours ++ ideally write the second post for # 100DaysToOffload right away +* we will see ... + +This post is **part 1** of 100 Days To Offload. If you want to participate, visit https://100daystooffload.com diff --git a/content/posts/21-01-04.de.md b/content/posts/21-01-04.de.md new file mode 100644 index 0000000..dcef0ae --- /dev/null +++ b/content/posts/21-01-04.de.md @@ -0,0 +1,20 @@ +--- +title: "Optimierung meiner Wochenplanung" +date: 2021-04-01 +draft: true +tags: ["blabla","produktivität"] +series: [""] +--- +Ich habe kürzlich ja schon eine [Änderung meiner Wochenplanung](https://www.m3tam3re.com/2021/21-28-03/) vorgenommen. Die Wochenplanung mit Omnifocus ist auf jeden Fall eine große Hilfe, aber so richtig zufrieden bin ich damit noch nicht. + +Ich nehme mir zwar sonntags ca. eine Stunde Zeit und gehe alle Aufgaben durch, die ich in der kommenden Woche erledigen möchte, aber das ganze ist noch ein wenig zu locker. + +### Was fehlt der Wochenplanung noch? + +- detaillierte Planung der Aufgaben mit Vorausplanung was ich an welchem Tag erledigen möchte +- Vorausplanung Sport, d.h. mit Details zu den Workouts, die ich in der kommenden Woche machen möchte +- konkrete Planung an welchem Tag ich was in meinem Programmierprojekt erreichen will + +Ich muss mir glaube ich noch einmal die Regeln für die Wochenplanung festlegen. + + diff --git a/content/posts/21-01-04.en.md b/content/posts/21-01-04.en.md new file mode 100644 index 0000000..57b1dee --- /dev/null +++ b/content/posts/21-01-04.en.md @@ -0,0 +1,20 @@ +--- +title: "Optimizing my weekly schedule" +date: 2021-04-01 +draft: true +tags: ["blabla","productivity"] +series: [""] +--- +I recently made a [change to my weekly schedule](https://www.m3tam3re.com/2021/21-28-03/). The weekly planning with Omnifocus is definitely a great help, but I'm not really satisfied with it yet. + +I take about an hour on Sundays and go through all the tasks that I want to do in the coming week, but the whole thing is still a little too loose. + +### What is still missing from the weekly planning? + +- detailed planning of the tasks with advance planning of what I want to do on which day +- plan sports in advance, i.e. with details of the workouts I want to do in the coming week +- concrete planning on which day I want to achieve what in my programming project + +I think I have to define the rules for weekly planning again. + + diff --git a/content/posts/21-02-04.de.md b/content/posts/21-02-04.de.md new file mode 100644 index 0000000..6a3012d --- /dev/null +++ b/content/posts/21-02-04.de.md @@ -0,0 +1,26 @@ +--- +title: "Vielleicht doch lieber englisch?" +date: 2021-04-02 +draft: true +tags: ["blabla"] +series: ["#100DaysToOffload"] +--- +Ich überlege gerade, ob ich mir die Übersetzung ins englische erspare und stattdessen nur noch auf englisch schreibe. Das würde nicht nur Zeit sparen, sondern +ich würde auch mehr dabei lernen. Jetzt ist es oft so, dass ich mich beeile, weil ich ja noch übersetzen muss. + +Ich bin noch etwas hin- und hergerissen. Vielleicht hilft eine Liste? + +## Deutsch & Englisch +- **+** es ist eigentlich ganz nett, dass es auch deutschen Content im Internet gibt +- **+** nicht jeder kann englisch +- **-** mehr Arbeit +- **-** eigentlich fühle ich mich in der englischen Sprache *wohler* + +## Nur Englisch +- **+** mein Englisch wird besser, wenn ich direkt in der Sprache denke und schreibe +- **+** ich galube, dass Englisch besser für das Internet ist, da das Internet nunmal uns alle verbindet, egal wo wir herkommen +- **-** viele Deutsche können nicht sehr gut Englisch + +Okay, die Liste hilft mir so gar nicht. Ich merke gerade, dass ich jeden Punkt regelrecht aus meinem Kopf saugen muss. Ich denke ich werde da mal etwas drüber nachdenken und mich dann entscheiden. + +Dieser Beitrag ist **Teil 25** von 100 Days To Offload. Wenn Du mitmachen willst besuche https://100daystooffload.com diff --git a/content/posts/21-02-04.en.md b/content/posts/21-02-04.en.md new file mode 100644 index 0000000..3bf6c17 --- /dev/null +++ b/content/posts/21-02-04.en.md @@ -0,0 +1,26 @@ +--- +title: "Maybe English as main language?" +date: 2021-04-02 +draft: true +tags: ["blabla"] +series: ["#100DaysToOffload"] +--- +I am currently considering whether I should save myself the translation into English and instead only write in English. That would not only save time, but +I would also learn more from it. At the moment I often feel like I am in a hurry, because I still have to translate. + +I'm still a little torn. Maybe a list will help? + +## German + English +- **+** it is actually quite nice that there is also German content on the Internet +- **+** not everyone can speak English +- **-** more work +- **-** actually I feel *more comfortable* in the English language + +## Only English +- **+** my English gets better when I think and write directly in the language +- **+** I think English is better for the internet because the internet connects us all, no matter where we come from +- **-** many Germans don't speak English very well + +Okay, the list doesn't help me at all. I am just realizing that I have to suck every point out of my head. I'll think about it a bit and then make a decision. + +This post is **Part 25** of 100 Days To Offload. If you want to participate, visit https://100daystooffload.com diff --git a/content/posts/21-03-04.de.md b/content/posts/21-03-04.de.md new file mode 100644 index 0000000..e74b710 --- /dev/null +++ b/content/posts/21-03-04.de.md @@ -0,0 +1,15 @@ +--- +title: "Manchmal ist manuell doch besser" +date: 2021-04-03 +draft: true +tags: ["blabla","programmierung"] +series: [""] +--- +Ich hatte vor ein paar Tagen einem Problem mit einerr oAuth 2 Authentifizierung mit einer API geschrieben. Ich habe mich gestern noch einmal da rangesetzt, weil der Status "Es funktioniert nicht" vollkommen inakzeptabel ist. + +Dieses Mal habe ich keine externe oAuth Library genommen sondern das Ganze Hand umgesetzt. Ich habe mich gefragt warum man überhaupt eine Library für oAuth +braucht, weil der Authentifizierungsvorgang eigentlich super einfach ist. Auch der Coder, den ich geschrieben habe ist nur unwesentlich länger. + +Ich freue mich schon darauf, wenn ich in dem kleinen Projekt jetzt endlich weiterkomme. + + diff --git a/content/posts/21-03-04.en.md b/content/posts/21-03-04.en.md new file mode 100644 index 0000000..0b8161d --- /dev/null +++ b/content/posts/21-03-04.en.md @@ -0,0 +1,15 @@ +--- +title: "Sometimes manual is till better" +date: 2021-04-03 +draft: true +tags: ["blabla","coding"] +series: [""] +--- +A few days ago I wrote about a problem with an oAuth 2 authentication with an API. I sat down again yesterday because the "It doesn't work" status is completely unacceptable. + +This time I did not use an external oAuth library but implemented the whole thing by hand. I was wondering why there should be a library for oAuth +because the authentication process is actually super easy. The code that I wrote is only slightly longer than the code with using the library. + +I am already looking forward to when I can finally make progress on this small project. + + diff --git a/content/posts/21-04-04.de.md b/content/posts/21-04-04.de.md new file mode 100644 index 0000000..76e8ff4 --- /dev/null +++ b/content/posts/21-04-04.de.md @@ -0,0 +1,21 @@ +--- +title: "2 Wochen tägliches Schreiben" +date: 2021-04-04 +draft: true +tags: ["blabla"] +series: [""] +--- +Ich schreibe jetzt seit ca. 2 Wochen täglich. Dabei gibt es verschiedene Ansätze, die ich zur Zeit beide verfolge: + +1. Ich führe ein Tagebuch in dem ich über den Vortag reflektiere und kurz das beschreibe was mir durch den Kopf geht +2. Ich schreibe Beiträge für meinen Blog. + +Ich bemerke mittlerweile ein paar Veränderungen. Das Schreiben hilft mir dabei Klarheit zu schaffen. Meine Gedanken sind weniger chaotisch und das ist wirklich sehr angenehm. Das interessante dabei ist, dass der einfache Akt des Schreibens schon reicht. Wahrscheinlich ist das wirklich schon der Trick an der Sache. Dadurch, dass man seine Gedanken in Worte fasst muss man sich intensiever damit befassen und lässt sich weniger treiben und hinterfragt für sich selbst auch mehr. + +Worüber ich mir noch nicht ganz sicher bin ist der Blog. Der Grund warum ich ich hier täglisch schreibe ist, weil ich mir angewöhnen möchte Content zu produzieren statt zu konsumieren. Der erste Grundstein dafür ist bereits gelegt, immerhin habe ich schon 14 Tage am Stück jeden Tag zumindest etwas kleines veröffnetlicht. + +Im nächsten Schritt möchte ich mit noch mehr Planung an den Blog gehen, d.h. ich möchte bereits in meiner Wochenplanung 1-2 große Themen, die mich beschäftigen festlegen und darüber dann ausführlicher schreiben. + +Von den Inhalten her soll es um Dinge geben, über die ich gerade nachdenke und vor allen Dingen um meine eigene Position zu dem Thema. Also nicht einfach nur eine neutrale Besprechung Themen, sonden Position beziehen. + + diff --git a/content/posts/21-04-04.en.md b/content/posts/21-04-04.en.md new file mode 100644 index 0000000..85abb7f --- /dev/null +++ b/content/posts/21-04-04.en.md @@ -0,0 +1,21 @@ +--- +title: "2 weeks of daily writing" +date: 2021-04-04 +draft: true +tags: ["blabla"] +series: [""] +--- +I've been writing every day for about 2 weeks now. There are different approaches that I am currently both pursuing: + +1. I keep a diary in which I reflect on the previous day and briefly describe what goes through my head +2. I write posts for my blog. + +I'm noticing a few changes now. Writing helps me to create clarity. My thoughts are less chaotic and that is really very pleasant. The interesting thing is that the simple act of writing is enough. That's probably really the trick. Because you put your thoughts into words, you have to deal with them more intensely and let yourself be drifted less and question more for yourself. + +What I'm not quite sure about yet is the blog. The reason why I write here every day is because I want to get into the habit of producing content instead of consuming it. The first cornerstone for this has already been laid, after all, I've been opening at least something small every day for 14 days in a row. + +In the next step, I would like to go to the blog with even more planning, i.e. I would like to define 1-2 major topics that concern me in my weekly planning and then write about them in more detail. + +In terms of content, it should be about things that I'm currently thinking about and, above all, about my own position on the topic. So not just a neutral discussion of topics, but take a position. + + diff --git a/content/posts/21-05-04.de.md b/content/posts/21-05-04.de.md new file mode 100644 index 0000000..e76a226 --- /dev/null +++ b/content/posts/21-05-04.de.md @@ -0,0 +1,19 @@ +--- +title: "Ziele & Reflektion" +date: 2021-04-05 +draft: true +tags: ["blabla","life","produktivität"] +series: [""] +--- +Ich habe in der letzten Woche das Buch [Stop living on Autopilot Antonio Neves](https://theantonioneves.com/stop-living-on-autopilot-book/) gelesen. Ein wirklich tolles Buch. Es ist jetzt nicht so, dass es neue Erkenntnisse enthält. Der Autor verfolgt aber ein paar interessante Ansätze: + +Die für mich wichtigste Erkenntnis war die Idee regelmäßig die letzten 30 Tage zu reflektieren, d.h. wenn man sich jetzt zum Beispiel vorgenommen hat im Job bessere Leistungen zu bringen sollte man sich fragen ob die Firma einen erneut einstellen würde, wenn man die Leistung der letzten 30 Tage betrachtet. +Der Autor vertritt die Ansicht, dass wenn man sich nicht zu sehr auf das konzentrieren sollte was man in 3 oder 5 Jahren erreichen will. Stattdessen sollte man eher schauen, dass man sich auf die nächsten 30 Tage konzentriert und durch Reflektion der letzten 30 Tage realistisch seinen Fortschritt bewertet. + +Vieles in dem Buch dreht sich darum zu lernen die Dinge zu sehen wie sie wirklich sind und daraus zu lernen. + +Ich glaube mittlerweile, dasss eine realistische Reflektion und Auswertung Fortschritten mindestens genauso wichtig bei der Erreichung Zielen ist, wie die Ziele selbst. + +Man liest viel darüber, dass man sich große Ziele setzen soll oder sich voll und ganz auf den Prozess konzentrieren soll. Ich glaube mittlerweile, dass der Weg ganz klar in der Mitte liegt und das aber auch für jeden anders. + + diff --git a/content/posts/21-05-04.en.md b/content/posts/21-05-04.en.md new file mode 100644 index 0000000..a482386 --- /dev/null +++ b/content/posts/21-05-04.en.md @@ -0,0 +1,19 @@ +--- +title: "Goals & Reflection" +date: 2021-04-05 +draft: true +tags: ["blabla","life","productivity"] +series: [""] +--- +Last week I read the book [Stop living on Autopilot by Antonio Neves](https://theantonioneves.com/stop-living-on-autopilot-book/). A really great book. It is not like it contains very new knowledge. However, the author takes a few interesting approaches: + +The most important finding for me was the idea to regularly reflect on the last 30 days, i.e. if you have now decided to perform better in your job, you should ask yourself whether the company would hire you again based on your performance for the last 30 days. +The author believes that you shouldn't focus too much on what you want to achieve in 3 or 5 years. Instead, you should make sure that you concentrate on the next 30 days and realistically evaluate your progress through the 30 days of reflection. + +Much of the book revolves around learning to see things for what they really are and learning from them. + +I believe that realistic reflection and evaluation of progress is at least as important in achieving goals as the goals themselves. + +You read a lot about the fact that you should set big goals or concentrate fully on the process. I now believe that the path is clearly in the middle and that it is different for everyone. + + diff --git a/content/posts/21-06-04.de.md b/content/posts/21-06-04.de.md new file mode 100644 index 0000000..13dbff8 --- /dev/null +++ b/content/posts/21-06-04.de.md @@ -0,0 +1,25 @@ +--- +title: "Der Urlaub wird verschoben" +date: 2021-04-06 +draft: true +tags: ["blabla","life","produktivität"] +series: [""] +--- +Eigentlich haben wir für diese Woche Urlaub eingeplant. In Zeiten der Pandemie bedeutet das, dass man seinen Urlaub zu Hause verbringt, da reisen ja zur Zeit +nicht möglich ist, zumindest bei vielen Menschen. Bei uns macht das keinen Unterschied. Wir haben durch unsere vielen Tieren eine Situation, die das reisen, und +wenn es nur über's Wochenende ist, schwierig macht. Das ist aber auch gar nicht schlimm 😊. + +Wir hatten gestern darüber geredet, dass wir den Urlaub in die nächste Woche verlegen, da in dieser Woche noch Buchhaltung und Einarbeitung einer virtuellen +Assistentin anstehen. Ich habe mich allerdings dazu entschieden, den Urlaub erst dann zu nehmen, wenn ich ihn mir verdient habe. + +Das Problem ist, dass ich mit dem Steuerberater noch ein paar Konten abstimmen muss um den Jahresabschluss fertig zu machen. Dadurch, dass wir aber zuvor einen +6-wöchigen Projektblock gemacht haben ist da noch nicht viel passiert. Nach unserem Urlaub würde dann der nächste Projektblock starten und auch wenn ich bei dem +kommenden Projekt eher eine beratende Funktion habe entsteht in den ersten 2 Wochen doch einiges an Arbeit bis man auf der Spur ist. Das bedeutet, dass sich +dadurch die Zuarbeiten für den Steuerberater um weitere 2-3 Wochen nach hinten schieben würden. + +Eigentlich ist Buchhaltung nicht wirklich mein Ding, aber ich freue mich darauf das Thema nächste Woche, statt, Urlaub anzugehen. Wenn ich ansonsten nur die +allernötigsten Aufgaben mache und nur diese eine Aufgabe habe wird das wahrscheinlich sehr viel Spaß machen und ich werde gut damit vorankommen. + +Den Urlaub werde ich wahrscheinlich aufteilen und stattdessen ein paar verlängerte Wochenenden machen. + + diff --git a/content/posts/21-06-04.en.md b/content/posts/21-06-04.en.md new file mode 100644 index 0000000..5b1270c --- /dev/null +++ b/content/posts/21-06-04.en.md @@ -0,0 +1,24 @@ +--- +title: "Vacation moved" +date: 2021-04-06 +draft: true +tags: ["blabla","life","produktivität"] +series: [""] +--- +Actually, we have planned vacation for this week. In times of the pandemic, this means that you spend your vacation at home, since traveling is currently +not possible, at least for many people. It doesn't make any difference to us. We have a situation through our many animals that travel and +even weekend trips are a bit difficult. But that's not bad at all 😊. + +We had talked yesterday about moving the vacation to the next week, since this week there are still bookkeeping and training of a virtual +Assistant standing in line. However, I've decided not to take the vacation until I've earne it. + +The problem is that I still have to coordinate a few accounts with the tax adviser to get the financial statements ready. But because we did a 6-week project +cycle beforehand not much has happened yet. After our vacation, the next project block would start, and although I have more of an advisory role in this project +there is still a lot of work for the first 2 weeks to get everything on track. As a result +the preparatory work for the tax adviser would be postponed by another 2-3 weeks. + +Actually, bookkeeping isn't really my thing, but I'm looking forward to tackling the topic next week instead of vacation. Otherwise if I only have that one task on my list for the coming week it will will probably be a lot of fun and I'll get on well with it. + +I'll probably split the vacation up and do a couple of extended weekends instead. + + diff --git a/content/posts/21-07-04.de.md b/content/posts/21-07-04.de.md new file mode 100644 index 0000000..658d372 --- /dev/null +++ b/content/posts/21-07-04.de.md @@ -0,0 +1,23 @@ +--- +title: "Irgendwas stört mich an der Schreiberei noch" +date: 2021-04-07 +draft: true +tags: ["blabla","life"] +series: ["#100DaysToOffload"] +--- +Ich bin gerade dabei zu überdenken, wie ich das Thema *schreiben und reflektieren* besser umsetze. Derzeit bin ich ja schon dabei mir hier eine Routine zu schaffen und das funktioniert ja auch schon einmal seit mehr als 14 Tagen. +Leider muss ich aber auch sagen, dass mir hier ein wenig der Tiefgang fehlt. Es kommt mir oft so vor, dass ich das mehr abarbeite als mich mit den wirklich interessanten Themen zu beschäftigen. Um es mal ganz klar zu sagen: viel zu viel blabla. + +Ich merke halt gerade, dass das alles zwar ganz nett ist und dass ich einhalte was ich mir vorgenommen habe, aber es ist relativ oberflächlich. Der Unterschied zwischen dem was ich schreibe und dem was mir so durch den Kopf geht ist relativ groß und das ist eigentlich schade. + +Im Grunde ist das aber eher ein Zeitproblem. Derzeit habe ich was das schreiben angeht 3 Baustellen: + +- meine tägliche Reflektion +- den kurzen Blogpost für meinen Blog +- die Übersetzung des Blogpost + +An manchen Tagen führt das zu einem regelrechten *durchrauschen*, weil von vorneherein klar ist, dass die Zeit knapp ist. + +Ich habe mir jetzt noch keinen konkreten Plan gemacht, wie ich das anders machen könnte. Ein erster Ansatz ist, dass ich vielleicht nur noch 2 oder 3x die Woche etwas für meinen Blog schreibe, aber dafür wählerischer und ausführlicher bin in den Themen. + +Dieser Beitrag ist **Teil 30** von 100 Days To Offload. Wenn Du mitmachen willst besuche https://100daystooffload.com diff --git a/content/posts/21-07-04.en.md b/content/posts/21-07-04.en.md new file mode 100644 index 0000000..3d80ac3 --- /dev/null +++ b/content/posts/21-07-04.en.md @@ -0,0 +1,23 @@ +--- +title: "Something is not feeling right yet" +date: 2021-04-07 +draft: true +tags: ["blabla","life"] +series: ["#100DaysToOffload"] +--- +I am rethinking how to better implement *writing and reflecting*. At the moment I am already in the process of creating a routine here and it has been working for more than 14 days. +Unfortunately, I also have to say that I am a little lacking in depth here. It often seems to me that I work through this more than dealing with the really interesting topics. To be very clear: way too much blabla. + +I'm just realizing that all of this is *okay* as far as I keep what I've set out to do, but it's relatively superficial. The difference between what I write and what goes through my head is relatively big and that's actually a shame. + +Basically, that's more of a time problem. Currently I have 3 construction sites as far as writing is concerned: + +- my daily reflection +- the short Blog post for my Blog +- the translation of the Blog post + +On some days this leads to a real *rushing through*, because it is clear from the start that time is short. + +I haven't made a concrete plan yet how I could do it differently. A first approach is that I may only write something for my Blog 2 or 3 times a week, but I am more selective and detailed about the topics. + +This post is **Part 30** of 100 Days To Offload. If you want to participate, visit https://100daystooffload.com diff --git a/content/posts/21-08-04.de.md b/content/posts/21-08-04.de.md new file mode 100644 index 0000000..4abc388 --- /dev/null +++ b/content/posts/21-08-04.de.md @@ -0,0 +1,16 @@ +--- +title: "25 Schritte mehr" +date: 2021-04-08 +draft: true +tags: ["blabla","life","training"] +series: ["#100DaysToOffload"] +--- +Ich habe vor ein paar Wochen damit angefangen mein Lauftraining zu ändern. Zuerst habe ich einen Versuch mit der Länge der Strecke gestartet. Statt der üblichen 6 km bin ich einfach mal 8 km gelaufen. + +Das lief erstaunlich gut. Ich kann sogar sagen, dass die Änderung der Streckenlänge eigentlich kaum einen Unterschied gemacht hat. + +Seit ich die 8 km laufe habe ich mir vorgenommen jedes Mal etwas mehr zu laufen, d.h. ich laufe jedes Mal mindestens **25 Schritte mehr** als beim letzten Mal. Dadurch bin ich mittlerweile bei 8,15 km. + +Ich habe jetzt nicht das Ziel einen Marathon oder so zu laufen, aber es ist trotzdem schön sich zu steigern. Auf diese Art und Weise stelle ich sicher, dass ich jedes Mal zumindest etwas Fortschritt mache. + +Dieser Beitrag ist **Teil 31** von 100 Days To Offload. Wenn Du mitmachen willst besuche https://100daystooffload.com diff --git a/content/posts/21-08-04.en.md b/content/posts/21-08-04.en.md new file mode 100644 index 0000000..266cad3 --- /dev/null +++ b/content/posts/21-08-04.en.md @@ -0,0 +1,16 @@ +--- +title: "25 steps mehr" +date: 2021-04-08 +draft: true +tags: ["blabla","life","training"] +series: ["#100DaysToOffload"] +--- +I started changing my running routine a few weeks ago. First I started a test with the length of the route. Instead of the usual 6 km, I just ran 8 km. + +That went amazingly well. I can even say that the change in the length of the track actually made little difference. + +Since I've been running the 8 km, I've decided to run a little more each time, i.e. I run at least **25 steps more** than last time. As a result, I am now at 8.15 km. + +My goal is not to running a marathon or anything, but it's still nice to improve. This way I make sure that I make at least some progress every time. + +This post is **Part 31** of 100 Days To Offload. If you want to participate, visit https://100daystooffload.com diff --git a/content/posts/21-09-04.de.md b/content/posts/21-09-04.de.md new file mode 100644 index 0000000..1b80677 --- /dev/null +++ b/content/posts/21-09-04.de.md @@ -0,0 +1,16 @@ +--- +title: "Amtsblatt, Hühner und die Steinzeit" +date: 2021-04-09 +draft: true +tags: ["blabla","life"] +series: ["#100DaysToOffload"] +--- +Heute geht es um Hühner 🐓. Meine Frau hat gestern einen Außenhühnerstall improvisiert. Der Grund dafür liegt darin, dass es zur Zeit eine Stallpflicht aufgrund der Vogelgrippe gibt. Eigentlich hätte ja eine Pandemie gereicht, aber auch unsere Hühner müssen in Quarantäne. + +Etwa fragwürdig ist, wie die Information mit der Stallpflicht zu uns gelangt ist. Man sollte meinen, dass aufgrund der Tatsache, dass unser Hühnerbestand beim Veterinäramt registriert ist, ein einfacher Informationsfluss möglich ist. Die Damen und Herren auf dem Amt haben unsere Anschrift, Telefonnummer und auch die E-Mail. Klingt ja alles erst einmal ganz einfach. Wir haben allerdings von der Stallpflicht per WhatsApp von einem *Hühnerfreund* erfahren. Dieser hatte die Info auch nur, weil er aufgrund eines Gerüchtes beim Veterinäramt angerufen hat. + +Meine Frau hat als das Thema aufkam erst einmal eine Internet Recherche gemacht. Sie hat ganz genau eine Seite gefunden, die eine Info dazu für unseren Landkreis hatte. Das Veterinäramt selbst hat die offizielle Info dazu im Amtsblatt veröffentlicht. Hallo? Amtsblatt? Lebt ihr noch in der Steinzeit? + +Es könnte doch wirklich einfach sein? Wenn man doch eh schon seinen Hühnerbestand anmelden muss, warum kann man nicht einfach jeden Hühnerhalter von der Stallpflicht per E-Mail Newsletter informieren? Einfacher geht es doch nun wirklich nicht mehr. + +Dieser Beitrag ist **Teil 32** von 100 Days To Offload. Wenn Du mitmachen willst besuche https://100daystooffload.com diff --git a/content/posts/21-09-04.en.md b/content/posts/21-09-04.en.md new file mode 100644 index 0000000..2e6b91c --- /dev/null +++ b/content/posts/21-09-04.en.md @@ -0,0 +1,16 @@ +--- +title: "Official gazette, chickens and the Stonde Age" +date: 2021-04-09 +draft: true +tags: ["blabla","life"] +series: ["#100DaysToOffload"] +--- +Today it's about chickens 🐓. My wife improvised an outside chicken coop yesterday. The reason for this is that there is currently compulsory stable due to bird flu. A pandemic would have been enough, but our chickens also have to be quarantined. + +It is somewhat questionable how the information about the compulsory stable got to us. One would think that due to the fact that our chicken herd is registered with the veterinary office, an easy flow of information is possible. The ladies and gentlemen in the office have our address, telephone number and email. It all sounds very simple at first. However, we heard about the compulsory stable via WhatsApp from a *chicken friend*. He only had the information because he called the veterinary office based on a rumor. + +When the subject came up, my wife did some internet research. She found exactly one page that had information about it for our district. The veterinary office itself has published the official information in the official gazette. Hello? Official Gazette? Do you still live in the Stone Age? + +If you have to register your chickens anyway, why can't you just inform every chicken owner with an email newsletter? It really doesn't get any easier than that. + +This post is **Part 32** of 100 Days To Offload. If you want to participate, visit https://100daystooffload.com diff --git a/content/posts/21-10-04.de.md b/content/posts/21-10-04.de.md new file mode 100644 index 0000000..fd3cfe9 --- /dev/null +++ b/content/posts/21-10-04.de.md @@ -0,0 +1,16 @@ +--- +title: "Entscheidung" +date: 2021-04-10 +draft: true +tags: ["blabla","life"] +series: ["#100DaysToOffload"] +--- +Ich werde die Art und Weise, wie ich schreibe etwas ändern. Ich denke ich habe jetzt für eine Weile erst einmal geübt, wie es ist täglich zu schreiben, zu reflektieren und +meinen Gedanken Ausdruck zu verleihen. Ich habe dabei gemerkt, dass z.B. Täglich ein wenig für diesen Blog zu schreiben mich im Grunde davon abhält tiefer zu +gehen. + +Ich werde daher mal die Variante versuchen, dass ich nur noch 1-2 Mal die Woche hier schreibe und mich stattdessen mehr um meine Notizen und Gedanken kümmern. +Die werden auch auch täglich hochgeladen. + +Was ich dann auch nochmal testen werde ist mir 1-2 Themen im Rahmen meiner Wochenplanung zu überlegen mit denen ich mich konkret gedanklich befassen möchte. +Also weniger vor mich hin plätschern, sondern etwas zielgerichteter sein. diff --git a/content/posts/21-10-04.en.md b/content/posts/21-10-04.en.md new file mode 100644 index 0000000..1e2b049 --- /dev/null +++ b/content/posts/21-10-04.en.md @@ -0,0 +1,16 @@ +--- +title: "Decision" +date: 2021-04-10 +draft: true +tags: ["blabla","life"] +series: ["#100DaysToOffload"] +--- +I will change the way I write. I think I've practiced for a while now what it's like to write, reflect and write on a daily basis +to express my thoughts. I noticed that, for example, writing a little daily for this blog basically prevents me from going deeper +walk. + +I will therefore try the variant that I only write here 1-2 times a week and instead concentrate more on my notes and thoughts. +They are also uploaded daily. + +What I will then test again is to consider 1-2 topics as part of my weekly planning that I would like to deal with specifically in thought. +So less splashing around in front of me, but rather be a little more purposeful. diff --git a/content/posts/21-17-03.de.md b/content/posts/21-17-03.de.md new file mode 100644 index 0000000..0e11c78 --- /dev/null +++ b/content/posts/21-17-03.de.md @@ -0,0 +1,18 @@ +--- +title: "Disziplinarstrafe" +date: 2021-03-17 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +## Disziplin und Strafe + +Ich habe vor einigen Wochen eine Art Disziplinarstrafe für mich selber eingeführt. Wann immer ich nicht in der Lage bin die Willenskraft aufzubringen mich an etwas zu halten, dass ich mir vorgenommen habe, wird für den kommenden Tag die Messlatte deutlich höher gelegt. +Beispiel: Gestern war als Sportprogramm eine Stunde radfahren auf dem Plan. Da wir vormittags noch einen Termin beim Tierarzt für unseren Kakadu Dexter gemacht hatten war es absehbar, dass ich nachmittags in Zeitnot kommen werde. Trotzdem habe ich den Tierarzttermin ignoriert, was dazu führte, dass ich statt der geplanten 60 Minuten nur 45 Minuten Sport absolvieren konnte. Das bedeutete für heute ganz konkret, dass der 6K Lauf, der morgens anstand entweder schneller oder länger sein musste als üblicherweise. Das Endgergebnis war eine neue persönliche Bestleistung. + +## Konsequenzen helfen einem bei der Sache zu bleiben + +Ich habe die Erfahrung gemacht, dass man nicht immer in der Lage ist sich diszipliniert an alles zu hakten was man sich so vorgenommen hat. Manche Tage sind stressig, man hat sich schlechter organisiert als man dachte oder man hat einfach schlecht geschlafen und das ist auch okay, weil es eben menschlich ist. Ich fand es aber irgendwie nicht ausreichend sich selbst zu sagen "Ist schon, okay. Morgen wird es wieder besser". Auch wenn man das wahrschenlich schon 1000x zu sich oder jemand anderem gesagt hat finde ich, dass man sich auf diese Art und Weise schnell den Schwung nehmen kann, weil man so ein Szenario schafft in dem es einfach keine Konsequenz gibt. +Dadurch das man sich für den kommenden Tag auferlegt noch mehr, dem was man sich vorgenommen hat, leisten überlegt man sich das eine oder andere Mal noch ob man es heute wirklich nicht durchziehen kann. + + diff --git a/content/posts/21-17-03.en.md b/content/posts/21-17-03.en.md new file mode 100644 index 0000000..2b45ba9 --- /dev/null +++ b/content/posts/21-17-03.en.md @@ -0,0 +1,18 @@ +--- +title: "Disciplinary punishment" +date: 2021-03-17 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +## Disziplin und Strafe + +I introduced some kind of disciplinary punishment for myself a few weeks ago. Whenever I am unable to sustain the willpower to hold onto something that I have set out to do, the bar is raised significantly for the day ahead. +Example: Yesterday, an hour of cycling was on the plan as a sports program. Since we had made an appointment with the vet for our cocatoo Dexter in the morning, it was foreseeable that I would be short of time in the afternoon. Nevertheless, I ignored the vet appointment, which meant that I was only able to do 45 minutes of exercise instead of the planned 60 minutes. For today, that meant in concrete terms that the 6K run that was due in the morning had to be either faster or longer than usual. The end result was a new personal best. + +## Consequences help you stick with it + +In my experience, you are not always able to discipline yourself to hook up to everything that you have set out to do. Some days are stressful, you are less organized than you thought or you just slept badly and that's okay because it's human. But I found it somehow insufficient to say to myself "It's okay. Tomorrow it will be better". Even if you have probably said that 1000 times to yourself or someone else, I think that you can quickly get going in this way, because you create a scenario in which there is simply no consequence. +By imposing even more of what you have set out to do for the next day, you think one time or the other whether you really can't go through with it today. + + diff --git a/content/posts/21-17-04.de.md b/content/posts/21-17-04.de.md new file mode 100644 index 0000000..ff16961 --- /dev/null +++ b/content/posts/21-17-04.de.md @@ -0,0 +1,47 @@ +--- +title: "Meine täglichen Notizen & Schreibroutine" +date: 2021-04-17 +draft: true +tags: ["blabla","life","produktivität"] +series: [""] +--- +Ich stoße gerade auf ein paar Probleme mit meiner täglichen Schreibroutine. Das Problem ist nicht, dass ich mich nicht daran halte, sondern eher wie ich insgesamt dazu stehe. Das führt dazu, dass ich mich zwar damit beschäftige und mich daran gewöhne, aber ich trotzdem das Gefühl habe, dass ich nur um das Thema *herumtanze*. Daher möchte ich einmal versuchen das Thema genauer zu beleuchten und vor allen Dingen ein paar Grundregeln festzulegen. + +## Meine Probleme beim Schreiben meiner täglichen Notizen + +### Zeitfenster und Eile +Ich habe mir hier ein Zeitfenster innerhalb meiner [Tagesroutine](https://publish.obsidian.md/m3tam3re/%E2%9C%85+-+NOTIZEN/Tagesroutine) zugewiesen. Innerhalb dieses Zeitfensters passieren mehrere Sachen, unter anderem auch eine kurze Meditation(wenn man das so nennen will). Ich habe oft das Gefühl, dass ich hier trotz der 2 Stunden durch hetze. + +Bis vor kurzem hatte ich mir fest vorgenommen täglich wie eine Art Tagebuch zu schreiben und anschließend einen kurzen Blogpost in Deutsch und Englisch zu schreiben. + +Ich glaube dieses Gefühl der Eile kam aus dem Wunsch alles fertig zu bekommen, was ich mir vorgenommen habe. + +### Haken dran und fertig? +Diese 2 Stunden früh am morgen, bevor ❤️ Kathleen wach ist oder mich irgendjemand oder irgendetwas einnehmen kann, sollten eigentlich etwas sein, dass ich genießen kann. Ich habe in dieser Zeit keine Verpflichtungen (außer denen, die ich mir selbst auferlege) und keine Ablenkungen. Es ist wahrscheinlich der einzige Zeitblock des Tages der wirklich nur mir gehört. + +Das oben beschriebene Gefühl der Eile hat, glaube ich ernsthafte Konsequenzen, was das Ergebnis angeht. Daraus entsteht eher das Gefühl **fertig werden zu wollen** und das was ich mir vorgenommen habe abzuhaken und erledigt zu wissen. + +### YouTube +Ich genieße es eigentlich, morgens meinen ersten Kaffee zu trinken und mir auf YouTube ganz in Ruhe ein Video von etwas anzusehen, dass mich interessiert. + +Leider führt das aber auch dazu, dass ich YouTube einfach nebenbei weiterlaufen lasse was zu 2 Problemen führt: + +1. Ich werde beim Schreiben immer mal wieder von meinen Gedanken abgebracht +2. Ich glaube, dass die Videos und deren Geräuschkulisse schon der erste Stress des Tages ist + +## Was will ich eigentlich mit den 2 Stunden erreichen? +Diese 2 Stunden des Schreibens jeden morgen habe ich aus verschiedenen Gründen in meine [Tagesroutine](Tagesroutine.md) aufgenommen: + +1. Ich möchte sicherstellen, dass ich täglich etwas erschaffe, statt nur zu konsumieren. +2. Ich möchte meine Gedanken und Gefühle aufzeichnen. Ich glaube man dreht sich nur um sich selbst, wenn alles nur im eigenen Kopf bleibt. +3. Ich möchte durch das Schreiben und damit verbundene reflektieren Klarheit in meine Gedankenwelt bringen. +4. Ich bin neugierig welche langfristigen Veränderungen das tägliche schreiben in mein Leben bringt. + +Es dreht sich vieles darum, dass ich mir meiner Gedanken und Gefühle bewusst werde. Ich glaube auch, dass ich bereits die ersten positiven Auswirkungen spüren kann. Z.B. scheine ich etwas mehr Abstand zu bekommen, also im Sinne von *Ich beobachte mich selbst und schaffe es dadurch innezuhalten*. +Ein Aspekt dabei ist, dass ich das alles hier ja auch öffentlich tue. Ich bin mir nicht sicher, ob es überhaupt jemanden gibt, der diese Seite gefunden hat, geschweige denn hier regelmäßig liest. Darum geht es auch gar nicht wirklich. Ich weiß nicht genau, wie ich es beschreiben soll, aber ich glaube, dass das Ganze etwas ernster und auch verbindlicher ist, wenn ich weiß, dass es jemand anderes lesen könnte. + +## Also was mache ich nun mit den 2 Stunden, wie sieht die Lösung aus? + +1. **Ich muss meine Einstellung dazu ändern:** d.h. ich muss dieses Zeitfenster als etwas sehen für das ich dankbar sein kann. Das ist Zeit, die einfach nur mir gehört und niemandem sonst und das sollte ich schätzen und lieben. +2. **Ich muss dafür sorgen, dass ich diese Zeit nur mit mir verbringe:** d.h. ich muss, so gerne ich mir auch interessante Videos ansehe, diese Zeit ohne Ablenkung verbringen. Ideal wäre es wahrscheinlich, wenn ich diese 2 Stunden in totaler Stille verbringe, in der ich keine Geräusche außer des Tippens meiner Tastatur höre (und des Schnarchens meiner Hunde) +3. **Ich muss es etwas lockerer nehmen**: Vorsätze sind gut und wichtig. Dennoch muss ich hier lernen, dass es nicht darauf ankommt, dass alles erledigt ist, was ich mir vorgenommen habe. Stattdessen sollte ich sicherstellen, dass das *was mir am wichtigsten ist* erledigt ist. Beim Schreiben bedeutet das konkret, dass ich mich eben nicht hetzen sollte, weil ich ja noch einen Blogpost schreiben wollte, sondern dass ich das woran ich gerade schreibe, um meine Gedanken klar zu kriegen vollende, sodass es seinem Zweck gerecht werden kann. diff --git a/content/posts/21-17-04.en.md b/content/posts/21-17-04.en.md new file mode 100644 index 0000000..ad075d9 --- /dev/null +++ b/content/posts/21-17-04.en.md @@ -0,0 +1,47 @@ +--- +title: "My daily notes & writing routine" +date: 2021-04-17 +draft: true +tags: ["blabla","life","productivity"] +series: [""] +--- +I'm running into a couple of issues with my daily writing routine. The problem is not that I don't stick to it, but rather how I feel about it as a whole. This leads to the fact that I get used to it, but I still feel like I'm just *dancing around* the topic. Therefore I would like to try to shed a light on the subject and, above all, to lay down a few basic rules. + +## My problems with writing my daily notes + +### Time slots and a hurry +I have assigned myself a time window within my [daily routine](https://publish.obsidian.md/m3tam3re/%E2%9C%85+-+NOTIZEN/Tagesroutine). Several things happen within this time window, including a short meditation (if you want to call it that). I often have the feeling that I'm rushing through here despite the 2 hours. + +Until recently, I had firmly resolved to write a kind of diary every day and then write a short blog post in German and English. + +I think this sense of rush came from wanting to get everything done that I set out to do. + +### Hook on and done? +Those 2 hours early in the morning before ❤️ Kathleen is awake or anyone or anything can take me in should actually be something I can enjoy loneliness. I have no obligations (other than those that I impose on myself) and no distractions during this time. It's probably the only time block of the day that really belongs to me. + +I believe that the feeling of rush described above has serious consequences for the result. This rather creates the feeling of **wanting to finish** and knowing that what I have set out to do is ticked off and done. + +### YouTube +I actually enjoy having my first coffee in the morning and quietly watching a video on YouTube of something that interests me. + +Unfortunately, this also leads to the fact that I just keep YouTube running on the side, which leads to 2 problems: + +1. I am always distracted from my thoughts while writing +2. I think that the videos and their background noise is the first stress of the day + +## What do I actually want to achieve with the 2 hours? +I have included these 2 hours of writing every morning in my [Daily Routine](Daily Routine.md) for various reasons: + +1. I want to make sure that I create something every day instead of just consuming it. +2. I want to record my thoughts and feelings. I think you only revolve around yourself if everything just stays in your own head. +3. I would like to bring clarity to my thoughts through writing and the related reflection. +4. I am curious about the long-term changes daily writing will bring to my life. + +A lot revolves around becoming aware of my thoughts and feelings. I also believe that I can already feel the first positive effects. E.g. I seem to get a little more distance, in the sense of *I observe myself and thus manage to pause*. +One aspect is that I do all of this in public. I'm not sure if there is anyone who has found this page, let alone reads it here regularly. That's not really the point. I'm not sure how to describe it, but I think it's a bit more serious and also more authentic when I know that someone else could read it. + +## So what do I do with the 2 hours, what is the solution? + +1. **I have to change my attitude towards this:** i.e. I have to see this time window as something I can be thankful for. This is time that just belongs to me and nobody else and I should cherish and love that. +2. **I have to make sure that I only spend this time with myself:** i.e., as much as I like to watch interesting videos, I have to spend this time without distraction. It would probably be ideal if I spend those 2 hours in total silence, in which I hear no noises other than typing my keyboard (and my dogs snoring) +3. **I have to take it a little more relaxed**: resolutions are good and important. Nevertheless, I have to learn here that it does not matter that everything that I set out to do is done. Instead, I should make sure that * what matters most to me * is done. When writing this specifically means that I shouldn't rush myself because I wanted to write a blog post, but that I complete what I'm writing to get my thoughts clear so that it can do justice to its purpose. diff --git a/content/posts/21-18-03.de.md b/content/posts/21-18-03.de.md new file mode 100644 index 0000000..e9f7dfd --- /dev/null +++ b/content/posts/21-18-03.de.md @@ -0,0 +1,25 @@ +--- +title: "Digitales Sammelsurium" +date: 2021-03-18 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +## Was für ein Chaos + +Es ist mir schon länger ein Dorn im Auge. Wenn ich mir alleine meine Filme und Serien anschaue frage ich mich wie ich hier jemals Ordnung reinkriege. Locker 100 Blu Rays, teilweise digitalisiert und auf dem Plex Homeserver, 10-20 gekaufte Filme und Serien auf Amazon Prime, das gleiche bei Apple. Bei den Games sieht es ähnlich aus. Ein Teil auf Xbox, der Großteil über Playstation. Eigentlich müsste man Buch darüber führen welche digitalten Besitztümer man so hat, bei welchem Anbieter sie liegen und mit welchem Gerät man was abspielen kann. +Ich frage mich ernsthaft ob das im Zeitalter Blockchain Technologie noch zeitgemäß ist. Eigentlich sollte es doch möglich sein, die Lizenzen für Spiele Filme etc. zentral zu verwalten. Die Technologie dafür ist vorhanden. + +## Es könnte so einfach sein + +Wenn man sich mal im Gegenzug vorstellt man würde das ganze Thema über Blockchain Technologie abbilden könnte das wirklich eine einfache und runde Sache werden. Über Smart Contracts könnten Nutzungsrechte klar und plattformübergreifend geregelt werden. + +### Kaufen, Verkaufen, Leihen, Tauschen, alles kein Problem + +Würde man den Kauf z.B. eines Filmes über eine Blockchain regeln wäre es im Grunde egal wo ich den Film gekauft habe. Mein Abspielgerät oder meine App zum abspielen könnte vor dem abspielen über die Blockchain verifizieren, dass ich den Film besitze oder abspielen darf. +So wäre es auch möglich, dass ich z.B. einen Film wieder verkaufe, weil ich kein Interesse mehr daran habe. Von der Sache her würde uns die Blockchain Technologie erlauben mit digitalen Gütern umzugehen wie früher mit Musik-CDs oder Comics. Ganz einfach kaufen, verkaufen etc. +Auch das ausleihen wäre kein Thema und das nicht nur zwischen Anbieter und Kunde, sondern auch Kunde zu Kunde. Man könnte zum Beispiel per Smart Contract einen Film für sagen wir mal 2 Tage an einen Kumpel verleihen. Ist die Zeit abgelaufen wird die Berechtigung automatisch wieder an den Besitzer des Filmes zurückübertragen. + +Nur mal so am Rande... + + diff --git a/content/posts/21-18-03.en.md b/content/posts/21-18-03.en.md new file mode 100644 index 0000000..8a26acb --- /dev/null +++ b/content/posts/21-18-03.en.md @@ -0,0 +1,27 @@ +--- +title: "Digitales Sammelsurium" +date: 2021-03-18 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +## What a mess + +It has been a thorn in my side for a long time. When I watch my movies and tv-shows alone, I ask myself how I can ever get this in order. Easily more than 100 Blu Rays, partially digitized and on the Plex Homeserver, 10-20 bought movies and tv-shows on Amazon Prime, the same on Apple. It looks similar with the games. Some on Xbox, the majority on Playstation. Actually, you should keep a record of what digital possessions you have, with which provider they are and with which device you can play what. +I seriously ask myself whether this is still appropriate in the age of blockchain technology. It should actually be possible to manage the licenses for games, movies, etc. centrally. The technology is there. + + + +## It could be so easy + +If you imagine in return that the whole topic would be covered by blockchain technology, it could really be a simple and well-rounded thing. Using smart contracts, usage rights could be regulated clearly and across platforms. + +### Buying, selling, lending, swapping, no problem at all + +If you were to regulate the purchase of a movie via a blockchain, for example, it would basically not matter where I bought the movie. My player or my app to play it could verify via the blockchain before playing that I own the movie or that I am allowed to play it. +It would also be possible, for example, to resell a movie because I am no longer interested in it. Blockchain technology would allow us to deal with digital goods like we did when we were kids music with CDs or comics. Easily buy, sell, etc. +Borrowing would also not be an issue and not only between provider and customer, but also from customer to customer. For example, you could lend a movie to a buddy for, say, two days using a smart contract. When the time has expired, the right to watch the movie are automatically transferred back to the owner of the movie. + +Just by the way ... + + diff --git a/content/posts/21-19-03.de.md b/content/posts/21-19-03.de.md new file mode 100644 index 0000000..d42868d --- /dev/null +++ b/content/posts/21-19-03.de.md @@ -0,0 +1,41 @@ +--- +title: "Das richtige Werkzeug ist nur eine Ausrede" +date: 2021-03-19 +draft: true +tags: ["blabla","life","misc","produktivität"] +series: [""] +--- +## Jetzt mal ganz ehrlich + +Wie oft kommt es vor, dass man das Fehlen eines Werkzeuges, eines Programmes oder was auch immer vorschiebt um sich selbst dem was man sich vorgenommen +abzuhalten. Wenn ich an die Zeit zurückdenke als ich wieder mit dem programmieren begonnen habe könnte ich mir jetzt noch die Haare raufen. Es ist unfassbar +wieviel Zeit man mit der Frage zubringen kann "Welcher Editor ist der beste um zu programmieren?". Der Punkt ist der: Wenn man seine Zeit damit verbringt sich +Stunden und Tage mit der Frage nach dem besten Editor befasst lautet die Antwort wahrscheinlich: "Gar keiner". + +Die oben geschilderte Situation gibt es in unzähligen Variationen. Dabei ist es egal ob man Fotograf, Handwerker oder Steuerberater ist. Jeder kennt das +wahrscheinlich allzu gut. + +Das ist als würde man Gitarre lernen wollen und man kauft sich erst einmal die beste und teuerste Gitarre, die man für Geld finden kann. Aber der Punkt ist +einfach nun mal der, dass einem das wirklich gar nichts nützt. Die Gitarre macht Dich nicht zum Rockstar, die 500 Megapixel Kamera macht aus Dir keinen +Fotografen. + +## Die Komfortzone ist das Problem + +Wenn wir versuchen etwas schwieriges, neues oder gar beides zu tun scheint unser Gehirn besonders kreativ zu werden. Das Fehlen eines bestimmten Werkzeuges als +Grund dafür mit etwas nicht zu beginnen ist nur eine Ausrede vielen. Soweit ich das beobachtet haben neigen wir zu derartigen Ausreden, sobald wir den +sicheren Boden unserer Komfortzone verlassen. + +## Man muss sich selber austricksen + +Das Problem ist, dass unser Gehirn so gut darin ist uns diese Ausreden aufzutischen, dass wir es manchmal erst Stunden später mitbekommen. Eine perfekte Lösung +dafür habe ich noch nicht gefunden, aber ein Einsatz könnte tatsächlich eine gute Planung kombiniert mit einer gesunden Portion Sturheit sein. +Ich habe die Methode zu der Zeit wo ich wieder mit regelmäßigem Sport angefangen genutzt. Im Grunde muss man einen Zustand schaffen in dem es kein entweder oder +gibt. Es muss einfach vollkommen klar sein, dass jetzt genau das passieren muss was man sich vorgenommen. + +Dabei ist es wichtig, dass man vorher entschieden hat was in diesem Moment zu tun ist. Mit anderen Worten geht es um Planung. Wenn man bereits gestern +entschieden hat was jetzt in diesem Moment zu tun ist macht es das deutlich einfacher. Es ist ja schon entschieden...oder? + +Hier kommt die Sturheit ins Spiel. Man muss am Anfang in der Lage sein sich hier selbst in die Verantwortung zu nehmen. "Du hast das gestern so entschieden, +jetzt wir XYZ gemacht. Ende der Durchsage". + + diff --git a/content/posts/21-19-03.en.md b/content/posts/21-19-03.en.md new file mode 100644 index 0000000..e0b1b88 --- /dev/null +++ b/content/posts/21-19-03.en.md @@ -0,0 +1,41 @@ +--- +title: "The right tool is just an excuse" +date: 2021-03-19 +draft: true +tags: ["blabla","life","misc","productivity"] +series: [""] +--- +## Now let's be honest + +How often does it happen that you think the lack of a tool, a program or whatever in order to make yourself aware of what you set out to do +to hold. When I think back to the time when I started programming again, I could still pull my hair out now. It's unbelievable +how much time you can spend with the question "Which editor is the best for programming?". The point is this: when you spend your time doing it yourself +Hours and days spent trying to find the best editor the answer is probably: "None at all". + +The situation described above exists in countless variations. It doesn't matter whether you are a photographer, craftsman or tax advisor. Everyone knows that +probably too good. + +It's like wanting to learn to play the guitar and first of all you buy the best and most expensive guitar that money can find. But the point is +simply the fact that it really doesn't help you at all. The guitar doesn't make you a rock star, the 500 megapixel camera doesn't make you a rock star +Photographers. + +## The comfort zone is the problem + +When we try to do something difficult, new, or both, our brains seem particularly creative. The lack of a specific tool as +Reason to not start with something is just one of many excuses. As far as I've seen, we tend to make such excuses as soon as we do +Leave the safe ground of our comfort zone. + +## You have to outsmart yourself + +The problem is, our brains are so good at making these excuses that we sometimes don't notice them until hours later. A perfect solution +I haven't found it yet, but a mission could actually be good planning combined with a healthy dose of stubbornness. +I used the method around the time I started doing regular exercise again. Basically you have to create a state where there is no either or +gives. It just has to be perfectly clear that exactly what you set out to do has to happen now. + +It is important that you have decided beforehand what to do at this moment. In other words, it's about planning. If you already have decided yesterday +what to do now things seem a lot easier. It's already decided ... right? + + +now we made XYZ. End of the announcement ". + + diff --git a/content/posts/21-20-03.de.md b/content/posts/21-20-03.de.md new file mode 100644 index 0000000..803e1c6 --- /dev/null +++ b/content/posts/21-20-03.de.md @@ -0,0 +1,16 @@ +--- +title: "Ich bin gespannt auf die nächste Woche" +date: 2021-03-20 +draft: true +tags: ["blabla","life","misc","produktivität"] +series: [""] +--- +## Und nochmal + +Ich habe das alles schon allzu oft versucht. Ziele stzen, Planung, etc...Ich bin immer wieder in alte Muster zurückgefallen. Das waren zwar niemals komplette +Fehlschläge, aber ich habe es bisher niemals hinbekommen eine permanente Änderung in allem was ich mir vorgenommen habe zu erreichen. + +Ich bin mir noch nicht einmal sicher, ob das was ich mir in dieser Urlaubswoche erarbeitet es wirklich wert ist. Der Zugang zu meinen eigenen Wünschen und +Gefühlen bleibt nach wie vor schwer. + + diff --git a/content/posts/21-20-03.en.md b/content/posts/21-20-03.en.md new file mode 100644 index 0000000..cea3d3f --- /dev/null +++ b/content/posts/21-20-03.en.md @@ -0,0 +1,16 @@ +--- +title: "Curious about the upcoming week" +date: 2021-03-20 +draft: true +tags: ["blabla","life","misc","productivity"] +series: [""] +--- +## And again + +I've tried all of this too many times. Setting goals, planning, etc ... I kept falling back into old patterns. They were never complete +failures, but I've never managed to make permanent changes in everything I've set out to achieve. + +I'm not even sure if what I've worked out for this week of vacation is really worth it. Access to my own desires and +feelings are still difficult. + + diff --git a/content/posts/21-21-03.de.md b/content/posts/21-21-03.de.md new file mode 100644 index 0000000..2819ca7 --- /dev/null +++ b/content/posts/21-21-03.de.md @@ -0,0 +1,35 @@ +--- +title: "Ich habe keine gute Erklärung dafür" +date: 2021-03-21 +draft: true +tags: ["blabla","life","misc","beziehungen"] +series: [""] +--- +Ich habe vor ein paar Tagen damit angefangen diesen Satz häufiger zusagen. Die Situation ist meistens die, dass ich +- etwas getan habe, was ich nicht hätte tun sollen +- irgendwas nur halbherzig getan habe +- etwas falsch gemacht habe +- bitte ausfüllen + +Ich rede hier diesen Situationen, wo Deine Frau dich fragt, ob Du noch bei Trost bist. Ich weiß nicht, wie es anderen geht, aber bei uns ist das ziemlich oft. Das könnte unter Umständen daran liegen, dass ich dazu neige ein klein wenig stur zu sein. + +Warum ich ich angefangen habe mit "Ich habe keine gute Erklärung dafür" zu antworten weiß ich nicht. Ich habe nirgendwo darüber glesen oder sonst etwas. Das ist aber auch egal, wichtig ist was dieser kleine Satz bewirkt: + +## Eine kleine Portion Ehrlichkeit + +Meistens ist es doch wirklich so: Wir tun etwas, wovon wir wissen, dass jetzt nicht gerade weise ist oder nur halbherzig oder man weiß, dass man gerade etwas tut was dem anderen mißfallen wird. +Ich weiß jetzt nicht wie es anderen geht, aber wenn man dabei erwischt und danach gefragt wird, ist das meistens eine Steilvorlage für eine Ausrede. Der Punkt ist der, dass Deine Frau mekrt, dass Du ihr gerade eine Aurede auftischst. +Das ist wenig ruhmreich, nicht wirklich ehrlich, aber es ist wie es ist, man versucht irgendwie Sinn in sein Verhalten zu erklären. + +Wenn ich statt mit einer Ausrede oder einer Eklärung mit "Ich habe keine gute Erklärung dafür" reagierte passieren andere Dinge als sonst: + +1. Meine Frau reagiert mit einem Lächeln und die Situation entspannt sich +2. Der Druck, den ich selbst evtl. in so einer Situation spüre ist sofort verflogen + +Das ist nicht nur eine Floskel. Es ist wahrscheinlich das einzige was ich sagen könnte, was wirklich der Wahrheit entspricht, denn Fakt ist: Ich habe meistens wirklich keine gute Erklärung für mein Verhalten in solchen Situationen. Das macht diese Antwort sehr ehrlich. + +Wenn alles andere sowieso eine Ausrede und der klägliche Versuch wäre Sinn aus unsinnigem Verhalten zu machen ist es wahrscheinlich die Mühe nicht wert. + +Ich werde diese Art und Weise beibehalten. Ob sich das langfristig auszahlt und wir dadurch besser und ehrlicher miteinander umgehen kann ich heute noch nicht sagen. Vielleicht trägt es ja dazu bei. + + diff --git a/content/posts/21-21-03.en.md b/content/posts/21-21-03.en.md new file mode 100644 index 0000000..bdce21a --- /dev/null +++ b/content/posts/21-21-03.en.md @@ -0,0 +1,35 @@ +--- +title: "I don't have a good explanation for this" +date: 2021-03-21 +draft: true +tags: ["blabla","life","misc","relationships"] +series: [""] +--- +A few days ago I started saying this sentence more often. The situation is mostly that me +- did something I shouldn't have done +- have only done something half-heartedly +- did something wrong +- Please fill in the blanks + +I'm talking about these situations where your wife asks you if you are still at consolation. I don't know about others, but we do quite often. That could possibly be because I tend to be a little bit stubborn. + +I don't know why I started to answer "I don't have a good explanation for it". I haven't read about it anywhere or anything. But that doesn't matter, what is important is what this little sentence does: + +## A small portion of honesty + +Most of the time it really is like this: We do something that we know is not exactly wise now or only half-heartedly or we know that we are doing something that will displease the other. +I don't know how others are doing, but if you're caught doing it and asked about it, it's usually a great excuse. The point is that your wife will remark that you are just serving her an aura. +It's not very glorious, not really honest, but it is what it is, you try to explain the meaning of your behavior somehow. + +If I responded with "I don't have a good explanation" instead of an excuse or an explanation, different things happen than usual: + +1. My wife responds with a smile and the situation relaxes +2. The pressure that I myself may feel in such a situation is gone immediately + +This is not just an empty phrase. It's probably the only thing I could say that is really true, because the fact is: I usually really don't have a goo explanation for my behavior in such situations. That makes this answer very honest. + +If everything else is an excuse anyway and the pitiful attempt to make sense of nonsensical behavior, it is probably not worth the effort. + +I will keep this way. I can't say today whether this will pay off in the long term and whether we will treat each other better and more honestly as a result. Maybe it will help. + + diff --git a/content/posts/21-22-03.de.md b/content/posts/21-22-03.de.md new file mode 100644 index 0000000..02ab3ea --- /dev/null +++ b/content/posts/21-22-03.de.md @@ -0,0 +1,17 @@ +--- +title: "Justice League - Snyder Cut" +date: 2021-03-22 +draft: true +tags: ["filme"] +series: [""] +--- +Gestern war es soweit. Ich habe mir den langersehnten Snyder Cut des Films Justice League angesehen. Der Film war insgesamt schon ziemlich gut, hat aber dennoch meiner Meinung nach nicht das Niveau vorheriger Zack Snyder Filme erreicht. + +Mir fast 4 Stunden Laufzeit war der Film fast doppelt so lang wie die Kinofassung. Das gute daran ist, dass hier icht einfach nur entfallene Szenen in den Film gestückelt wurden. Stattdessen hat man sehr viel mehr Tiefgang im gesamten Film geschaffen. Die Stories und Motive der einzelnen Helden und auch der Bösewichte wurden sehr viel ausführlicher erzählt als bei der Kinofassung. Das ist meiner Meinung nach auch ein ganz wichtiger Untschied der beiden Fassungen. Ich fand, dass in der original Kinofassung einfach viel zu wenig erklärt wurde. +Was mir auch gut gefallen hat war, dass man sich in manchen Szenen einfach Zeit gelassen hat um so die Stimmung wirken lassen zu können. Das kennt man schon aus anderen Zack Snyder Filmen, gerade Man of Steel war hier ganz groß. Im Vergleich zu Man of Steel muss man allerdings auch sagen, dass diese ruhigen Momente in Justice League lange nicht so gut waren wie in Man of Steel. + +Was etwas seltsam war, war das Filmformat. Statt 16:9 Bildformat wurde hier eine Art 4:3 gewählt, ich glaube es war das Imax Format. Ich fand das Format eher störend und irritierend. Das hat auch noch die Tatsache unterstützt, dass der Film in der Bildgestaltung sowieso nicht allzu gut war. Ich weiß nicht genau wie ich das erklären soll, aber wenn ich mir im Vergleich Filme wie Watchmen, 300, Sucker Punch oder Man of Steel ansehe, dann waren diese Filme der Bildgestaltung her in fast jeder Szene perfekt. In den neueren Filmen Zack Snyder ist das leider nicht mehr so. + +Insgesamt war der Film sehr gut und unterhaltsam. Ich muss jedoch auch sagen, dass wir meiner Meinung nach den Punkt erreicht haben an dem die meisten Superheldengeschichten erzählt sind. Marvel und DC haben mittlerweile zu allen ihren Helden mehr als nur einen Film. Hinzu kommen noch Filme wie Justice League in denen mehrere Helden zusammen kommen. Ich für meinen Teil bin mittlerweile übersättigt was Comicverfilmungen angeht. + + diff --git a/content/posts/21-22-03.en.md b/content/posts/21-22-03.en.md new file mode 100644 index 0000000..1d717bf --- /dev/null +++ b/content/posts/21-22-03.en.md @@ -0,0 +1,17 @@ +--- +title: "Justice League - Snyder Cut" +date: 2021-03-22 +draft: true +tags: ["movies"] +series: [""] +--- +The time had come yesterday. I watched the long-awaited Snyder Cut from Justice League. The film was pretty good overall, but in my opinion it still didn't reach the level of previous Zack Snyder films. + +With a running time of almost 4 hours, the film was almost twice as long as the theatrical version. The good thing about it is that not just deleted scenes have been cut into the film. Instead, you created a lot more depth in the entire film. The stories and motifs of the individual heroes and the villains were told in much more detail than in the theatrical version. In my opinion, this is also a very important difference between the two versions. I found that the original theatrical version simply didn't explain enough. +What I also liked was that in some scenes you simply took your time to let the mood take effect. You already know that from other Zack Snyder films, especially Man of Steel was really big here. Compared to Man of Steel, it has to be said that those quiet moments in Justice League weren't nearly as good as in Man of Steel. + +What was a little strange was the film format. Instead of 16: 9 picture format, a kind of 4: 3 was chosen, I think it was the Imax format. I found the format rather annoying and irritating. That also supported the fact that the film wasn't very good at the composition anyway. I don't know exactly how to explain that, but when I watch movies like Watchmen, 300, Sucker Punch or Man of Steel in comparison, these films were perfect in terms of the picture composition in almost every scene. Unfortunately, this is no longer the case in Zack Snyder's newer films. + +Overall, the film was very good and entertaining. I have to say, however, that in my opinion we have reached the point where most of the superhero stories are told. Marvel and DC now have more than one movie about all of their heroes. There are also films like Justice League in which several heroes come together. For my part, I'm now saturated when it comes to comic book adaptations. + + diff --git a/content/posts/21-23-03.de.md b/content/posts/21-23-03.de.md new file mode 100644 index 0000000..ed99c22 --- /dev/null +++ b/content/posts/21-23-03.de.md @@ -0,0 +1,38 @@ +--- +title: "Wann ist Kundendienst so schlecht geworden?" +date: 2021-03-23 +draft: true +tags: ["work"] +series: ["","Kompetenz im Kundedienst"] +--- +Ich wundere mich schon seit längerem darüber wie unterirdisch so mancher Kundendienst ist. Ich habe eigentlich täglich mit großen Firmen wie Amazon oder DPD zu +tun und es ist immer wieder spannend zu sehen wie nutzlos der Kundendienst die meiste Zeit ist. + +## Du willst uns erreichen? Na dann viel Erfolg dabei + +Ich weiß nicht wie es anderen geht, aber ich bin jemand, der den Kundendienst einer Firma in der Regel nur dann kontaktiert, wenn er wirklich nicht weiterkommt. +Das bedeutet, dass mein Problem in der Regel nicht über die FAQ Seite beantwirtet werden kann. + +Bei den meisten Firmen geht hier schon der Frust für mich als Kunden los. Bei vielen Firmen muss man wirklich auf die Suche gehen, wo man Kontakt zum +Unternehmen aufnehmen kann. E-Mail, Telefonnummer oder einfach nur ein Tocket eröffnen? Fehlanzeige! Meistens muss man sich erst einmal durch Chatbots oder +andere Frage-Antwort-Spiele wühlen bevor man mit etwas Glück seine Frage stellen kann. + +## Sind solche künstlichen Barrieren wirklich notwendig? + +Die Botschaft, die vermittelt wird ist leider oft sehr deutlich: "Wir möchten nicht, dass Du uns kontaktiert". Hat man es endlich geschafft in einem +Ticketsystem oder einem einigermaßen sinvollen Call-System zu landen wird man meistens wenig dezent darauf hingewiesen, dass "aufgrund des hohen Aufkommens an +Kundenanfragen zur Zeit mit einer längeren Wartezeit zu rechnen ist.". Meistens werden einem auch gleich noch die FAQ oder Hilfseiten als "bessere Alternative" zur Wartezeit angeboten. Die bösen, bösen Kunden. Verstopfen die Leitungen mit Ihren Fragen! +Irgendwo in diesem Prozess wurde mir als Kunden natürlich noch eine Standardfloskel wie "Du, lieber Kunde, bist uns als Unternehmen sehr wichtig" eingestreut. +Gott sei Dank, jetzt geht es mit gleich viel besser 😇 + +## Wann ist Kommunikation mit den Kunden so unwichtig geworden? + +Ich weiß ja nicht...vielleicht werde ich ja aufgrund meines ALters mittlerweile komisch, aber ist eine direktes Gespräch mit einem Kunden für ein Unternehmen +nicht immer auch eine Gelegenheit? Die meiste Zeit macht man sich doch als Unternehmen Gedanken darüber welche Produkte man anbieten könnte und wie man seine Kunden +am besten erreicht etc. + +Es wäre doch viel besser, wenn man die Anfrage beim Kundendienst als Gelegenheit nutzt. Natürlich ist das auch Arbeit, weil der Kunde sich ja aufgrund eines +Problems meldet. Löst man aber das Problem des Kunden (was man ja eh tun muss) hat man hier die Gelegenheit einfach an Kundenfeedback zu kommen und einen Dialog +mit dem Kunden zu führen. + + diff --git a/content/posts/21-23-03.en.md b/content/posts/21-23-03.en.md new file mode 100644 index 0000000..6378691 --- /dev/null +++ b/content/posts/21-23-03.en.md @@ -0,0 +1,37 @@ +--- +title: "When did customer service really get that bad?" +date: 2021-03-23 +draft: true +tags: ["work"] +series: ["","Competence in customer service"] +--- +I've been wondering for a long time how underground some customer service is. I actually work with big companies like Amazon or DPD every day +do and often wonder how useless customer service is most of the time. + +## Do you want to contact us? Well then, good luck with it + +I don't know about others, but I am someone who usually only contacts a company's customer service department when I am really stuck. +This means that my problem can usually not be answered via the FAQ page. + +For most companies, this is where the frustration starts for me as a customer. With many companies you really have to look for where to contact +Company can accommodate. Email, phone number or just open a pocket? Nothing! Most of the time you first have to go through chatbots or +rummage through other question-answer games before, with a bit of luck, you can ask your question. + +## Are such artificial barriers really necessary? + +The message that is conveyed is unfortunately often very clear: "We don't want you to contact us". Did you finally make it to a +Ticket system or a reasonably usable call system you are discreetly pointed out that "due to the high volume of +Customer inquiries a longer waiting time is to be expected. ". Mostly the FAQ or help pages are also offered as a" better alternative "to the waiting time. The bad, bad customers. Clog the lines with your questions! +Somewhere in this process, as a customer, I was of course interspersed with a standard phrase like "You, my dearest customer, are very important to us as a company". +Thank goodness, now I feel much better 😇 + +## When did communication with customers become so unimportant? + +I don't know ... maybe my age makes me weird, but is a direct conversation with a customer for a company +not always an opportunity? Most of the time a company you thinks about which new product to offer and how to reach the customers. + +It would be much better if you used the customer service inquiry as an opportunity. Of course, that is also work, because the customer is is asking for help +with a problem. But if you solve the customer's problem (which you have to do anyway) you have the opportunity to simply get customer feedback and a dialogue +to lead with the customer. + + diff --git a/content/posts/21-24-03.de.md b/content/posts/21-24-03.de.md new file mode 100644 index 0000000..17f0f60 --- /dev/null +++ b/content/posts/21-24-03.de.md @@ -0,0 +1,32 @@ +--- +title: "Projekte & Abschlüsse" +date: 2021-03-24 +draft: true +tags: ["work","projekte"] +series: [""] +--- +Wir sind gerade in der Firma in einer Phase kurz nach einem Projekt. Wir haben zuvor 6 Wochen damit verbracht ein neues Corporate Design zu entwickeln und zu +planen. Ich hatte die Projektleitung dabei. Jetzt sind wir gerade an einem Punkt, an dem wir zwar das Projekt recht gut umgesetzt haben, aber es noch eine Menge +Verwirrung dazu gibt. + +Das Problem ist eigentlich, dass ich nicht dafür gesorgt habe, dass wir mit einem klaren Fahrplan für Anpassung unserer ganzen Werbemittel etc. aus dem Projekt +gehen. Das führt gerade zu Unklarheiten und Unsicherheit bei meinen Kollegen. Das gute dabei ist, dass meine Kollegin mittlerweile lernt sehr viel offener Dinge +anzusprechen. Sie hat einen großartigen internen Blogpost gemacht in dem sie klar geäußert hat wie sie sich fühlt und was passiert, wenn wir das Projekt jetzt +so stehen lassen. + +## Den richtigen Weg zu finden ist gar nicht so einfach + +Wir arbeiten jetzt seit ca. 1 Jahr in Projektzyklen. D.h. wir machen jeweils 6 Wochen Projekt und dann 2 Wochen Pause. Von der Sache her funktioniert das +eigentlich ziemlich gut, da wir es so schaffen Dinge anzugehen, die für die Firma wichtig sind statt nur das tägliche Rauschen abzuarbeiten. + +Dennoch haben wir noch viel zu lernen. Zur Zeit ist es so, dass ich der einzige bin, der sich Gedanken darüber gemacht hat, wie man am besten an die internen +Projekte herangeht. Das führt bei mir gerade zu etwas Frust angesichts der oben genannten Situation. Ich bin zur Zeit noch nicht in der Lage mich und +meine Kollegen in unseren Projekten so zu führen, dass wir wirklich vorwärts kommen. Es fühlt sich manchmal an als würde man Steine schneiden. + +Ich das Gefühl, dass meine Kollegen zwar alles bereitwillig mitmachen, aber es fehlt an dem Blick für das "warum". Es ist leider nicht genug +Interesse vorhanden, dass man sich eingehender damit befassen möchte "wie wir arbeiten". Das ist aber nicht der Fehler meiner Kollegen. Ich muss einen Weg finden +das Interesse dafür zu wecken bestmöglich zu arbeiten. Wie ich das hinbekomme weiß ich noch nicht. + +Vielleicht bin ich aber auch zu ungeduldig und ich sehr den Fortschritt gerade noch nicht? + + diff --git a/content/posts/21-24-03.en.md b/content/posts/21-24-03.en.md new file mode 100644 index 0000000..09c8a78 --- /dev/null +++ b/content/posts/21-24-03.en.md @@ -0,0 +1,29 @@ +--- +title: "Projekte & Deadlines" +date: 2021-03-24 +draft: true +tags: ["work","projects"] +series: [""] +--- +In our company we are currently in a phase shortly after a project. We had previously spent 6 weeks developing and installing a new corporate design. I had the +project lead. We are now at the point where we have implemented the project quite well, but there seems to be a lot confusion about the next steps. + +The problem is actually that I did not ensure that we had a clear timetable for adapting all of our advertising material etc. from the project +walk. This leads to confusion and uncertainty among my colleagues. The good thing is that my colleague is now learning to address issues a lot more openly. She did a great internal blog post in which she clearly stated how she felt and what would happen if we did not put the work in to solve the situation. + +## Finding the right way is not that easy + +We have been working in project cycles for about 1 year. That means we do a 6-week project and then a 2-week break. It works +actually pretty good, because we manage to tackle things that are important and meaningful for the company instead of just dealing with the daily noise. + +Still, we have a lot to learn. At the moment, I'm the only one who has thought about how best to approach the internal +projects. That leads to some frustration for me, especially in situations like the above-mentioned. At the moment I am not yet able to lead myself and +my colleagues in such a way that we really get ahead. Sometimes it feels like cutting stones. + +I have the feeling that my colleagues willingly go along with everything, but they lack an understanding of the "why". Unfortunately there is not enough +interest in delving deeper into "how we work". That is not my colleagues' fault. I have to find a way +to arouse interest in doing the best possible job. I don't know how to do that yet. + +But maybe I'm too impatient and I'm not very aware of the progress yet? + + diff --git a/content/posts/21-25-03.de.md b/content/posts/21-25-03.de.md new file mode 100644 index 0000000..8df20b9 --- /dev/null +++ b/content/posts/21-25-03.de.md @@ -0,0 +1,50 @@ +--- +title: "Die Meinung der anderen" +date: 2021-03-25 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +In der heutigen Zeit ist es einfach, dass man den Meinungen anderer beeinflusst wird. Genau genommen bekommt man die Meinung anderer nicht nur kostenlos, sondern auch ungefragt, egal ob man sie hören will oder nicht. + +Jeder der einen Social Media Account hat lässt seine Meinung zu einem Thema vom Stapel und pustet sie in die Welt hinaus. + +Bei den ist es nicht besser. Ich interessiere mich normalerweise so gar nicht für Nachrichten, habe aber aufgrund der Pandemie im letzten Jahr einigermaßen regelmäßig Nachrichten gesehen. Aus meiner Sicht sind die Nachrichten kein Stück besser als Social Media. +Dabei folgen die Nachrichten den gleichen Grundregeln wie der Quatsch den wir teilweise in den sozialien Medien sehen, mit einem etwas offizielleren Charakter. Es geht nicht darum was wahr oder gut ist, es geht eigentlich nur darum was die meiste Aufmerksamkeit erzeugt. +In Laufe der Pandemie hat man das sehr schön gesehen. Nch kurzer Zeit ging es nur noch um Wirtschaft, um Infektionszahlen und darum wer Schuld daran hat, dass die kürzlich beschlossenen Maßnehmen nicht funktionieren. +Das was das größte Potential hat den Zuschauer oder Leser aufzuregen wird genommen 😇. + +## Warum sollte man sich überhaupt mit den Meinungen anderer abgeben? + +Man könnte sich jetzt auf die Position zurückziehen, dass die Meinungen anderer ja unwichtig sind und dass es nur auf einen selbst ankommt. Das funktioniert aber nicht. Wir können nicht nur in unserem eigenen Kopf und unserer eigenen Gedankenwelt leben. +Die Meinung anderer hilft uns dabei unseren eigenen Blick auf die Wet zu schärfen und liefert uns durchaus immer wieder interessante Einblicke. +Gerade für diejenigen die kreativen Output produzieren ist die Meinung anderer unerlässlich. Sie hilft uns dabei besser zu werden, unsere Produkte und unsere Kunst zu verbessern und noch so vieles mehr. + +## Man muss darauf achten was man reinlässt + +Am liebsten wäre es mir wahrscheinlich einfach alle Meinungen komplett zu ignorieren. Das wäre bequem, schmerzfrei und würde für den Moment super funktionieren. + +Dann habe ich da ja auch noch die [[Liste meiner Lieblingsmenschen]] 🥰. Wenn ich mich dazu entschließe nur Meinungen in meinen Kopf zu lassen, wenn der Autor der Meinung auf der Liste steht ist das wahrscheinlich schon einmal ein ziemlich guter Filter. + +Dennoch bin ich der Meinung, dass auch das mittel- bis langfristig zu Stagnation führt. + +Und was ist eigentlich, wenn jemand nicht auf der Liste steht, seine Meinung aber vollkommen nachvollziehbar und berechtigt ist? + +Eine andere Möglichkeit zu Filtern ist wahrscheinlich auch wie lange ich brauche um die Meinung zu konsumieren. Für einen Tweet brauche ich vielleicht 5 Sekunden, ist die Meinung aber in einem Blogpost verfasst für den ich 30 Minuten brauche sieht das schon anders aus. +Die ganzen Ein- und Zweizeiler Clickbait Meinungen kann man im Grunde komplett ignorieren. Warum sollte man eine Meinung in seinen Kopf lassen, die einfach so im Raum steht? + +## Fazit + +Im Grunde kommt es wahrscheinlich auf 2 Dinge an: + +1. Kommt die Meinung jemandem, dem man vertraut +2. Und/Oder hat sich derjenige die Mühe gemacht zu erklären warum er dieser Meinung ist + +Alles andere kann man wahrscheinlich getrost ignorieren zggl. so einiger Grauzonen zwischendrin. + +Das wichtigste ist sowieso, dass man, egal ob man eine Meinung in seinen Kopf lässt, sich seine eigenen Gedanken macht. + +Aber das hier ist ja auch nur eine weitere Meinung. + + + diff --git a/content/posts/21-25-03.en.md b/content/posts/21-25-03.en.md new file mode 100644 index 0000000..4ece08b --- /dev/null +++ b/content/posts/21-25-03.en.md @@ -0,0 +1,50 @@ +--- +title: "The optinion of the others" +date: 2021-03-25 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +In this day and age, it's easy to be influenced by the opinions of others. Strictly speaking, you not only get the opinion of others for free, but also without being asked whether you want to hear them or not. + +Everyone who has a social media account lets his opinion on a topic from the stack and blows it out into the world. + +It's not better with them. I'm usually not that interested in the news, but I've seen the news fairly regularly over the past year due to the pandemic. From my point of view, the news is no better than social media. +The news follows the same basic rules as the nonsense that we sometimes see in social media, with a somewhat more official character. It's not about what's true or what's good, it's actually just about what gets the most attention. +That was seen very nicely in the course of the pandemic. Before long it was only about the economy, the number of infections and who is to blame for the fact that the recently decided measures do not work. +What has the greatest potential to excite the viewer or reader is taken 😇. + +## Why should one even bother with the opinions of others? + +One could now withdraw to the position that the opinions of others are unimportant and that it is only up to you that matters. But that doesn't work. We cannot just live in our own mind and thoughts. +The opinion of others helps us to sharpen our own view of the wet and provides us with interesting insights again and again. +The opinion of others is essential, especially for those who produce creative output. It helps us to get better, to improve our products and our art and so much more. + +## You have to pay attention to what you let in + +I would probably prefer to just ignore all opinions completely. That would be comfortable, painless, and would work great for the moment. + +Then I also have the [[list of my favorite people]] 🥰. If I decide to just let opinions in my head when the author of the opinion is on the list, that's probably a pretty good filter. + +Nevertheless, I am of the opinion that this will also lead to stagnation in the medium to long term. + +And what if someone is not on the list, but their opinion is completely understandable and justified? + +Another way to filter is probably how long it will take me to consume the opinion. For a tweet I might need 5 seconds, but if the opinion is written in a blog post that takes me 30 minutes, things look different. +The whole one- and two-line clickbait opinions can basically be ignored completely. Why should you let an opinion in your head that just stands there? + +## Conclusion + +Basically, it probably comes down to 2 things: + +1. The opinion comes from someone you trust +2. And / or has the person bothered to explain why he or she is of this opinion + +Everything else can probably be safely ignored zggl. so a few gray areas in between. + +The most important thing is anyway that, regardless of whether you let an opinion in your head, you make your own thoughts. + +But this is just another opinion. + + + diff --git a/content/posts/21-26-03.de.md b/content/posts/21-26-03.de.md new file mode 100644 index 0000000..b308ded --- /dev/null +++ b/content/posts/21-26-03.de.md @@ -0,0 +1,22 @@ +--- +title: "Dinge, die nicht so funktioniert haben, wie ich dachte." +date: 2021-03-26 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +Okay, das wird vielleicht komisch. Ich habe gerade beschlossen mich mit den Fehlschlägen in meinem Leben auseinanderzusetzen. Ich bin mir fast sicher, dass dieses Thema aus ganz anderen Gründen schwierig wird als manch einer denkt. + +Mir fällt es schwer Fehlschläge in meinem Leben überhaupt als solche zu registrieren. Vielleicht liegt es daran, dass ich eigentlich nie etwas bereue, sondern dankbar für jede Erfahrung bin, die ich gemacht habe. Auf jeden Fall merke ich gerade, dass das eine Kopfnuss wird. Ich habe zwar bereits 2 Dinge identifiziert, aber es war nicht ganz einfach. + +Wahrscheinlich brauche ich einfach nur eine andere Bezeichnung dafür, die besser zu dem passt wie ich das empfinde. Vielleicht Dinge, die nicht so funktioniert haben, wie ich dachte? + +## Wieso will ich das überhaupt machen? + +Mir geht es dabei gerade darum mir ein paar Dinge bewusst zu machen. Ich möchte einfach verstehen was schiefgelaufen, warum ich welche Entscheidungen getroffen habe und was ich daraus lernen kann. + +Ich bin mir sicher, dass ich vieles unterwegs gelernt habe und es ist mit Sciherheit unmöglich alles zu rekapitulieren. Dennoch hat man ja in seinem Leben immer mal wieder vor großen Veränderungen gestanden und sich für das eine oder andere entschieden. + +Es sollte machbar sein ein paar der großen Brocken zu identifizieren und sich genauer anzuschauen warum man sich dafür entschieden hat und warum das am Ende nicht so lief, wie man es sich vorgestellt hat. + + diff --git a/content/posts/21-26-03.en.md b/content/posts/21-26-03.en.md new file mode 100644 index 0000000..03c7c63 --- /dev/null +++ b/content/posts/21-26-03.en.md @@ -0,0 +1,22 @@ +--- +title: "Things that didn't work out the way I thought" +date: 2021-03-26 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +Okay, this might be weird. I've just decided to deal with the failures in my life. I am almost certain that this topic will be difficult for completely different reasons than some people think. + +I find it difficult to even register failures in my life as such. Maybe it's because I never really regret anything, but rather am grateful for every experience I've had. In any case, I'm just noticing that this is going to be a headache. I already identified 2 things, but it wasn't that easy. + +I probably just need a different name for it that better fits how I feel about it. Maybe things that didn't work the way I thought? + +## Why do I even want to do that? + +For me, it's just about making myself aware of a few things. I just want to understand what went wrong, why I made which decisions and what I can learn from them. + +I am sure that I learned a lot on the way and it is impossible to recapitulate everything with certainty. Nevertheless, you have always faced major changes in your life and decided on one thing or the other. + +It should be feasible to identify a few of the big chunks and take a closer look at why you decided to do it and why it didn't work out as you imagined it in the end. + + diff --git a/content/posts/21-27-03.de.md b/content/posts/21-27-03.de.md new file mode 100644 index 0000000..b7ccaa4 --- /dev/null +++ b/content/posts/21-27-03.de.md @@ -0,0 +1,12 @@ +--- +title: "Tagesroutine ändern" +date: 2021-03-27 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +Ich habe heute so gedacht, dass ich meine [Tagesroutine](https://publish.obsidian.md/m3tam3re/%E2%9C%85+-+NOTIZEN/Tagesroutine) noch anders nutzen muss. Ich +habe mir zwar bei vielen Dingen schon die Mühe gemacht sie aufzuschreiben, dennoch glaube ich, dass ich mir gerade so etwas wie wichtige Ziele und Gründe +täglich ansehen sollte. + + diff --git a/content/posts/21-27-03.en.md b/content/posts/21-27-03.en.md new file mode 100644 index 0000000..371bffb --- /dev/null +++ b/content/posts/21-27-03.en.md @@ -0,0 +1,12 @@ +--- +title: "Changing my daily routine" +date: 2021-03-27 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +Today I thought that I would have to use my [daily routine](https://publish.obsidian.md/m3tam3re/%E2%9C%85+-+NOTIZEN/Tagesroutine) differently. I +I have already written them down for many things, but I still believe that I have something like important goals and reasons +should watch daily. + + diff --git a/content/posts/21-28-03.de.md b/content/posts/21-28-03.de.md new file mode 100644 index 0000000..66308cf --- /dev/null +++ b/content/posts/21-28-03.de.md @@ -0,0 +1,52 @@ +--- +title: "Wochenplanung - bloß weg mit dem verdammten Kalender" +date: 2021-03-28 +draft: true +tags: ["blabla","life","produktivität"] +series: [""] +--- +Ich habe letzte Woche damit angefangen meine Wochen im Voraus zu planen: + +- Arbeit +- persönliches Wachstum +- Sport +- ... you name it + +Nachdem ich in der letzten Woche ganz klassisch unterwegs war, habe ich diese Woche einfach alles anders gemacht, dazu später mehr. + +## Die letzte Woche +Ich habe ganz klassisch mit meinen Notizen und einem Kalender die Woche durchgeplant. Da ich nicht vollkommen wahnsinnig bin hatte ich mir zuvor eine Vorlage ausgearbeitet, die mir die wöchentliche Planung erleichter. + +Soweit so gut, aber ein Kalender? Ich habe nicht die geringste Ahnung wie ein Kalender jemals bei sowas hätte hilfreich sein können. Na klar, den Geburtstag XYZ kann man eintragen oder den Besuch Geschäftspartner Blablabla. + +Ich dachte aber ich versuche es trotzdem mal, d.h. ich habe meine Routinen als wiederkehrende Ereignisse eingespeichert, habe Arbeitsblöcke festgelegt etc. etc. + +Ich habe jetzt leider keinen Screenshot mehr, weil ich den Kalender nach 2 Tagen gelöscht und zum Teufel gejagt habe, aber der war einfach: + +- überfüllt +- unübersichtlich +- ablenkend +- verstörend + +## Zurück zu Omnifocus +Ich habe zwar letztens darüber geschrieben, dass das [richtige Werkzeug nur eine Ausrede ist](https://www.m3tam3re.com/2021/21-19-03/), aber ich habe prompt meine erste Ausnahme gefunden. + +Ich habe vor Jahre schon Omnifocus genutzt und habe damals zugunsten Teamarbeit und Co. in der Firma Omnifocus zugunsten Basecamp verworfen (der Weg zu Basecamp führte allerdings auch über Umwege. Vielleicht ein anderes Mal). + +Nachdem ich letzten Sonntag alles peinlich genau für die kommende Woche geplant hatte und mich in meine gut geplante aber unübersichtliche Woche gestürzt hatte, fiel es mir am Dienstag wie Schuppen den Augen. Mit Omnoficus geht das alles so viel einfacher. + +Ohne jetzt hier eine Programmvorstellung machen zu wollen hier einmal ein paar Schlüsselaspekte: + +- Zurückstellen Aufgaben: Wenn ich meine Woche plane kann ich Aufgaben, die ich in dieser Woche eh nicht machen will zurückstellen. Wenn ich nun meine Perpektiven richtig eingestellt habe sind diese Aufgaben komplett verschwunden, dadurch sehe ich nur die Aufgaben, wie für die Woche wirklich relevant sind +- Tagesplanung: Ich habe eine eigene Perspektive für die Planung des nächsten Tages. +- Heute: Ich habe mir eine Heute Perspektive eingerichtet. Hier werden nur Objekte angezeigt, die ich in der Tagesplanung zugewiesen habe. Dadurch sehe ich wirklich nur das, was für den Tag interessant ist. +- Aufgabenerfassun: Über eine Hotkey kann ich innerhalb Sekunden eine neue Aufgabe oder Notiz erfassen. Dadurch schaffe ich es bei Störungen sofort wieder an die Arbeit zu gehen. Hotkey -> Notiz -> zurück zur Aufgabe + +## Die heutige Planung +Meine heutige Wochenplanung war im Vergleich zur letzten Woche geradezu lächerlich einfach. Ich habe gerade mal 30 Minuten dafür gebraucht und es hat sogar Spaß gemacht. + +Das Beste daran ist, dass ich mir sicher bin, dass ich alles im Blick hatte und auch garantiert nichts übersehen habe. Die Woche kann kommen. + +Die Wochenplanung mit Omnifocus will ich aber trotzdem nach und nach weiter ausarbeiten und verbessern. + + diff --git a/content/posts/21-28-03.en.md b/content/posts/21-28-03.en.md new file mode 100644 index 0000000..6b6a4fd --- /dev/null +++ b/content/posts/21-28-03.en.md @@ -0,0 +1,52 @@ +--- +title: "Weekly planning - just get rid of that damn calendar" +date: 2021-03-28 +draft: true +tags: ["blabla","life","productivity"] +series: [""] +--- +I started planning my weeks in advance last week: + +- Job +- personal growth +- Sports +- ... you name it + +After I was on the classic road last week, I just did everything differently this week, more on that later. + +## The last week +I planned the week through the classic way with my notes and a calendar. Since I am not completely insane, I had previously worked out a template that made the weekly planning easier for me. + +So far so good, but a calendar? I have absolutely no idea how a calendar could ever have been helpful with this. Of course, you can enter XYZ's birthday or a visit from business partner blah blah blah blah blah blah blah blah blah blah blah bla trails. + +But I thought I would give it a try anyway, i.e. I saved my routines as recurring events, defined work blocks etc. etc. + +Unfortunately, I don't have a screenshot anymore because I deleted the calendar after 2 days and chased the hell out of it, but it was easy: + +- overfilled +- confusing +- distracting +- disturbing + +## Back to Omnifocus +I recently wrote about the [correct tool is just an excuse] (https://www.m3tam3re.com/2021/21-19-03/), but I promptly found my first exception. + +I used Omnifocus years ago and at that time discarded Omnifocus in favor of Basecamp in favor of teamwork and co. + +After I had meticulously planned everything for the coming week last Sunday and plunged into my well-planned but confusing week, it fell like scales from my eyes on Tuesday. It's so much easier with Omnoficus. + +Without wanting to present a program here, here are a few key aspects: + +- Postpone tasks: When I plan my week, I can postpone tasks that I don't want to do this week anyway. If I have now set my perspectives correctly, these tasks have completely disappeared, so I only see the tasks that are really relevant for the week +- Daily planning: I have my own perspective for planning the next day. +- Today: I have set up a Today perspective. Only objects that I have assigned in the daily planning are displayed here. As a result, I really only see what is interesting for the day. +- Task recording: I can use a hotkey to record a new task or note within seconds. This enables me to go back to work immediately in the event of a malfunction. Hotkey -> Note -> back to the task + +## Today's planning +My weekly planning today was ridiculously easy compared to last week. It only took me 30 minutes and it was even fun. + +The best part is that I am sure that I had everything in view and guaranteed not to overlook anything. The week can come. + +Nevertheless, I want to gradually develop and improve the [[weekly planning with omnifocus]]. + + diff --git a/content/posts/21-30-03.de.md b/content/posts/21-30-03.de.md new file mode 100644 index 0000000..74389c8 --- /dev/null +++ b/content/posts/21-30-03.de.md @@ -0,0 +1,19 @@ +--- +title: "Schreiben ist nicht einfach" +date: 2021-03-30 +draft: true +tags: ["blabla","life"] +series: [""] +--- +Eigentlich wollte ich heute an dem Thema weiterschrieben, dass ich gestern angefangen habe. Das habe ich auch. In meinen Notizen habe ich ein paar Abschnitte +weitergeschrieben. Ich habe aber das Gefühl, dass ich noch nicht bei dem bin worauf ich eigentlich hinaus will bei dem Thema. Es wirkt so als würde ich noch +etwas übersehen oder noch nicht ganz klar bekommen. + +Seine Gedanken un Worte zu fassen ist anstrengend. Oft weiß man nicht genau wie man etwas so formulieren soll, dass es auch Sinn ergibt. Gleichzeitig macht das +Schreiben Fehler in den eigenen Denkmustern sehr offensichtlich. Mir geht es oft so, dass ich etwas schreibe und dann später lese, nur um dann zu dem Schluss +zu kommen, dass ich mir etwas vormache oder mich selbst austrickse. + +Das ist glaube ich schon einmal ein Vorteil des Schreibens. Man ist außerhalb seines eigenen Kopfes damit und dreht sich nicht nur um sich selbst. Mit etwas +Abstand das Geschriebene nochmal zu lesen schafft viel Klarheit. + + diff --git a/content/posts/21-30-03.en.md b/content/posts/21-30-03.en.md new file mode 100644 index 0000000..c377e2e --- /dev/null +++ b/content/posts/21-30-03.en.md @@ -0,0 +1,14 @@ +--- +title: "It's not easy to write" +date: 2021-03-30 +draft: true +tags: ["blabla","life"] +series: [""] +--- +Actually, I wanted to continue to write on the topic today that I started yesterday. I have. In my notes I have written a few sections, but I had the feeling that I have not yet found the point of what I would like to express. It seems like there is something that I overlooked or that is not quite clear. + +To grasp your thoughts is exhausting. Often you do not know exactly how to formulate something in order to make sense of it. At the same time writing often reveals mistakes in thought patterns. I often feel that I write something and then read it later, only to conclude, that I fooled myself about something. + +That's where the huge advantage of writing comes into play. One is outside of his own head and is not just about himself. Writing allows to come back to one's thoughts and helps to deliver clarity in thinking. + + diff --git a/content/posts/21-31-03.de.md b/content/posts/21-31-03.de.md new file mode 100644 index 0000000..c432987 --- /dev/null +++ b/content/posts/21-31-03.de.md @@ -0,0 +1,22 @@ +--- +title: "Festgebissen..." +date: 2021-03-31 +draft: true +tags: ["blabla","programmieren"] +series: [""] +--- +Ich habe gestern Abend an einer oAuth 2 Authentifizierung für eine API gesessen, die wir auf der Arbeit nutzen. Eigentlich sollte das Ganze eine einfache Machbarkeitsstudie werden. +Die Voraussetzungen dafür waren eigentlich ganz gut: + +- eine gut dokumentierte API +- eine oAuth 2 Library die mir Teile der grundlegenden Arbeit abnimmt + +Tja, soviel zur Theorie. Mit Hilfe der Library hätte das alles relativ einfach sein sollen. Das war auch das was ich gestern Abend immer wieder gedacht habe. "Es ist alles richtig, das muss funktionieren". + +Nach 2 Stunden bin ich dann doch mißtrauisch geworden. Ich habe über [n8n](https://www.n8n.io/) mal schnell das gleiche versucht, nur um dann festzustellen, dass ich hier das gleiche Problem habe. + +Danach habe ich noch einmal die Gegenprobe gemacht und sowohl in meinem Code als auch in n8n mit der Github API kommuniziert...ohne Probleme. + +So ist es leider manchmal. + + diff --git a/content/posts/21-31-03.en.md b/content/posts/21-31-03.en.md new file mode 100644 index 0000000..46210b7 --- /dev/null +++ b/content/posts/21-31-03.en.md @@ -0,0 +1,22 @@ +--- +title: "Difficult API" +date: 2021-03-31 +draft: true +tags: ["blabla","coding"] +series: [""] +--- +Last night I was working an oAuth 2 authentication for an API that we use at work. Actually, the whole thing should have been a simple feasibility study. +The prerequisites for this were actually quite good: + +- a well-documented API +- an oAuth 2 library that does most of the basic work for me + +Well, so much for the theory. With the help of the library, it should all have been relatively easy. That was also what I kept thinking last night. "Everything is right, it has to work." + +After 2 hours I got suspicious. I quickly tried the same thing via [n8n](https://www.n8n.io/), only to find out that I have the same problem here. + +Then I did the cross-check again and communicated with the Github API both in my code and in n8n ... without any problems. + +Unfortunately, that's the way it is sometimes. + + diff --git a/content/posts/bitwarden.de.md b/content/posts/bitwarden.de.md new file mode 100644 index 0000000..af50b45 --- /dev/null +++ b/content/posts/bitwarden.de.md @@ -0,0 +1,45 @@ +--- +title: "Bitwarden - Open Source Passwortmanager" +date: 2020-08-20 +draft: false +tags: ["sicherheit","tools"] +archive: ["Technik Zeug"] +series: [""] +featuredImage: "/img/bitwarden/bitwarden.gif" +--- +# Bitwarden - ein großartiger Passwortmanager + +Ich habe jahrelang 1 Passwor benutzt um meine Kennwörter sicher aufzubewahren. Das Programm hat mir immer gute Dienste geleistet. +Als die Firma vor ein paar Jahren das Lizenzmodell umgestellt hat, habe ich nach einer Alternative umgesehen. +Seither setze ich stattdessen [Bitwarden](https://bitwarden.com/) ein und habe seitdem auch nie wieder zurückgeschaut. + +Bitwarden ist im Gegensatz zu anderen Passwort Managern, wie 1 Passwor oder Dashlane vollkommen kostenlos und ist für alle gängigen Plattformwn verfügbar. +Auch Plugins für alle gängigen Browser sind verfügbar. + +Was ich persönlich auch sehr spannend finde ist, dass Bitwarden Open Source ist. Darüber hinaus betreibt Bitwarden ein Bug Bounty Program über Hackerone um Bugs und Sicherheitsprobleme schnell aufdecken zu können. + + +## Funktionen + +Der Funktionsumfang im Grunde so, wie man es solchen Programmen gewohnt ist. Das Interface erinnert mich stark an 1Passwor was den Umstieg natürlich deutlich erleichtert. Ihr könnt neben Zugangsdaten auch sichere Notizen, Kreditkarten oder auch Identitätsdaten speichern. +Mit einer Browser-Erweiterung kann mann dann z.B. mit einem Klick Kreditkartendaten oder Login-Formulare ausfüllen. + +![Benutzeroberfläche](/img/bitwarden/bitwarden1.gif "Interface") + +Funktionen wie 2-Faktor-Authentifizierung sind selbstverständlich eingebaut und funktionieren sehr gut, wenn man z.B. eine Authenticator App nutzt. +In der Premium Variante kann man aber auch FIDO U2F Sicherheitsschlüssel nutzen, wenn man ganz sicher sein will. + +Die Synchronisation läuft zwischen allen Geräten tadellos. + +## Premium Variante + +Es gibt auch eine Premium Variante, die im Grunde 1 GB sicheren Speicherplatz bietet und FIDO U2F Sicherheitsschlüssel oder Duo Unterstützung. +Die meisten sollten aber mit dem kostenlosen Funktionsumfang locker hinkommen. Ich selbst habe die Premium Variante gebucht, weniger wegenn der Funktionen, sondern um ein wenig zu unterstützen. 10 $ für die Premium Variante sind wirklich günstig. + +Einen Familienaccount gibt es für 12 $ im Jahr für bis zu 5 Benutzer. Was ich hier sehr schön finde ist, dass man Einträge untereinander freigeben kann. + +## Fazit + +Bitwarden ist ein richtig guter Passwort Manager und ein tolles Beispiel dafür, dass Open Source Software einer kommerziellen Lösung in nichts nachstehen muss. + + diff --git a/content/posts/bitwarden.en.md b/content/posts/bitwarden.en.md new file mode 100644 index 0000000..b71a07d --- /dev/null +++ b/content/posts/bitwarden.en.md @@ -0,0 +1,44 @@ +--- +title: "Bitwarden - Open Source password manager" +date: 2020-08-20 +draft: false +tags: ["security","tools"] +archive: ["Technical Stuff"] +series: [""] +featuredImage: "/img/bitwarden/bitwarden.gif" +--- +# Bitwarden - a great password manager + +I used 1 Passwor for years to keep my passwords safe. The program has always served me well. +When the company changed its licensing model a few years ago, I looked for an alternative. +Since then, I have been using [Bitwarden](https://bitwarden.com/) instead and have never looked back since. + +In contrast to other password managers such as 1 Passwor or Dashlane , Bitwarden is completely free and is available for all common platforms. +Plugins for all common browsers are also available. + +What I personally find very exciting is that Bitwarden is open source. In addition, Bitwarden operates a Bug Bounty Program via Hackerone in order to be able to quickly uncover bugs and security problems. + +## Features + +The functionality is basically what you would expect to from such programs. The interface reminds me a lot of 1Passwor which of course makes the switch much easier. In addition to access data, you can also save secure notes, credit cards or identity data. +With a browser extension you can e.g. fill in credit card details or login forms with one click. + +![User Interface](/img/bitwarden/bitwarden1.gif "Interface") + +Functions such as 2-factor authentication are of course built in and work very well, e.g. if you have an authenticator app. +In the premium version you can also use the FIDO U2F security key if you want to be completely safe. + +The synchronization runs flawlessly between all devices. + +## Premium Features + +There is also a premium version, which basically offers 1 GB of secure storage space and FIDO U2F security key or duo support. +Most of them should easily get there with the free range of functions. I booked the premium variant myself, not so much because of the functions, but to provide a little support. $ 10 for the premium variant is really cheap. + +A family account is available for $ 12 a year for up to 5 users. What I think is very nice here is that you can share entries with each other. + +## Conclusion + +Bitwarden is a really good password manager and a great example that open source software has to be in no way inferior to a commercial solution. + + diff --git a/content/posts/datamanagement/why-choose-baserow-to-manage-product-data.de.md b/content/posts/datamanagement/why-choose-baserow-to-manage-product-data.de.md new file mode 100644 index 0000000..2260aea --- /dev/null +++ b/content/posts/datamanagement/why-choose-baserow-to-manage-product-data.de.md @@ -0,0 +1,116 @@ ++++ +title = "Game Changer: Wie Baserow unseren Ansatz zur Datenverwaltung verändert hat" +date = 2023-10-12 +draft = false +tutorials = ["Datenverwaltung"] +datamanagement = ["Baserow"] +featuredImage = "/img/tutorials/baserow/baserow-excel-title.png" ++++ + +## Einführung {#einführung} + +Seit über einem Jahrzehnt ist meine Reise durch die Welt des E-Commerce ein sich ständig weiterentwickelndes Abenteuer. Zusammen mit meinem großartigen Team haben wir zahlreiche Versionen unserer Online-Shops sorgfältig erstellt, verfeinert und iteriert, und sind im Laufe der Jahre von früheren Lösungen wie Magento zu Shopify übergegangen. Neben der Auseinandersetzung mit den gestalterischen Feinheiten und der Abstimmung der Benutzererfahrung mit jeder Iteration habe ich erkannt, wie entscheidend unser Ansatz zur Produkt-Datenverwaltung tatsächlich ist. + +{{< admonition type="tip" title="🧙 Dieser Artikel ist KI-übersetzt" open="false" >}} +🚀 Auch wenn Deutsch meine Muttersprache ist, habe ich Englisch in diesem Blog und auch auf anderen Plattformen den Vorzug. Mein Ziel ist es mein Wissen mit so vielen Menschen wie möglich zu teilen, da komme ich mit der englischen Sprache einfach weiter. Die deutsche Version wurde daher mit Hilfe von KI übersetzt 😉 🤖, wenn Du Fehler findest, darfst Du sie gerne behalten. +{{< /admonition >}} + +Ob wir die Benutzeroberfläche in unserem Shopify-Shop optimierten oder Änderungen an unseren Produktlisten vornahmen, die effektive und effiziente Verwaltung unserer Produktdaten hat sich als Game-Changer erwiesen. Sie hat wirklich den Unterschied ausgemacht zwischen mühsamen, langwierigen Projekten und schnellen, handhabbaren Aufgaben, wodurch wir Dutzende von Stunden an Projektzeit sparen konnten, die wir in anderen Aktivitäten zur Geschäftserweiterung sinnvoller nutzen konnten. + +Mit der Weiterentwicklung unserer Shops hat sich auch unser Ansatz zur Datenverwaltung verändert. Wie viele andere begannen wir mit einem simplen Ansatz, indem wir Produkte einzeln über das Backend des Shops eintrugen. Wir stellten jedoch schnell fest, dass diese Methode ineffizient war. Wir wechselten zu Tabellenkalkulationen, was es uns ermöglichte, mehrere Produkte auf einmal anzulegen. Doch die Beschränkungen der Standardtabellenkalkulationen erforderten eine Suche nach einer noch effizienteren Lösung. Diese Suche endete, als wir Baserow entdeckten. Jetzt fungiert Baserow als unser zentrales Repository für alle Produktdaten. Es speist alle Shops, verschiedene Verkaufskanäle und unser ERP-System, was ein kohärentes, straffes Datenverwaltungssystem bietet, das elegant mit unserem wachsenden Geschäft skaliert. + +Der Zweck dieser Artikel ist nicht nur, meine eigene E-Commerce-Reise zu teilen. Ich möchte grundlegende Konzepte für die Datenverwaltung teilen, die riesige Mengen an Arbeitsstunden für E-Commerce-Unternehmen sparen können. Ich hoffe, Dir eine Einführung zu geben, wie Du eine dauerhafte und effiziente Lösung für die Datenverwaltung aufbauen und viel Arbeitszeit für wichtigere Geschäftsaufgaben, wie die Interaktion mit Deinen Kunden oder die Erstellung großartiger Produkte, frei machen kannst. Ich weiß nicht, wo Du Dich auf Deiner E-Commerce-Reise befindest, aber die Chancen stehen gut, dass Du ähnliche Herausforderungen wie ich hast. + + +## Der Stand der Werkzeuge {#der-stand-der-werkzeuge} + +{{< figure src="/img/tutorials/baserow/spreadsheet-cyberpunk.png" alt="Excel bringt es einfach nicht" title="Excel bringt Ves einfach nicht" >}} + +Während meiner unternehmerischen Reise bin ich auf zahlreiche Herausforderungen gestoßen, eine bedeutende davon war eine effektive Produkt-Datenverwaltung. Die Verwendung herkömmlicher Werkzeuge wie Excel, die zunächst unkompliziert erschien, offenbarte bald Probleme. Excel hat Beschränkungen hinsichtlich der Datengröße, es fehlen Funktionen für die Echtzeit-Zusammenarbeit, und es hat Schwierigkeiten mit der Komplexität, wenn die Datenmenge wächst. Kurz gesagt, es skaliert nicht besonders gut, besonders wenn ein E-Commerce-Unternehmen sein Produktangebot und seine Kundenbasis erweitert. + +Mit dem Wachstum meines eigenen Shopify-Geschäfts wurden die Einschränkungen von Excel immer offensichtlicher. Als wir unser Produktangebot erweiterten, jeweils mit zahlreichen Attributen wie SKU-Codes, Farben, Größen und Preisen, wurden die Tabellenkalkulationen enorm komplex. Diese Komplexität war nicht nur schwierig zu handhaben, sondern sie erhöhte auch signifikant das Risiko menschlicher Fehler. Informationen waren über verschiedene Blätter und Dateien verstreut, was es den Teammitgliedern erschwerte, effektiv und effizient zusammenzuarbeiten. Im Grunde konnte Excel mit den steigenden Datenanforderungen unseres wachsenden Geschäfts nicht mithalten. + +{{< admonition type="danger" title="10.000 Produkte in einer Tabelle" open="true" >}} +Wir hatten Zeiten, in denen wir etwa 10.000 SKUs über 4-5 Plattformen in 5 verschiedenen Sprachen verwalten mussten. Dies in einer Tabelle zu verwalten, wäre ein endloser Alptraum gewesen 🙈 +{{< /admonition >}} + +Das Ergebnis dieser Komplexitäten und Ineffizienzen waren verlorene Stunden - Stunden, die besser hätten genutzt werden können, um das Geschäft zu erweitern, Strategien zu entwerfen oder das Kundenerlebnis zu verbessern. Die häufigen Fehler aufgrund der unhandlichen Natur unserer Tabellen summierten sich zu einer erheblichen Menge an Zeit, die für Korrekturen aufgewendet werden musste, ganz zu schweigen von der Unterbrechung des Arbeitsablaufs. Anstatt uns bei unseren Operationen zu unterstützen, schufen die Einschränkungen von Werkzeugen wie Excel Engpässe in unserem Produkt-Datenverwaltungsprozess und bremsten uns aus, anstatt uns voranzutreiben. + + +## Einführung von Baserow {#einführung-von-baserow} + +Inmitten der Einschränkungen von Excel stieß ich auf Baserow. Dieses innovative Werkzeug, das die Funktionen einer Datenbank und einer Tabelle kombiniert, bot eine frische Perspektive auf die Verwaltung unserer wachsenden Produktdaten. + +Die Stärke von Baserow liegt in seiner Flexibilität und Anpassungsfähigkeit, mit der Fähigkeit, Informationen auf nicht-lineare Weise zu speichern. Es präsentiert Informationen über die herkömmlichen Zeilen und Spalten hinaus, einschließlich der Möglichkeit für verknüpfte Datensätze, mehrere Ansichten und umfangreiche Felddaten wie Kontrollkästchen, Dropdowns, Anhänge und mehr. + +Meine erste Begegnung mit Baserow markierte den Beginn einer transformierenden Reise in der Datenverwaltung. Im Vergleich zu Excel schien es mehr auf die Bedürfnisse eines dynamischen, schnell skalierenden E-Commerce-Unternehmens wie unserem abgestimmt zu sein. Die Frage war - könnte dies das bahnbrechende Werkzeug sein, das wir gesucht haben? Das Potenzial war definitiv da und es war höchste Zeit für uns, einzutauchen und zu erkunden. + + +## Baserow als Lösung {#baserow-als-lösung} + +Im Kern glänzt Baserow, wenn es um die Handhabung großer Mengen an Produkt-Daten geht. Im Gegensatz zu Excel, das oft langsamer und schwieriger zu bedienen wird, wenn die Listen wirklich groß werden, ist Baserow speziell dafür konzipiert, große Datenmengen zu handhaben. Das bedeutet, dass Baserow problemlos mithalten konnte, als unser Produktangebot wuchs. + +Eines der tollen Dinge an Baserow ist, dass es jedem im Team erlaubt, gemeinsam am selben Ort, in Echtzeit zusammenzuarbeiten. Kein Jonglieren mehr mit mehreren Versionen derselben Excel-Datei - in Baserow sieht jeder immer die aktuellsten Informationen. Das macht die Teamarbeit viel leichter und bedeutet weniger Fehlerchancen. + +{{< figure src="/img/tutorials/baserow/baserow-views.png" alt="In Baserow kannst Du Deine Daten aus mehreren Blickwinkeln betrachten" title="In Baserow kannst Du Deine Daten aus mehreren Blickwinkeln betrachten" >}} + +Darüber hinaus bietet Baserow verschiedene Ansichten Deiner Daten. Du kannst mehrere Rasteransichten anpassen, um nur ausgewählte Teilmengen an Informationen anzuzeigen. Weitere Ansichtsoptionen beinhalten die Galerie für eine schnelle Übersicht, Kanban für die Verwaltung von Aktionselementen und den Kalender für die Verfolgung von Fristen. + +Der Wechsel von Excel zu Baserow hat unsere Datenverwaltung erheblich verbessert. Wo wir einst mit unorganisierten Produktinformationen zu kämpfen hatten, hat Baserow uns ein ordentliches und leicht zugängliches Format zur Verfügung gestellt. Der Übergang zu Baserow hat uns erhebliche Zeit gespart und Fehler reduziert, was zu einem strafferem und besser handhabbarem Arbeitstag führte. + + +## Baserow - Eine einzelne Quelle der Wahrheit {#baserow-eine-einzelne-quelle-der-wahrheit} + +{{< figure src="/img/tutorials/baserow/baserow-single-source-of-truth.png" alt="Es gibt nicht eine Wahrheit, nur die Wahrheit" title="Es gibt nicht eine Wahrheit, nur die Wahrheit" >}} + +Mit den robusten Funktionen von Baserow existieren unsere Produktdaten nicht mehr verstreut über verschiedene Plattformen, Kanäle und Dateien. Sie sind an einem Ort gesammelt - in Airtable. Diese Funktion gab uns eine zuverlässige "einzige Quelle der Wahrheit", auf die jeder im Team zugreifen kann, was Inkonsistenzen und Verwirrung reduziert. + +Baserow ermöglicht es uns, alle unsere Daten auf einen Blick zu sehen. Und es geht nicht nur ums Ansehen; es liefert reichhaltige Einblicke, die bei der Entscheidungsfindung helfen. In der Vergangenheit war es ein Alptraum, Daten über mehrere Excel-Tabellen hinweg zu referenzieren. Jetzt ist es eine einfache Aufgabe. Es ist, als hätte man eine Lupe auf die Daten, die auf das kleinste Detail zoomen und Ihnen in einem Augenblick eine Übersicht geben kann. + +Der größte Vorteil für unsere Produkt-Datenverwaltung besteht darin, Daten und Tabellen zu verbinden. Dies gibt uns die Fähigkeit, ein zentrales Repository von Produkt-Daten als einzelne Quelle der Wahrheit zu verwalten. Aus diesem leiten wir verschiedene spezialisierte Tabellen für Plattformen wie Shopify und Amazon ab, die leicht exportiert werden können. Das macht es sehr einfach, kleine und sogar große Veränderungen zu handhaben. + +{{< admonition type="tip" title="Pro Tipp" open="true" >}} +Wenn Du etwas Mühe und Sorgfalt in die Struktur Deiner Produktdaten steckst, werden selbst große Änderungen sehr einfach sein. Es wird keine Rolle spielen, ob Du z.B. eine Preisänderung für 5 oder 5.000 Produkte 🚀🚀🚀 auf Shopify durchführen wollen. Der Aufwand wird nahezu unabhängig von der Anzahl der Datansätze sein. +{{< /admonition >}} + + +## Das Potenzial von Baserow {#das-potenzial-von-baserow} + +Eine der größten Gewinne mit Baserow ist, wie viel Zeit es uns spart. Da es alle unsere Daten an einem leicht zu bedienenden Ort aufbewahrt, verschwenden wir keine Stunden mehr damit, durch chaotische Informationen zu wühlen. Dies hat unsere täglichen Aufgaben schneller und effizienter gemacht. Je nach Aufgabe kannst Du Deine Produktivität leicht verzehn- oder zwanzigfachen. + +Aber die Zeitersparnis hört nicht dort auf. Wenn Du die leistungsstarke API von Baserow mit einem Tool zur Workflow-Automatisierung wie [n8n](https://www.n8n.io) verbindest, kannst Du sehr, sehr weit gehen. Nur einige Beispiele dafür, was wir in Bezug auf Automatisierung tun: + +{{< admonition type="tip" title="Änderungen durchführen" open="true" >}} +🚀 Bei Erstellung oder Änderung von Produkten automatisch die Produkte in Shopify anlegen oder ändern +{{< /admonition >}} + +{{< admonition type="tip" title="KI🧠 gestützte Produktbeschreibungen" open="true" >}} +🚀 Produktbeschreibungen mit KI🧠 auf Basis von Produktattributen automatisch erstellen 🧙 +{{< /admonition >}} + +{{< admonition type="tip" title="Übersetzungen" open="true" >}} +🚀 Übersetzungen für Beschreibungen und andere Attribute mit KI🧠 erstellen +{{< /admonition >}} + +{{< admonition type="tip" title="🧙 Magie" open="true" >}} +🚀 Alles von den oben stehenden Punkten auf einmal, sobald eine neue Produktzeile hinzugefügt wird 😉 🤖 +{{< /admonition >}} + +Die Auswirkungen, die Baserow auf unsere Arbeitsstunden und die allgemeine Zufriedenheit hat, können nicht hoch genug eingeschätzt werden. + + +## Schlussfolgerung {#schlussfolgerung} + +Wenn ich auf meine Reise zurückblicke, war der Übergang zu Baserow zweifellos eine der besten Entscheidungen, die ich für mein E-Commerce-Geschäft getroffen habe. Es ist mehr als ein Werkzeug; es ist ein zeitsparender, stressreduzierender Begleiter, der unsere Abläufe optimiert und unsere Produktivität gesteigert hat. + +Wenn Du ein E-Commerce-Unternehmen besitzt und mit der Produkt-Datenverwaltung zu kämpfen hast, empfehle ich Dir von ganzem Herzen, Baserow in Betracht zu ziehen. Es mag etwas Aufwand bedeuten, es zunächst einzurichten, aber die Vorteile, die Du erzielen kannst - Effizienz, Genauigkeit und gesparte wertvolle Zeit - werden es wert sein. + +Am Ende des Tages geht es beim Betrieb eines erfolgreichen E-Commerce-Geschäfts nicht nur darum, ein breites Sortiment an Produkten oder eine ausgeklügelte Marketingstrategie zu haben; es geht auch darum, die richtigen Werkzeuge zu verwenden, um Deine Abläufe effektiv zu verwalten, und für die Produkt-Datenverwaltung habe ich Baserow als das richtige Werkzeug gefunden. + +{{< admonition type="tip" title="Was ist mit Airtable?" open="true" >}} +Einige von Euch könnten **Airtable** als ähnliche Lösung kennen. Obwohl Airtable ein sehr gutes Produkt ist, bevorzuge ich persönlich freie und Open-Source-Lösungen. +{{< /admonition >}} + +{{< admonition type="success" title="Wissen ist Macht 🤓" open="true" >}} +Teile diesen Betrag mit jemandem, für den er hilfreich ist. +{{< /admonition >}} diff --git a/content/posts/datamanagement/why-choose-baserow-to-manage-product-data.en.md b/content/posts/datamanagement/why-choose-baserow-to-manage-product-data.en.md new file mode 100644 index 0000000..cbd91ae --- /dev/null +++ b/content/posts/datamanagement/why-choose-baserow-to-manage-product-data.en.md @@ -0,0 +1,112 @@ ++++ +title = "Game Changer: How Baserow Transformed Our Approach to Data Management" +date = 2023-10-12 +draft = false +tutorials = ["Data Management"] +datamanagement = ["Baserow"] +featuredImage = "/img/tutorials/baserow/baserow-excel-title.png" ++++ + +## Introduction {#introduction} + +For over a decade, my journey through the world of e-commerce has been an evolving adventure. Alongside my dedicated team, we have painstakingly built, refined, and iterated numerous versions of our online storefronts, transitioning from earlier solutions like Magento to Shopify over the years. Beyond grappling with the design intricacies and aligning the user experience with each iteration, I’ve come to realize how crucial our approach to product data management truly is. + +Whether we were streamlining the user interface on our Shopify store or making amendments to our product listings, effective and efficient management of our product data emerged as a game-changer. It has truly made the difference between tedious, protracted projects and quick, manageable tasks, saving us dozens of hours in project time that we've been able to direct towards other business growth activities. + +As our storefronts evolved, so did our approach to managing data. Like many others, we began with a simplistic approach, listing products individually via the store's backend. However, we quickly discovered the inefficiency in this method. We transitioned to spreadsheets, gaining the ability to set up multiple products at once. Yet, the limitations of standard spreadsheets prompted a search for an even more efficient solution. This search concluded when we discovered Airtable. Now, Baserow functions as our central repository for all product data. It feeds into all storefronts, various sales channels and our Enterprise Resource Planning (ERP) system, providing a cohesive, streamlined data management system that has scaled elegantly with our growing business. + +The purpose of this journey is not just to share my own e-commerce journey. I want to share basic concepts for data management which can save huge amounts of working hours for e-commerce businesses. I will hopefully give you an introduction on how to build a lasting and efficient solution for data management and free lots of working hourse for more important business tasks like interacting with your customers or building great products. I don't know where you are on your e-commerce journey, but chances are that you face similar challenges like I do. + + +## The state of tools {#the-state-of-tools} + +{{< figure src="/img/tutorials/baserow/spreadsheet-cyberpunk.png" alt="Excel just doesn’t cut it" title="Excel just doesn’t cut it" >}} + +Throughout my entrepreneurial journey, I've grappled with numerous challenges, a significant one being effective product data management. Using traditional tools like Excel, while initially straightforward, soon exposed issues. Excel has limitations on data size, lacks real-time collaboration features, and struggles with complexity as data grows. In short, it doesn’t scale particularly well, especially as an e-commerce business expands its product range and customer base. + +With the growth of my own Shopify business, the limitations of Excel became increasingly apparent. As we expanded our product range, each with numerous attributes like SKU codes, colors, sizes, and prices, the spreadsheets became enormously complex. This complexity was not just hard to manage, but it significantly increased the risk of human error. Information was scattered across different sheets and files, making it difficult for team members to collaborate effectively and efficiently. In essence, Excel was unable to keep up with the increasing data demands of our growing business. + +{{< admonition type="danger" title="10.000 products in a spreadsheet" open="true" >}} +We had times where we had around 10.000 SKUs to manage across 4-5 platforms in 5 different languages. Managing this in a spreadsheet would have been an endless nightmare 🙈 +{{< /admonition >}} + +The upshot of these complexities and inefficiencies were hours lost - hours that could have been better spent on growing the business, strategizing, or improving customer experience. The frequent errors due to the unwieldy nature of our spreadsheets added up to a considerable amount of time spent on rectification, not to mention disruption of workflow. Instead of assisting in our operations, the limitations of tools like Excel were creating bottlenecks in our product data management process, slowing us down instead of propelling us forward. + + +## Intoducing Baserow {#intoducing-baserow} + +In the midst of Excel's limitations, I stumbled upon Baserow. This innovative tool, which combines the features of a database and a spreadsheet, offered a fresh perspective on managing our growing product data. + +Baserow's strength lies in its flexibility and customizability, with the capacity to store information in a non-linear way. It presents information beyond the conventional rows and columns, including capability for linked records, multiple views, and rich field types like checkboxes, dropdowns, attachments, and more. + +My initial encounter with Baserow marked the beginning of a transformative journey in data management. Compared to Excel, it seemed more aligned with the needs of a dynamic, rapidly scaling e-commerce business like ours. The question was - could this be the game-changing tool we've been searching for? The potential was definitely there and it was high time for us to dive in and explore. + + +## Baserow as a Solution {#baserow-as-a-solution} + +At its core, Baserow shines when it comes to handling large amounts of product data. Unlike Excel, which often becomes slower and more difficult to use with really large lists, Baserow is built specifically to handle big datasets. This means as our product range grew, Baserow could easily keep up. + +One great thing about Baserow is that it lets everyone on the team work together in the same place, in real time. No more juggling multiple versions of the same Excel file - in Baserow, everyone always sees the most up-to-date information. This makes teamwork a lot smoother, and means less chance of mistakes happening. + +{{< figure src="/img/tutorials/baserow/baserow-views.png" alt="In Baserow you can view your data from different perspectives" title="In Baserow you can view your data from different perspectives" >}} + +Additionally, Baserow provides various views of your data. You can customize multiple grid views to display selected subsets only. Other view options include Gallery for quick overview, Kanban for managing actionable items and Calendar for deadline tracking. + +Switching from Excel to Baserow has vastly improved our data management. Where we once struggled with disorganized product information, Baserow has provided a neat and easily accessible format. The transition to Baserow has saved us significant time and reduced errors, resulting in a more streamlined and manageable workday. + + +## Baserow - A Single Source of Truth {#baserow-a-single-source-of-truth} + +{{< figure src="/img/tutorials/baserow/baserow-single-source-of-truth.png" alt="There is not one truth, just the truth" title="There is not one truth, just the truth" >}} + +With Baserow's robust features, our product data no longer exists scattered across disparate platforms, channels, and files. It's gathered in one place - in Airtable. This feature gave us a reliable "single source of truth" that everyone in the team can access, reducing inconsistencies and confusion. + +Baserow allows us to see all our data at a glance. And it’s not just viewing; it provides rich insights which help in decision-making. In the past, cross-referencing data across multiple Excel sheets was a nightmare. Now, it's a simple task. It's like having a magnifying glass on your data that can zoom in on the tiniest detail and zoom out to give you an overview in an instant. + +The biggest advantage for our product data manageent is to connect data and tables. This gives us the ability to manage one central repository of peoduct data as a single source of truth. From this we derive various specialized tables for platforms like Shopify and Amazon which can be easily exported. That makes it very easy to handle small and even large scale changes. + +{{< admonition type="tip" title="Pro Tip" open="true" >}} +When you put some effort and care into the structure of your product data even large changes will be very easy. It will not matter if you want to push a price change for 5 or 5.000 🚀🚀🚀 products to Shopify. +{{< /admonition >}} + + +## The Potential of Baserow {#the-potential-of-baserow} + +One of the biggest wins with Baserow is how much time it saves us. Because it keeps all our data in one easy-to-use place, we're not wasting hours digging through messy information anymore. This has made our daily tasks faster and more efficient. Depending on the task you can easily 10x or 20x or productivity. + +But the time saving doesn't stop there. When you connect Baserow's powerful API to a workflow automation tool like [n8n](https://www.n8n.io) you can go very very far. Just some examples what we are dong when it comes to automation: + +{{< admonition type="tip" title="Push changes" open="true" >}} +🚀 Create new products of push changes in products automatically to Shopify +{{< /admonition >}} + +{{< admonition type="tip" title="AI🧠 powered produt desriptions" open="true" >}} +🚀 Create product descriptions with AI🧠 based on product attributes automatially 🧙 +{{< /admonition >}} + +{{< admonition type="tip" title="Translations" open="true" >}} +🚀 Create translations for descriptions and other attributes with AI🧠 +{{< /admonition >}} + +{{< admonition type="tip" title="🧙 Magic" open="true" >}} +🚀 Do all of the above each time a new product row is added 😉 🤖 +{{< /admonition >}} + +The impact Baserow has on our working hours and overall satisfaction can't be overstated. + + +## Conclusion {#conclusion} + +Looking back on my journey, transitioning to Baserow has undoubtedly been one of the best decisions I’ve made for my e-commerce business. It's more than a tool; it's a time-saving, stress-reducing companion that's streamlined our operations and boosted our produtivity. + +If you're an e-commerce business owner struggling with product data management, I wholeheartedly recommend considering Baserow. It may take a some effort to set up initially, but the benefits you'll reap - efficiency, accuracy, and precious time saved - will be well worth it. + +At the end of the day, running a successful e-commerce business isn’t just about having a wide range of products or a sophisticated marketing strategy; it’s also about using the right tools to manage your operations effectively, and for product data management, I've found Airtable to be the right tool. + +{{< admonition type="tip" title="What about Airtable?" open="true" >}} +Some of you might be aware of **Airtable** as a similar solution. Although Airtable is a very good product I personally prefer free and open source solutions. +{{< /admonition >}} + +{{< admonition type="success" title="Knowledge is power 🤓" open="true" >}} +Share this post with someone for whom it's helpful. +{{< /admonition >}} diff --git a/content/posts/dgraph1.de.md b/content/posts/dgraph1.de.md new file mode 100644 index 0000000..4332969 --- /dev/null +++ b/content/posts/dgraph1.de.md @@ -0,0 +1,76 @@ +--- +title: "DGraph - Teil 1: Installation & erste Schritte" +date: 2020-03-13 +draft: false +tags: ["datenbank","graphql","grpc","graph","graphql"] +archive: ["Dgraph Grundlagen"] +--- +Ich war auf der Suche nach einem Datenbanksystem für ein internes Projekt in unserer Firma. Aus diesem Grund habe ich mir verschiedene Systeme angesehen. Neben alten Bekannten aus dem SQL oder NoSQL Umfeld bin ich auf etwas sehr interessantes gestoßen. Graph Datenbanken. +Ohne großartig auf die Unterschiede eingehen zu wollen, hier die für mich interessantesten Aspekte, weshalb ich mich entschieden habe für meine Projekt :eine Graphdatenbank zu wählen: + +- kein festes Datenbankschema erforderlich +- Daten werden in Form Knoten und Verbindungen abgebildet +- starker Fokus auf die Beziehungen Datensätzen zueinander +- präziser Abruf Daten auch über Beziehungen hinweg +- gRPC Server eingebaut +- GraphQL Server eingebaut + +## Dgraph Server starten + +Am einfachsten lässt sich Dgraph mit Docker starten. Da wir persistente Daten haben wollen erstellen wir einen Ordner dgraph den wir unserem Container als Volume zur Verfügung stellen. +```sh +mkdir ~/dgraph +``` +```sh +docker run -p 8080:8080 -p 9080:9080 -p 8000:8000 -it -v ~/dgraph:/dgraph dgraph/standalone:latest +``` +Damit wird dgraph gestartet. Ist der Container noch nicht vorhanden wird das Image heruntergeladen. Zur Zeit ist die aktuelle Version die 2.0. Einen Überblick über die Version gibt es auf dem Docker Hub unter https://hub.docker.com/r/dgraph/dgraph/tags + +Was bekommen wir hier? +- einen HTTP Dienst auf Port 8080 mit den Endpunkten /admin und /graphql +- einen HTTP Dienst auf Port 8000 mit dem WebInterface für Dgraph namens Ratel +- einen gRPC Dienst auf Port 9080 + + +## Die ersten Datensätze speichern und wieder abrufen + +Jetzt kann man auch schon mit der Datenbank interagieren und zwar auf eine der 3 oben stehenden Arten. +Wir können uns unter http://localhost:8000/ in Ratel einloggen und unter Console anfangen die ersten Daten zu speichern. Dazu klicken wir erst einmal auf Mutation. +Unsere erste Mutation sieht so aus: + +```graphql +{ + set{ + _:Peter "Peter Parker" . + _:Peter "New York" . + _:Mary "Mary Jane Watson" . + _:Mary "New York" . + _:Mary _:Peter . + _:Harry "Harry Osborne" . + _:Harry "New York" . + _:Harry _:Peter . + _:Harry _:Mary . + } +} +``` +Hiermit erstellen wir mehrere Personen mit den Feldern name und hometown. Das Feld friend_of ist eine Verbindung zu einem anderen Datensatz. Wer sich wegen des Formates wundert, es handelt sich hier um das RDF N-Quad Format. Keine Sorge deswegen, dazu kommen wir noch und das Format ist relativ einfach. + +Jetzt können wir die Daten abfragen. Dazu wählen wir in der Konsole die Query aus und geben folgendes ein: +```graphql +{ + all(func: has(name)){ + uid + name + hometown + friend_of{ + uid + name + hometown + } + } +} +``` +Wir erstellen eine Abfrage all und nutzen dazu die Funktion has. Damit suchen wir alle Datensätze, die das Feld name haben. Dann geben wir an, dass wie die Felder ui, name, hometown und friend_of haben möchten. +Da friend_of eine Verbindung zu einem anderen Datensatz ist geben wir hier wieder an welche Felder wir gerne haben möchten. + +Wir haben jetzt erst einmal gesehen, wie man Dgraph startet und die ersten Schritte geht. Bisher haben wir ja auch nur mit Ratel gearbeitet. Der GraphQL endpunkt ist zwar gestartet, aber meckert, dass wir kein Schema haben. Außerdem haben wird RDF N-Quads kennengelernt. Hier müssen wir auf jeden Fall nochmal ansetzen 😊 diff --git a/content/posts/dgraph1.en.md b/content/posts/dgraph1.en.md new file mode 100644 index 0000000..b1223d3 --- /dev/null +++ b/content/posts/dgraph1.en.md @@ -0,0 +1,73 @@ +--- +title: "Dgraph - Part 1: installation & first steps" +date: 2020-03-23 +draft: false +tags: ["database","graphql","grpc","graph"] +archive: ["Dgraph Basics"] +--- +I was looking for a database system for an internal project in our company. For this reason, I looked at various systems. In addition to old acquaintances from the SQL or NoSQL environments, I came across something very interesting. Graph databases. +Without wanting to go into great detail, here are the most interesting aspects for me and the reason I decided to choose a graph database for my project: + +- no fixed database schema required +- data is represented in the form of nodes and connections +- strong focus on relationships between data sets +- precise retrieval of data even across relationships +- gRPC server built in +- GraphQL server built in + +## Start Your Dgraph Server + +The easiest way to start Dgraph is with Docker. Since we want persistent data, we create a folder dgraph which we make available to our container as a volume. +```sh +mkdir ~/dgraph +``` +```sh +docker run -p 8080:8080 -p 9080:9080 -p 8000:8000 -it -v ~/dgraph:/dgraph dgraph/standalone:latest +``` +This starts dgraph. If the container does not yet exist, the image is downloaded. Currentlythe version is 2.0. An overview of the versions available on Docker Hub can bou found at https://hub.docker.com/r/dgraph/dgraph/tags +What do we get here? +- an HTTP service on port 8080 with the endpoints /admin and /graphql +- an HTTP service on port 8000 with the web interface for Dgraph called Ratel +- a gRPC service on port 9080 + + +## Save and retrieve the first records + +Now you can already interact with the database in one of the 3 ways mentioned above. +We can login at http://localhost:8000/ and use Ratel to start storing the first data using the menu item Console. To do this, we first click on Mutation. +Our first mutation looks like this: +```graphql +{ + set{ + _:Peter "Peter Parker" . + _:Peter "New York" . + _:Mary "Mary Jane Watson" . + _:Mary "New York" . + _:Mary _:Peter . + _:Harry "Harry Osborne" . + _:Harry "New York" . + _:Harry _:Peter . + _:Harry _:Mary . + } +} +``` +We use this to create several people with the fields name and hometown. The friend_of field is a connection to another data record. If you are wondering about the format, this is the RDF N-Quads format. Don't worry, we'll get to that and the format is relatively simple. +Now we can query the data. To do this, we select the query in the console and enter the following: +```graphql +{ + all(func: has(name)){ + uid + name + hometown + friend_of{ + uid + name + hometown + } + } +} +``` +We create a query all using the has function. We use it to search for all data records that have the field name. Then we indicate that we want to have the fields ui, name, hometown and friend_of. +Since friend_of is a connection to another data record, we indicate here which fields we would like to have. + +We have just seen how to start Dgraph and take the first steps. So far we have only worked with Ratel. The GraphQL endpoint is started, but complains that we don't have a schema. We also got to know RDF N-Quads. We definitely have to pick up here 😊 diff --git a/content/posts/dgraph2.de.md b/content/posts/dgraph2.de.md new file mode 100644 index 0000000..6854af6 --- /dev/null +++ b/content/posts/dgraph2.de.md @@ -0,0 +1,132 @@ +--- +title: "DGraph - Teil 2: GraphQL Schema und die ersten Schritte" +date: 2020-03-16 +draft: false +tags: ["datenbank","graphql","grpc","graph"] +archive: ["Dgraph Grundlagen"] +--- +Beim letzten mal haben wir den Server gestartet und unsere ersten Daten gespeichert. Hierzu hatten wir das Ratel Interface Dgraph genutzt. Wir haben auch einen GraphQl Endpunkt bereitgestellt. Hier erzeugen wir die selben Daten und Verbindungen wie schon zuvor in Ratel. +Im Moment können wir mit unseren GraphQL Endpunkt nichts machen, da GraphQL ein Schema benötigt. Hierzu erstellen wir eine Datei namens schema.graphql: +```graphql +type Person { + name: String! @id + hometown: String + friend_of: [Person] +} +``` +Die Struktur ist so wie in Teil 1. Zusätzlich definieren wir das Feld name als Pflichtfeld und sorgen dafür, dass die Einträge eindeutig sind. Das erreichen wir mit der Direktive @i. Man könnte natürlich auch ein zusätzliches Feld mit einer eindeutigen Id bestimmen, aber für unser Beispiel soll das erstmal so reichen. +Das Feld friend_of wird als Liste vom Typ Person definiert. Das bedeutet, dass hier in Dgraph eine Verbindung zu einer anderen Person erstellt. +Nun können wir unser Schema an den admin Endpunkt übermitteln: + +```sh +curl -X POST localhost:8080/admin/schema -d '@schema.graphql' +``` +Dgraph hat unserem Schema deutlich mehr Komplexität hinzugefügt. Wenn wir uns das Schema über einen GraphQL Client ansehen sehen wir grob zusammengefasst folgende Zusätze: + +- definierte Mutation für das erstellen, ändern oder löschen Personen +- definierte Queries für das abrufen Personen +- verschiedene Input Typen für das filtern und sortieren, sowie Paginierung + +## Die ersten Datensätze speichern +Da wir das Schema übermittelt haben können wir jetzt mit dem GraphQL Endpunkt interagieren. Im Vergleich zu den RDF N-Quads aus Teil 1 sieht das hinzufügen der gleichen Personen etwas komplexer aus. +Außerdem lassen sich die Verknüpfungen über friendof nur teilweise direkt beim erstellen setzen. Wir können zwar für Harry Osborne die beiden anderen Personen im Zuge der friend_of Verknüpfung miterstellen, trotzdem müssen wir anschließend noch Mary Jane Watson aktualisieren. +Würde wir bei Mary Jane Watson unseren Peter Parker ebenfalls im Zuge der friend_of Verknüpfung erstellen würde Peter Parker 2x in der Datenbank existieren. +```graphql +mutation addPerson { + addPerson(input:[ + { + name: "Harry Osborne", + hometown: "New York", + friend_of: [ + { + name: "Mary Jane Watson", + hometown: "New York", + }, + { + name: "Peter Parker", + hometown: "New York", + }, + + ] + } + ]) + { + person{ + name + } + }, + updatePerson(input: + { + filter: {name: {eq: "Mary Jane Watson"}} + set: {friend_of: [{name: "Peter Parker"}]} + }, + ){ + person{ + name + friend_of{ + name + } + } + } +} +``` +Ein Hinweis noch zur updatePerson Mutation: Wir haben ja in diesem Beispiel die updatePerson Mutation einfach an die addPerson Mutation angehängt. Würden wir jetzt versuchen eine weitere updatePerson Mutation anzuhängen würde GraphQL einen Fehler melden: + +Fields updatePerson conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional. + +Wenn wir jetzt aber in Zeile 21 und 34 mit Aliases arbeiten gibt es kein Problem. +```graphql +mutation addPerson { + addPerson(input:[ + { + name: "Harry Osborne", + hometown: "New York", + }, + { + name: "Peter Parker", + hometown: "New York", + }, + { + name: "Mary Jane Watson", + hometown: "New York", + }, + ]) + { + person{ + name + } + }, + mary: updatePerson(input: + { + filter: {name: {eq: "Mary Jane Watson"}} + set: {friend_of: [{name: "Peter Parker"}]} + }, + ){ + person{ + name + friend_of{ + name + } + } + }, + harry: updatePerson(input: + { + filter: {name: {eq: "Harry Osborne"}} + set: {friend_of: [ + {name: "Mary Jane Watson"}, + {name: "Peter Parker"} + ]} + }, + ){ + person{ + name + friend_of{ + name + } + } + } +} +``` +Wie man sieht kann man mit Dgraph recht schnell mit der Nutzung GraphQL loslegen. Dabei übernimmt Dgraph so einige Dinge, die man sonst selbst machen müsste. + +Beim nächsten Mal schauen wir uns dann die RDF N-Quads noch einmal genauer an 😊 diff --git a/content/posts/dgraph2.en.md b/content/posts/dgraph2.en.md new file mode 100644 index 0000000..8d0477a --- /dev/null +++ b/content/posts/dgraph2.en.md @@ -0,0 +1,130 @@ +--- +title: "Dgraph - Part 2: GraphQL, Schema & first steps" +date: 2020-03-24 +draft: false +tags: ["database","graphql","grpc","graph"] +archive: ["Dgraph Basics"] +categories: ["Archive"] +--- +Last time we started the server and saved our first data. For this we used Dgraph's Ratel Interface. We also provided a GraphQl endpoint. Here we create the same data and connections as before in Ratel. +At the moment we cannot do anything with our GraphQL endpoint because GraphQL needs a schema. For this we create a file called schema.graphql: +```graphql +type Person { + name: String! @id + hometown: String + friend_of: [Person] +} +``` +The structure is the same as in part 1. In addition, we define the field name as a mandatory field and ensure that the entries are unique. We achieve this with the directive @i. You could of course also specify an additional field with a unique ID, but for our example this should be enough for now. +The field friend_of is defined as a list of the type person. This means that Dgraph will create a connection to another person. +Now we can send our schema to the admin endpoint: +```sh +curl -X POST localhost:8080/admin/schema -d '@schema.graphql' +``` +Dgraph has added significantly more complexity to our schema. If we look at the schema using a GraphQL client, we see the following additions: +- predefined mutation for creating, changing or deleting people +- predefined queries for retrieving people +- Different input types for filtering and sorting, as well as pagination + +## Store the first records + +Now that we've submitted the schema, we can interact with the GraphQL endpoint. Compared to the RDF N-Quads from Part 1, adding the same people looks a bit more complex. +In addition, the links via friendof can only be partially set directly when they are created. We can use Harry Osborne to create the other two people as part of the friend_of connection, but we still have to update Mary Jane Watson afterwards. +When we use Mary Jane Watson to create our Peter Parker as part of the friend_of connection Peter Parker would exist twice in the database. +```graphql +mutation addPerson { + addPerson(input:[ + { + name: "Harry Osborne", + hometown: "New York", + friend_of: [ + { + name: "Mary Jane Watson", + hometown: "New York", + }, + { + name: "Peter Parker", + hometown: "New York", + }, + + ] + } + ]) + { + person{ + name + } + }, + updatePerson(input: + { + filter: {name: {eq: "Mary Jane Watson"}} + set: {friend_of: [{name: "Peter Parker"}]} + }, + ){ + person{ + name + friend_of{ + name + } + } + } +} +``` +A note about the updatePerson mutation: In this example, we simply added the updatePerson mutation to the addPerson mutation. If we tried to add another updatePerson mutation, GraphQL would report an error: +Fields updatePerson conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional. + +If we work with Aliases in lines 21 and 34, there is no problem. +```graphql +mutation addPerson { + addPerson(input:[ + { + name: "Harry Osborne", + hometown: "New York", + }, + { + name: "Peter Parker", + hometown: "New York", + }, + { + name: "Mary Jane Watson", + hometown: "New York", + }, + ]) + { + person{ + name + } + }, + mary: updatePerson(input: + { + filter: {name: {eq: "Mary Jane Watson"}} + set: {friend_of: [{name: "Peter Parker"}]} + }, + ){ + person{ + name + friend_of{ + name + } + } + }, + harry: updatePerson(input: + { + filter: {name: {eq: "Harry Osborne"}} + set: {friend_of: [ + {name: "Mary Jane Watson"}, + {name: "Peter Parker"} + ]} + }, + ){ + person{ + name + friend_of{ + name + } + } + } +} +``` +As you can see, with Dgraph you can start using GraphQL quite quickly. Dgraph creates the CRUD functionality for you. You do not need to write resolvers or anything. +Next time we will take a closer look at the RDF N-Quads diff --git a/content/posts/dgraph3.de.md b/content/posts/dgraph3.de.md new file mode 100644 index 0000000..ffa77ed --- /dev/null +++ b/content/posts/dgraph3.de.md @@ -0,0 +1,120 @@ +--- +title: "DGraph - Teil 3: RDF N-Quads" +date: 2020-03-28 +draft: false +tags: ["datenbank","graphql","grpc","graph","RDF","N-Quads"] +archive: ["Dgraph Grundlagen"] +categories: ["Archive"] +--- +Das hinzufügen oder ändern Daten wird in Dgraph so wie in GraphQL auch als Mutation bezeichnet. Das Eingabeformat sind hier sogenannte Triples im RDF N-Quad Format. +So ein Triple besteht aus 3 Bausteinen, einem Subjekt, einem Prädikat und einem Objekt. Da klingelt doch was? Ja genau, so etwas gab es vor graumer Zeit einmal in der Schule. Die Begriffe Subjekt, Prädikat und Objekt sind hier nicht zufällig gewählt: +Ein Triple ist eine Aussage, die Subjekt und Objekt miteinander in Beziehung setzt, + +z.B. Peter Parker ---befreundet mit --> Mary Jane Watson + +Eine ausführliche Beschreibung dazu findet Ihr auf [Wikipedia](https://de.wikipedia.org/wiki/Resource_Description_Framework). + +Im ersten Teil haben wir ja schon mit Triples gearbeitet, wenn auch wenig dazu erklärt. Der Aufbau der Triples für eine Mutation in Dgraph ist eigentlich genau so einfach wie das oben stehende Beispiel: +```graphql + . + +<0x01> "Peter Parker" . +<0x02> "Mary Jane Watson" . +<0x01> <0x02> . +``` +Hier haben wir einen Knoten mit der Id 0x01. Dieser Knoten hat ein Feld name, dem wir den Wert Peter Parker zugewiesen haben. Beim Knoten 0x02 haben wir Mary Jane Watson als Namen zugewiesen. Anschließend verbinden wir die beiden Datansätze mit dem Prädikat friend_of. Der . am Ende signalisiert das Ende der Zeile. +Hat ein Knoten noch mehr Felder oder andere Verbindungen kann man nach diesem Schema Zeile für Zeile weitermachen. +Das o.g. genannte Beispiel setzt natürlich voraus, dass wir die Ids der Knoten kennen. + +## Mutationen in Dgraph + +In Teil hatten wir ja schon die erste Mutation in diesem Format: +```graphql +{ + set{ + _:Peter "Peter Parker" . + _:Peter "New York" . + _:Mary "Mary Jane Watson" . + _:Mary "New York" . + _:Mary _:Peter . + _:Harry "Harry Osborne" . + _:Harry "New York" . + _:Harry _:Peter . + _:Harry _:Mary . + } +} +``` +Hierbei haben wir neue Datensätze erzeugt. Damit wir das effizient tun können hat Dgraph die Möglichkeit mit leeren Knoten zu arbeiten. Hierbei können wir temporäre Ids nutzen um einen Bezug zwischen Datensätzen herzustellen. Das Format hierbei ist _:Bezeichnung. +Dadurch können wir mehere Felder setzen und auch gleich Beziehungen mehrerer Knoten untereinander definieren. + +## Kombination mit Queries + +Richtig schick wird es in der Kombination Queries und Mutationen. Wir können in Dgraph Variablen innerhalb einer Query definieren, die wir dann in in einer Mutation nutzen können. +```graphql +upsert { + query { + q(func: eq(name, "Peter Parker")) { + Peter as uid + name + } + } + mutation { + set { + uid(Peter) "Spiderman" . + } + } +} +``` +In diesem Beispiel suchen wir erst im Feld name nach Peter Parker und weisen der Variable Peter den Wert der uid unseres Suchergebnisses zu. Die Variable Peter können wir dann in der Mutation nutzen um den Knoten zu aktualisieren. +Die Möglichkeit hier mit Variablen zu arbeiten ist einfach großartig, weil Sie Zeit und vor allem Code spart. + +## Schemadefinition mit RDF N-Quads + +Ich habe oben ein wenig geschummelt. Die Kombination aus Query und Mutation funktioniert zwar, aber nur wenn man zuvor die Definition des Feldes name ein wenig ändert. +Damit wir per Funktion das Feld name durchsuchen können müssen wir Dgraph erst noch mitteilen, dass es sich um ein suchbares Feld handelt. Dazu müsst Ihr im Ratel Interface auf den Punkt Schema klicken und könnt nun Bulk Edit klicken: + +![Schema in Dgraph ändern](/img/dgraph/schema-nquad.png "Schema mit N-Quads ändern") + +Die Bulk Edit Funktion macht dann Sinn, wenn Ihr mehrere Einträge überarbeiten wollt. Wenn Ihr jedoch nur einen überarbeiten wollt könnt Ihr auch einfach auf den Feldnamen klicken: + +![Schema in Dgraph ändern](/img/dgraph/schema-ratel.png "Schema mit N-Quads ändern") + +Damit haben wir das Feld name suchbar gemacht und jetzt funktioniert auch die upsert mutation. Man kann das Schema auch über einen der verfügbaren Clients übermitteln. Eine Schemaänderung über http z.B. mit cURL ist aus Sicherheitsgründen nicht möglich. + +DGraph erstellt automatisch ein Datenschema anhand der Daten, die man speichert. Das bedeutet man muss sich im ersten Moment wenig Gedanken darum machen. Man sieht am oben stehenden Beispiel aber, dass man schon für eine einfache Suche nach einem bestimmten Feld nicht mehr ganz um das Thema Schema herumkommt. +Das ist auch durchaus sinvoll. Wenn jedes Fel Hause aus suchbar wäre, dann wäre das nicht besonders performant. + +## Mutationen im JSON Format + +Man kann Mutationen auch im JSON Format übermitteln was gerade bei komplexen Datensätzen eine enorme Erleichterung darstellt. + +```json +{ + "set": [ + { + "name": "Peter Parker", + "hometown": "New York" + }, + { + "name": "Mary Jane Watson", + "hometown": "New York" + } + ] +} +``` + +Auch die Nutzung Variablen aus einer Query für eine Upsert Operation ist möglich: + +```json +{ + "query": "{ var(func: eq(name, \"Peter Parker\")) { Peter as uid}}", + "set": + { + "uid": "uid(Peter)", + "name": "Batman" + } +} +``` + +Das ist nur ein grober Überblick über das Thema, In der DGraph Dokumentation finden sich noch weitere Beispiele und Infos. +[DGraph Dokumentation](https://dgraph.io/docs/master/mutations/#language-and-rdf-types) diff --git a/content/posts/dgraph3.en.md b/content/posts/dgraph3.en.md new file mode 100644 index 0000000..96e5858 --- /dev/null +++ b/content/posts/dgraph3.en.md @@ -0,0 +1,120 @@ +--- +title: "DGraph - Part 3: RDF N-Quads" +date: 2020-03-31 +draft: false +tags: ["database","graphql","grpc","graph","RDF","N-Quads"] +archive: ["Dgraph basics"] +categories: ["Archive"] +--- +Adding or changing data is also called a mutation in Dgraph as in GraphQL. The input format here are so-called triples in the RDF N-Quad format. +Such a triple consists of 3 components, a subjec , a predicate and a object. Something is ringing? Yes, exactly, there was something like that back in school a long time ago. The terms subject, predicate and object are not chosen at random here: +A triple is a statement that relates subject and object to each other, + +e.g. Peter Parker ---is a friend of --> Mary Jane Watson + +A detailed description can be found on [Wikipedia](https://en.wikipedia.org/wiki/Resource_Description_Framework). + +In the first part we already worked with triples, although little was explained about it. Building triples for a mutation in Dgraph is actually just as simple as the example above: +```graphql + . + +<0x01> "Peter Parker" . +<0x02> "Mary Jane Watson" . +<0x01> <0x02> . +``` +Here we have a node with the id 0x01. This node has a field name to which we have assigned the value Peter Parker. At node 0x02 we assigned Mary Jane Watson as a name. Then we connect the two data sets with the predicate friend_of. The . at the end signals the end of the line. +If a node has more fields or other connections, you can continue line by line according to this scheme. +The above The example given assumes, of course, that we know the Ids of the nodes. + +## Mutations in Dgraph + +In part we already had the first mutation in this format: +```graphql +{ + set{ + _:Peter "Peter Parker" . + _:Peter "New York" . + _:Mary "Mary Jane Watson" . + _:Mary "New York" . + _:Mary _:Peter . + _:Harry "Harry Osborne" . + _:Harry "New York" . + _:Harry _:Peter . + _:Harry _:Mary . + } +} +``` +We have created new data records. So that we can do this efficiently, Dgraph has the option to work with empty nodes. Here we can use temporary IDs to create a relationship between data records. The format here is _: description. +This allows us to set several fields and to define relationships between several nodes. + +## Combination of Queries and Mutations + +It gets really efficient in the combination of queries and mutations. In Dgraph we can define variables within a query, which we can then use in a mutation. +```graphql +upsert { + query { + q(func: eq(name, "Peter Parker")) { + Peter as uid + name + } + } + mutation { + set { + uid(Peter) "Spiderman" . + } + } +} +``` +In this example, we first look for Peter Parker in the name field and assign the Peter variable the value of the uid of our search result. We can then use the variable Peter in the mutation to update the node. +The ability to work with variables here is great because it saves you time and, above all, code. + +## Schema definition with RDF N-Quads + +I cheated a bit above. The combination of query and mutation works, but only if you change the definition of the field name a little beforehand. +We need to be able to search on the field name with a function, so we have to tell Dgraph that it is a searchable field. To do this you have to click on the Schema in the Ratel interface and now you can click Bulk Edit: + +![Change the schema in Dgraph](/img/dgraph/schema-nquad.png "Changing a schema with N-Quads") + +The Bulk Edit function makes sense if you want to edit several entries. However, if you only want to revise one, you can simply click on the field name: + +![Change the schema in Dgraph](/img/dgraph/schema-ratel.png "Changing a schema with N-Quads") + +We have now made the field name searchable and now the upsert mutation works. The scheme can also be transmitted via one of the available clients. A scheme change via http e.g. with cURL is not possible for security reasons. + +DGraph automatically creates a data schema based on the data you save. That means you don't have to worry about it at first. You can see from the example above, however, that even a simple search for a specific field can no longer avoid the topic of schema. +This makes a lot of sense. If every field were searchable from home, it would not be particularly performant. + +## Mutations in the JSON Format + +Mutations can also be transmitted in JSON format, which is an enormous relief, especially for complex data sets. + +```json +{ + "set": [ + { + "name": "Peter Parker", + "hometown": "New York" + }, + { + "name": "Mary Jane Watson", + "hometown": "New York" + } + ] +} +``` + +It is also possible to use variables from a query for an upsert operation: + +```json +{ + "query": "{ var(func: eq(name, \"Peter Parker\")) { Peter as uid}}", + "set": + { + "uid": "uid(Peter)", + "name": "Batman" + } +} +``` + +This is only a rough overview of the topic. There are further examples and information in the DGraph documentation. +[DGraph Documentation](https://dgraph.io/docs/master/mutations/#language-and-rdf-types) diff --git a/content/posts/dgraph4.de.md b/content/posts/dgraph4.de.md new file mode 100644 index 0000000..9e9f74f --- /dev/null +++ b/content/posts/dgraph4.de.md @@ -0,0 +1,109 @@ +--- +title: "DGraph - Teil 4: Schema in Dgraph erstellen" +date: 2020-08-12 +draft: false +tags: ["datenbank","graph","graphql"] +archive: ["Dgraph Grundlagen"] +categories: ["Archive"] +--- +Im ersten Teil dieser Serie habe ich erwähnt, dass Dgraph ohne Schema auskommt. In Teil 3 haben wir eine Anpassung des Schemas gemacht um ein Feld suchbar zu machen. +Darüber hinaus gibt es noch weitere Gründe sich mit dem Thema Schema in Dgraph zu befassen, da man für manche Funktionen ohne Schema nicht weiterkommt. +Ein Beispiel dafür ist die expand() Funktion. Damit ist es möglich alle Felder eines Datensatzes abzurufen ohne diese explizit anzufordern. Damit das funktioniert müssen wir in Dgraph erst einmal ein Schema definieren. + +## Schema und Datentypen definieren + +Die Schema Definition in Dgraph ist relativ einfach. Mit dem Keyword type teilen wir Dgraph mit, dass eine Typendefinition folgt. Innerhalb der Definition geben wir die Datenfelder / Prädikate an aus denen der Typ bestehen soll. + +Im Anschluss an den Datentyp können wir noch die einzelnen Felder genauer definieren. +```graphql +type Person { + name + hometown + friend_of +} + +name: string @index(hash) . +hometown: string . +friend_of: [uid] . +``` +Hier definieren wir das Feld name als Typ string und teilen Dgraph mit, dass dieses Feld indiziert sein soll. Für das Feld friend_of geben wir an, dass es sich um eine Verbindung zu einem anderen Datensatz handelt. + +Dgraph verwendet den definierten Knotentyp nicht automatisch und geht nicht davon aus, dass bloß weil ein Knoten alle Felder des Typs Person besitzt, dieser auch vom Knotentyp Person ist. Das bedeutet, dass wir DGraph mitteilen müssen, wenn ein Datensatz eine Person ist: +```graphql +{ + set{ + _:Peter "Peter Parker" . + _:Peter "New York" . + _:Peter "Person" . + _:Mary "Mary Jane Watson" . + _:Mary "New York" . + _:Mary _:Peter . + _:Mary "Person" . + _:Harry "Harry Osborne" . + _:Harry "New York" . + _:Harry _:Peter . + _:Harry _:Mary . + _:Harry "Person" . + } +} +``` +Mit dem N-Quad _:Peter "Person" . wird z.B. dem Knoten für Peter Parker der Typ Person zugewiesen. Das funktioniert natürlich auch im JSON Format: +```json +{ + "set": [ + { + "name": "Peter Parker", + "hometown": "New York", + "dgraph.type": "Person" + }, + { + "name": "Mary Jane Watson", + "hometown": "New York", + "dgraph.type": "Person" + } + ] +} +``` + +## Ein paar Funktionen, die sich aus der Schemadefinition ergeben + +Dank der Schemadefinition haben wir jetzt Zugriff auf ein paar Standardfunktionen, die ohne Schema nicht möglich wären. +Jetzt können wir in Dgraph z.B. gezielt nach dem Typ Person suchen. +```graphql +{ + persons(func: type(Person)){ + uid + name + } +} +``` +Dadurch lassen sich Queries noch gezielter ausführen, da man ja meistens mit recht konkreten Datanstrukturen arbeitet. In einem Bestellsystem hat man Bestellungen, Kunden und so weiter. Diese definiert man als eigene Typen, die man dann gezielt wieder ansprechen kann. + +Eine weitere praktische Funktion ist expan: +```graphql +{ + persons(func: type(Person)){ + expand(_all_) { + expand(_all_) + } + } +} +``` + +Mit expan lassen sich alle Felder eines Datensatzes ausgeben und müssen nicht einzeln angegeben werden. + +Ich habe schon oft gelesen, dass schemalos als Vorteil Datenbanken angepriesen wird. Das ist ja im Grunde auch gut und richtig, letzten Endes muss man sich aber bei jedem Projekt so oder so Gedanken über die Struktur seiner Daten machen. Im Fall Dgraph halte ich es für absolut sinnvoll mit einem Schema zu arbeiten. +Es ist in Dgraph auch nicht so, dass man sich mit einem Schema die Flexibilität nimmt. Selbst wenn ein Datensatz als Typ angelegt wurde kann man trotzdem beliebige Felder hinzufügen, die nicht in der Typendefinition enthalten sind. Man muss sich nur darüber klar sein, dass man diese Felder dann in einer Query anfordern muss: + +```graphql +{ + persons(func: type(Person)){ + fieldname + expand(_all_) { + expand(_all_) + } + } +} +``` + +Ich werde wahrscheinlich an dieser Stelle erst einmal mit den Basics aufhören und in den nächsten Beiträgen zeigen wie man mit dem Go Client mit Dgraph interagiert. diff --git a/content/posts/dgraph4.en.md b/content/posts/dgraph4.en.md new file mode 100644 index 0000000..c84cb92 --- /dev/null +++ b/content/posts/dgraph4.en.md @@ -0,0 +1,108 @@ +--- +title: "DGraph - Part 4: Creating a schema" +date: 2020-08-12 +draft: false +tags: ["database","graph","graphql"] +archive: ["Dgraph basics"] +categories: ["Archive"] +--- +In the first part of this series I mentioned that Dgraph works without a scheme. In part 3 we made an adjustment to the schema to make a field searchable. +In addition, there are other reasons to deal with the topic of schema in Dgraph, as you will not get any further for some functions without schema. +An example of this is the expand() function. This makes it possible to call up all fields of a data record without explicitly requesting them. For this to work we first have to define a scheme in Dgraph. + +## Define a schema and data types + +The schema definition in Dgraph is relatively simple. With the keyword type we tell Dgraph that a type definition follows. Within the definition, we specify the data fields / predicates from which the type should consist. + +Following the data type, we can define the individual fields more precisely. +```graphql +type Person { + name + hometown + friend_of +} + +name: string @index(hash) . +hometown: string . +friend_of: [uid] . +``` +Here we define the field name as type string and tell Dgraph that this field should be indexed. For the field friend_of we indicate that it is a connection to another data record. + +Dgraph does not automatically use the defined node type and does not assume that just because a node has all fields of the Person type, it is also of the Person node type. That means we need to tell DGraph when a record is a person: +```graphql +{ + set{ + _:Peter "Peter Parker" . + _:Peter "New York" . + _:Peter "Person" . + _:Mary "Mary Jane Watson" . + _:Mary "New York" . + _:Mary _:Peter . + _:Mary "Person" . + _:Harry "Harry Osborne" . + _:Harry "New York" . + _:Harry _:Peter . + _:Harry _:Mary . + _:Harry "Person" . + } +} +``` +With the N-Quad _: Peter "Person". e.g. assigned the type Person to the node for Peter Parker. Of course, this also works in JSON format: +```json +{ + "set": [ + { + "name": "Peter Parker", + "hometown": "New York", + "dgraph.type": "Person" + }, + { + "name": "Mary Jane Watson", + "hometown": "New York", + "dgraph.type": "Person" + } + ] +} +``` + +## A couple of functions that result from the schema definition + +Thanks to the schema definition, we now have access to a few standard functions that would not be possible without the schema. +Now in Dgraph we can e.g. search specifically for the type person. +```graphql +{ + persons(func: type(Person)){ + uid + name + } +} +``` +This allows queries to be executed even more specifically, since you usually work with very concrete data structures. In an ordering system, you have orders, customers, and so on. You define these as your own types, which you can then specifically address again. + +Another useful function is expan: +```graphql +{ + persons(func: type(Person)){ + expand(_all_) { + expand(_all_) + } + } +} +``` + +With expand all fields of a data record can be output and do not have to be specified individually. + +I've read many times that schemaless is touted as an advantage of databases. That is basically a good thing and correct to say, but in the end you have to think about the structure of your data one way or another with every project. In the case of Dgraph, I think it makes perfect sense to work with a schema. +It is also not the case in Dgraph that a scheme takes away the flexibility. Even if a data record has been created as a type, you can still add any fields that are not included in the type definition. You just have to be aware that you have to request these fields in a query: +```graphql +{ + persons(func: type(Person)){ + fieldname + expand(_all_) { + expand(_all_) + } + } +} +``` + +I will probably stop at this point with the basics and show in the next few posts how to interact with the Go Client with Dgraph. diff --git a/content/posts/email-hoelle.de.md b/content/posts/email-hoelle.de.md new file mode 100644 index 0000000..01eae4a --- /dev/null +++ b/content/posts/email-hoelle.de.md @@ -0,0 +1,97 @@ +--- +title: "Einmal E-Mail Hölle und zurück" +date: 2019-09-01 +draft: true +tags: ["produktivität","ordnung","e-mail","spam","automatisierung"] +categories: ["Archive"] +--- +# UPDATE August 2020 + +Der folgende Artikel ist zwar für den einen oder anderen interessant, spiegelt aber mittlerweile nicht mehr meinen aktuellen Ansatz zum Thema E-Mail wieder. +Ich habe mich mittlerweile allen genannten Tools getrennt und habe stattdessen seit Juni einen [HEY](https://hey.com). Ich werde hierzu noch einen Beitrag schreiben 😊 + +|||||||||||||||||||||||||| + +Kennt Ihr das? Ihr bekommt gefühlt tausende Benachrichtigungen, Status Updates, Bestellbestätigungen und vieles mehr? Man bekommt so viel Zeug im Laufe des Tages und das meiste davon ist es einfach nicht wert auch nur geöffnet zu werden. Dabei muss sich gar nicht einmal um Newsletter handeln. Ich bekomme viele Statusupdates. Meistens den Systemen, mit denen ich tagtäglich in der Firma arbeite. WiKi, Aufgabenverwaltung, CC, E-Mails Kollegen, Logs etc. etc. + +## Ordnung und Regeln + +Zuerst habe ich E-Mail Regeln Apple Mail versucht. + +Das funktioniert im ersten Moment recht gut. E-Mails einem bestimmten Absendet können als gelesen markiert und verschoben werden. Das ganze lässt sich auch mit Schlüsselwörtern kombinieren. Das schafft Ordnung, aber es gab leider dennoch ein paar Punkte mit denen ich nicht zufrieden war: + + bei sehr vielen Absendern und sehr vielen E-Mails ist man schnell bei 30+ Regeln + ich wollte gerne E-Mails als erledigt markieren und sie in einen FERTIG-Ordner schieben + E-Mails, die einen Handlungsbedarf haben möchte ich an Omnifocus übergeben. + +Durch dies vielen E-Mails war ich trotzdem irgendwann genervt. Viele Leute verbringen täglich viele Zeit in ihren Mails. Ich selbst möchte mich nicht dazuzählen müssen. Wie viele der E-Mails, die man täglich erhält sind wirklich wichtig oder interessant? + +## Von Apple Mail zu Air Mail + +Ich bin Apple Mail zu Airmail gewechselt. Ich benutze das Programm mittlerweile seit Jahren für macOS und iOS und bin echt glücklich damit. Natürlich muss man hier abwägen, ob man die knapp 11 € + knapp 6 € iOS Version investieren möchte. + +Ich habe mich aus diesen Gründen dafür entschieden: + + E-Mails als erledigt markieren und verschieben (mit einer Aktion) + E-Mails schlummern lassen + E-Mail Erinnerungen für versendete E-Mails + aus E-Mails Aufgaben oder Erinnerungen machen + +### Schlummern & Erinnerungen machen das Leben leichter +Die Schlummern Funktion ist eine wirklich großartige Sache. Dadurch verschwindet eine E-Mail eine bestimmte Zeit. Gerade E-Mails bei E-Mails mit Handlungsbedarf ist diese Funktion super. Wie sagt man? Aus den Augen, aus dem Sinn. + +![Snooze Funktion in Airmail](/img/email-hoelle/snooze.png "Sbooze Funktion") + +Ideal ist es für mich die eine E-Mail bis zu dem Zeitpunkt schlummern zu lassen an dem ich Zeit dafür habe. Nach Ablauf der Schlummer-Zeit legt Air Mail die E-Mail wieder in den Posteingang. + +Die Erinnerungsfunktion kann direkt beim verfassen einer E-Mail eingeschaltet werden. Ich nutze die Erinnerungen, wenn ich dringend auf eine Antwort warte. So erinnert mich Air Mail daran, dass ich diese E-Mail versendet habe und ich kann ggf. nochmal nachfassen. + +### Aktionen & Dienste + +Wirklich schnell wird das Durchgehen des Posteingangs durch Aktionen. Diese kann man in Airmail selbst definieren. Meine rechte Pfeiltaste markiert eine E-Mail als erledigt. Gleichzeitig wird die E-Mail dadurch in den ERLEDIGT Ordner geschoben. Die linke Pfeiltaste übergibt die markierte E-Mail an Omnifocus. Mit der Eingabetaste setze ich E-Mails auf Schlummern. So komme ich bei durchgehen meiner E-Mails extrem schnell voran. + +![Aktionen in Airmail](/img/email-hoelle/actions.png "Aktionen in Airmail") + +Neben Omnifocus gibt es übrigens noch viele weitere Dienste, die sich integrieren lassen. Kalender, Google Drive, Wunderlist, Trello und Todoist sind nur einige davon. + +Ich nutze Airmail seit Jahren und es hilft mir wirklich effizient mit Mails zu arbeiten. Trotzdem fehlte mir was. Mein Hauptkritikpunkt sind genau wie bei Apple Mail die Regeln. Man muss hier gefühlt permanent neue Regeln erstellen. Außerdem sind die Regeln in der iOS App nicht verfügbar. Ist man ein paar Tage unterwegs kann hier schnell das Chaos im Posteingang einziehen. Ich bin einfach nie zufrieden 😎. + +## Mit Sanebox im E-Mail Himmel + +Seit ein paar Monaten setze ich zusätzlich zu Air Mail noch Sanebox ein. Sanebox arbeitet direkt mit dem Mailserver. Dadurch laufen alle Aktion Sanebox auch ohne Abruf durch den E-Mail Client. + +![Sanebox Ordner Einrichtung](/img/email-hoelle/sanebox.png "Sanebox Ordner Einrichtung") + +E-Mail Regeln sind mit dem Einsatz Sanebox vollkommen hinfällig. Sanebox versucht im Grunde nur wichtige E-Mails im Posteingang zu zeigen. Alles was nicht wichtig ist landet im Ordner @SaneLater. Was wichtig ist und was nicht lernt Sanebox recht schnell. Ein Kriterium ist z.B. auf welche E-mails man antwortet und wie schnell nach Erhalt der Mail. + +![Sanbox Ordner](/img/email-hoelle/sanebox-folders.png "Ordner in Sandebox") + +### Noch mehr Ordnung mit eigenen Ordnern + +Natürlich kann man auch eigene Ordner definieren. Das Schöne daran ist, dass man hier auch gleich noch eine Weiterleitung anhängen kann. E-Mails mit Rechnungen lasse ich so z.B. gleich an unsere Buchhaltung weiterleiten. + +Durch das Verschieben E-Mails einem Ordner zum anderen lernt Sanebox. Das tolle daran ist, dass man wenig Aufwand betreiben muss um das System anzulernen. Bei mir ist es so, dass ich meine E-Mails sowieso in Unterordner sortiere. + +Neben den Standardordners bietet Sanebox auch noch Ordner mit weiteren Funktionen an. Ordner mit Schlummern Funktion oder ein schwarzes Loch 😁 für alles was man gar nicht sehen will. Praktisch ist auch der SaneNoReplies Ordner. Sanebox legt hier E-Mails ab auf die man noch keine Antwort erhalten hat. Kombiniert mit SaneReminders wird das wirklich interessant. Man kann beim Versand einer Mail eine Erinnerungsadresse angeben. Die Erinnerungsadresse hat einen definierten Zeitraum. Wurde die E-mail in dem Zeitraum nicht beantwortet landet die E-Mail wieder im Eingang. + +### Sanebox Digest + +Man kann sich Sanebox so einrichten, dass man regelmäßig einen Bericht bekommt. Hier hat man alle Trainings und verschobenen E-Mails im Überblick. Eventuell falsch zugeordnete E-Mails können ganz einfach anders zugeordnet werden. So hat man immer einen Überblick ob Sanebox richtige Zuordnungen vornimmt. + +### Ich bearbeite meine E-Mails wieder gerne + +Okay, das ist nicht ganz war. Ich mache mein E-Mail Programm wieder gerne auf. Kein Wunder, ich muss mittlerweile kaum noch E-Mails selbst bearbeiten oder sortieren 😇. + +Dank Air Mail und Sanebox bearbeite ich meine E-Mails innerhalb 5 Minuten pro Tag. Das Spart Zeit und Nerven und ich kann mich um wichtigere Dinge kümmern. Inbox Zero - jeden Tag 😎 + +### "Gesunde" E-Mail Gewohnheiten sollte man trotzdem haben + +Ordnung alleine ist nicht alles. Letzten Endes braucht man Disziplin, wenn man effektiv sein möchte. Es gibt so viele Ablenkungen in der heutigen Zeit. Oft werden E-Mails und andere Arten Benachrichtigungen verteufelt. Tatsache ist aber, dass man mit diesen Dingen richtig umgehen muss. Wir haben es selbst in der Hand ob wir uns ablenken lassen oder nicht. Niemand zwingt uns den ganzen Tag _Pling_ und _Bing_ zu hören oder das E-Mail Programm permanent geöffnet zu haben. + +Ich habe mir angewöhnt mein E-Mail Programm 2x am Tag zu öffnen. In Kombination mit Airmail und Sanebox wird dadurch vieles entspannter. + +### Links zu den verwendeten Programmen und Diensten: + +[Sanebox (Afiiliate Link)](https://sanebox.com/t/28g9627o30) | [Sanebox](https://sanebox.com) + +[Air Mail (Affiliate Link)](https://geo.itunes.apple.com/de/app/airmail-3/id918858936?mt=12&app=apps) | [Air Mail](https://apps.apple.com/de/app/airmail-3/id918858936/) diff --git a/content/posts/email-hoelle.en.md b/content/posts/email-hoelle.en.md new file mode 100644 index 0000000..63e90c0 --- /dev/null +++ b/content/posts/email-hoelle.en.md @@ -0,0 +1,95 @@ +--- +title: "Down to e-mail hell and back again" +date: 2019-09-01 +draft: true +tags: ["productivity","order","e-mail","spam","automation"] +categories: ["Archive"] +--- +# UPDATE August 2020 + +The following article may be of interest to one or the other, but no longer reflects my current approach to the subject of email. +I have since parted with all the tools mentioned and have had a [HEY](https://hey.com) instead since June. I will write a post about this 😊 + +||||||||||||||||||||||||||| + +Do you know that? You get thousands of notifications, status updates, order confirmations and much more? You get so much stuff during the day and most of it is not worth opening. It does not even have to be newsletters. I get many status updates from I work with every day in the company. WiKi, task management, CC, emails from colleagues, logs etc. etc. + +## Order and rules + +First I tried email rules from Apple Mail. That works pretty well at first. E-mails from a particular sender can be marked as read and moved. The whole thing can also be combined with keywords. That brings order, but unfortunately there were a few points I was not satisfied with: + + With a lot of senders and a lot of emails you will end up with 30+ rules + I wanted to mark emails as done and put them in a DONE folder + I would like to hand over emails, which have a need for action, to Omnifocus. + +I was annoyed by getting this many e-mails. Many people spend a lot of time every day in their post box. I no interest to this as well. Honestly, how many of the emails you receive are really important or interesting? + +## From Apple Mail to Air Mail + +I switched from Apple Mail to Airmail. I have been using the program for macOS and iOS for years and am really happy with it. Of course, you have to weigh whether you want to invest the almost 11 € and  6 € iOS version. + +I decided for Airmail for these reasons: + + Mark emails as done and move them (with an action) + Let e-mails go to sleep + E-Mail reminders for sent emails + make emails tasks or reminders + Snooze & rminders make life easier + +The snooze function is a really great thing. It makes an e-mail disappear from your inbox for a certain time. Especially for actionable e-mails this feature is great. How do you say? Out of sight, out of mind. + +![Snooze function in Airmail](/img/email-hoelle/snooze.png "Sbooze function") + +Usually I let an e-mail snooze until I have time to deal with it. At the end of the slumber time, Air Mail puts the e-mail back in the Inbox. + +The reminder function can be activated directly when writing an e-mail. I use the memories when I am urgently waiting for an answer. So Air Mail reminds me that I have sent this e-mail and I can possibly catch up again. + +### Actions & Services + +Actions & Services make going through the inbox fast. These can be defined in Airmail itself. My right arrow key marks an email as done. At the same time the e-mail is pushed into the DONE folder. The left arrow key passes the selected email to Omnifocus. I use the Enter key to put emails to snooze. This is how I get ahead of my e-mails extremely fast. + +![Actions in Airmail](/img/email-hoelle/actions.png "Actions in Airmail") + +Besides Omnifocus, there are many more services that can be integrated. Calendar, Google Drive, Wunderlist, Trello and Todoist are just some of them. + +I have been using Airmail for years and it really helps me to work efficiently with mails. Still, I was missing something. My main criticism is the same as with Apple Mail. You feel like you are constantly creating new rules. Moreover, the rules function is not available in the iOS app. If you are a few days on the road, the chaos in the inbox can quickly move in here. I'm just never satisfied 😎. + +### With Sanebox to email heaven + +For a few months, I have been using Sanebox in addition to Air Mail. Sanebox works directly with the mail server. As a result, all actions from Sanebox run without retrieval by the e-mail client. + +![Sanebox folder setup](/img/email-hoelle/sanebox.png "Sanebox folder setup") + +Email rules are completely obsolete with the use of Sanebox. Sanebox basically just tries to show important emails in the Inbox. Everything that is not important ends up in the folder @SaneLater. What's important and what does not Sanebox learn quickly. One criterion is e.g. on which e-mails one responds and how fast after receiving the mail. + +![Sanbeox Ordner](/img/email-hoelle/sanebox-folders.png "Ordner in Sandebox") + +## Even more order with their custom folders + +Of course you can also define your own folders. The nice thing is that you can attach a forwarding function as well. In my setup e-Mails containing invoices are immediately forward to our accounting department. + +By moving emails from one folder to another, Sanebox learns. The great thing is that you have to do little effort to learn the system. For me, I sort my e-mails into subfolders anyway. + +Besides he default folders, Sanebox also offers folders with extra functions. Folder with a snooze function or a black hole 😁 for everything you do not want to see. Practical is also the SaneNoReplies folder. Sanebox deposits emails that have not been answered yet. Combined with SaneReminders that will be really interesting. You can specify a reminder address when sending an e-mail. The reminder address has a defined period. If the e-mail was not answered during the period, the e-mail will be returned to the entrance. + +### Sanebox Digest + +You can set up Sanebox to get a report regularly. Here you have all trainings and postponed emails at a glance. Any mismatched emails can easily be reassigned. So you always have an overview of whether Sanebox makes correct assignments. + +### I like to go through my e-mails again + +Okay, that was not quite. I like to open my e-mail program again. No wonder, I hardly have to edit or sort e-mails myself mittlerweile. + +Thanks to Air Mail and Sanebox I process my emails within 5 minutes per day. It saves time and nerves and I can take care of more important things. Inbox Zero - every day 😎 + +## You should still have "healthy" e-mail habits + +Order alone is not everything. After all, you need discipline if you want to be effective. There are so many distractions in this day and age. Often emails and other types of notifications are vilified. The fact is that you have to deal with these things properly. We have it in our own hands whether we let ourselves be distracted or not. Nobody forces us to listen to _pling_ and _bing_ all day or to have the e-mail program permanently open. + +I have become accustomed to opening my e-mail program twice a day. In combination with Airmail and Sanebox this will be much more relaxed. + +### Links to the programs and services: + +[Sanebox (Afiiliate Link)] (https://sanebox.com/t/28g9627o30) | [Sanebox] (https://sanebox.com) + +[Air Mail (Affiliate Link)] (https://geo.itunes.apple.com/de/app/airmail-3/id918858936?mt=12&app=apps) | [Air Mail] (https://apps.apple.com/de/app/airmail-3/id918858936) diff --git a/content/posts/evans-grpc.de.md b/content/posts/evans-grpc.de.md new file mode 100644 index 0000000..ce5a192 --- /dev/null +++ b/content/posts/evans-grpc.de.md @@ -0,0 +1,157 @@ +--- +title: "Evans - ein CLI gRPC Client" +date: 2020-08-18 +draft: false +tags: ["grpc","protobuf","cli"] +archive: ["Technik Zeug"] +series: [""] +featuredImage: "/img/evans/evans.gif" +--- +# gRPC Server testen, aber wie? + +Wenn man eine REST oder GraphQL Api entwickelt hat man diverse Tools zur Verfügung, die einen beim Testen unterstützen. Ich persönlich setze hier [Insomnia](https://insomnia.rest) ein, viele werden auch [Postman](https://www.postman.com/) verwenden. +Manch einer wird aber auch einfach [cURL](https://curl.haxx.se/) verwenden. Für gRPC scheinen solche Tools weniger weit verbreitet zu sein. + +Ein Tool, dass ich sehr nützlich finde und dass mir hilft, wenn ich mit einem gRPC Service arbeite ist [Evans](https://github.com/ktr0731/evans). + +## Installation & Setup + +Die Installation ist unter MacOS am einfachsten: + +```bash +brew tap ktr0731/evans +brew install evans +``` + +Binaries für Linux und Windows sind auf [Github](https://github.com/ktr0731/evans) ebenfalls verfügbar. + +Um Evans effektiv nutzen zu könnnen, empfehle ich auf jeden Fall gRPC Reflection einzuschalten. In Go könnte das so aussehen: + +```go +package main + +import ( + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "log" + "net" + pb "path/to/your/compiled/protobuf/package" +) + +var port = ":50051" + +func main() { + lis, err := net.Listen("tcp", port) + if err != nil { + log.Fatalf("failed to listen: %v", err) + } + + s := grpc.NewServer() + pb.RegisterExampleserviceServer(s, &exampleService) + + // Enable reflection: + reflection.Register(s) + + if err := s.Serve(lis); err != nil { + log.Fatalf("failed to serve: %v", err) + } +} +``` + + +## Erste Schritte + +Evans startet Ihr z.B. im Repl Modus mit: +```bash +evans -r -p 50051 +``` +Ist Reflection so wie oben beschrieben eingeschaltet könnt Ihr Euch mit show package die verfügbaren Services anzeigen lassen und mit packache ServiceName zu einem Service wechseln. + +![Evans starten](/img/evans/evans1.gif "Evans starten") + +## Reflektion + +Sinn und zweck des Ganzen ist aber natürlich das Testen RPCs. Auch hier hilft uns die Reflektion. Wenn Ihr ein package gewählt habt könnt Ihr Euch mit show Service anzeigen lassen welche Services in dem Paket verfügbar sind. + +![Service Info](/img/evans/evans2.gif "Einen Service auswählen") + +Das Schöne ist, dass Euch die RPCs samt Request- und Responsetypen ebenfalls angezeigt werden. + +Um mit dem Service arbeiten zu können muss dieser ausgewählt werden. service ServiceName wählt einen Service aus und nun könnnt Ihr Euch mit show rpc die verfügbaren RPCs anzeigen lassen: + +![RPCs](/img/evans/evans3.gif "RPCs anzeigen lassen") + +## RPCs aufrufen + +Mit call RPCname könnt Ihr jetzt RPCs aufrufen. In meinem Beispiel hier rufe ich Save auf. Evans fragt nun interaktiv die einzelnen Felder ab, diee für den Aufruf notwendig sind. +![RPCs aufrufen](/img/evans/evans5.gif "RPCs aufrufen") +Wie man sieht bekommt man hier auch noch weitere Infos angezeigt. Repeate zeigt uns, dass addresslist ein Array ist un welchem Typ die einzelnen Felder sind. Die protobuf Datei dazu sieht so aus: + +```protobuf +syntax = "proto3"; + +package address; + +import "helper/helper.proto"; + +option go_package = "models/address"; + +service AddressService { + rpc GetSingleAddress (address.GetAddressRequest) returns (address.Address) {} + rpc GetAddressList (address.GetAddressRequest) returns (address.AddressList) {} + rpc Save (address.AddressList) returns (helper.StatusResponse) {} + rpc Delete (address.AddressList) returns (helper.StatusResponse) {} +} + +message GetAddressRequest { + string id = 1; +} + +message Address { + string id = 1; + string firstName = 2; + string lastName = 3; + string company = 4; + string address1 = 5; + string address2 = 6; + string zip = 7; + string city = 8; + Country country = 9; +} + +message AddressList { + repeated address.Address addresslist = 1; +} + +enum Country { + option allow_alias = true; + AL = 0 ; + AD = 1 ; + AT = 2 ; + BY = 3 ; + BE = 4 ; + ... + ALBANIA = 0 ; + ANDORRA = 1 ; + AUSTRIA = 2 ; + BELARUS = 3 ; + BELGIUM = 4 ; + ... +} +``` + + ## Fazit und Alternativen + + Das kann natürlich erst einmal nur als Überblick dienen. Evans kann noch einiges mehr, unter anderem kann damit auch Streaming getestet werden. + + Ich persönlich finde, dass das Testen dadurch um einiges leichter wird. Dass es sich um ein CLI tool handelt, finde ich gerade gut, da man ja nicht immer unbedingt ein GUI zur Verfügung hat. + + Alternativen gibt es natürlich auch. z.B. [Bloom RPC](https://github.com/uw-labs/bloomrpc) ist ein Electron Client für gRPC mit einem schicken GUI. Wer z.B. mit [GraphiQL](https://github.com/graphql/graphiql) vertraut ist wird sich hier schnell zurechtfinden. + + [gRPC Curl](https://github.com/fullstorydev/grpcurl) ist für einige mit Sicherheit auch eine Möglichkeit. + + + + + + diff --git a/content/posts/evans-grpc.en.md b/content/posts/evans-grpc.en.md new file mode 100644 index 0000000..36f22cb --- /dev/null +++ b/content/posts/evans-grpc.en.md @@ -0,0 +1,157 @@ +--- +title: "Evans - a CLI gRPC Client" +date: 2020-08-18 +draft: false +tags: ["grpc","protobuf","cli"] +archive: ["Technical Stuff"] +series: [""] +featuredImage: "/img/evans/evans.gif" +--- +# gRPC Server testing, but how? + +If you develop a REST or GraphQL Api you have various tools available that support you in testing. I personally use [Insomnia](https://insomnia.rest) here, many will also use [Postman](https://www.postman.com/). +But some people will simply use [cURL](https://curl.haxx.se/). Such tools appear to be less common for gRPC. + +A tool that I find very useful and that helps me when I work with a gRPC service is [Evans](https://github.com/ktr0731/evans). + +## Installation & Setup + +Installation is easiest on MacOS: + +```bash +brew tap ktr0731/evans +brew install evans +``` + +Binaries for Linux and Windows are also available on [Github](https://github.com/ktr0731/evans). + +In order to be able to use Evans effectively, I definitely recommend switching on gRPC Reflection. In Go this could look like this: + +```go +package main + +import ( + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + "log" + "net" + pb "path/to/your/compiled/protobuf/package" +) + +var port = ":50051" + +func main() { + lis, err := net.Listen("tcp", port) + if err != nil { + log.Fatalf("failed to listen: %v", err) + } + + s := grpc.NewServer() + pb.RegisterExampleserviceServer(s, &exampleService) + + // Enable reflection: + reflection.Register(s) + + if err := s.Serve(lis); err != nil { + log.Fatalf("failed to serve: %v", err) + } +} +``` + + +## First Steps + +Evans starts in repl mode with +```bash +evans -r -p 50051 +``` +If Reflection enabled as described above, you can display the available services with show package and switch to a service with packache ServiceName. + +![Start Evans](/img/evans/evans1.gif "Start Evans") + +## Reflection + +The whole point, of course, is to test RPCs. Here, too, reflection helps us. If you have chosen a package you can use show Service to display which services are available in the package. + +![Service Info](/img/evans/evans2.gif "Select a service") + +The nice thing is that you can also see the RPCs including request and response types. + +To be able to work with the service, it must be selected. service ServiceName selects a service and now you can display the available RPCs with show rpc: + +![RPCs](/img/evans/evans3.gif "Show RPCs") + +## Call RPCs + +With call RPCname you can now call RPCs. In my example here, I am calling Save. Evans now asks interactively the individual fields that are necessary for the call. +![Call RPCs](/img/evans/evans5.gif "Call RPCs") +As you can see, further information is also displayed here. repeate indicates that addresslist is an array and what type the individual fields are. The protobuf file looks like this: + +```protobuf +syntax = "proto3"; + +package address; + +import "helper/helper.proto"; + +option go_package = "models/address"; + +service AddressService { + rpc GetSingleAddress (address.GetAddressRequest) returns (address.Address) {} + rpc GetAddressList (address.GetAddressRequest) returns (address.AddressList) {} + rpc Save (address.AddressList) returns (helper.StatusResponse) {} + rpc Delete (address.AddressList) returns (helper.StatusResponse) {} +} + +message GetAddressRequest { + string id = 1; +} + +message Address { + string id = 1; + string firstName = 2; + string lastName = 3; + string company = 4; + string address1 = 5; + string address2 = 6; + string zip = 7; + string city = 8; + Country country = 9; +} + +message AddressList { + repeated address.Address addresslist = 1; +} + +enum Country { + option allow_alias = true; + AL = 0 ; + AD = 1 ; + AT = 2 ; + BY = 3 ; + BE = 4 ; + ... + ALBANIA = 0 ; + ANDORRA = 1 ; + AUSTRIA = 2 ; + BELARUS = 3 ; + BELGIUM = 4 ; + ... +} +``` + + ## Conclusion and alternatives + + Of course, this can only serve as an overview. Evans can do a lot more, including streaming testing. + + Personally, I think it makes testing a lot easier. I think it's a good thing that it's a CLI tool, because you don't always have a GUI available. + + There are of course alternatives. e.g. [Bloom RPC](https://github.com/uw-labs/bloomrpc) is an electron client for gRPC with a nice GUI. Who e.g. is familiar with [GraphiQL](https://github.com/graphql/graphiql) you will quickly find your way around here. + + [gRPC Curl](https://github.com/fullstorydev/grpcurl) is certainly an option for some. + + + + + + diff --git a/content/posts/go-pointer.de.md b/content/posts/go-pointer.de.md new file mode 100644 index 0000000..538d40c --- /dev/null +++ b/content/posts/go-pointer.de.md @@ -0,0 +1,136 @@ +--- +title: "Pointer in Go" +date: 2019-09-10 +draft: false +tags: ["programmieren","golang","go","datenstrukturen","zeiger","pointer"] +categories: ["Archive"] +--- +Ein Pointer in Go, oder auch Zeiger verweist auf die Speicheradresse an der ein Wert gesichert ist. Um die Speicheradresse für eine Variable auszugeben verwendet man das & Zeichen: + +```go +func main() { + x := 10 + fmt.Println(x) + fmt.Println(&x) + + fmt.Printf("%T\n", x) + fmt.Printf("%T\n", &x) +} +``` + +Gibt man Typ der Speicheradresse ausgeben, so ist er \int. Da \ ist der Operator für einen Pointer, dass heißt, die Speicheradresse ist ein Pointer zu einem int. Mit anderen Worten zeigt der Pointer zeigt auf eine Speicheradresse an der ein Wert vom Typ int gespeichert ist. + +Man muss hier klarstellen, dass ein Pointer zu einem int ein eigener Typ ist und nicht dem Typ int gleichzusetzen ist. + +```go +func main() { + x := 10 + + y := &x + fmt.Println(y) + fmt.Println(y) +} +``` + +In Zeile 6 wird der Operator \ verwendet. Dieser dereferenziert die in y gespeicherte Speicheradressem d.h. er gibt den dort gespeicherten Wert aus. + +```go +func main() { + x := 10 + + y := &x + y = 88 + fmt.Println(x) +} +``` + +Hier wird x = 88 gesetzt. Das liegt daran, dass die Variable y die Speicheradresse x enthält. Durch die Verwendung \y = 88 passiert wieder eine Dereferenzierung, d.h. man sagt dem Programm im Grunde "Setze den Wert, der sich an der in y gespeicherten Adresse befindet gleich 88". + +## Wie Pointer benutzt werden + +Pointer sind dann besonders nützlich, wenn man große Datemengen übergeben möchte. Es ist wesentlich effizienter auf die Adresse zu verweisen an der die Daten gespeichert sind statt die Daten an sich zu übergeben. + +Der zweite Anwendungsfall ist der, dass man manchmal Werte an einer Adresse ändern möchte. + +```go +func main() { + var x int = 5 + fmt.Println("Adresse x", &x) + zahlen(&x) +} + +func zahlen(x int) { + fmt.Println("x vorher ",x) + fmt.Println("Adresse x", &x) + x = 48 + fmt.Println("x nachher ",x) + fmt.Println("Adresse x", &x) +} +``` + +Die Funktion zahlen() konsumiert einen Pointer vom Typ int, d.h. wir übergeben in Zeile 3 die Speicheradresse x indem wir &x übergeben. Die Speicheradresse bleibt im oberen Beispiel immer die gleiche, während wir den Wert an der Adresse ändern. + +Die Funktion zahlen() hat keinen Zugriff auf. Selbst wenn x direkt an sie übergeben würde wäre es nicht möglich x zu ändern, da bei Übergabe an die Funktion eine Kopie x erstellt wird. + +## Methodensatz + +Eine Methodensatz sind die Methoden, die einem bestimmten Datentyp zugerordnet sind. Ein Methodensatz bestimmt die Schnittstellen (Interfaces), die der jeweilige Typ implementiert. + +Bei den Methodensätzen gibt es einen wichtigen Unterschied beim Empfänger Argumenten: + +Ein Receiver, der nicht als Pointer definiert ist funktioniert mit mit Pointern und auch mit nicht-Pointern. + +Ein Receiver, der als Pointer definiert ist funktioniert nur mit Pointern. + +```go +package main + +import ( + "fmt" + "math" +) + +type kreis struct { + radius float64 +} + +type form interface { + flaeche() float64 +} + +func (k kreis) flaeche() float64 { + return math.Pi k.radius k.radius +} + +func info(f form) { + fmt.Println("Fläche", f.flaeche()) +} + +func main() { + k := kreis{5} + info(&k) //Pointer Übergabe + info(k) //Nicht-Pointer Übergabe +} + +``` + +Die Aufrufe in Zeile 26 und 27 führen beide zum selben Ergebnis. Würde man die Methode flaeche() anders definieren würde der Aufruf in Zeile 27 einen Fehler verursachen: + +```go +... +func (k kreis) flaeche() float64 { + return math.Pi k.radius k.radius +} +... + +func main() { + k := kreis{5} + info(&k) //Pointer Übergabe + info(k) //Nicht-Pointer Übergabe // FEHLER +} +``` + +Der Grund warum info(k) fehlschlägt ist, dass die Funktion konkret nach einem Pointer vom Typ kreis verlangt. Da wie oben schon beschrieben ein Pointer vom Typ kreis ein eigenständiger Typ ist und nicht das gleiche wie der Typ kreis muss hier auch ein Pointer übergeben werden. + + + diff --git a/content/posts/go-pointer.en.md b/content/posts/go-pointer.en.md new file mode 100644 index 0000000..3028be9 --- /dev/null +++ b/content/posts/go-pointer.en.md @@ -0,0 +1,132 @@ +--- +title: "Pointer in Go" +date: 2019-09-10 +draft: false +tags: ["programming","golang","go", "data structures","pointer"] +categories: ["Archive"] +--- +A pointer in Go or pointer points to the memory address at which a value is saved. To output the memory address for a variable, use the & character: + +```go +func main() { + x := 10 + fmt.Println(x) + fmt.Println(&x) + + fmt.Printf("%T\n", x) + fmt.Printf("%T\n", &x) +} +``` + +If you enter the type of the memory address, it is \int. Since \ is the operator for a pointer, that is, the memory address is a pointer to an int. In other words, the pointer points to a memory address at which a value of the type int is stored. + +You have to make it clear here that a pointer to an int is a separate type and is not to be equated with the type int. +```go +func main() { + x := 10 + + y := &x + fmt.Println(y) + fmt.Println(y) +} +``` + +The operator \ is used in line 6. This dereferences the memory address stored in y i.e. it outputs the value stored there. +```go +func main() { + x := 10 + + y := &x + y = 88 + fmt.Println(x) +} +``` + +Here x =c88 is set. This is because the variable y contains the memory address of x. By using \ y = 88 dereferencing happens again, i.e. the program is basically told "set the value at the address stored in y equal to 88". + +## How Pointers Are Used + +Pointers are particularly useful when you want to transfer large amounts of data. It is much more efficient to refer to the address where the data is stored than to pass the data on to yourself. + +The second use case is that you sometimes want to change values at an address. +```go +func main() { + var x int = 5 + fmt.Println("Adresse of x", &x) + numbers(&x) +} + +func numbers(x int) { + fmt.Println("x before ",x) + fmt.Println("Adresse of x", &x) + x = 48 + fmt.Println("x after ",x) + fmt.Println("Adresse of x", &x) +} +``` + +The function numbers () consumes a pointer of the type int, i.e. we pass the memory address of x in line 3 by passing &x. In the example above, the memory address always remains the same as we change the value at the address. + +The numbers() function has no access to. Even if x were passed directly to them, it would not be possible to change x, since a copy of x is created when passed to the function. + +## Method Set + +A method set are the methods that are assigned to a certain data type. A set of methods determines the interfaces that the respective type implements. + +There is an important difference in the method sets when receiving arguments: + +A receiver that is not defined as a pointer works with pointers and also with non-pointers. + +A receiver that is defined as a pointer only works with pointers. + +```go +package main + +import ( + "fmt" + "math" +) + +type circle struct { + radius float64 +} + +type shape interface { + area() float64 +} + +func (c circle) area() float64 { + return math.Pi c.radius c.radius +} + +func info(f shape) { + fmt.Println("Area", f.area()) +} + +func main() { + k := circle{5} + info(&k) //Pointer + info(k) //Non-pointer +} + +``` + +The calls in lines 26 and 27 both lead to the same result. If the method area() were to be defined differently, the call in line 27 would cause an error: + +```go +... +func (c circle) area() float64 { + return math.Pi c.radius c.radius +} +... + +func main() { + k := circle{5} + info(&k) //Pointer + info(k) //Non-pointer = ERROR +} +``` + +The reason why info(k) fails is that the function specifically requests a pointer of the type circle. Since, as already described above, a \circle type pointer is an independent type and not the same as the circle type, a pointer must also be passed here. + + diff --git a/content/posts/goroutine-errors.de.md b/content/posts/goroutine-errors.de.md new file mode 100644 index 0000000..08d4bc8 --- /dev/null +++ b/content/posts/goroutine-errors.de.md @@ -0,0 +1,203 @@ +--- +title: "Go routinen und Fehlerbehandlung" +date: 2020-02-14 +draft: false +tags: ["programmieren","golang","go","goroutine","concurrent","channels"] +categories: ["Archive"] +--- +Bei einem kleinen Projekt an dem ich gerade arbeite habe ich gerade mit dem Thema Fehlerbeahndlung in Verbindung mit Goroutinen zu tun. Ich habe hier eine Library geschrieben, welche verschiedene Methoden für eine Bestellung anbietet. Natürlich habe ich brav darauf geachtet, dass im Fall der Fälle ein Fehler zurückgegeben wird. +Aber wie ist das wenn ich nun eine Methode als Goroutine starte. + +```go +package main + +import ( + "fmt" +) + +type order struct { + id string +} + +func (o order) create(id string) error { + //do something useful with the order + if id == "OD-002" { + err := fmt.Errorf("error with %s", id) + return (err) + } + o.id = id + return nil +} + +func main() { + o := order{} + err := o.create("OD-001") + fmt.Printf("Error: %v / Id: %s\n", err, o.id) + + o2 := order{} + err = o.create("OD-002") + fmt.Printf("Error: %v / Id: %s\n", err, o2.id) +} +``` +[Code ausprobieren](https://play.golang.org/p/M7x_bd6xTDJ) + +## Goroutinen erlauben parallele Ausführung +Schön und gut. Wenn wir uns jetzt vorstellen, dass wir tausende Bestellungen bearbeiten müssen macht es natürlich Sinn über Effizienz nachzudenken. +Indem wir unsere Methode als Gouroutine starten ermöglichen wir eine parallele Ausführung der Methoden. Klingt ja erstmal sinnvoll, also probieren wir das aus: + +```go +package main + +import ( + "fmt" +) + +type order struct { + id string +} + +func (o order) create(id string) error { + //do something useful with the order + if id == "OD-002" { + err := fmt.Errorf("error with %s", id) + return (err) + } + o.id = id + return nil +} + +func main() { + o := order{} + o2 := order{} + + //start goroutines + go o.create("OD-001") + go o.create("OD-002") + + fmt.Printf("Id: %s\n", o.id) + fmt.Printf("Id: %s\n", o2.id) +} +``` +[Code ausprobieren](https://play.golang.org/p/XJAUIxdr4-W) + +Was passiert hier? Wir haben hier im Prinzip 3 Goroutinen. Zuerst die Goroutine auf der unser main() Funktion läuft. Dazu kommen noch die beiden Goroutinen für o.create(). +Aber wir sehen keine Werte! Der Grund dafür ist einfach. Wir starten 2x o.create() als Goroutine. Das bedeutet aber auch, dass unsere main() weiterläuft, wir haben ja gesagt wir möchten o.create() jeweils parallel ausführen. +Das führt aber jetzt dazu, dass die main() komplett durchläuft und nicht auf die Ergebnisse der anderen beiden Goroutinen wartet. Schlussendlich beendet sich sogar das Programm bevor wir einen Wert erhalten. + +Der zweite Punkt ist, dass wir keine Fehlerbehandlung mehr machen. Verursacht eine der Goroutinen einen Fehler, so wird dieser nicht behandelt und der Benutzer bekommt eine wirklich häßliche Fehlermeldung mit der er wahrscheinlich nix anzufangen weiß. + +## Channels machen hier alles besser + +Wir brauchen also 2 Dinge. 1. müssen wir dafür Sorgen, dass unser Hauptprogramm auf die Beendigung der Goroutinen wartet, 2. müssen wir dafür sorgen, dass wir unseren Goroutinen eventuell Fehlermeldungen erhalten. Eine Lösung für beides bieten Channel. Ein Channel in Go ist im Grunde eine Verbindung 2 Übergabepunkten, einem Sende und einem Empfänger. Ein wichtiger Punkt ist zu wissen, das Channels blockieren. Das bedeutetkonkret, dass wenn eine Go Routine Daten in einen Channel sendet, ihre weitere Ausführung so lange blockiert wird bis der Empfänger (das könnte eine andere Go Routine sein) die Daten entgegengenommen hat. + +```go +package main + +import "fmt" + +func main() { + c := make(chan int) + numbers := []int{1, 2, 3, 4, 5} + for _, num := range numbers { + go func(n int) { + c <- n + fmt.Printf("end goroutine %v\n", n) + }(num) + fmt.Printf("channel: %v\n", <-c) + } + +} +``` +[Code ausprobieren](https://play.golang.org/p/5bUaufpUrkI) + +In diesem Beispiel iterieren wir über einen numbers und starten für jeden Wert eine Go Routine. Die Goroutine schreibt die Zahl in den channel. Der Wert des Channels wird jeweils fmt.Printf() abgerufen. Das klappt soweit, jetzt schauen wir uns das blockieren einmal genauer an: + +```go +package main + +import ( + "fmt" + "time" +) + +func main() { + c := make(chan int) + numbers := []int{1, 2, 3, 4, 5} + for _, num := range numbers { + go func(n int) { + c <- n + fmt.Printf("end goroutine %v\n", n) + }(num) + } + fmt.Printf("channel: %v\n", <-c) + time.Sleep(time.Second 5) + fmt.Printf("channel: %v\n", <-c) +} +``` +[Code ausprobieren](https://play.golang.org/p/dnkPclxJOvB) + +Der einzige Unterschied zum vorherigen Code ist, dass fmt.Printf() nun außerhalb der for Schleife ist. Das bedeutet, dass wir den Channel nun nur noch einmal abrufen, statt zuvor fünf mal. Probiert man den Code aus so sieht man nur noch eine Ausgabe für ein Element numbers und auch fmt.Printf("end goroutine %v\n", n) innerhalb der Go Routinen wird wird nur einmal ausgegeben. Was passiert hier? +In der for Schleife starten wir die Go Routinen. Der erste Abruf des Chanels c erfolgt erst nachdem alle Go Routinen gestartet wurden. Hier kommt die blockierende Eigenschaft Channels zum tragen. Dadurch, dass wir den Channel nur einmal abrufen bleiben die übrigen 4 Go Routinen nach dem senden an den Channel stehen und fmt.Printf("end goroutine %v\n", n) wird gar nicht ausgeführt. Ruft man aber 5 Sekunden später den Channel ein weiteres mal ab kann die nächste Go Routine beendet werden. + +## Channel für die Fehlerbehandlung nutzen + +Das zweite Punkt unseres Ausgangsproblems war ja die Fehlerbehandlung. Im Grunde haben wir hierfür schon alles was wir brauchen. Wir definieren mit errch := make(chan error) einen Channel der Daten vom Typ error weiterleitet. Sollte ein Fehler auftreten senden wir diesen in den Channel (Zeile 44-47), falls nicht senden wir nil in den Channel. + +```go +package main + +import ( + "fmt" +) + +type order struct { + id string +} + +func (o order) create(id string) error { + //tue etwas nützliches + if id == "OD-002" { + err := fmt.Errorf("error with %s", id) + return (err) + } + o.id = id + return nil +} + +func main() { + // a slice of order numbers + orderno := []string{"OD-001", "OD-002", "OD-003"} + // channel of type error + errch := make(chan error) + // a slice of empty orders + orders := []order{ + { + id: "", + }, + { + id: "", + }, + { + id: "", + }, + } + for i, order := range orders { + go func() { + err := order.create(orderno[i]) + if err != nil { + errch <- err + return + } + errch <- nil + }() + err := <-errch + if err != nil { + fmt.Println(err) + } + fmt.Println(order) + } +} +``` +[Code ausprobieren](https://play.golang.org/p/p_rrBOfduT9) + +Auf der anderen Seite muss natürlich der Abruf der Daten aus dem Channel erfolgen. In Zeile 51 rufen wir die Daten innerhalb der for Schleife aus dem Channel ab. Dadurch, dass der Channel Daten vom Typ error weiterleitet können wir in den Zeilen 51-55 die Fehlerbehandlung so wie sonst auch handhaben 😊 diff --git a/content/posts/goroutine-errors.en.md b/content/posts/goroutine-errors.en.md new file mode 100644 index 0000000..e0eee72 --- /dev/null +++ b/content/posts/goroutine-errors.en.md @@ -0,0 +1,201 @@ +--- +title: "Go routines and error handling" +date: 2020-02-14 +draft: false +tags: ["programming","golang","go","goroutine","concurrent","channels"] +categories: ["Archive"] +--- +In a small project I am currently working on, I am dealing with the topic of error handling in goroutines. I have written a library here that offers different methods for orders. Of course, I took good care to ensure that an error is returned if the worst comes to the worst. +But what is it like when I start a method as a goroutine? +```go +package main + +import ( + "fmt" +) + +type order struct { + id string +} + +func (o order) create(id string) error { + //do something useful with the order + if id == "OD-002" { + err := fmt.Errorf("error with %s", id) + return (err) + } + o.id = id + return nil +} + +func main() { + o := order{} + err := o.create("OD-001") + fmt.Printf("Error: %v / Id: %s\n", err, o.id) + + o2 := order{} + err = o.create("OD-002") + fmt.Printf("Error: %v / Id: %s\n", err, o2.id) +} +``` +[Try it out](https://play.golang.org/p/M7x_bd6xTDJ) + +## Go routines allow parallel execution +Nice and good. If we now imagine that we have to process thousands of orders, it obviously makes sense to think about efficiency. +By starting our method as a go routine, we enable parallel execution of the methods. Sounds reasonable at first, so let's try it out: +```go +package main + +import ( + "fmt" +) + +type order struct { + id string +} + +func (o order) create(id string) error { + //do something useful with the order + if id == "OD-002" { + err := fmt.Errorf("error with %s", id) + return (err) + } + o.id = id + return nil +} + +func main() { + o := order{} + o2 := order{} + + //start goroutines + go o.create("OD-001") + go o.create("OD-002") + + fmt.Printf("Id: %s\n", o.id) + fmt.Printf("Id: %s\n", o2.id) +} +``` +[Try it out](https://play.golang.org/p/XJAUIxdr4-W) + +What's happening? We basically have 3 goroutines here. First the goroutine on which our main() function runs. Then there are the two goroutines for o.create(). +But we don't see any values! The reason for this is simple. We start 2x o.create() as a go routine. But that also means that our main() continues running as we wanted to execute o.create() in parallel. +However, this now leads to the main() running and finishing the program not waiting for the results of the other two go routines. + +The second point is that we no longer do any error handling. If one of the go routines causes an error, it is not dealt with and the user gets a really ugly error message with which he probably doesn't know what to do. + +## Channels make things better here + +So we need 2 things. 1. we have to make sure that our main program is waiting for the go routines to finish, 2. we have to make sure that we receive error messages from our go routines. Channel offers a solution for both. A Channel in Go is basically a connection of 2 transfer points, a send and a receiver. An important point to know is that channels block. In concrete terms, this means that if a go routine sends data to a channel, its further execution is blocked until the recipient (which could be another go routine) has accepted the data. + +```go +package main + +import "fmt" + +func main() { + c := make(chan int) + numbers := []int{1, 2, 3, 4, 5} + for _, num := range numbers { + go func(n int) { + c <- n + fmt.Printf("end goroutine %v\n", n) + }(num) + fmt.Printf("channel: %v\n", <-c) + } + +} +``` +[Try it out](https://play.golang.org/p/5bUaufpUrkI) + +In this example we iterate over numbers and start a go routine for each value. The go routine writes the number into the channel. The value of the channel is retrieved by fmt.Printf (). This works so far, now let's take a closer look at blocking: + +```go +package main + +import ( + "fmt" + "time" +) + +func main() { + c := make(chan int) + numbers := []int{1, 2, 3, 4, 5} + for _, num := range numbers { + go func(n int) { + c <- n + fmt.Printf("end goroutine %v\n", n) + }(num) + } + fmt.Printf("channel: %v\n", <-c) + time.Sleep(time.Second 5) + fmt.Printf("channel: %v\n", <-c) +} +``` +[Try it out](https://play.golang.org/p/dnkPclxJOvB) + +The only difference from the previous code is that fmt.Printf() is now outside the for loop. This means that we now only retrieve the channel value once, instead of five times before. If you try out the code, you only see output for one element of numbers and also one fmt.Printf("end goroutine% v \ n", n) executed within the go routines. What's happening? +We start the go routines in the for loop. The first call of the Chanel c takes place after all go routines have been started. This is where the blocking property of channels comes into play. Because we only retireve from the channel once, the other 4 go routines remain paused after sending to the channel and fmt.Printf("end goroutine% v \ n", n) is not executed at all. If you retrieve from the channel again 5 seconds later, the next go routine can be end. + +## Channel for error handling + +The second point of our initial problem was error handling. Basically, we already have everything we need for this. With errch:= make(chan error) we define a channel that forwards data of the type error. If an error occurs we send it to the channel (lines 44-47), if not we send nil to the channel. + +```go +package main + +import ( + "fmt" +) + +type order struct { + id string +} + +func (o order) create(id string) error { + //tue etwas nützliches + if id == "OD-002" { + err := fmt.Errorf("error with %s", id) + return (err) + } + o.id = id + return nil +} + +func main() { + // a slice of order numbers + orderno := []string{"OD-001", "OD-002", "OD-003"} + // channel of type error + errch := make(chan error) + // a slice of empty orders + orders := []order{ + { + id: "", + }, + { + id: "", + }, + { + id: "", + }, + } + for i, order := range orders { + go func() { + err := order.create(orderno[i]) + if err != nil { + errch <- err + return + } + errch <- nil + }() + err := <-errch + if err != nil { + fmt.Println(err) + } + fmt.Println(order) + } +} +``` +[Try it out](https://play.golang.org/p/p_rrBOfduT9) + +On the other hand, the data must be retrieved from the channel. In line 51 we retrieve the data within the for loop from the channel. Because the channel forwards data of the type error we can handle error handling in the lines 51-55 as usual 😊 diff --git a/content/posts/graphql-shopify-golang.de.md b/content/posts/graphql-shopify-golang.de.md new file mode 100644 index 0000000..e940e73 --- /dev/null +++ b/content/posts/graphql-shopify-golang.de.md @@ -0,0 +1,166 @@ +--- +title: "Daten vom GraphQL Endpunkt Shopify holen" +date: 2020-04-24 +draft: false +tags: ["programmieren","golang","go","graphql","shopify"] +categories: ["Archive"] +--- +Ich habe gestern für einen unserer Backend-Services einfach nur einen Preis aus unserem Shopify Shop gebraucht. +Um genau zu sein brauchte ich eine Möglichkeit um bei Shopify anhand einer Artikelnummer/SKU einen Preis abzufragen. + +Da es sich hier um eine sehr gezielte Anfrage handelt, habe ich mir gedacht, dass ich hierzu die GraphQL Api Shopify nutze 😊 +Im folgenden zeige ich einmal wie man ein derartiges Problem lösen kann. Der vollständige Code ist unter folgender URL zu finden: + +https://gist.github.com/m3tam3re/98d9b57f404db3bc1ff8af133e54afd0 + +## Was brauchen wir? + +Zunächst einmal muss unser Programm ein Http Request an den GraphQL Endpunkt Shopify senden. Mit diesem Request wollen wir natürlich eine konkrete Anfrage in Form einer Query senden. +D.h. wir brauchen eine Funktion, die unsere Query anhand einer gegebenen Artikelnummer erzeugt und das Ergebnis verarbeitet und uns den Preis zurückgibt. + +Um das umzusetzen brauchen wir eigentlich keinerlei zusätzliche Pakete. Das alles lässt sich mit dem Standardumfang GO lösen. Da ich allerdings für mich den Umgang mit der JSON Antwort vereinfachen wollte habe ich mich entschieden das Paket github.com/valyala/fastjson zu verwenden. +Wenn Ihr Euch den Code anseht versteht Ihr schnell wieso 😇 + +## 1. Funktion für HTTP Request erstellen + +Als erstes erstellen wir eine Funktion, die ein Request an den GraphQL Endpunkt unseres Shopify Shops sendet und uns die Antwort oder einen Fehler zurückliefert. +Da ich davon ausgehe, dass ich vielleicht auch noch andere Daten brauche außer dem aktuellen Anwendungsfall habe ich mich entschieden das Ganze in eine allgemeine Funktion zu packen. +```go +func startRequest(body []byte) (http.Response, error) { + client := http.Client{ + Timeout: time.Second 120, + } + req, err := http.NewRequest("POST", endpoint, bytes.NewBuffer(body)) + if err != nil { + return nil, fmt.Errorf( "error building request: %s", err) + } + req.Header.Add("X-Shopify-Access-Token",token) + req.Header.Add("Content-Type", "application/graphql") + + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf( "error executing request: %s", err) + } + return resp, nil +} +``` +Die Funktion ist eigentlich recht einfach: +- wir erstellen einen HTTP Client mit einem Timeout, damit die Anfrage abgebrochen wird, wenn es zu lange dauert +- wir erstellen ein neues POST Request, dem wir neben der Art des Requests auch die URL und den Inhalt/body übermitteln. Da diese Funktion einen io.Reader erfordert wandeln wir unseren body in einen Buffer um der das io.Reader Interface implementiert +- wir fügen dem Header unseres Requests das X-Shopify-Access-Token hinzu und definieren, dass das Request vom Typ application/graphql ist +- anschließend führen wir das Request mit client.Do(req) aus +- unterwegs behandeln wir noch Fehler, die eventuell auftreten können + +## 2. Funktion zur Abfrage des Preises erstellen + +Die 2. Funktion die wir schreiben soll unsere Query für den GraphQL Endpunkt bauen und das Ganze an unsere startrequest() Funktion übermitteln. Außerdem soll Sie das zurückgelieferte Ergebnis auswerten und an unser Hauptprogramm zurückliefern. + +Das Anlegen eines eigenen Typs für das Einsortieren des JSON Antwort halte ich hier für Overkill, wir wollen ja nur einen Wert! Daher verwenden wir das Paket fastjson. +```go +func getItemPrice(sku string) (float32, error) { + query := `{ + inventoryItems(first:1, query:"sku:` + sku + `") { + edges{ + node{ + sku + variant { + price + } + } + } + } +}` + resp, err := startRequest([]byte(query)) + defer resp.Body.Close() + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return 0, fmt.Errorf( "error reading response body: %s", err) + } + p := fastjson.GetString(body, "data", "inventoryItems", "edges", "0", "node", "variant", "price") + if fastjson.Exists(body, "error") { + return 0, fmt.Errorf("shopify responded with an error: %s", fastjson.GetString(body, "error")) + } + if fastjson.Exists(body, "data", "inventoryItems", "edges", "0", "node", "variant", "price") == false { + return 0, fmt.Errorf("item could not be found in shopify: %s", sku) + } + price, err:= strconv.ParseFloat(p, 32) + if err != nil { + return 0, fmt.Errorf( "error reading response body: %s", err) + } + return float32(price), nil +} +``` +Ich erkläre mal oben nach unten was die Funktion macht: +- zuerst legen wir die Query für den GraphQL Endpunkt fest. Diese ist im Grunde nur ein zusammengesetzter String in den zwischendurch die Artikelnummer eingefügt wird, die wir der Funktion beim Aufruf übergeben haben +- danach übergeben wir unserer startRequest() die Query als byte Slice und erhalten die Antwort Shopify als \http.Response zurück +- wir sorgen mit defer resp.Body.Close() dafür, dass der Inhalt der Antwort nach Abschluss geschlossen wird und nutzen einen reader um den Inhalt in der Variable body zu speichern +- jetzt holen wir uns über die Funktion fastjson.GetString() den Preis aus der Antwort Shopify und erzeugen in der Zeile danach einen Fehler falls Shopify einen Fehler zurückmeldet. +- außerdem behandeln wir noch den Fall, dass das Feld price Shopify gar nicht zurückgeliefert wird (z.B. wenn Shopify den Artikel nicht kennt) +- zuletzt machen wir aus dem String den uns Shopify liefert ein Float und geben den Preis zurück an die Hauptfunktion + +### Wie das mit fastjson funktioniert + +Ich oben schnell darüber hinweggegangen wie genau wir mit fastjson unseren Preis erhalten. Im Grunde funktioniert das so, dass wir uns an der JSON antwort entlang hangeln: +Die Antwort Shopify sieht in etwa so aus: +```json +{ + "data": { + "inventoryItems": { + "edges": [ + { + "node": { + "sku": "mySKU", + "variant": { + "price": "144.90" + } + } + } + ] + } + }, + "extensions": { + "cost": { + "requestedQueryCost": 4, + "actualQueryCost": 4, + "throttleStatus": { + "maximumAvailable": 1000.0, + "currentlyAvailable": 996, + "restoreRate": 50.0 + } + } + } +} +``` +Unser fastjson.GetString() Aufruf sah ja so aus: +```go +fastjson.GetString(body, "data", "inventoryItems", "edges", "0", "node", "variant", "price") +``` +Wie man sieht, übergeben wir die komplette Antwort Shopify durch die Variable body gefolgt der Struktur, die wir in der JSON Antwort finden bis wir bei price landen. +Das Einzige was man hier wirklich beachten muss ist, dass die edges in der Antwort eine Liste sind. Daher müssen wir fastjson mitteilen welches Element der Liste wir haben wollen. Wir haben hier ja nur ein Element, daher geben wir den Index 0 an: ... "edges", "0", "node" ... + +Mit fastjson.Exists() kann man prüfen ob ein bestimmter Wert in der Antwort enthalten ist und entsprechend darauf reagieren. Natürlich hat fastjson noch weitere nützliche Funktionen. Mehr dazu unter: + +https://github.com/valyala/fastjson + +## 3. Die Hauptfunktion + +Die Hauptfunktion ist relativ simpel. Wir übergeben getItemPrice() die Artikelnummer, die wir suchen, prüfen ob es eventuell einen Fehler gab und geben ansonsten den Preis aus: +```go +func main() { + price, err := getItemPrice("your_SKU") // The SKU you are looking for + if err != nil { + log.Fatalf("could not get price from shopify: %s", err) + } + fmt.Println("Price:", price) +} +``` +Wie schon gesagt, den kompletten Code findet Ihr unter: + +https://gist.github.com/m3tam3re/98d9b57f404db3bc1ff8af133e54afd0 + +## 4. Das war's 😇 + +Wie man sieht kann man sich relativ einfach Daten aus seinem Shopify Shop holen. Neben ein paar Programmierkenntnissen ist es natürlich hilfreich, wenn man sich mit GraphQL ein wenig auskennt. + +Man könnte an diesem kleinen Programm berechtigterweise kritisieren, dass die Funktion getItemPrice() zu viele Aufgaben zu erledigen hat. In einem größeren Kontext hätte man wahrscheinlich das Erstellen der Query an eine eigene Funktion ausgelagert. +Ich denke aber das Prinzip wird trotzdem klar. diff --git a/content/posts/graphql-shopify-golang.en.md b/content/posts/graphql-shopify-golang.en.md new file mode 100644 index 0000000..2d1e0d4 --- /dev/null +++ b/content/posts/graphql-shopify-golang.en.md @@ -0,0 +1,166 @@ +--- +title: "Get data from the graphql endpoint of you Shopify store" +date: 2020-04-24 +draft: false +tags: ["programming","golang","go","graphql","shopify"] +categories: ["Archive"] +--- +Yesterday I just needed a price from our Shopify Shop for one of our backend services. +To be precise, I needed a way to request a price from Shopify using an article number / SKU. + +Since this is a very specific query, I thought that I would use the GraphQL Api from Shopify 😊 +In the following I show how to solve such a problem. The full code can be found at the following URL: + +https://gist.github.com/m3tam3re/98d9b57f404db3bc1ff8af133e54afd0 + +## What do we need? + +First of all, our program has to send a Http Request to the GraphQL endpoint of Shopify. With this request we naturally want to send a specific query in the form of a query. +I.e. we need a function that generates our query based on a given article number and processes the result and returns the price to us. + +We don't actually need any additional packages to implement this. All of this can be solved with the standard library of GO. However, since I wanted to simplify the handling of the JSON answer for myself, I decided to use the package github.com/valyala/fastjson . +If you look at the code, you quickly understand why 😇 + +## 1. Create a function for the HTTP request + +First, we create a function that sends a request to the GraphQL endpoint of our Shopify shop and returns the answer or an error. +Since I assume that I might need other data besides the current use case, I decided to put the whole thing in a general function. +```go +func startRequest(body []byte) (http.Response, error) { + client := http.Client{ + Timeout: time.Second 120, + } + req, err := http.NewRequest("POST", endpoint, bytes.NewBuffer(body)) + if err != nil { + return nil, fmt.Errorf( "error building request: %s", err) + } + req.Header.Add("X-Shopify-Access-Token",token) + req.Header.Add("Content-Type", "application/graphql") + + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf( "error executing request: %s", err) + } + return resp, nil +} +``` +The function is actually quite simple: +- we create an HTTP client with a timeout so that the request is canceled in case it takes too long +- we create a new POST request, to which we send the URL and the content / body in addition to the type of request. Since this function requires a io.Reader, we convert our body into a buffer that implements the io.Reader interface +- we add the X-Shopify-Access-Token to the header of our request and define that the request is of the type application/graphql +- then we execute the request with client.Do (req) +- on the way we still handle errors that may occur + +## 2. Create a function to query the price + +The second function we are going to write is to build our query for the GraphQL endpoint and to send the whole thing to our startRequest() function. Also the returned result should be evaluated and returned to our main function. + +I think creating an own type for unmarshaling the JSON answer is overkill, we only want one value! Therefore we use the fastjson package. +```go +func getItemPrice(sku string) (float32, error) { + query := `{ + inventoryItems(first:1, query:"sku:` + sku + `") { + edges{ + node{ + sku + variant { + price + } + } + } + } +}` + resp, err := startRequest([]byte(query)) + defer resp.Body.Close() + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return 0, fmt.Errorf( "error reading response body: %s", err) + } + p := fastjson.GetString(body, "data", "inventoryItems", "edges", "0", "node", "variant", "price") + if fastjson.Exists(body, "error") { + return 0, fmt.Errorf("shopify responded with an error: %s", fastjson.GetString(body, "error")) + } + if fastjson.Exists(body, "data", "inventoryItems", "edges", "0", "node", "variant", "price") == false { + return 0, fmt.Errorf("item could not be found in shopify: %s", sku) + } + price, err:= strconv.ParseFloat(p, 32) + if err != nil { + return 0, fmt.Errorf( "error reading response body: %s", err) + } + return float32(price), nil +} +``` +I'll explain from top to bottom what the function does: +- First we define the query for the GraphQL endpoint. Basically, this is just a composite string in which the article number that we provided to the function is inserted +- then we pass the query to our startRequest() as a byte slice and receive the response from Shopify as \http.Response +- With defer or Body.Close() we ensure that the content of the answer is closed after completion. Moreover we use a reader to save the content in the variable body +- Now we use the fastjson.GetString() function to get the price from Shopify's response and then generate an error in the line if Shopify reports an error. +- We also deal with the case that the price field is not returned by Shopify (e.g. if Shopify does not know the item) +- Finally, we make the string that Shopify provides us with a float and return the price to the main function + +### How to use fastjson + +I quickly went over how exactly we get our price with fastjson. Basically we need to move along the JSON answer: +Shopify's answer looks something like this: +```json +{ + "data": { + "inventoryItems": { + "edges": [ + { + "node": { + "sku": "mySKU", + "variant": { + "price": "144.90" + } + } + } + ] + } + }, + "extensions": { + "cost": { + "requestedQueryCost": 4, + "actualQueryCost": 4, + "throttleStatus": { + "maximumAvailable": 1000.0, + "currentlyAvailable": 996, + "restoreRate": 50.0 + } + } + } +} +``` +Our fastjson.GetString() function call looked like this: +```go +fastjson.GetString(body, "data", "inventoryItems", "edges", "0", "node", "variant", "price") +``` +As you can see, we pass Shopify's complete response through the variable body followed by the structure we find in the JSON response until we end up with price. +The only thing you really have to consider here is that the edges in the answer are a list. Therefore we have to tell fastjson which element of the list we want. We only have one element here, so we give the index 0: ... "edges", "0", "node" ... + +With fastjson.Exists() you can check whether a certain value is contained in the answer and react accordingly. Of course, fastjson has other useful functions. More on this at: + +https://github.com/valyala/fastjson + +## 3. The main() function + +The main function is relatively simple. We pass getItemPrice() the article number we are looking for, check whether there was an error and otherwise output the price: +```go +func main() { + price, err := getItemPrice("your_SKU") // The SKU you are looking for + if err != nil { + log.Fatalf("could not get price from shopify: %s", err) + } + fmt.Println("Price:", price) +} +``` +As I said, you can find the complete code at: + +https://gist.github.com/m3tam3re/98d9b57f404db3bc1ff8af133e54afd0 + +## 4. That's it 😇 + +As you can see, it is relatively easy to get data from your Shopify shop. In addition to a few programming skills, it is of course helpful if you are familiar with GraphQL. + +One could legitimately criticize this small program. The function getItemPrice() has too many responsibilities. In a larger context, the query creation would probably have been outsourced to its own function. +I think the principle is still clear. diff --git a/content/posts/links.de.md b/content/posts/links.de.md new file mode 100644 index 0000000..d50eb5d --- /dev/null +++ b/content/posts/links.de.md @@ -0,0 +1,31 @@ +--- +title: "Links" +date: 2020-03-13 +draft: true +tags: ["datenbank","graphql","grpc","graph","graphql"] +series: ["Dgraph Grundlagen"] +categories: ["Archive"] +--- + +https://www.ecamm.com/mac/ecammlive/ +https://github.com/rclone/rclone +https://github.com/pion/webrtc +https://github.com/labstack/echo +https://github.com/cristalhq/jwt +https://github.com/containous/traefik +https://github.com/fatedier/frp +https://etcd.io/ +https://jsonnet.org/ +dependabot +mighty networkd + +https://github.com/Redocly/redoc +golang.org/x/crypto/acme/autocert + +https://github.com/johanbrandhorst/grpc-auth-example +https://github.com/johanbrandhorst/grpc-auth-example + +https://www.alexedwards.net/blog/organising-database-access + +https://wallabag.org/en# +https://www.freshrss.org/ diff --git a/content/posts/links.en.md b/content/posts/links.en.md new file mode 100644 index 0000000..d50eb5d --- /dev/null +++ b/content/posts/links.en.md @@ -0,0 +1,31 @@ +--- +title: "Links" +date: 2020-03-13 +draft: true +tags: ["datenbank","graphql","grpc","graph","graphql"] +series: ["Dgraph Grundlagen"] +categories: ["Archive"] +--- + +https://www.ecamm.com/mac/ecammlive/ +https://github.com/rclone/rclone +https://github.com/pion/webrtc +https://github.com/labstack/echo +https://github.com/cristalhq/jwt +https://github.com/containous/traefik +https://github.com/fatedier/frp +https://etcd.io/ +https://jsonnet.org/ +dependabot +mighty networkd + +https://github.com/Redocly/redoc +golang.org/x/crypto/acme/autocert + +https://github.com/johanbrandhorst/grpc-auth-example +https://github.com/johanbrandhorst/grpc-auth-example + +https://www.alexedwards.net/blog/organising-database-access + +https://wallabag.org/en# +https://www.freshrss.org/ diff --git a/content/posts/orchid.de.md b/content/posts/orchid.de.md new file mode 100644 index 0000000..6f7f1d4 --- /dev/null +++ b/content/posts/orchid.de.md @@ -0,0 +1,120 @@ +--- +title: "Orchid - Dezentrales VPN" +date: 2020-08-27 +draft: true +tags: ["sicherheit","tools","vpn","privatsphäre","anonym"] +archiv: ["Archive"] +featuredImage: "/img/orchid/orchid.gif" +--- +# Privatsphäre im heutigen Internet + +Machen wir uns nichts vor. Die Zeiten, in denen das Internet ein freier Ort war, sind längst vorbei. Die vielen vermeintlich kostenlosen Dienste der Web 2.0 Ära kosten uns unsere Privatsphäre und werden durch unsere Daten und Online-Gewohnheiten finanziert. +Ich will hier jetzt gar nicht klagen. Deutschland ist mit Sicherheit nicht die allerschlechteste Wahl, wenn es um den Schutz persönlicher Daten angeht. Die EU versucht ja immerhin die Sammelwut diverser Großkonzerne zu begrenzen. + +Ich habe mir lange Zeit keine Gedanken um so etwas gemacht. Frei nach dem Motto "Ich habe ja eh nichts zu verbergen." habe ich mir auch nicht viel dabei gedacht, was mit meinen Daten so passiert. +In den letzten Jahren ist es aber leider sehr viel schlimmer geworden und hat teilweise gruselige Ausmaße angenommen. Werbung ist einfach allgegenwärtig. +Ich habe früher immer gerne Werbung gesehen und fand es immer toll auf das eine oder andere interessante Produkt hingewiesen zu werden. Das ist leider lange vorbei. + +Ich will jetzt hier auch kein generelles Urteil fällen. Es gehören immer zwei Seiten dazu und wir als Konsumenten und Kunden haben durchaus Einfluss auf die Situation. Die Sache ist die: Wenn wir alles umsonst haben wollen, müssen Firmen wie Google, E-Mail Anbieter und soziale Netzwerke sich Möglichkeiten überlegen um trotz kostenloser Dienste profitabel arbeiten zu können. + +Es scheint auch so, dass das aktuelle Modell attraktiver für die meisten Konzerne ist. Zumindest ist es bisher so, dass man bei nur wenigen Anbietern die Wahl hat. Vielleicht würde ja der eine oder andere gerne ein paar Euro für einen Dienst bezahlen und dafür eine werbefreie Erfahrung genießen. + + +## Mein persönliches Setup + +Ein Teil meiner Strategie ist, dass ich, da wo es Sinn ergibt ,auf kostenpflichtige Dienste setze. Z.B. nutze ich für meine E-Mail [HEY](https://hey.com/). Außerdem habe ich ein YouTube Premium Abo, da ich Youtube sehr viel nutze und man hier für vergleichsweise wenig Geld viel Werbung erspart bekommt. + +Zusätzlich setze ich [Pi Hole](https://pi-hole.net/) als DNS Server ein, d.h. der gesamte Internetverkehr geht durch den Pi Hole Server. Pi Hole leistet wirklich gute Arbeit beim Entfernen Werbeanzeigen. + +Als Browser nutze ich [Brave](https://brave.com/). Meiner Meinung nach hat Brave viele Punkte in Sachen Privatsphäre sehr gut gelöst. Auch der Ansatz, dass man für das Einblenden Werbung BAT Token verdient finde ich einen guten Ansatz. So kann man selbst entscheiden, ob und wie viel Werbung man sehen möchte. + +Zusätzlich dazu nutze ich auch ab und zu einen VPN Dienst. Bisher hatte ich hier den Dienstleister IPVanish genutzt. Also mein Abo bei diesem Dienst vor ein paar Wochen auslief, habe ich mich nach Alternativen umgesehen. Ich bin dabei auf das [Orchid](https://www.orchid.com/) Netzwerk gestoßen. + +## Was ist Orchid + +Orchid ist im Wesentlichen ein dezentraler VPN Marktplatz. Mit eigener Crypto Währung und Smart Contracts auf Basis der Ethereum Blockchain werden die Transaktionen zwischen Usern und VPN Anbietern dezentral abgewickelt. +Der komplette Marktplatz ist peer-to-peer, d.h. es gibt keine zentrale Verwaltung. + +Man kann über die Orchid App mit einem Klick eine sichere VPN Verbindung herstellen, der Rest läuft im Hintergrund. Auch Verbindungen aus mehreren Sprüngen/Hops, so wie manch einer es vom Tor Netzwerk kennt, sind möglich. Hier ist jeder Sprung im Grunde eine zusätzliche VPN Verbindung. + +Die Währung OXT dient dazu, die Zahlungen, genannt Nanopayments, zwischen VPN Nutzern und Anbietern abzuwickeln. Gleichzeitig müssen die Anbieter OXT Anteile halten um am Netzwerk teilnehmen zu können. + +Die Abrechnung erfolgt nach verbrauchter Bandbreite. Laut [diesem Artikel](https://blog.orchid.com/how-much-does-bandwidth-cost-on-orchid/) entspricht ein OXT einem Datenvolumen rund 10 GB. + +Orchid kann jedem genutzt werden, ohne Registrierung und ohne persönliche Daten. Es gibt keine Laufzeit und keine Verträge. Man benötigt lediglich ein Wallet, dass mit OXT aufgeladen ist und kann loslegen. +Für den einfachen Einstieg bietet Orchid eine App für iOS, Android und macOS. Eine Windows App soll bald folgen. + +## Einen Account einrichten + +Für die Einrichtung eines Accounts gibt es 2 Möglichkeiten. + +1. Ihr könnt in der App einen Orchid Account kaufen. Ihr bekommt dafür einen Account der bereits mit OXT aufgeladen ist und könnt sofort loslegen. +2. Ihr könnnt selbst einen Account anlegenn + +![Account kaufen](/img/orchid/account.gif "Einen Orchid Account kaufen") + +Wie das genau mit dem selbst angelegten Account funktioniert zeigt einem die [Orchid Webseite](https://www.orchid.com/join). +Für die Einrichtung des Accounts müssen ausreichend OXT Credits vorhanden sein. Zurzeit sind dazu 65 OXT notwendig, was beim aktuellen Kurs(28.08.2020) etwa 25 € entspricht. + +Für den Kauf der OXT Credits gibt es verschiedene Wege. Man kann die Credits einfach bei einem Anbieter wie [Coinbase](https://www.coinbase.com/join/knig_ij) kaufen. + +Da man sich bei nahezu jedem Anbieter verifizieren muss, ist dieser Vorgang im ersten Moment nicht gerade anonym. +Das muss er aber auch gar nicht sein. Die Anbieter, bei denen man Cryptowährungen kaufen kann, verwalten die Bestände der Kunden auf internen Konten. Wenn man jetzt dort aus Coins an eine Wallet Adresse sendet, kann mann zwar die Transaktion auf der Blockchain sehen, es gibt aber keine Möglichkeit herauszufinden wer die Coins ursprünglich gekauft hat (es sei denn der Anbieter wird gehacked). + +## Die Orchid App nutzen + +Hat man seinen Account, ist die Einrichtung denkbar einfach. Man fügt einfach einen Hop/Sprung hinzu und hinterlegt seinen Account. + +![Einrichtung](/img/orchid/hop.gif "Einen Hop einrichten") + +Ein Hop ist dabei immer jeweils eine VPN Verbindung. Wie man am Bild oben sieht, muss ein Hop nicht zwangsläufig ein Orchid Account sein. Ihr könnt hier auch eine beliebige OpenVPN oder WireGuard Konfiguration hinterlegen. +Man kann mehrere Hops einrichten und so die Anonymisierung noch verstärken. Man muss sich aber auch darüber klar sein, dass mehrere Hops mit Orchid Accounts auch zu höherem OXT Verbrauch führen. + +Hat man seine Hops eingerichtet muss man eigentlich nur noch den Connect Button drücken: + +![Verbinden](/img/orchid/connect.gif "Verbindung mit dem Orchid Netzwerk herstellen") + +## Wie anonym ist das Ganze? + +Wenn man einem einzelnen Hop ausgeht, ist man ungefähr so anonym wie bei einem herkömmlichen VPN Anbieter, d.h. der VPN Anbieter weiß die folgenden Dinge: + + welchen ISP Du benutzt + wie Deine IP Adresse lautet + welche Internetseiten Du besuchst + +Außerdem ist die Zahlung Ethereum Adresse Deines Orchid Account zur Ethereum Adresse des VPN Anbieters auf der Blockchain einsehbar. Der VPN Anbieter weiß aber trotzdem nicht, wem die Ethereum Adresse gehört. +Dein ISP allerdings weiß nur noch über Deine Verbindung zum VPN Anbieter Bescheid und kann nicht nachvollziehen welche Webseiten Du besuchst. +Auch die besuchten Webseiten wissen weniger über Dich, Deine Herkunft und Dein ISP sind z.B. nicht mehr für die Webseiten verfügbar. + +### Mit mehreren Hops arbeiten + +Wer sehr viel Wert auf seine Privatsphäre legt, kann auch mit mehreren Hops arbeiten. Bei mehreren Hops über Orchid Accounts ist es sinnvoll, wenn das unterschiedliche Accounts nutzt. Dadurch gibt es für keinen Anbieter wirklich brauchbare Informationen. +Welche Inhalte man aufruft weiß nur der letzte Anbieter in der Kette, wie die ursprüngliche IP Adresse lautet und welchen Internetanbieter man nutzt weiß hingegen nur der erste Anbieter. + +![Mehrere Hops](/img/orchid/multihop.gif "Mit mehreren Hops arbeiten") + +Man muss hier auch nicht mit eigenen Accounts arbeiten. Der Orchid App ist es völlig egal zu wem der Account gehört und bietet einem die Möglichkeit Accounts einfach weiterzugeben oder zu teilen. +Es können auch mehrere Leute einen Account gleichzeitig nutzen. + +### Nachteile mehrerer Hops + +So schön mehrere Hops auch für die Privatsphäre sind, es gibt auch Nachteile. Je mehr Sprünge die Verbindung macht desto höher wird die Latenz. Die Geschwindigkeit wird dadurch ebenfalls negativ beeinflusst. Ein anderer Faktor ist der OXT Verbrauch. 4 Hops = 4x so hoher Verbrauch Credits. + + +## TL;DR + +Orchid ist eine flexible und auch günstige Lösung, die Sicherheit und Privatsphäre gewährleistet. Durch die Abrechnung per Crypto Währung nach Datenvolumen zahlt man auch wirklich nur das, was man auch nutzt. Die Token verfallen auch nicht. +Einmal gekauft ist es egal ob man die OXT Token in 4 Wochen oder in 4 Jahren verbraucht. + +Die Accounterstellung ist sehr einfach gehalten. Auch an Nutzer, die sich noch nie mit Blockchain und Ethereum befasst haben wurde gedacht, da man einfach fertige Accounts kaufen kann. + +Orchid ist dezentral und es sind keinerlei persönliche Daten erforderlich um den Dienst zu nutzen. Dadurch muss man sein Vertrauen nicht in einen einzelnen Anbieter setzen, in der Hoffnung, dass dieser keine Logs schreibt oder Nutzerdaten weitergibt. + +Die App ist wirklich sehr einfach zu bedienen, mit technischen Details muss man sich eigentlich gar nicht befassen. + +Interessant fände ich die Möglichkeit mit erweiterten Einstellungen zu arbeiten. Im Whitepaper gibt es einen Absatz zum Thema Node Auswahl anhan Metadaten wie Geolocation, Preis, Latenz etc. +Ich fände es für die App durchaus interessant hier ein wenig Einfluss zu haben. Man hat ja auch nicht immer die gleichen Anforderungen. + +Das war's fürs Erste 😎 + + diff --git a/content/posts/orchid.en.md b/content/posts/orchid.en.md new file mode 100644 index 0000000..0218bfd --- /dev/null +++ b/content/posts/orchid.en.md @@ -0,0 +1,120 @@ ++++ +title = "Orchid - Decentralized VPN" +date = 2020-08-27 +draft = true +tags = ["security","tools","vpn","privacy"] +archive = ["bla"] +series = ["misc stuff"] +featuredImage = "/img/orchid/orchid.gif" ++++ +# Privacy in today's internet + +Let's not fool ourselves. The days when the internet was a free place are long gone. The many supposedly free services of the Web 2.0 era cost us our privacy and are financed by our data and online habits. +I don't want to complain here now. Germany is definitely not the worst choice when it comes to protecting personal data. After all, the EU is trying to limit the collecting mania of various large corporations. + +For a long time I didn't think about that. True to the motto "I have nothing to hide anyway." I didn't think too much about what would happen to my data. +Unfortunately, in the last few years it has gotten a lot worse and has taken on creepy proportions. Advertising is ubiquitous. +In the past I always liked to see advertising and always found it great to be pointed out to one or the other interesting product. Unfortunately that is long over. + +I don't want to make a general judgment here either. There are always two sides to it, and we as consumers and customers definitely have an influence on the situation. The thing is: if we want everything for free, companies like Google, email providers and social networks have to think about ways to work profitably despite free services. + +It also appears that the ad based model is more attractive to most corporations. At least it has been the case so far that you only have a choice with a few providers. Perhaps one or the other would like to pay a few euros for a service and enjoy an ad-free experience in return. + +## My personal setup + +Part of my strategy is to use paid services where it makes sense. E.g. I use [HEY](https://hey.com/) for my email. I also have a YouTube Premium subscription because I use YouTube a lot, so you can save a lot of advertising for comparatively little money. + +In addition, I use [Pi Hole](https://pi-hole.net/) as a DNS server, i.e. all internet traffic goes through the Pi Hole server. Pi Hole does a wonderful job of removing ads. + +My browser is [Brave](https://brave.com/). In my opinion, Brave handled a lot of privacy issues very well. I also think that the approach that you earn BAT tokens for displaying ads is a good way. So you can decide for yourself whether and how much advertising you want to see. + +In addition, I also use a VPN service from time to time. So far I had used the service provider IPVanish. As my subscription to this service expired a few weeks ago, I started looking for alternatives. I came across the [Orchid](https://www.orchid.com/) network. + +## What is orchid + +Orchid is essentially a decentralized VPN marketplace. With their own crypto currency and smart contracts based on the Ethereum blockchain, the transactions between users and VPN providers are processed decentrally. +The entire marketplace is peer-to-peer, i.e. there is no central administration. + +You can set up a secure VPN connection with one click of the Orchid app, the rest runs in the background. Connections from several hops, as some people know from the Tor network, are also possible. Here, every jump is basically an additional VPN connection. + +The OXT currency is used to process payments, called nanopayments, between VPN users and providers. At the same time, the providers must hold OXT shares in order to participate in the network. + +Billing is based on the bandwidth used. According to [this article](https://blog.orchid.com/how-much-does-bandwidth-cost-on-orchid/) an OXT corresponds to a data volume of around 10 GB. + +Orchid can be used by anyone, without registration and without personal data. There is no term and no contracts. All you need is a wallet that is charged with OXT and you can get started. +Orchid offers an app for iOS, Android and macOS. A Windows app should follow soon. + +## Set up an account + +There are 2 options for setting up an account. + +1. You can buy an Orchid account in the app. You will get an account that is already charged with OXT and you can start immediately. +2. You can create an account yourself + +![Buy an account](/img/orchid/account.gif "Buy an Orchid Account") + +The [Orchid website](https://www.orchid.com/join) shows you exactly how to set up an account on your own. +Sufficient OXT credits must be available to set up the account. At the moment 65 OXT are necessary for this, which corresponds to about 25 € at the current rate (08/28/2020). + +There are different ways to buy the OXT Credits. You can simply buy the credits from a provider like [Coinbase](https://www.coinbase.com/join/knig_ij). + +Since you have to verify yourself with almost every provider, this process is not exactly anonymous at first. +But it doesn't have to be. The providers from whom you can buy crypto currencies manage the customers' inventories in internal accounts. If you now send coins to a wallet address from there, you can see the transaction on the blockchain, but there is no way to find out who originally bought the coins (unless the provider is hacked). + +## Use the Orchid app + +If you have an account, the setup is very easy. You just add a hop and save your account. + +![Setup](/img/orchid/hop.gif "Setup a hop") + +One hop is always a VPN connection. As you can see in the picture above, a hop does not have to be an Orchid account. You can also store any OpenVPN or WireGuard configuration here. +You can set up several hops and thus increase the anonymization. But you also have to be aware that multiple hops with Orchid accounts also lead to higher OXT consumption. + +Once you have set up your hops, you actually only have to press the Connect button: + +![Connect](/img/orchid/connect.gif "Connect to the Orchid network") + +## How anonymous is it all? + +If you assume a single hop, you are about as anonymous as with a conventional VPN provider, i.e. the VPN provider knows the following things: + + which ISP you are using + what your IP address is + which websites you visit + +In addition, the payment from the Ethereum address of your Orchid account to the Ethereum address of the VPN provider can be viewed on the blockchain. The VPN provider still does not know who owns the Ethereum address. +However, your ISP only knows about your connection to the VPN provider and cannot find out which websites you are visiting. +The websites visited also know less about you, your origin and your ISP are e.g. no longer available for the websites. + +### Working with multiple hops + +Those who value their privacy very much can also work with several hops. If there are several hops via Orchid accounts, it makes sense to use different accounts. As a result, there is no really useful information for any provider. +Only the last provider in the chain knows what content is accessed, what the original IP address is and which Internet provider you are using, on the other hand, only the first provider knows. + +![Multiple hops](/img/orchid/multihop.gif "Working with multiple hops") + +You don't have to work with accounts that you created yourself. The Orchid app doesn’t care who the account belongs to and offers you the option of simply passing on or sharing accounts. +Several people can use one account at the same time. + +### Disadvantages of multiple hops + +As nice as multiple hops are for privacy, there are downsides too. The more hops the connection makes, the higher the latency. This also has a negative impact on the speed. Another factor is OXT consumption. 4 hops = 4x as high consumption of credits. + + +## TL; DR + +Orchid is a flexible and affordable solution that ensures security and privacy. By billing via crypto currency according to data volume, you really only pay for what you actually use. The tokens do not expire either. +Once bought, it doesn't matter whether you use up the OXT tokens in 4 weeks or 4 years. + +The account creation is kept very simple. Users who have never dealt with blockchain and Ethereum were also thought of, as you can simply buy ready-made accounts. + +Orchid is decentralized and no personal data is required to use the service. This means you don't have to put your trust in a single provider in the hope that they won't write any logs or pass on user data. + +The app is really very easy to use, you don't actually have to deal with technical details. + +I would find the possibility to work with advanced settings interesting. In the white paper there is a paragraph on the subject of node selection based on metadata such as geolocation, price, latency, etc. +I would find it interesting for the app to have a little influence here. You don't always have the same requirements. + +That's it for now 😎. + + diff --git a/content/posts/password-encrypt-go.de.md b/content/posts/password-encrypt-go.de.md new file mode 100644 index 0000000..2f83520 --- /dev/null +++ b/content/posts/password-encrypt-go.de.md @@ -0,0 +1,33 @@ +--- +title: "Kennwörter in Go verschlüsseln" +date: 2020-02-26 +draft: false +tags: ["programmieren","golang","go","crypt","snippets"] +--- +Go hat vorne herein bereits viele hilfreiche Pakete. Eines davon ist das Paket bcrypt mit dem sich z.B. Kennwörter sicher verschlüsseln lassen: +```go +package main + +import ( + "fmt" + "golang.org/x/crypto/bcrypt" +) + +func main() { + pw := "SecretPassword" + bs, err := bcrypt.GenerateFromPassword([]byte(pw), 2) + + //let's look at the encrypted password + fmt.Printf("encryption result: %s\n", string(bs)) + + err = bcrypt.CompareHashAndPassword(bs, []byte(pw)) + if err != nil { + fmt.Println("Wrong! Wrong! Wrong!") + } +} +``` +[Code ausprobieren](https://play.golang.org/p/jxoTHhAPQ5G) + +Wir übergeben der Funktion GenerateFromPassword([]byte(pw), 2) unser Kennwort als slice vom Typ Byte, sowie einen Integer für das zweite Funktionsargument cost. Je höher die Zahl ist desto höher die "Kosten" für die Berechnung. Das bedeutet, dass die Verschlüsselung bei einer höheren Zahl länger braucht, aber auch sicherer ist. Wenn wir eine 0 als Kosten übergeben nimmt bcrypt einen Standardwert für die Berechnung. + +Eigentlich alles recht easy 😊 diff --git a/content/posts/password-encrypt-go.en.md b/content/posts/password-encrypt-go.en.md new file mode 100644 index 0000000..6e2d117 --- /dev/null +++ b/content/posts/password-encrypt-go.en.md @@ -0,0 +1,33 @@ +--- +title: "Encrypt passwords with Go" +date: 2020-02-26 +draft: false +tags: ["programming","golang","go","crypt","snippets"] +--- +Go already has many helpful packages from the start. One of them is the bcrypt package with which e.g. will encrypt passwords securely. +```go +package main + +import ( + "fmt" + "golang.org/x/crypto/bcrypt" +) + +func main() { + pw := "SecretPassword" + bs, err := bcrypt.GenerateFromPassword([]byte(pw), 2) + + //let's look at the encrypted password + fmt.Printf("encryption result: %s\n", string(bs)) + + err = bcrypt.CompareHashAndPassword(bs, []byte(pw)) + if err != nil { + fmt.Println("Wrong! Wrong! Wrong!") + } +} +``` +[Try it out](https://play.golang.org/p/jxoTHhAPQ5G) + +We pass our password to the function GenerateFromPassword([]byte(pw), 2) as a slice of byte. The second argument is the cost for the encryption as an integer. The higher the costs the longer the encryption will take. The encryption will also be more secure if calculated with a higher cost value. If we pass a 0 bcrypt will use a standard value for the cost. + +Pretty easy so far 😊 diff --git a/content/posts/productivity-80-20.de.md b/content/posts/productivity-80-20.de.md new file mode 100644 index 0000000..2d0bf82 --- /dev/null +++ b/content/posts/productivity-80-20.de.md @@ -0,0 +1,51 @@ +--- +title: "Ich und die 80/20 Regel" +date: 2020-08-21 +draft: true +tags: ["blabla","life","produktivität","tips","pareto"] +series: [""] +featuredImage: "/img/productivity-8020/productivity-8020.png" +--- +# Meine Erfahrung mit dem Pareto Prinzip - Einleitung + +Ich will gar nicht lange um das Pareto Prinzip, die 80/20 Regel oder wie auch immer man das Kind nennen will herumtanzen. Es ist einen ganzen Industriezweig Life Coaches, Selbsthilfegurus und Produktivitätsexperten die sich damit ausführlich befassen. + +Also nur soviel: laut dem Pareto Prinzip sind 20% des Aufwandes ist für 80% des Ergebnisses verantwortlich + +Ich habe es ausprobiert, sehr real und noch dazu sehr erfolgreich...und ja ich habe irgendein Selbsthilfebuch gelesen, ich glaube es war ["The One Thing"](https://en.wikipedia.org/wiki/The_One_Thing_(book)). +Ob ich das Buch jetzt jedem empfehlen würde weiß ich nicht. Ich fand es ganz gut, aber dadurch, dass das Pareto Prinzip sehr einfach ist, hätte man sich auch locker 75% der Wörter sparen können 😇. + +Der für mich interessante Aspekt ist eigentlich der, dass das Pareto Prinzip zu einer sehr positiven Veränderung beigetragen hat. + +## Die Erkenntnis + +Meine Frau, unsere Mitarbeiter und ich designen und produzieren Wandbilder. Wir verkaufen die Bilder in unserem Online Shop. + +Viele Jahre haben wir es so gemacht wie fast jeder in der Branche. Immer mehr Designs kamen dazu, wir waren glaube ich in unseren Spitzenzeiten bei +mehreren hundert Designs. +Eines Tages habe ich mich hingesetzt und einmal eine Rechnung aufgemacht. Ich habe mir angesehen, mit welchen Produkten wir die meisten Verkäufe machen. +Ich wollte es erst gar nicht glauben, aber es war tatsächlich so, dass wir mit 10% unserer Produkte mehr als 90% der Verkäufe generiert haben. + +Ihr denkt Euch jetzt vielleicht "Na klar, die Sache ist doch ganz einfach!" - oh einfach ist sowas nicht. Wie oben schon geschrieben, wir haben unsere Designs selbst gemacht. +D.h. keine Bilder der Stange aus irgendwelchen Bilddatenbanken, sondern Blut, Schweiß und Tränen uns und unseren Grafikdesignern. Es ist unermesslich schwer sich so vielen Stunden Arbeit einfach zu trennen. + +Können wir das wirklich machen und 90% unserer jahrelangen Arbeit über Bord werfen? + +## Die Entscheidung + +Wir haben uns dafür entschieden! Wir haben gefühlt wochenlang diskutiert. Wir haben miteinander gekämpft und es uns wirklich nicht leicht gemacht mit der Entscheidung. Es konnte aber nur die eine Entscheidung geben: 90% der Produkte müssen weg. +Um uns die Möglichkeit zu nehmen einfach wieder zurückrudern zu können haben wir uns dazu entschieden alles auf eine Karte zu setzen. +Wir haben einen komplett neuen Online Shop erstellt und unsere gesamte Kommunikation und unser Image nach diesen 10% der Produkte ausgerichtet. Kein Weg zurück. + +## Das Ergebnis + +Das ist jetzt 1 Jahr her. Ich gebe zu, dass die ersten Monate nicht einfach waren. Wir wussten zwar, dass wir das Richtige tun, aber wir hatten auch Angst vor der Veränderung. + +Wenn ich heute auf diese Entscheidung blicke, war das wohl die beste Entscheidung, die wir in den letzten 10 Jahren getroffen haben. +Es hat sich viel dadurch verändert. Unser Team ist dadurch sehr viel stärker zusammengewachsen. Wir arbeiten besser zusammen, wir lachen mehr zusammen und machen bessere Produkte. + +Auch das Feedback unserer Kunden ist absolut positiv. + +Wenn man sich einmal überlegt, was alles wegfällt, wenn man sich 90% trennt, dann wird einem klar wie viel Raum das für Kreativität. Man kann wirklich alles daran setzen sein Bestes zu geben. + + diff --git a/content/posts/productivity-80-20.en.md b/content/posts/productivity-80-20.en.md new file mode 100644 index 0000000..262fcbb --- /dev/null +++ b/content/posts/productivity-80-20.en.md @@ -0,0 +1,51 @@ +--- +title: "Me and the 80/20 Rule" +date: 2020-08-21 +draft: true +tags: ["blabla","life","productivity","tips","pareto"] +series: [""] +featuredImage: "/img/productivity-8020/productivity-8020.png" +--- +# My experience with the Pareto principle - introduction + +I don't want to dance around the Pareto principle, the 80/20 rule or whatever you want to call it. There is an entire industry of life coaches, self-help gurus, and productivity experts studying it in depth. + +So just this: according to the Pareto principle, 20% of the effort is responsible for 80% of the result + +I tried it, very real and very successful ... and yes I read some self-help book, I think it was ["The One Thing"](https://en.wikipedia.org/wiki/The_One_Thing_ (book )). +I don't know if I would recommend the book to anyone. It was very good, but because the Pareto principle is very simple, you could easily have saved 75% of the words 😇. + +The aspect that is interesting for me is actually that the Pareto principle has contributed to a very positive change in my life. + +## The realization + +My wife, our employees and I design and produce murals. We sell the art prints in our online store. + +For many years we did it like almost everyone in the industry. More and more designs were created, I think we were at our peak with +several hundred designs. +One day I sat down and did some math. I wanted to know which products drive most of our sales. +I didn't want to believe it at first, but it actually happened that we generated more than 90% of sales with 10% of our products. + +You might think to yourselves now "Of course, that's an easy decision!" - oh no, that is not easy. As already written above, we made our designs ourselves. +I.e. no off-the-peg images from any image database, but blood, sweat and tears from us and our graphic designers. It is immeasurably difficult to simply part with so many hours of work. + +Can we really do that and throw 90% of our years of work overboard? + +## The decision + +We decided to do it! It felt like we discussed for weeks. We fought with each other and we really didn't find an easy way to this decision. However, there could only be one decision: 90% of the products have to go. +In order to take the opportunity to simply undo everything, we decided to put everything on one card. +We have created a completely new online store and geared our entire communication and image to these 10% of the products. No way back. + +## The result + +That was 1 year ago. I admit the first few months were not easy. We knew we were doing the right thing, but we were also afraid of the change. + +When I look at this decision today, it was probably the best decision we have made in the last 10 years. +A lot has changed as a result. Our team has grown much closer together. We work better together, we laugh more together, and we make better products. + +The feedback from our customers has also been absolutely positive. + +If you think about what goes away when you part with 90% of the stuff that keeps you busy, then you realize how much room there is for creativity. Now you can finally do your best work, every day. + + diff --git a/content/posts/regex.de.md b/content/posts/regex.de.md new file mode 100644 index 0000000..6daf52b --- /dev/null +++ b/content/posts/regex.de.md @@ -0,0 +1,270 @@ +--- +title: "Reguläre Ausdrücke - Wenn sie nur nicht so praktisch wären" +date: 2019-09-26 +draft: false +tags: ["programmieren","helper","regex"] +categories: ["Archive"] +--- +Ich habe lange einen Bogen um reguläre Ausdrücke gemacht. Jedes Mal wenn ich es mit dem Thema zu tun bekam war die instinktive Reaktion die Flucht. Ich habe mich immer mal wieder versucht diesem Thema zu nähern. Die ganzen schlauen Menschen, die reguläre Ausdrücke beherrschen, können ja nicht ganz falsch liegen. Ich habe allen Mut zusammen genommen und mich durchgekämpft. Ich muss ganz ehrlich zugeben ich bin immer noch nicht der allergrößte Fan regulärer Ausdrücke. Trotzdem, sie sparen viel Zeit. + +Das geht bei ganz einfachen Beispielen los. Stell Dir vor Du hast in Google Sheets eine lange Tabelle mit Artikelnummern. Die Artikelnummern haben eine einheitliche Struktur (z.B. artikel-farbe-12587). Was machst Du, wenn Du z.B. die Reihenfolge der Segmente ändern möchtest? Mit ein paar  einfachen Formeln und hier und da eine Hilsspalte lässt sich das lösen 😁. + +Mit einem regulären Ausdruck kann man dieses Problem  wesentlich eleganter lösen. Google Sheets besitzt eine Funktion _REGEXREPLACE()._ Damit kann man dieses Problem mit einer simplen Formel lösen. Bevor wir aber zur Lösung kommen müssen wir ein paar Grundlagen kennen. + +## Die Grundlagen für reguläre Ausdrücke + +Reguläre Ausdrücke helfen  bei der Erkennung Mustern innerhalb Zeichenketten. Das kleinste Element einer Zeichenkette ist ein einzelnes Zeichen. Damit fangen wir an. Es gibt bei der Verwendung regulärer Ausdrücke verschiedene sog. Zeichenklassen: + +### Zeichenklassen +|RegEx | Bedeutung | +|-------|-------------------------------------------------------------------| +|. | Jedes beliebige Zeichen | +|\d | Ziffern (0-9) | +|\D | Alle Zeichen ausgenommen Ziffern | +|\s | Leerzeichen (Leerzeichen, Tab, CR, LF | +|\S | Alle Zeichen, die kein Leerzeichen sind | +|\w | alphanumerische Zeichen inklusive | +|\W | jedes Zeichen, dass kein alphanumerisches Zeichen inklusive | + +Damit können wir z.B. schon einmal ein Datumsmuster suchen: + +\d\d\.\d\d\.\d\d\d\d + +Zwei Ziffern, gefolgt einem Punkt, gefolgt 2 Ziffern, einem Punkt und 4 Ziffern.  + +Der Punkt bekommt hier einen \ vorangestellt. Dadurch wird klar gemacht, dass wir nicht _jedes beliebige Zeichen_ meinen, sondern tatsächlich den Punkt. Genauso funktioniert das auch bei den Ziffern. Wäre der \ nicht vor dem d würde nach dem Buchstaben d gesucht werden und nicht nach der Zeichenklasse. + +## Besondere Zeichen + +Neben den geläufigen Zeichen wie Buchstaben, Zahlen und Satzzeichen gibt es Sonderzeichen. + +|Regex |Bedeutung| +|-------|----------------| +|c | z.B. der Buchstabe "c"| +|^ | Zeilenanfang / Negation bei [^..] Zeichenklassen| +|$ | Ende der Zeile oder Zeichenkette| +|\\ | hebt die spezielle Bedeutung des nächsten Zeichens auf| +|\n | LF Vorschub in die nächste Zeile / Zeilenumbruch| +|\r | CR oder WR - Rückbewegung der Schreibbewegung auf Pos.1 der gleichen Zeile| +|\r\n | Zeilenumbruch DOS / Windows| +|\t | Tabulator| +|\f | FF oder Seitenumbruch - Bewegung in die erste Zeile der nächsten Seite| +|\a | Beep oder Piep| +|\e | Escape| +|\b | leere Zeichenkette am Wortanfang oder Wortende| +|\B | leere Zeichenkette nicht am Anfang oder Ende des Wortes| +|\< | leere Zeichenkette am Wortanfang| +|> | leere Zeichenkette am Wortende| + +### Eigene Zeichenklassen festlegen + +Man kann auch eigene Zeichenklassen festlegen: + +|Regex |Bedeutung| +|-------|----------------| +|[abc] | a, b, oder c - eine sog. einfache Klasse| +|[^abc] |jedes Zeichen, dass nicht a, b, oder c ist| +|[a-h]      |Zeichenbereich a bis h| +|[a-h]'[r-u]| Zeichen im Bereich zwischen a bis h oder r bis u| + +In einer  Zeichenklasse werden entweder einzelne Zeichen definiert [aeiou] oder ein Bereich [a-h0-9]. Mit dem ^ kann man die Klasse negieren, d.h. [^abc] bedeutet jedes Zeichen, dass nicht ein a, b oder c ist. Außerdem kann man mehrere Zeichenklassen mit dem ' Operator (oder) verbinden. + +## Angaben Mengen + +Man kann in regulären Ausdrücken angeben wie oft ein Zeichen darf. + +|Regex |Bedeutung| +|-------|----------------| +|a?   | einmal oder gar nicht| +|a   | gar nicht bis beliebig oft| +|a+   | einmal bis beliebig oft| +|a{3} | genau dreimal| +|a{3,5} | dreimal oder mehr, aber maximal fünfmal| + +Damit kann man z.B. Nummernblöcke suchen: \d{3}-\d{4}-\d{5} findet Nummern, die so formatiert sind: 123-4567-89101. + +## Gierige und träge Quantifizierer + +Bei der Angabe Mengen in regulären Ausdrücken gibt es sogenannte träge und gefräßige Quantifizierer. Dabei versuchen  gierige Quantifizierer so viel wie möglich pro Ergebnis zu verarbeiten. Ihre trägen Kollegen wollen so wenig wie möglich pro Ergebnis verarbeiten . + +### Träge Quantifizierer: + +|Regex |Bedeutung| +|-------|----------------| +|a?    | gar nicht bis so selten wie möglich| +|a+?    |  einmal bis so selten wie möglich| +a{3,}? |   dreimal oder mehr, aber so wenig wie möglich | + + +### Gierige Quantifizierer: + +|Regex |Bedeutung| +|-------|----------------| +|a+ |gar nicht bis so oft wie möglich | +|a++ |einmal bis so so oft wie möglich | +|a{3,}+ |dreimal oder mehr, aber so oft wie möglich| + +Nehmen wir einmal an wir haben den Satz Hallo -Bob-, wie geht es -Dir-? +Und jetzt suchen wir einmal mit einem gierigen und einem trägen Quantifizierer: + +(gieriger Quantifizierer): -.- +findet: -Bob-, wie geht es -Dir- + + +(träger Quantifizierer): -.\?- +findet: -Bob- -Dir- + +Man sieht, dass der gierige Quantifizierer im gleichen Satz einen langen Treffer findet. Der träge Quantifizierer findet stattdessen zwei kurze Treffer. + +## Gruppen + +Man kann Teile eines regulären Ausdrucks einander abgrenzen. Dabei werden Gruppen in einem regulären Ausdruck durch Klammern definiert. Gruppen innerhalb eines regulären Ausdrucks erhalten eine Nummer. Die Nummerierung so, dass der komplette gefundene Ausdruck die 0 erhält. Danach werden die jeweiligen Gruppen hochgezählt werden. + +--- +Beispiel Artikelnummer: + +artikel-rot-2545 + +regulärer Ausdruck: (\w+)-(\w+)-(\d+) + +--- +Der reguläre Ausdruck findet die komplette Artikelnummer. Es werden aber auch 4 Nummern zugewiesen. Für den Abruf verwendet man $n also $ + der jeweiligen Nummer. In diesem Beispiel sieht das wie folgt aus: + +--- +$0 = artikel-rot-2545 + +$1 = artikel + +$2 = rot + +$3 = 2545 + +--- +Nun haben wir alles was wir für unser Ursprungsproblem brauchen. Die Formel in Google Sheets sieht wie folgt aus: + +--- +=REGEXREPLACE(A1;"(\w+)-(\w+)-(\d+)";"$3-$2-$1") + +--- +Beispiel: [http://Google Sheets](https://docs.google.com/spreadsheets/d/1jE5u8q2bKauiIQu6bGRX76Y-XE3CVtuumtwgRBis1Rw/edit?usp=sharing) + +Das gleiche Prinzip lässt sich in diversen Programmiersprachen anwenden. Dabei gib es leichte Unterschiede je nach Sprache: + +Python: +re.sub(r'(\w+) (\w+)',r'\2 \1','Wort1 Wort2') + + +Go: +regex := regexp.MustCompile(\`(\w+) (\w+)\`) +fmt.Printf(regex.ReplaceAllString("Wort1 Wort2", "$2 $1")) + +Javascript: +let regex = /(\w+) (\w+)/; +"Wort1 Wort2".replace(regex, "$2 $1"); + +alternativ auch so in Javascript: + +let regex2 = new RegExp("(\w+) (\w+)"); +"Wort1 Wort2".replace(regex2, "$2 $1"); + +## Lookaround + +Jetzt wird es etwas komplizierter 😇. Man kann auch den Kontext eines regulären Ausdrucks angeben. D.h. wir können ganz konkret nach etwas suchen, dass sich vor oder hinter einer bestimmten Zeichenfolge befindet. + +### Look behind + +Beispiel Artikelliste: +artikel-rot-2538 +artikel-gelb-2539 +artikel-blau-2542 +artikel-lila-2543 +artikel-rot-2545 +artikel-gelb-2546 + +Regulärer Ausdruck + Look behind: + +--- +(?<=artikel-)\w+ + +Der 1\. Ausdruck artikel- muss dem 2\. Ausdruck \w+ vorausgehen + +(? | Empty string at the end of the word| + +### Custom character classen + +You can also define your own character classes: + +|Regex |Meaning| +|-------|----------------| +|[abc] | a, b, or c - a so-called simple class| +|[^abc] |any character that is not a, b, or c| +|[a-h]      |Character range from a to h| +|[a-h]'[r-u]| characters in the range between a to h or r to u| + +In a character class, either single characters are defined [aeiou] or an area [a-h0-9]. With the ^ one can negate the class, i. [^ abc] means any character that is not an a, b, or c. In addition, you can connect several character classes with the 'operator (or). + +## Quantities + +You can specify in regular expressions how often a character is allowed. + +|Regex |Meaning| +|-------|----------------| +|a?   | once or not at all| +|a   | not at all up to any number of times| +|a+   | once up to any number of times| +|a{3} | exactly three times| +|a{3,5} | three times or more, but not more than five times| + +This can be used e.g. Find number blocks: \d{3}-\d{4}-\d{5} finds numbers formatted like this: 123-4567-89101. + +## Greedy and lazy quantifiers + +When specifying sets in regular expressions, there are so-called lazy and gluttonous quantifiers. Greedy quantifiers try to process as much as possible per result. Your lazy colleagues want to process as little as possible for each outcome. + +### Lazy quantifiers: + +|Regex |Meaning| +|-------|----------------| +|a?    | not at all up to as rare as possible| +|a+?    |  once up to to as rare as possible| +a{3,}? |   three times or more, but as little as possible | + + +### Greedy quantifiers: + +|Regex |Meaning| +|-------|----------------| +|a+ |not at all up to as often as possible | +|a++ |once to up to as often as possible | +|a{3,}+ |three times or more, but as often as possible| + +Suppose we have the sentence Hello -Bob-, how re -You-? +Und now we're looking with a greedy and a lazy quantifier: + +(greedy quantifier): -.- +finds: -Bob-, how re -You- + + +(lazy quantifier): -.\?- +finds: -Bob- -You- + +You can see that the greedy quantifier finds one long match in the sentence. The lazy quantifier finds two short matches instead. + +## Groups + +You can separate parts of a regular expression from each other. In this case, groups in a regular expression are defined by parentheses. Groups within a regular expression get a number. The numbering so that the complete found expression gets the 0. Then the respective groups will be counted up. + +--- +Example SKU: + +artikel-rot-2545 + +regular expression: (\w+)-(\w+)-(\d+) + +--- +The regular expression finds the complete article number. But there are also assigned 4 numbers. For the call you use $ + the respective number. In an example, it looks like this: + +--- +$0 = artikel-rot-2545 + +$1 = artikel + +$2 = rot + +$3 = 2545 + +--- +Now we have everything we need for our origin problem. The formula in Google Sheets looks like this: + +--- +=REGEXREPLACE(A1;"(\w+)-(\w+)-(\d+)";"$3-$2-$1") + +--- +Example: [http://Google Sheets](https://docs.google.com/spreadsheets/d/1jE5u8q2bKauiIQu6bGRX76Y-XE3CVtuumtwgRBis1Rw/edit?usp=sharing) + +The same principle can be applied in various programming languages. There are slight differences depending on the language: + +Python: +re.sub(r'(\w+) (\w+)',r'\2 \1','Word1 Word2') + + +Go: +regex := regexp.MustCompile(\`(\w+) (\w+)\`) +fmt.Printf(regex.ReplaceAllString("Word1 Word2", "$2 $1")) + +Javascript: +let regex = /(\w+) (\w+)/; +"Word1 Word2".replace(regex, "$2 $1"); + +different way in Javascript: + +let regex2 = new RegExp("(\w+) (\w+)"); +"Word1 Word2".replace(regex2, "$2 $1"); + +## Lookaround + +Now it gets a bit more complicated 😇. One can also specify the context of a regular expression. That we can specifically search for something that is in front of or behind a specific string. + +### Look behind + +Example SKU list: +artikel-rot-2538 +artikel-gelb-2539 +artikel-blau-2542 +artikel-lila-2543 +artikel-rot-2545 +artikel-gelb-2546 + +Regular expression + Look behind: + +--- +(?<=artikel-)\w+ + +The first term article- must precede the second expression \w+ + +(? src/main.rs:21:22 + | +16 | let bob = Person { + | --- move occurs because `bob` has type `Person`, which does not implement the `Copy` trait +... +20 | bob.hello(); + | ------- `bob` moved due to this method call +21 | println!("{:?}", bob) + | ^^^ value borrowed here after move + | +note: this function consumes the receiver `self` by taking ownership of it, which moves `bob` + --> src/main.rs:10:14 + | +10 | fn hello(self) { + | + ^^^^ +``` + +In Go würde man die Person einmal initialisieren und könnte dann beliebig oft die Methoden verwenden. Go würde hier lediglich zwischen einem Pointer und Nicht-Pointer Receiver unterscheiden, aber die Funktion wäre trotzdem immer verwendbar. + +In Rust verbraucht die Verwendung der Methode das Objekt, da Sie durch die Verwendung self Eigentümer des Objektes ist. + +Da ich die Person nach Verwendung der Methode gerne noch nutzen möchte, muss ich diese an die Methode verleihen: + +```rust + +// ... + +impl Person { + fn hello(&self) { + println!("Hello" {}, your age is {}", self.name, self.age"); + } +} + +//... +``` + +Und schon funktioniert alles. Nach Beendigung des Codeblocks in der hello Methode wird self wieder zurückgegeben. + +Ich werde wahrscheinlich ein wenig brauchen bis ich mich daran gewöhnt habe und auch noch das eine oder andere Mal darüber stopern. diff --git a/content/posts/rust-1.en.md b/content/posts/rust-1.en.md new file mode 100644 index 0000000..4569c70 --- /dev/null +++ b/content/posts/rust-1.en.md @@ -0,0 +1,89 @@ +--- +title: "Part 1: Today we learn Rust" +date: 2020-09-18 +draft: false +series: ["Starting with rust"] +tags: ["rust","coding"] +--- +I started working with the programming language Rust about 1 week ago. When I started programming again a year ago, +I had shortlisted the languages to Go and Rust. Ultimately I decided to lear Go. + +The reason why I'm stopping by Rust after a year is pure curiosity. I've heard a lot of good things about the language and it doesn't make you dumber either 😇. + +## should be feasible + +I decided to do the whole thing as part of the [](https://www.100daysofcode.com/) challenge. Programming 1 hour a day is not that difficult for me now, I usually do that anyway. It remains to be seen whether I can consistently hold out fo. + +## Day 1 - Rust, Methods and Ownership + +Like I said, I started Rust a week ago. I.e. I read the book (great to read by the way) and did the Rustlings course. Today I started to rewrite a small program in Rust. I learned a few things about ownership in Rust. I think this is best illustrated by the code: + +```rust +use std::string::String; + +#[derive(Debug)] +struct Person { + name: String, + age: i32, +} + +impl Person { + fn hello(self) { + println!("Hello {}, your age is {}", self.name, self.age); + } +} + +fn main() { + let bob = Person { + name: String::from("Bob"), + age: 32, + }; + bob.hello(); + println!("{:?}", bob) +} +``` +That looks right at first glance. If you let the program run you will get an error: + +```rust +error[E0382]: borrow of moved value: `bob` + --> src/main.rs:21:22 + | +16 | let bob = Person { + | --- move occurs because `bob` has type `Person`, which does not implement the `Copy` trait +... +20 | bob.hello(); + | ------- `bob` moved due to this method call +21 | println!("{:?}", bob) + | ^^^ value borrowed here after move + | +note: this function consumes the receiver `self` by taking ownership of it, which moves `bob` + --> src/main.rs:10:14 + | +10 | fn hello(self) { + | + ^^^^ +``` + +In Go you would initialize the person once and then use the methods as often as you like. Go would only differentiate between a pointer and a non-pointer receiver, but the function could still be used. + +In Rust, using the method consumes the object, since it owns the object by using self. + + +Since I would like to use the person after using the method, I have to borrow this to the method: + +```rust + +// ... + +impl Person { + fn hello(&self) { + println!("Hello" {}, your age is {}", self.name, self.age"); + } +} + +//... +``` + +And everything works. After finishing the code block in the hello method, self is returned. + +It will probably take me a little while to get used to it and stop at it one or two times. diff --git a/content/posts/rust-2.de.md b/content/posts/rust-2.de.md new file mode 100644 index 0000000..3577190 --- /dev/null +++ b/content/posts/rust-2.de.md @@ -0,0 +1,68 @@ +--- +title: "Teil 2: Result Typ und Fehlerbehandlung" +date: 2020-09-19 +draft: false +series: ["Rust Grundlagen"] +tags: ["rust","programmieren"] +--- +Heute habe ich einmal mit dem Thema Fehlerbrhandlung rumexperimentiert. Einer mehreren Wegen in Rust ist der Result Typ. +Dabei handelt es sich um ein enum, dass entweder einen Wert für den Erfolgsfall oder einen Fehler enthält. + +```rust +use std::string::String; + +#[derive(Debug)] +struct Person { + name: String, + age: i32, +} + +impl Person { + fn hello(&self) -> Result{ + if self.name != "" { + let ret = format!("{} is {} years old.", self.name, self.age); + Ok(ret) + } else { + Err("No name given") + } + + } +} + +fn main() { + let bob = Person { + name: String::from("Bob"), + age: 32, + }; + let res = bob.hello().unwrap(); // will consume the Ok value or panic in case of error + println!("{:?}", res); + + let mary = Person { + name: String::from(""), + age: 30, + }; + let res1 = mary.hello().unwrap(); // will consume the Ok value or panic in case of error + println!("{:?}", res1); +} +``` + +Die Rückgabe der Methode hello wird als Result definiert. Innerhalb der if Anweisung geben wir im Erfolgsfall durch Ok(ret) den String zurück. Andernfalls über Err("...") eine Fehlermeldung. + + +Durch das Anhängen der Methode unwrap() wird der zurückgelieferte Result Typ entpackt. Im Falle eines Fehler führt unwrap() zu einer Panik. Die Ausgabe sieht dann so aus: + +```rust +Standard Error: +Compiling playground v0.0.1 (/playground) + Finished dev [unoptimized + debuginfo] target(s) in 1.05s + Running `target/debug/playground` +thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "No name given"', src/main.rs:33:29 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +Standard Output: +"Bob is 32 years old." +``` + + +Das ist denke ich erstmal nur der Einstieg. Die Methode unwrap() zu verwenden ist zwar schnell und bequem, aber man will ja in den wenigsten Fällen das Programm mit einer Panik enden lassen, dazu dann nochmal mehr... + diff --git a/content/posts/rust-2.en.md b/content/posts/rust-2.en.md new file mode 100644 index 0000000..d245e6d --- /dev/null +++ b/content/posts/rust-2.en.md @@ -0,0 +1,66 @@ +--- +title: "Part 2: Result Type and error handling" +date: 2020-09-19 +draft: false +series: ["Starting with rust"] +tags: ["rust","coding"] +--- +Today I experimented with the subject of error handling. One of several ways in Rust is the Result type. +This is an enum that either contains a value for the success case or an error. + +```rust +use std::string::String; + +#[derive(Debug)] +struct Person { + name: String, + age: i32, +} + +impl Person { + fn hello(&self) -> Result{ + if self.name != "" { + let ret = format!("{} is {} years old.", self.name, self.age); + Ok(ret) + } else { + Err("No name given") + } + + } +} + +fn main() { + let bob = Person { + name: String::from("Bob"), + age: 32, + }; + let res = bob.hello().unwrap(); // will consume the Ok value or panic in case of error + println!("{:?}", res); + + let mary = Person { + name: String::from(""), + age: 30, + }; + let res1 = mary.hello().unwrap(); // will consume the Ok value or panic in case of error + println!("{:?}", res1); +} +``` + +By appending the method unwrap() the returned Result type is unpacked. In the event of an error, unwrap() leads to panic. + +The output looks like this: + +```rust +Standard Error: +Compiling playground v0.0.1 (/playground) + Finished dev [unoptimized + debuginfo] target(s) in 1.05s + Running `target/debug/playground` +thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "No name given"', src/main.rs:33:29 +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + +Standard Output: +"Bob is 32 years old." +``` + + +I think that's just the beginning. Using the method unwrap() is quick and easy, but usually you would not want your program to quit with a panic on error. diff --git a/content/posts/rust-3.de.md b/content/posts/rust-3.de.md new file mode 100644 index 0000000..0453ecd --- /dev/null +++ b/content/posts/rust-3.de.md @@ -0,0 +1,207 @@ +--- +title: "Teil 3: Methoden, Optionen, Verweise und Kopfknoten" +date: 2020-09-22 +draft: false +series: ["Rust Grundlagen"] +tags: ["rust","programmieren"] +--- +Die letzten 2 Tage und auch heute habe ich mich mit verschiedenen Themen auseinandergesetzt. +Da ich irgendwie einem Thema ins andere gerutscht bin, hat es wenig Sinn +gemacht einzelne Beiträge zu schreiben. Ich musste erst einmal den Kopfknoten +lösen, der mit den verschiedenen Themen einher ging 😇. + +Ich habe mehrere Beispiele zusammengestellt, die ganz gut das wiederspiegeln, +was ich in den letzten Tagen gelernt habe. Aber fangen wir einfach mal an. + +## Rust, Referenzierung und Ownership + +Ich will jetzt hier nicht zu weit ins Detail gehen. Ich denke, dass das [Rust Buch](https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html) das alles viel besser im Detail erklären kann als ich. Nur soviel: Was man aus Sprachen wie Go oder C++ als Pointer kennt funktioniert in Rust anders. Rust sorgt durch sein Owenership System dafür, dass jeder Wert nur einen einzigen Besitzer hat. Werte können aber dennoch refrenziert werden. Dazu werden sie "ausgeliehen" und anschließend an den Besitzer zurückgegeben. + +Fangen wir einfach mal mit einem Beispiel an. Den kompletten Code findet ihr [hier](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d5e36c9e573201e0843b0e947b033ab9): + +### Lifetimes + +Ich habe in meinem Beispiel eine Datenstruktur für eine Person erstellt. Diese Person soll einen Namen und eine Liste Freunden haben. Den Namen habe ich als &str string slice definiert, was eine Referenz auf den Speicherort ist. Wer sich für Details zuma Strings interessiert sollte [diesen Artikel](https://blog.thoughtram.io/string-vs-str-in-rust/) lesen. Hier wird genau erklärt die Strings gespeichert und referenziert werden und was die UNterschiede sind. +```rust +#[derive(Debug)] +struct Person { + name: &str, + friends: Option>, +} +``` + +Hier liefert uns der Compiler einen Fehler: +```rust +error[E0106]: missing lifetime specifier + --> src/main.rs:3:11 + | +3 | name: &str, + | ^ expected named lifetime parameter + | +help: consider introducing a named lifetime parameter + | +2 | struct Person<'a> { +3 | name: &'a str, + | + +error[E0106]: missing lifetime specifier + --> src/main.rs:4:25 + | +4 | friends: Option>, + | ^ expected named lifetime parameter + | +help: consider introducing a named lifetime parameter + | +2 | struct Person<'a> { +3 | name: &str, +4 | friends: Option>, + | +``` + +Rust möchte eine Lifetime Spezifizierung haben. Das leigt daran, dass Rust nicht weiß wie lange die &str Verweise gültig sein sollen. Standardmäßig wird in Rust nach verlassen einen Blocks "{}" der Speicher freigegeben und damit würden diese Verweise ungültig. Über die Lifetimes teilen wir dem Rust Compiler mit wie Lange die Verweise gültig sein sollen: +```rust +#[derive(Debug)] +struct Person<'a> { + name: &'a str, + friends: Option>, +} +``` +Wir deklarieren hier eine Lifetime a für unsere Datenstruktur. Diese weisen wir auch dem &str Verweis des Namens und den Elementen der Freundesliste zu. Dadurch sagen wir dem Compiler, dass die Felder so lange existieren sollen, wie die Person existiert. + + +Bei der Implementierung der Methoden fordert der Compiler ebenfalls wieder Lifetimes: + +```rust +impl<'a> Person<'a> { + fn new(name: &'a str, friends: Vec<&'a str>) -> Self { + let mut fl: Option> = None; + if friends.len() > 0 { + fl = Some(friends); + } + Self { + name, + friends: fl + } + } + + fn add_friends(&mut self, friend: &'a str) { + let fl = self.friends.as_mut(); // This needs to be borrowed as mutable! + match fl { + Some(f) => f.push(friend), + None => self.friends = Some(vec![friend]), + }; + println!("Friend '{}' added.", friend); + } +} +``` + +Hier gibt es nur zwei einfache Methoden. new erstellt eine neue Person und ist genau genommen keine Methode. Die zweite Methode fügt Freunde zur Freundesliste hinzu. + +### match und if let + +Das Strukturfeld friends ist ein Feld vom Typ Option, d.h. das Feld kann entweder eine Liste mit Freunden enthalten oder nichts (None). Wenn man den Inhalt des Feldes nutzen möchte muss man meistens unterscheiden ob das Feld belegt ist oder nicht. Dabei hilf match: + +```rust +fn main() { + // Peter has no friends + let peter = Person { + name: "Peter", + friends: None, + }; + println!("{:?}", peter); + + let peter_has_friends = &peter.friends; //this needs to be borrowed because peter.friends is needed later on + match peter_has_friends { + Some(_) => println!("{} has friends.", peter.name), + None => {}, + } +} +``` + +Für den Fall, dass friends Daten enthält wird Peter has friends ausgegeben, andernfalls passiert gar nichts. + +Das Gleiche erreicht man kompakter indem man den match Block durch if let ersetzt: + +```rust +if let Some(_peter_has_friends) = peter.friends { + println!("{} has friends!", peter.name); + } +``` +Beide Varianten führen zum gleichen Ergebnis. In diesem Fall sind aber keine Freunde vorhanden. Ist bei einer Person das Optionsfeld belegt erfolgt auch eine Ausgabe: + +```rust +fn main() { + // Mary has friends + let mary = Person { + name: "Mary", + friends: Some(vec!["Paul", "Jerry"]), + }; + println!("{:?}", mary); + + let mary_has_friends = &mary.friends; //this needs to be borrowed because mary.friends is needed later on + match mary_has_friends { + Some(_) => println!("{} has friends.", mary.name), + None => {}, + } + // Instead of the match block "if let" is a shorter alternative + if let Some(_mary_has_friends) = &mary.friends { + println!("{} has friends!", mary.name); + } +} +``` + +Auch hier ist die Verwendung if let kompakter, wobei ich persönlich finde, dass das der match Block klarer zu verstehen gibt, was hier getan wird. + +## Referenzierung und Veränderung Daten + +Nehmen wir mal an wir möchten in dem oben stehenden Beispiel einen Freund ändern. In diesem Fall muss die Freundesliste mutable / änderbar sein: + +```rust +... +// Let'try max + let mut max = Person::new("Max", vec![]); + max.add_friends("Bobby"); + max.add_friends("Batman"); + println!("{:?}", max); + + if let Some(has_friends) = max.friends.as_mut() { + has_friends[1] = "Superman"; + println!("{} has friends: {:?}", max.name, has_friends); + } + // This could also be written like this: + if let Some(mut has_friends) = max.friends { + has_friends[1] = "Batgirl"; + println!("{} has friends: {:?}", max.name, has_friends); + } +... +``` + +Durch die Verwendung der Methode as_mut() wird unsere Freundesliste an had_friends als mutable übergeben und wir können das 2. Element ändern. +Wenn wir das so machen tritt aber ein anderes Problem auf. has_friends wird neuer Eigentümer der Freundesliste. D.h., wenn wir auf max.friends zugreifen wollen meldet der Compiler einen Fehler: + +```rust +... +println!("{} has friends: {:?}", max.name, max.friends); +``` + +Fehlermeldung: + +```rust +error[E0382]: borrow of moved value: `max.friends` + --> src/main.rs:77:48 + | +73 | if let Some(mut has_friends) = max.friends { + | --------------- value moved here +... +77 | println!("{} has friends: {:?}", max.name, max.friends); + | ^^^^^^^^^^^ value borrowed here after move + | + = note: move occurs because value has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait +help: borrow this field in the pattern to avoid moving `max.friends.0` + | +73 | if let Some(ref mut has_friends) = max.friends { + | ^^^ +``` + +Der Compiler sagt uns, dass der Inhalt max_friends zu has_friends verschoben wurde. Außerdem gibt der Compiler an, dass der Copy Trait vom Typ Vector nicht implementiert wird. +Gleichzeitig schlägt uns der Compiler einen Teil der Lösung vor. Wir müssen max.friends an has_friends ausleihen. diff --git a/content/posts/rust-3.en.md b/content/posts/rust-3.en.md new file mode 100644 index 0000000..c27b620 --- /dev/null +++ b/content/posts/rust-3.en.md @@ -0,0 +1,215 @@ +--- +title: "Part 3: Methods, Options, References and Head Nodes" +date: 2020-09-22 +draft: false +series: ["Starting with rust"] +tags: ["rust","coding"] +--- +For the last 2 days and today I have dealt with various topics. +Since I somehow slipped one topic into another, it makes little sense +made to write individual posts. I had to tie the head knot first +solve that went along with the various topics 😇. + +I've put together several examples that reflect quite well that +what I've learned in the past few days. But let's just start. + +## Rust, referencing and ownership + +I don't want to go into too much detail here. I think the [Rust book](https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html) can explain all of this in much better detail than I can. Just this much: What you know as a pointer from languages ​​like Go or C ++ works differently in Rust. With its Owenership System, Rust ensures that every asset has only one owner. However, values ​​can still be referenced. To do this, they are "borrowed" and then returned to the owner. + +Let's just start with an example. You can find the complete code [here](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d5e36c9e573201e0843b0e947b033ab9): + +### Lifetimes + +In my example I created a data structure for a person. This person should have a name and a list of friends. I defined the name as & str string slice, which is a reference to the storage location. If you are interested in details about strings, you should read [this article](https://blog.thoughtram.io/string-vs-str-in-rust/). This explains exactly which strings are stored and referenced and what the differences are. +```rust +#[derive(Debug)] +struct Person { + name: &str, + friends: Option>, +} +``` + +Here the compiler gives us an error: + +```rust +error[E0106]: missing lifetime specifier + --> src/main.rs:3:11 + | +3 | name: &str, + | ^ expected named lifetime parameter + | +help: consider introducing a named lifetime parameter + | +2 | struct Person<'a> { +3 | name: &'a str, + | + +error[E0106]: missing lifetime specifier + --> src/main.rs:4:25 + | +4 | friends: Option>, + | ^ expected named lifetime parameter + | +help: consider introducing a named lifetime parameter + | +2 | struct Person<'a> { +3 | name: &str, +4 | friends: Option>, + | +``` + +Rust wants a lifetime specification. This is because Rust doesn't know how long the & str references should be valid. By default, the memory is released in Rust after leaving a block "{}" and this would invalidate these references. We use the lifetimes to tell the Rust compiler how long the references should be valid: + +```rust +#[derive(Debug)] +struct Person<'a> { + name: &'a str, + friends: Option>, +} +``` + +We declare a lifetime a for our data structure here. We also assign these to the & str reference of the name and the elements of the friends list. By doing this, we are telling the compiler that the fields should exist as long as the person exists. + + +When implementing the methods, the compiler also requests lifetimes again: + +```rust +impl<'a> Person<'a> { + fn new(name: &'a str, friends: Vec<&'a str>) -> Self { + let mut fl: Option> = None; + if friends.len() > 0 { + fl = Some(friends); + } + Self { + name, + friends: fl + } + } + + fn add_friends(&mut self, friend: &'a str) { + let fl = self.friends.as_mut(); // This needs to be borrowed as mutable! + match fl { + Some(f) => f.push(friend), + None => self.friends = Some(vec![friend]), + }; + println!("Friend '{}' added.", friend); + } +} +``` + +There are only two simple methods here. new creates a new person and is not strictly a method. The second method adds friends to the friends list. + +### Match and if let + +The friends structure field is an option field, i.e. the field can either contain a list of friends or nothing (None). If you want to use the content of the field, you usually have to distinguish whether the field is occupied or not. Help match: + +```rust +fn main() { + // Peter has no friends + let peter = Person { + name: "Peter", + friends: None, + }; + println!("{:?}", peter); + + let peter_has_friends = &peter.friends; //this needs to be borrowed because peter.friends is needed later on + match peter_has_friends { + Some(_) => println!("{} has friends.", peter.name), + None => {}, + } +} +``` + +In the event that friends contains data, Peter has friends is output, otherwise nothing happens. + +The same thing can be achieved more compactly by replacing the match block with if let: + +```rust +if let Some(_peter_has_friends) = peter.friends { + println!("{} has friends!", peter.name); + } +``` + +Both variants lead to the same result. In this case, however, there are no friends. If the option field is occupied for a person, there is also an output: + +```rust +fn main() { + // Mary has friends + let mary = Person { + name: "Mary", + friends: Some(vec!["Paul", "Jerry"]), + }; + println!("{:?}", mary); + + let mary_has_friends = &mary.friends; //this needs to be borrowed because mary.friends is needed later on + match mary_has_friends { + Some(_) => println!("{} has friends.", mary.name), + None => {}, + } + // Instead of the match block "if let" is a shorter alternative + if let Some(_mary_has_friends) = &mary.friends { + println!("{} has friends!", mary.name); + } +} +``` + +Here, too, the use of if let is more compact, although I personally find that the match block gives a clearer understanding of what is being done here. + +## Referencing and changing data + +Let's say we want to change a friend in the example above. In this case the friends list must be mutable / changeable: + +```rust +... +// Let'try max + let mut max = Person::new("Max", vec![]); + max.add_friends("Bobby"); + max.add_friends("Batman"); + println!("{:?}", max); + + if let Some(has_friends) = max.friends.as_mut() { + has_friends[1] = "Superman"; + println!("{} has friends: {:?}", max.name, has_friends); + } + // This could also be written like this: + if let Some(mut has_friends) = max.friends { + has_friends[1] = "Batgirl"; + println!("{} has friends: {:?}", max.name, has_friends); + } +... +``` + +By using the as_mut () method, our friend list is passed to had_friends as mutable and we can change the 2nd element. +But if we do that, another problem arises. has_friends becomes the new owner of the friends list. That means, if we want to access max.friends, the compiler reports an error: + +```rust +... +println!("{} has friends: {:?}", max.name, max.friends); +``` + +Error message: + +```rust +error[E0382]: borrow of moved value: `max.friends` + --> src/main.rs:77:48 + | +73 | if let Some(mut has_friends) = max.friends { + | --------------- value moved here +... +77 | println!("{} has friends: {:?}", max.name, max.friends); + | ^^^^^^^^^^^ value borrowed here after move + | + = note: move occurs because value has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait +help: borrow this field in the pattern to avoid moving `max.friends.0` + | +73 | if let Some(ref mut has_friends) = max.friends { + | ^^^ +``` + +The compiler tells us that the max_friends content has been moved to has_friends. The compiler also states that the Vector copy trait will not be implemented. +At the same time, the compiler suggests part of the solution. We have to lend max.friends to has_friends. + + + + diff --git a/content/posts/to-ipfs.de.md b/content/posts/to-ipfs.de.md new file mode 100644 index 0000000..da6b8ae --- /dev/null +++ b/content/posts/to-ipfs.de.md @@ -0,0 +1,15 @@ +--- +title: "Hosting über IPFS" +date: 2020-08-12 +draft: true +tags: ["hosting","server","blockchain","web3"] +--- +I habe das Hosting für diese Seite geändert. Statt eines regulären serverbasierten Hostings ist die Seite nun über IPFS gespeichert. +Im Grunde funktioniert das so, dass ich die Seite in einem Github Repository gespeichert habe. +Bei Änderung des Repositories wird die Seite automatisch auf IPFS bereitgestellt. Hierzu nutze ich den Anbieter [Fleek](https://fleek.co). + +## Warum? + +Ich glaube das IPFS das Potential hat das Internet von Grund auf zu verändern und wollte mich gerne einmal damit zu befassen. +IPFS ist im Grunde ein peer to peer Protokoll, d.h. es gibt keinen zentralen Server bei dem die Clients Daten anfordern. Das löst einige Probleme, die das Internet derzeit hat. +Die Technologie und die Ideen dahinter sind faszinierend und das Projekt entwickelt sich stetig. Mehr Innfos unter https://ipfs.io diff --git a/content/posts/to-ipfs.en.md b/content/posts/to-ipfs.en.md new file mode 100644 index 0000000..54b8dc5 --- /dev/null +++ b/content/posts/to-ipfs.en.md @@ -0,0 +1,15 @@ +--- +title: "IPFS Hosting" +date: 2020-08-12 +draft: true +tags: ["hosting","server","blockchain","web3"] +--- +I changed the hosting for this site. Instead of regular server-based hosting, the site is now stored via IPFS. +Basically, it works like this, I've saved the page in a Github repository. +If the repository is changed, the page is automatically deployed to IPFS. For this I use the provider [Fleek](https://fleek.co). + +## Why? + +I believe that IPFS has the potential to change the Internet from the ground up and I would like to take a look at it. +IPFS is basically a peer to peer protocol, i.e. there is no central server from which the clients request data. That solves some of the problems the internet is currently having. +The technology and the ideas behind it are fascinating and the project is constantly evolving. More information at https://ipfs.io diff --git a/content/posts/url-encoding-go.de.md b/content/posts/url-encoding-go.de.md new file mode 100644 index 0000000..0f4c44a --- /dev/null +++ b/content/posts/url-encoding-go.de.md @@ -0,0 +1,124 @@ +--- +title: "URLs in Go kodieren" +date: 2020-03-04 +draft: false +tags: ["programmieren","golang","go","urlencode","net/url"] +--- +Das Paket net/url ist ein nützliches Paket um in Go mit URLs, Pfaden und Parametern umzugehen. Man kann Parameter in ein URL kodieren lassen oder Sonderzeichen automatisch umwandeln. +```go +package main + +import ( + "fmt" + "log" + "net/url" +) + +func main() { + //set the URL + baseUrl, err := url.Parse("https://www.google.com/search") + if err != nil { + log.Fatalln(err) + } + fmt.Printf("URL: %s\n", baseUrl) + fmt.Println(baseUrl.Host) + fmt.Println(baseUrl.Path) +} +``` +[Code ausprobieren](https://play.golang.org/p/_W7yv9HWHBD) + +Wie man wird die URL mit url.Parse in Ihre Bestandteile zerlegt und in einer Struktur gespeichert. +Neben den oben stehenden Feldern gibt es auch noch weitere (Auszug aus der Dokumentation): +```go +type URL struct { + Scheme string + Opaque string // encoded opaque data + User Userinfo // username and password information + Host string // host or host:port + Path string // path (relative paths may omit leading slash) + RawPath string // encoded path hint (see EscapedPath method); added in Go 1.5 + ForceQuery bool // append a query ('?') even if RawQuery is empty; added in Go 1.7 + RawQuery string // encoded query values, without '?' + Fragment string // fragment for references, without '#' +} +``` + +## Mit URL Parametern arbeiten + +Net/url definiert einen Typ Values als Schlüssel-Wertepaar und bietet einige Methoden an um Damit zu arbeiten. +```go +package main + +import ( + "fmt" + "log" + "net/url" +) + +func main() { + //parameters + p := url.Values{} + p.Add("q", "cat") + p.Add("s", "something else") + + fmt.Println(p) + fmt.Println(p.Encode()) + + //this also works backwards + q, err := url.ParseQuery("q=cat&s=something+else") + + if err != nil { + log.Fatalln(err) + } + + fmt.Println(q) + + //delete a key + p.Del("q") + fmt.Println(p) + +} +``` +[Code ausprobieren](https://play.golang.org/p/BzuUpv3bIaO) + +## URL Pfade mit Sonderzeichen kodieren + +Beim Erstellen der URL mit der parse Methode wird praktischweise auch ein eine kodierte Fassung des URL Pfades angelegt, so dass Sonderzeichen kein Problem sind: + +```go +package main + +import ( + "fmt" + "log" + "net/url" +) + +func main() { + //set the URL + baseUrl, err := url.Parse("https://www.google.com/search") + if err != nil { + log.Fatalln(err) + } + + //path encoding + baseUrl.Path += "/a path with spaces and special chars!ü@" + fmt.Printf("URL: %s\n", baseUrl) + + fmt.Println(baseUrl.Host) + fmt.Println(baseUrl.Path) + fmt.Println(baseUrl.EscapedPath()) + + //lets try this backwards + newUrl, err := url.ParseRequestURI("https://www.google.com/search/a%20path%20with%20spaces%20and%20special%20chars%21%C3%BC@") + if err != nil { + log.Fatalln(err) + } + fmt.Println(newUrl.Host) + fmt.Println(newUrl.Path) + fmt.Println(baseUrl.EscapedPath()) +} + +``` +Das Paket hat noch mehr praktische Funktion. Die Doku findet Ihr unter: https://golang.org/pkg/net/ + diff --git a/content/posts/url-encoding-go.en.md b/content/posts/url-encoding-go.en.md new file mode 100644 index 0000000..2ec898e --- /dev/null +++ b/content/posts/url-encoding-go.en.md @@ -0,0 +1,124 @@ +--- +title: "Encode URLs in Go" +date: 2020-03-04 +draft: false +tags: ["programming","golang","go","urlencode","net/url"] +--- +The net/url package is a useful package for dealing with URLs, paths and parameters in Go. You can have parameters encoded in a URL or automatically convert special characters. +```go +package main + +import ( + "fmt" + "log" + "net/url" +) + +func main() { + //set the URL + baseUrl, err := url.Parse("https://www.google.com/search") + if err != nil { + log.Fatalln(err) + } + fmt.Printf("URL: %s\n", baseUrl) + fmt.Println(baseUrl.Host) + fmt.Println(baseUrl.Path) +} +``` +[Try it](https://play.golang.org/p/_W7yv9HWHBD) + +As you can see url.Parse splits the URL into its components and saves it to a structure. +In addition to the fields above, there are also others (from the documentation): +```go +type URL struct { + Scheme string + Opaque string // encoded opaque data + User Userinfo // username and password information + Host string // host or host:port + Path string // path (relative paths may omit leading slash) + RawPath string // encoded path hint (see EscapedPath method); added in Go 1.5 + ForceQuery bool // append a query ('?') even if RawQuery is empty; added in Go 1.7 + RawQuery string // encoded query values, without '?' + Fragment string // fragment for references, without '#' +} +``` + +## Working with URLs + +Net/url defines a type Values as a key-value pair and offers some methods to work with it. +```go +package main + +import ( + "fmt" + "log" + "net/url" +) + +func main() { + //parameters + p := url.Values{} + p.Add("q", "cat") + p.Add("s", "something else") + + fmt.Println(p) + fmt.Println(p.Encode()) + + //this also works backwards + q, err := url.ParseQuery("q=cat&s=something+else") + + if err != nil { + log.Fatalln(err) + } + + fmt.Println(q) + + //delete a key + p.Del("q") + fmt.Println(p) + +} +``` +[Try it](https://play.golang.org/p/BzuUpv3bIaO) + +## Encode URL paths with special characters + +When creating the URL with the parse method, an encoded version of the URL path is also created, so that special characters are not a problem: + +```go +package main + +import ( + "fmt" + "log" + "net/url" +) + +func main() { + //set the URL + baseUrl, err := url.Parse("https://www.google.com/search") + if err != nil { + log.Fatalln(err) + } + + //path encoding + baseUrl.Path += "/a path with spaces and special chars!ü@" + fmt.Printf("URL: %s\n", baseUrl) + + fmt.Println(baseUrl.Host) + fmt.Println(baseUrl.Path) + fmt.Println(baseUrl.EscapedPath()) + + //lets try this backwards + newUrl, err := url.ParseRequestURI("https://www.google.com/search/a%20path%20with%20spaces%20and%20special%20chars%21%C3%BC@") + if err != nil { + log.Fatalln(err) + } + fmt.Println(newUrl.Host) + fmt.Println(newUrl.Path) + fmt.Println(baseUrl.EscapedPath()) +} + +``` +The package contains even more practical functionality. You can find the documentary at: https://golang.org/pkg/net/ + diff --git a/content/posts/v1-docker-n8n-setup.de.md b/content/posts/v1-docker-n8n-setup.de.md new file mode 100644 index 0000000..31518c4 --- /dev/null +++ b/content/posts/v1-docker-n8n-setup.de.md @@ -0,0 +1,374 @@ +--- +title: "#1: Docker, Portainer und n8n installieren" +date: 2022-03-28 +draft: false +tutorials: [Docker Installationen] +tags: ["docker", "n8n", "caddy", "portainer", "installation", "tutorial"] +--- + +Ich will mich jetzt nicht allzu lange mit einer Einführung aufhalten. Ich denke es gibt viele gute Videos zu den Themen, die ich hier besprechen werde. Ich möchte Euch hier gar nicht zeigen, wie man Tools wie Docker oder ähnliches benutzt. Viel mehr zeige ich hier ein paar konkrete Lösungsansätze, die ich so oder in abgewandelter Form auch tatsächlich in unserer Firma einsetze. + +Für einen großen Teil der hier gezeigten Videos wird ein Setup aus **Docker, Caddy, Portainer und n8n** notwendig sein. Ich werde mich hier was die Installation und Konfiguration auf das wesentliche beschränken. Ich denke es gibt mehr als genug Tutorials und Videos zu jedem dieser Themen 😉 + +## Subdomains & DNS einrichten + +Da ich später Portainer und n8n über separate Subdomains aufrufen möchte und es manchmal ein wenig dauert bis Änderungen an Domains angewendet sind mache ich die Einstellung der Subdomains zuerst. Ich zeige das hier am Beispiel von GoDaddy, weil ich hier meine Domains registriert habe. + +### DNS Einträge erstellen + +Ihr müsst in der Verwaltung Eurer Domain in de DNS Einstellungen gehen. Im Fall von GoDaddy nach dem Login einfach oben rechts auf Euren Namen klicken und dann **Meine Produkte** wählen. Anschließend könnt Ihr Eure Domain verwalten: + +![Domain verwalten](/img/yt-1/godaddy-dns1.png "Domain verwalten") + +Jetzt entweder auf das Menü bei der Domain Karte klicken oder unten auf DNS. + +Die DNS Einstellung ist denkbar einfach. Ihr müsst hier einen _A-Record_ und lediglich das Prefix für die Subdomain und die IP-Adresse Eures Servers angeben. Den TTL Wert könnt Ihr so einstellen, wie es für Euch Sinn macht, ich nehme hier immer 600 Sekunden. + +![Domain verwalten](/img/yt-1/godaddy-dns2.png "DNS einstellen") + +## Installation von Docker + +```sh +# Unter Arch Linux, Manjaro etc: +sudo pacman -S docker docker-compose + +# Unter Debian, Ubuntu etc: +sudo apt-get update && apt-get install docker docker-compose +``` + +```sh +sudo groupadd docker # Optional: bei den meisten Distributionen wird die Gruppe bei der Installation angelegt +sudo systemctl enable --now docker +``` + +### Berechtigungen und Ordner erstellen + +Ich mache es gerne so, dass ich meinen Hauptbenutzer der _docker_ Gruppe hinzufüge, dadurch muss ich beim ausführen von Docker-Befehlen nicht immer das Admin-Kennwort eingeben. +Je nachdem welche Shell Ihr einsetzt ist der Befehl ein klein wenig anders. Wenn Ihr nicht wisst welche Shell Ihr nutzt wird das mit Sicherheit _Bash_ sein: + +**Bash** + +```sh +sudo usermod -a -G docker "$(whoami)" +``` + +Oder **Fish** + +```sh +sudo usermod -a -G docker (whoami) +``` + +Jetzt den Ordner erstellen wo Docker Konfigurationen etc. abgelegt werden sollen. Ich habe mich hier für den Ordner _/opt/docker-services_ entschieden. + +```sh +sudo mkdir -m 775 /opt/docker-services +``` + +Und nun die Berechtigungen einstellen: + +**Bash** + +```sh +sudo chown $(whoami):docker /opt/docker-services +``` + +**Fish** + +```sh +sudo chown (whoami):docker /opt/docker-services +``` + +## Repository für Caddy, Portainer und n8 klonen und anpassen + +Um die Installation einfacher zu machen habe ich ein Repository vorbereitet wodurch eigentlich nur noch ein paar Werte angepasst werden müssen und wir dann direkt loslegen können: + +```sh +git clone git@git.sr.ht:~m3tam3re/yt1-docker-caddy-portainer-n8n /opt/docker-services +``` + +Hier eventuell den letzten Teil durch den Ordner ersetzen in dem Du die Daten für Deine Docker Services ablegen möchtest. Das ganze sollte dann von der Struktur her so aussehen: + +```sh +/opt/docker-services: +├── LICENSE +├── n8n +│   ├── docker-compose.yml +│   ├── DockerFile +│   └── README.md +├── portainer-caddy +│   ├── Caddyfile +│   └── docker-compose.yml +└── README.md +``` + +## Installation von Caddy und Portainer + +Caddy und Portainer sind die Basis für unser Setup. Dabei nutzen wir Caddy als Reverse-Proxy,der dafür zuständig Anfragen an jeweils entsprechenden Docker Container weiterzuleiten. Alternativ könnte man hier auch Traefik oder NGINX einsetzen, aber Caddy ist hier im Vergleich wesentlich einfacher zu konfigurieren. + +Portainer ist ein Webinterface, dass die Verwaltung von Docker Containern sehr einfach macht. Portainer ist im Grunde optional und eine gute Alternative für alle, die ungern mit dem Terminal arbeiten. + +### Caddy installieren + +Die Caddy Installation ist relativ einfach. Da mein Server Arch Linux als Betriebssystem hat wird Caddy über pacman installiert: + +```sh +sudo pacman -Syu caddy +``` + +In Ubuntu oder anderen Debian basierten Distributionen ist die Installation ein klein wenig umständlicher: + +```sh +sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo tee /etc/apt/trusted.gpg.d/caddy-stable.asc + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list + +sudo apt update + +sudo apt install caddy +``` + +Eigentlich wird Caddy nach der Installation automatisch gestartet, falls nicht einfach nochmal: + +``` +caddy start +``` + +Sollte Caddy schon laufen kommt hier ein Fehler. Den könnt Ihr einfach ignorieren. + +### Caddy und Portainer einrichten + +Ich hatte ja ganz oben unter der Überschrift [Subdomains & DNS einrichten](#subdomains--dns-einrichten) darüber gesprochen, dass ich Portainer und n8n über separate Subdomains aufrufen möchte. Damit das funktioniert müssen wir Caddy als Reverse-Proxy konfigurieren. Dazu bearbeiten wir das Caddyfile. In meinem Setup habe ich die Domain _ca.m3tam3re.com_ für Portainer eingeplant und _io.m3tam3re.com_ für n8n. Das Caddyfile sieht dann so aus: + +```json +ca.m3tam3re.com { + reverse_proxy localhost:9000 +} +io.m3tam3re.com { + reverse_proxy localhost:5678 +} +``` + +Wie man sieht ist die Caddy Konfiguration denkbar einfach. Hier solltet Ihr natürlich Eure eigenen Domains verwenden 😄 + +### Conatiner Stack starten + +Jetzt können wir die Container erstellen und starten. Dazu erstmal das Verzechnis wechseln wo sich die Datei _docker-compose.yml_ aus dem Repository befindet: + +```sh +cd /opt/docker-services/portainer-caddy +``` + +Da ich in der _docker-compose.yml_ ein externes Netzwerk angelegt habe muss das Netzwerk _web_ noch angelegt werden: + +```sh +docker network create web +``` + +Jetzt den Container Stack starten: + +```sh +docker-compose up -d +``` + +Wenn Ihr jetzt **docker ps** eingebt sollte das ungefähr so aussehen: + +```sh +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f4b9f9302962 portainer/portainer-ce:latest "/portainer -H unix:…" 4 minutes ago Up 4 minutes 8000/tcp, 9443/tcp, 127.0.0.1:9000->9000/tcp portainer-caddy-portainer-1 +``` + +### Caddy Konfiguration für den Container Stack laden + +Das _Caddyfile_, dass wir zuvor angepasst haben kann jetzt von caddy geladen werden: + +```sh +caddy reload +``` + +### Eventuell Caddy Berechtigungen einstellen + +Je nachdem wie das Betriebssystem konfiguriert ist kann es sein, dass Caddy erst die Berechtigung braucht um die Ports 80 und 443 an sich zu binden. Wenn Ihr **caddy reload** im Terminal ausführt wird Caddy das als Fehler ausgeben. + +```sh +tcp :443: bind: permission denied +``` + +Die Berechtigung setzt Ihr wie folgt: + +**Bash** + +```sh +sudo setcap CAP_NET_BIND_SERVICE=+eip $(which caddy) +``` + +**Fish** + +```sh +sudo setcap CAP_NET_BIND_SERVICE=+eip (which caddy) +``` + +Also nochmal: + +```sh +caddy reload +``` + +Das schöne an Caddy ist übrigens, dass ich in verschiedenen Ordnern _Caddyfiles_ mit unterschiedlichen Einstellungen haben kann und per _caddy reload_ einfach laden kann ohne Neustart des Serverdienstes. + +## Grundeinrichtung von Portainer + +Da jetzt alles laufen sollte 🚀 könnt Ihr jetzt Portainer im Browser ausfrufen. In meinem Fall ist das _ca.m3tam3re.com_. + +Ihr solltet jetzt Eure Administrator Daten für Portainer setzen können: +![Portainer - Admin Konto erstellen](/img/yt-1/portainer-admin.png "Admin Konto erstellen") + +Wenn Ihr Euer Admin-Konto eingerichtet habt werden Ihr auch direkt angemeldet und wir sind jetzt startklar für 🚀 n8n 🚀. + +![Portainer - erstes Login](/img/yt-1/portainer-start.png "erstes Login") + +## Installation von n8n + +Jetzt wo das grundsätzliche Setup fertig ist können wir endlich unseren ersten Container starten. Ich zeige hier zwei Möglichkeiten, welche Ihr davon nehmt ist Euch überlassen. + +### 1. Mit docker-compose über das Terminal + +Auch wenn wir gerade Portainer installiert haben, habe ich das Repository so vorbereitet, dass das ganze auch ohne Portainer einfach einzurichten ist. Also los geht's: + +#### Umgebungsvariablen anpassen + +Zuerst müssen wir in den Ordner **n8n** unseres Repositories wechseln: + +```sh +cd ../n8n +``` + +Das Verzeichnis sollte so aussehen. + +```sh +/opt/docker-services/n8n +├── docker-compose.yml +├── DockerFile +└── .env +``` + +Öffnet die Datei **.env** und passt die Werte entsprechend an. Bei mir sieht das z.B. so aus: + +```sh +# TLD - Deine Hauptdomain auf der n8n laufen wird +DOMAIN_NAME=m3tam3re.com + +# Die Subdomain für n8n +SUBDOMAIN=io + +# DOMAIN_NAME und SUBDOMAIN bestimmen in Kombination wie n8n erreichbar sein wird +# im oben stehende Beispiel wäre das: https://n8n.deine-domain-hier.com + +# Der Benutzername für die Anmeldung - BITTE ÄNDERN! +N8N_BASIC_AUTH_USER=admin + +# Das Kennwort für die Anmeldung - BITTE ÄNDERN! +N8N_BASIC_AUTH_PASSWORD=gehtDichNixAn0815 + +# Hier kannst Du die Zeitzone setzen, das ist z.B. für CRON Aufgaben wichtig +# Wenn nicht gesetzt wird New York gesetzt +GENERIC_TIMEZONE=Europe/Berlin + +# Erlaubt das Importieren und Nutzen von internen Modulen in Funktions-Nodes +NODE_FUNCTION_ALLOW_BUILTIN=* + +# Erlaubt das Importieren und Nutzen von externen Modulen in Funktions-Nodes +NODE_FUNCTION_ALLOW_EXTERNAL=* +``` + +Da n8n in dieser Konstellation Probleme mit den Berechtigungen bei regulären Docker Volumes bekommt müssen wir noch einen Ordner für die permanente Speicherung der Daten von n8n anlegen: + +```sh +mkdir n8n-data +``` + +**Bash:** + +```sh +chown $(whoami):docker n8n-data +``` + +**Fish:** + +```sh +chown (whoami):docker n8n-data +``` + +Das war es auch schon. Jetzt können wir den Stack starten: + +```sh +docker-compose up -d +``` + +### 2. n8n über Portainer einrichten + +#### Ordner für die permanente Speicherung von Daten anlegen + +Zuerst müssen wir auch bei dieser Variante in den Ordner **n8n** unseres Repositories wechseln: + +```sh +cd ../n8n +``` + +```sh +mkdir n8n-data +``` + +**Bash:** + +```sh +chown $(whoami):docker n8n-data +``` + +**Fish:** + +```sh +chown (whoami):docker n8n-data +``` + +#### Den n8n Stack in Portainer erstellen + +![Portainer - n8n Stack erstellen](/img/yt-1/n8n-stack-erstellen.png "n8n Stack erstellen") + +Wenn Ihr auf **Add stack** geklickt habt bekommt Ihr das Konfigurationsfenster für den Stack angezeigt: +![Portainer - n8n Stack konfigurieren](/img/yt-1/n8n-stack-config.png "n8n Stack konfigurieren") + +Hier gibt es eigentlich nur ein paar Dinge einzustellen: + +1. Den Namen für den Stack festlegen +2. Den Inhalt der Datei **n8n/docker-compose.yml** in den Webeditor kopieren oder die Datei über den **Upload** Tab hochladen +3. Die Datei **n8n/.env** hochladen + +![Portainer - n8n Umgebungsvariablen setzen](/img/yt-1/n8n-stack-env.png "Umgebungsvariablen setzen") + +Ihr braucht die Datei _.env_ nicht vorher anpassen. Portainer erlaubt Euch hier zuvor die Werte anzupassen. +Jetzt mit einem Klick auf **Deploy the stack** den Stack starten. + +### n8n einrichten + +Endlich geschafft 🚀 😄. Ich muss zugeben, dass mir auch so langsam die Puste ausgeht. Das alles einmal aufzuschreiben dauert doch sehr viel länger als ich dachte 🤣. + +Jetzt könnt Ihr die Domain für n8n aufrufen. In meinem Beispiel ist das **io.m3tam3re.com** und den admin Account einrichten: + +![n8n - Admin erstellen](/img/yt-1/n8n-admin.png "n8n Admin erstellen") + +Jetzt könnt Ihr Euch anmelden und landet auf der Seite für die Workflowerstellung. Wer möchte kann hier einfach einmal in den Templates stöbern. n8n bietet jede Menge fertige Vorlagen für die Automatisierng von Aufgaben 😄 + +![n8n - Templates](/img/yt-1/n8n-templates.png "n8n Templates") + +Das war's 🚀 + +## Abschluss + +Noch ein paar abschließende Kommentare 😄: + +1. In vielen Videos wird derzeit sehr oft die Kombination Docker und Traefik gezeigt und angepriesen. Traefik ist ein großartiges Programm und ich würde es bedenkenlos jedem empfehlen. Der Grund warum ich aber hier stattdessen Caddy verwende ist, dass Caddy sehr viel einfacher zu konfigurieren ist und auch viele Dinge einfacher macht. Z.B. werden über Caddy automatisch gültige SSL-Zertifikate für die Domains erstellt, was bei Traefik für jede Domain konfiguriert werde muss. + Im Produktiveinsatz macht es natürlich Sinn Caddy als Service zu starten und die Konfiguration über die REST-Api von Caddy vorzunehmen. Für dieses und auch noch folgende Beispiele ist die hier gezeigte Einstellung aber vollkommen ausreichend 😄 + +2. Ich setze ganz bewusst das Image n8n-debian ein. Ich weiß, dass Alpine-basierte Container wesentlich kleiner sind, aber es kommt hier gerade nicht auf den Speicherplatz an. Mit dem Debian Image habe ich Zugriff auf eine riesige Datenbank von Binaries die ich im Handumdrehen installieren und nutzen kann. Würde ich den Alpine Container nehmen müsste ich wahrscheinlich so einiges aus dem Quellcode kompilieren, weil es sehr viel weniger Pakete gibt. diff --git a/content/posts/v1-docker-n8n-setup.en.md b/content/posts/v1-docker-n8n-setup.en.md new file mode 100644 index 0000000..94042e3 --- /dev/null +++ b/content/posts/v1-docker-n8n-setup.en.md @@ -0,0 +1,376 @@ +--- +title: "#1: Docker, Portainer and n8n Installation" +date: 2022-03-28 +draft: false +tutorials: ["Docker Installations"] +tags: ["docker", "n8n", "caddy", "portainer", "installation", "tutorial"] +--- + +I don't want to spend too much time on an introduction. I think there are many good videos on the topics I will discuss here. I don't want to show you how to use tools like Docker or similar here. Rather, I will show you a few specific solutions that I use in our company in the same or a modified form. + +For a large part of the videos shown here, a setup of **Docker, Caddy, Portainer and n8n** will be necessary. I will keep the installation and configuration here to the essentials. I think there are more than enough tutorials and videos on each of these topics 😉 + +## Setting up Subdomains & DNS + +Later on, I want to call up Portainer and n8n via separate subdomains and sometimes it takes a little while until changes to domains are applied so I set up the subdomains first. I will show this here using the example of GoDaddy, where I have registered my domains. + +### Creating DNS Entries + +You must go to the management of Your domain in the DNS settings. In the case of GoDaddy, after logging in, simply click on your name in the top right and then select **My Products**. Then you can manage your domain: + +![Manage Domain](/img/yt-1/godaddy-dns1.png "Manage Domain") + +Now click on the menu at the domain card or below on DNS. + +The DNS setting is simple. Here you only need to specify an _A-Record_, just the prefix for the subdomain, and the IP address of your server. You can set the TTL value as it makes sense for you, I always take 600 seconds here. + +![Manage Domain](/img/yt-1/godaddy-dns2.png "Set DNS") + +## Installation of Docker + +```sh +# Under Arch Linux, Manjaro etc: +sudo pacman -S docker docker-compose + +# Under Debian, Ubuntu etc: +sudo apt-get update && apt-get install docker docker-compose +``` + +```sh +sudo groupadd docker # Optional: in most distributions the group will be created during installation +sudo systemctl enable --now docker +``` + +### Setting Permissions and Creating Folders + +I like to add my main user to the _docker_ group, so I don't always have to enter the admin password when running Docker commands. +Depending on which shell you use, the command is a little different. If you don't know which shell you are using, it will definitely be _Bash_: + +**Bash** + +```sh +sudo usermod -a -G docker "$(whoami)" +``` + +Or **Fish** + +```sh +sudo usermod -a -G docker (whoami) +``` + +Now create the folder where Docker configurations etc. should be stored. I have chosen the folder _/opt/docker-services_ here. + +```sh +sudo mkdir -m 775 /opt/docker-services +``` + +And now set the permissions: + +**Bash** + +```sh +sudo chown $(whoami):docker /opt/docker-services +``` + +**Fish** + +```sh +sudo chown (whoami):docker /opt/docker-services +``` + +## Clone and Adapt Repository for Caddy, Portainer and n8 + +To make the installation easier, I have prepared a repository where you actually only have to adjust a few values and we can start directly: + +```sh +git clone git@git.sr.ht:~m3tam3re/yt1-docker-caddy-portainer-n8n /opt/docker-services +``` + +Here you may replace the last part with the folder where you want to store your data for your Docker services. The structure should look like this: + +```sh +/opt/docker-services: +├── LICENSE +├── n8n +│ ├── docker-compose.yml +│ ├── DockerFile +│ └── README.md +├── portainer-caddy +│ ├── Caddyfile +│ └── docker-compose.yml +└── README.md +``` + +## Installation of Caddy and Portainer + +Caddy and Portainer are the basis for our setup. We use Caddy as a reverse proxy, which is responsible for forwarding requests to the corresponding Docker container. Alternatively, you could also use Traefik or NGINX here, but compared to those, Caddy is much easier to configure. + +Portainer is a web interface that makes managing docker containers very easy. Portainer is basically optional and a good alternative for anyone who doesn't like to work with the terminal. + +### Caddy install + +The Caddy installation is relatively simple. Since my server has Arch Linux as the operating system, Caddy is installed via pacman: + +```sh +sudo pacman -Syu caddy +``` + +In Ubuntu or other Debian-based distributions, the installation is a little more complicated: + +```sh +sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo tee /etc/apt/trusted.gpg.d/caddy-stable.asc + +curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list + +sudo apt update + +sudo apt install caddy +``` + +Basically, Caddy is started automatically after installation, if not just one more time: + +``` +caddy start +``` + +If Caddy is already running, you will get an error here. You can simply ignore that. + +### Setup Caddy and Portainer + +At the top, under the heading [Setting up Subdomains & DNS](#setting-up-subdomains--dns), I talked about wanting to call up Portainer and n8n via separate subdomains. For this to work, we need to configure Caddy as a reverse proxy. For this, we edit the Caddyfile. In my setup, I have planned the domain _ca.m3tam3re.com_ for Portainer and _io.m3tam3re.com_ for n8n. The Caddyfile then looks like this: + +```json +ca.m3tam3re.com { + reverse_proxy localhost:9000 +} +io.m3tam3re.com { + reverse_proxy localhost:5678 +} +``` + +As you can see, the Caddy configuration is straightforward. Here, of course, you should use your own domains 😄 + +### Start Container Stack + +Now we can create and start the containers. For this, first change the directory where the _docker-compose.yml_ file from the repository is located: + +```sh +cd /opt/docker-services/portainer-caddy +``` + +Since I created an external network in the _docker-compose.yml_, the _web_ network must be created: + +```sh +docker network create web +``` + +Now start the Container Stack: + +```sh +docker-compose up -d +``` + +When you now type **docker ps**, it should look something like this: + +```sh +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f4b9f9302962 portainer/portainer-ce:latest "/portainer -H unix:…" 4 minutes ago Up 4 minutes 8000/tcp, 9443/tcp, 127.0.0.1:9000->9000/tcp portainer-caddy-portainer-1 +``` + +### Load Caddy Configuration for Container Stack + +The _Caddyfile_ that we have previously adjusted can now be loaded by Caddy: + +```sh +caddy reload +``` + +### Possibly Set Caddy Permissions + +Depending on how the operating system is configured, Caddy may need permission to bind itself to ports 80 and 443. When you execute **caddy reload** in the terminal, Caddy will output this as an error. + +```sh +tcp:443: bind: permission denied +``` + +You set the permissions as follows: + +**Bash** + +```sh +sudo setcap CAP_NET_BIND_SERVICE=+eip $(which caddy) +``` + +**Fish** + +```sh +sudo setcap CAP_NET_BIND_SERVICE=+eip (which caddy) +``` + +Again: + +```sh +caddy reload +``` + +The nice thing about Caddy is that I can have _Caddyfiles_ with different settings in different folders and simply load them with _caddy reload_ without having to restart the server service. + +## Basic setup of Portainer + +Now that everything should be running 🚀 you can now call up Portainer in the browser. In my case, it's _ca.m3tam3re.com_. + +You should now be able to set your administrator data for Portainer: +![Portainer - Create Admin Account](/img/yt-1/portainer-admin.png "Create Admin Account") + +Once you have set up your admin account, you will also be logged in directly and we are now ready to go for 🚀 n8n 🚀. + +![Portainer - first login](/img/yt-1/portainer-start.png "first login") + +## Installation of n8n + +Now that the basic setup is complete, we can finally start our first container. I will show two possibilities here, which one you choose is up to you. + +### 1. With docker-compose via the terminal + +Even though we just installed Portainer, I have designed the repository in such a way that the whole thing can be set up easily without Portainer. So, let's get started: + +#### Adapt environment variables + +First, we need to go to the **n8n** folder in our repository: + +```sh +cd ../n8n +``` + +The directory should look like this. + +```sh +/opt/docker-services/n8n +├── docker-compose.yml +├── DockerFile +└── .env +``` + +Open the file **.env** and adjust the values accordingly. In my case, it looks like this: + +```sh +# TLD - Your main domain on which n8n will run +DOMAIN_NAME=m3tam3re.com + +# The subdomain for n8n +SUBDOMAIN=io + +# DOMAIN_NAME and SUBDOMAIN determine in combination how n8n will be accessible +# in the above example, this would be: https://n8n.your-domain-here.com + +# The username for logging in - PLEASE CHANGE! +N8N_BASIC_AUTH_USER=admin + +# The password for login - PLEASE CHANGE! +N8N_BASIC_AUTH_PASSWORD=noneOfYourBusiness0815 + +# Here you can set the timezone, this is important for CRON tasks, for example +# If not set, New York will be set +GENERIC_TIMEZONE=Europe/Berlin + +# Allows importing and using internal modules in function nodes +NODE_FUNCTION_ALLOW_BUILTIN=* + +# Allows importing and using external modules in function nodes +NODE_FUNCTION_ALLOW_EXTERNAL=* +``` + +Since n8n has problems with the permissions for regular Docker volumes in this constellation, we have to create another folder for the permanent storage of data from n8n: + +```sh +mkdir n8n-data +``` + +**Bash:** + +```sh +chown $(whoami):docker n8n-data +``` + +**Fish:** + +```sh +chown (whoami):docker n8n-data +``` + +That's all there is to it. Now we can start the stack: + +```sh +docker-compose up -d +``` + +### 2. Set up n8n via Portainer + +#### Create folder for permanent storage of data + +First, we need to go to the **n8n** folder of our repository again in this variant: + +```sh +cd ../n8n +``` + +```sh +mkdir n8n-data +``` + +**Bash:** + +```sh +chown $(whoami):docker n8n-data +``` + +**Fish:** + +```sh +chown (whoami):docker n8n-data +``` + +#### Create the n8n Stack in Portainer + +![Portainer - create n8n stack](/img/yt-1/n8n-stack-create.png "create n8n stack") + +When you click on **Add stack**, you will see the configuration window for the stack: +![Portainer - configure n8n stack](/img/yt-1/n8n-stack-config.png "configure n8n stack") + +There are only a few things to set up here: + +1. Specify the name of the stack. +2. Copy the contents of the file **n8n/docker-compose.yml** into a web editor or upload the file via the **Upload** tab. +3. Upload the file **n8n/.env**. + +![Portainer - set n8n environment variables](/img/yt-1/n8n-stack-env.png "set environment variables") + +You don't need to adjust the _.env_ file beforehand. Portainer allows you to adjust the values beforehand. + +Now start the stack with a click on **Deploy the stack**. + +### Set up n8n + +Finally done 🚀 😄. I must admit that I am also running out of steam. Writing all this down takes a lot longer than I thought 🤣. + +Now you can call the domain for n8n. In my example it's **io.m3tam3re.com** and set up the admin account: + +![n8n - create Admin](/img/yt-1/n8n-admin.png "n8n create Admin") + +Now you can login and land on the page for setting up the workflow. Who wants can simply browse through the templates here. n8n offers lots of ready-made templates for automating tasks 😄 + +![n8n - Templates](/img/yt-1/n8n-templates.png "n8n Templates") + +That's it 🚀 + +## Conclusion + +Just a few closing remarks 😄: + +1. In many videos, the combination Docker and Traefik is currently shown and praised a lot. Traefik is a great program, and I would recommend it without hesitation to anyone. The reason I use Caddy here instead is because Caddy is much easier to configure and simplifies many things. For example, Caddy automatically generates valid SSL certificates for the domains, which has to be configured for Traefik for each domain. + In production, of course, it makes sense to start Caddy as a service and do the configuration via Caddy's REST API. But this and the following examples are perfectly adequate for the setting shown here 😄. + +2. I deliberately use the n8n-debian image. I know that Alpine-based containers are much smaller, but it's not about storage space here. With the Debian image, I have access to a vast database of binaries that I can install and use in no time. If I were to take the Alpine container, I would probably have to compile a lot of stuff from the source code because there are much fewer packages. + diff --git a/content/posts/was-bisher-geschah.de.md b/content/posts/was-bisher-geschah.de.md new file mode 100644 index 0000000..260d061 --- /dev/null +++ b/content/posts/was-bisher-geschah.de.md @@ -0,0 +1,51 @@ +--- +title: "Was bisher geschah..." +date: 2021-03-16 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +# Was ist passiert + +Ich hatte mir zuletzt ja so einiges vor genommen (vor ein paar Monaten um genau zu sein). Unter anderem waren dabei ja die di of code und di to offloa Challenge. Nun ja, schauen wir doch mal. Der letzte Eintrag war der 19. September. Das ist jetzt fast 6 Monate her. +Wahrscheinlich würde ich sogar auf eine ziemlich stattliche Liste Ausreden kommen, wenn ich mir ein wenig Mühe gebe, aber das ist langweilig und wenig sinnvoll. Die Kurzfassung ist wahrscheinlich die, dass ich meinen Kurs über die Zeit verloren habe. Dabei habe ich nach wie vor viele der Dinge, die ich mir vorgenommen hatte auch umgesetzt. Z.B. habe ich viel Sport gemacht, ich habe sehr Zeit investiert um Rust zu lernen. Wir haben in der Firma trotz Corona Drama ein sensationelles Jahr hingelegt. Es ist also bei weitem nicht so, dass ich einfach stehengeblieben bin (Abgeshen einer kleinen Phase im November/Dezember als ich 3x hintereinander das Demon Souls Remake auf der PS5 durchgespielt habe). + +## Was habe ich daraus gelernt? + +Ich habe mich in den letzten Tagen einmal hingesetzt und habe mir mal im Detail angesehen, was ich mir vorgenommen hatte, was davon gut lief, was überhaupt nicht funktioniert hat und was einfach nur Blödsinn war. + +### Das Gute zuerst + +Bis auf oben genannten PS5 Aussetzer kann ich sagen, dass ich sehr diszipliniert war. Ich habe die Dinge, die mir wirklich wichtig waren konsequent weiterverfolgt. D.h. ich habe konsequent Sport gemacht und konsequent daran gearbeitet täglich besser im programmieren zu werden. + +### Die Kehrseite + +Wenn wir mal bei den bei den Themen Sport und Programmierung bleiben dann sieht das im Detail leider nicht so gut aus wie ich es im ersten Moment dachte: + +#### Sport +- ich habe 5 -7 Mal die Woche trainiert, 1-2 die Woche Ausdauer (5k Lauf), den Rest HIIT Training auf sehr intensivem Level +- ich habe was meine generelle Fitness angeht damit keinen Fortschritt erreicht + +Ich bin seit einigen Wochen dabei gezielt Erholungspausen einzubauen. Der Grund dafür liegt darin, dass ich im Januar das Buch Beyond Training Ben Greenfiel gelesen habe. Dadurch wurde mir vor Augen geführt, dass es vielleicht doch sinnvoll ist seinem Körper Zeit für Erholung zu gönnen. + +#### Programmierung +- Ich habe Rust gelernt und bin total happy damit. Die Sprache ist wirklich großartig und ich habe im Schnitt auch ca. 4 Tage die Woche mindestens eine Stunde damit verbracht +- Ich habe aber leider nicht mal ansatzweise soviel Fortschritt gemacht wie ich wollte. Ich habe zwar wahnsinnig viel über die Sprache gelernt und ich habe auch viele Experimente gemacht, die mir mit Sicherheit etwas gebracht haben. Ich habe mich aber nicht getraut eines der Projekte umzusetzen, die ich schon länger im Kopf habe. + +Zur Zeit habe ich hier etwas das Tempo raus genomen. Statt mich tagtäglich ein wenig damit zu beschäftigen habe ich mir 2 Abende die Woche auserkoren an denen ich mich wirklich damit befasse. D.h. ich ziehe mich für ein paar Stunden in mein Büro zurück und setze ein Projekt um. Zur Zeit ist das eher ein kleines Projekt bei dem ich eine Library schreibe um einfach mit externen APIs zu kommunizieren. + +#### Andere Experimente +- Ich habe im letzten Jahr mehrmals versucht mich mit Social Media anzufreunden (Instagram/Twitter/Mastodon) +- Ich habe versucht die oben schon erwähnten Challenges zu mitmachen + +Fangen wir mal mit Social Media an. Ich muss leider sagen, dass mich das Thema so gar nicht anhebt. Und man kann nicht sagen, dass ich es nicht versucht hätte. Ich habe es auf Instagram in ein paar Monaten auf immerhin ca. 800 Follower gebracht. Wenn ich aber ganz ehrlich bin habe ich weder Interesse, dass Leute mir folgen, noch habe ich Interesse daran anderen zu folgen. Es ist mir einfach völlig egal. Ich glaube die einzige Ausnahme, die man im weitesten Sinne noch als Social Medie bezeichnen kann ist YoutTube. Dort folge ich eine Hand voll Leute denen ich lernen kann oder die mich unterhalten. + +Die Challenges fand ich zwar der Idee her ganz lustig und spannend, aber hier habe leider ziemlich schnell das Interesse verloren. Irgendwie fand ich es langweilig und umständlich, dass ich wenn ich täglich Code schreibe dann auch noch einen Blogbeitrag oder Social Media Post dazu schreibe. Das erscheint mir irgendwie sinnlos. Die Challenge werde ich evtl. noch weiterverfolgen, mal sehen. + +Ich versuche mich gerade stattdessen mehr auf Selbstreflektion zu konzentrieren. D.h. ich schreibe und dokumentiere rgelmäßig, aber ich tue das für mich und meine eigene Gedankenwelt. + +### Und nun? +Jetzt mal abgesehen meinem heutigen Bedürfnis diesen Beitrag hier zu schreiben weiß ich noch nicht genau wie es weitergeht. Die Ideen dazu sind sehr widersprüchlich. Das geht "Ich verwerfe den Blog komplett" bis hin zu "Ich veröffneltiche meine kompletten Notizen und Gedankengänge" + + + diff --git a/content/posts/was-bisher-geschah.en.md b/content/posts/was-bisher-geschah.en.md new file mode 100644 index 0000000..d84476b --- /dev/null +++ b/content/posts/was-bisher-geschah.en.md @@ -0,0 +1,50 @@ +--- +title: "What happened until now..." +date: 2021-03-16 +draft: true +tags: ["blabla","life","misc"] +series: [""] +--- +# What happened + +I had planned a lot recently (a few months ago to be precise). Among other things, there were th of code and th to offloa Challenge. Well, let's see. The last entry was September 19th. That was almost 6 months ago. +In fact, I'd probably come up with a pretty handsome list of excuses if I tried a little, but that's boring and makes little sense. The short version is probably that I've lost my course over time. In doing so, I still implemented many of the things that I had set out to do. E.g. I did a lot of sport, I invested a lot of time to learn Rust. Despite the corona drama, we had a sensational year at the company. So it is by far not the case that I just stood still (apart from a small phase in November / December when I played through the Demon Souls Remake 3 times in a row on the PS5). + +## What did I learn from it? + +In the last few days I've sat down and looked in detail at what I had planned, what went well, what didn't work at all and what was just nonsense. + +### The good first + +Except for the PS5 dropouts mentioned above, I can say that I was very disciplined. I consistently followed up on the things that were really important to me. That means I have consistently done sport and consistently worked on getting better at programming every day. + +### The downside + +If we stick to the topics of sports and programming, then unfortunately it doesn't look as good in detail as I thought it at first: + +#### Sports +- I trained 5-7 times a week, 1-2 times a week endurance (5k run), the rest of the HIIT training at a very intense level +- I haven't made any progress in terms of my general fitness + +For a few weeks now, I've been taking targeted breaks to take a break. The reason for this is that I read the book Beyond Training by Ben Greenfiel in January. This made it clear to me that it might make sense to give your body time to relax. + +#### Programming +- I learned Rust and I'm totally happy with it. The language is really great and I spent at least an hour on average about 4 days a week +- Unfortunately, I haven't made as much progress as I wanted to. I have learned a tremendous amount about the language and I have also done a lot of experiments that have definitely brought me something. But I didn't dare to implement one of the projects that I've had in mind for a long time. + +At the moment I've slowed down a bit here. Instead of dealing with it a little every day, I have chosen 2 evenings a week when I really deal with it. That means I retire to my office for a few hours and implement a project. At the moment it's more of a small project where I'm writing a library to simply communicate with external APIs. + +#### Other experiments +- I tried to make friends with social media several times in the last year (Instagram / Twitter / Mastodon) +- I tried to take part in the challenges mentioned above + +Let's start with social media. Unfortunately, I have to say that the topic does not raise me at all. And you can't say that I didn't try. I got around 800 followers on Instagram in a few months. But if I’m completely honest I’m not interested in people following me, nor am I interested in following others. I just don't care. I think the only exception that can still be called social media in the broadest sense is YoutTube. There I follow a handful of people who I can learn from or who entertain me. + +Although I found the idea of the challenges very funny and exciting, unfortunately I lost interest here pretty quickly. Somehow I found it boring and awkward that when I write code every day, I also write a blog post or social media post about it. That seems kind of pointless to me. I may continue to pursue the Challenge, let's see. + +I'm trying to focus more on self-reflection right now instead. I.e. I write and document regularly, but I do it for myself and my own world of thoughts. + +### And now? +Now apart from my current need to write this post here, I still don't know exactly how it will go on. The ideas for this are very contradictory. This goes from "I completely discard the blog" to "I publish all of my notes and thoughts" + + diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..0a7e74a --- /dev/null +++ b/deploy.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +hugo + +cp -r ./public/img ./public/gem/ + +rsync -avz --no-perms --no-owner --no-group \ + --no-times --delete --exclude "gem" \ + public/ shodan:/opt/docker-services/m3tam3re.com/www + +rm -rf public diff --git a/resources/_gen/assets/scss/css/style.scss_26962b449d539ee5c1301a7879e5bb0e.content b/resources/_gen/assets/scss/css/style.scss_26962b449d539ee5c1301a7879e5bb0e.content new file mode 100644 index 0000000..182c5ef --- /dev/null +++ b/resources/_gen/assets/scss/css/style.scss_26962b449d539ee5c1301a7879e5bb0e.content @@ -0,0 +1,3 @@ +:root{--fi-primary: #1772ee;--fi-secondary: #919191;--fi-success: #13ce66;--fi-info: #0dcaf0;--fi-warning: #ffba00;--fi-danger: #ff4949;--fi-primary-dark: #1066db;--fi-secondary-dark: #848484;--fi-success-dark: #11b75a;--fi-info-dark: #0cb6d8;--fi-warning-dark: #e6a700;--fi-danger-dark: #ff3030;--fi-scroll-mt: calc(3.5rem + .5rem);--fi-breadcrumb-offset: 2.5rem}/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;font-display:swap;font-size:16px;line-height:1.5rem;width:100%;scroll-behavior:smooth;overflow:overlay}@media screen and (prefers-reduced-motion: reduce){html{scroll-behavior:auto}}::-webkit-scrollbar{width:0.5rem;height:0.5rem}::-webkit-scrollbar-thumb{background-color:#ba0066;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}::-webkit-scrollbar-thumb:hover{background-color:#EC008C}::selection{background-color:rgba(73,0,40,0.4)}[data-theme='dark'] ::selection{background-color:rgba(73,0,40,0.4)}body{background-color:#fff;color:#161209;scrollbar-color:auto;word-wrap:break-word;overflow-wrap:break-word}body::-webkit-scrollbar{width:0.75rem;height:0.75rem;background-color:transparent}body::-webkit-scrollbar-thumb{background-color:transparent;background-clip:content-box;border:2px solid transparent;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;border-radius:.5rem}body[data-scroll]::-webkit-scrollbar-thumb{background-color:#ba0066}body[data-theme='dark']{color:#a9a9b3;background-color:#221531}iframe{border:0;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}[role='button']{cursor:pointer}summary{cursor:pointer}abbr[title]{cursor:help;text-decoration-skip-ink:none}a,a::before,a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] a,[data-theme='dark'] a::before,[data-theme='dark'] a::after{color:#EC008C}a:active,a:hover{color:#EC008C}[data-theme='dark'] a:active,[data-theme='dark'] a:hover{color:#ba0066}#mask{background-repeat:no-repeat;background-position:center;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0);z-index:-1}.blur #mask{z-index:100;background-color:rgba(0,0,0,0.25)}img{-webkit-border-radius:2.5px;-moz-border-radius:2.5px;border-radius:2.5px}svg.icon{display:inline-block;width:1.25em;height:1em;text-align:center}svg.icon path{fill:currentColor}img.emoji{display:inline-block;height:1em;width:1em;margin:0 0.05em 0 0.1em;vertical-align:-0.1em}.fixit-icon{display:inline-block;height:1.5em;width:1.5em;line-height:1.5em;position:relative;vertical-align:text-bottom}.details .details-summary{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.details .details-summary:hover{cursor:pointer}.details i.details-icon{color:#b1b1ba;-webkit-transition:transform 0.2s ease;-moz-transition:transform 0.2s ease;-o-transition:transform 0.2s ease;transition:transform 0.2s ease}[data-theme='dark'] .details i.details-icon{color:#909092}.details .details-content{max-height:0;overflow-y:hidden;-webkit-transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s;-moz-transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s;-o-transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s;transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s}.details.open .details-summary{-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.details.open i.details-icon{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.details.open .details-content{max-height:100%;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s;-moz-transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s;-o-transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s;transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s}.cc-window.cc-banner .cc-btn{color:#161209}.cc-window.cc-banner .cc-btn:hover,.cc-window.cc-banner .cc-btn:focus{background-color:#ccc}[data-theme='dark'] .cc-window.cc-banner .cc-btn{color:#161209}[data-theme='dark'] .cc-window.cc-banner .cc-btn:hover,[data-theme='dark'] .cc-window.cc-banner .cc-btn:focus{background-color:#fff}.fixed-button{position:fixed;right:1.5rem;font-size:1rem;line-height:1.5rem;padding:0.5rem 0.625rem;color:#b1b1ba;background-color:#f8f8f8;z-index:100;-webkit-border-radius:1.25rem;-moz-border-radius:1.25rem;border-radius:1.25rem;-webkit-transition:color 0.4s ease;-moz-transition:color 0.4s ease;-o-transition:color 0.4s ease;transition:color 0.4s ease}.blur .fixed-button{-webkit-filter:blur(1.5px);filter:blur(1.5px)}.fixed-button:hover,.fixed-button:active{color:#161209;cursor:pointer}.fixed-button:active,.fixed-button:focus,.fixed-button:hover{outline:none}[data-theme='dark'] .fixed-button{color:#909092;background-color:#0d132c}[data-theme='dark'] .fixed-button:hover,[data-theme='dark'] .fixed-button:active{color:#a9a9b3}.back-to-top{bottom:1.5rem}.view-comments{bottom:4.5rem}@keyframes octocat-wave{0%,100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0)}20%,60%{-webkit-transform:rotate(-25deg);-ms-transform:rotate(-25deg);-o-transform:rotate(-25deg);transform:rotate(-25deg)}40%,80%{-webkit-transform:rotate(10deg);-ms-transform:rotate(10deg);-o-transform:rotate(10deg);transform:rotate(10deg)}}.github-corner{position:fixed;top:0;z-index:200}.github-corner :hover .octo-arm{animation:octocat-wave 560ms ease-in-out}.github-corner svg{width:3.5rem;height:3.5rem;border:0;color:#fff;fill:#0d132c}[data-theme='dark'] .github-corner svg{color:#000;fill:#f8f8f8}.github-corner.left{left:0}.github-corner.left svg{-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.github-corner.right{right:0}.noscript-warning{background-color:var(--fi-danger);color:white;font-size:1rem;font-weight:bold;position:fixed;text-align:center;left:0;bottom:0;width:100%;z-index:200}[data-theme='dark'] .noscript-warning{background-color:var(--fi-danger-dark)}.reading-progress-bar{--progress: 0;height:var(--progress-h, 2px);width:var(--progress);background-color:var(--bg-progress, var(--fi-info));position:fixed;z-index:200}[data-theme="dark"] .reading-progress-bar{background-color:var(--bg-progress-dark, var(--fi-info-dark))}.typeit{--ti-cursor-font-family: system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;--ti-cursor-font-size: 16px;--ti-cursor-font-style: normal;--ti-cursor-font-weight: 400;--ti-cursor-line-height: 1.5rem;--ti-cursor-color: #161209;--ti-cursor-transform: translateX(0)}.typeit .highlight{padding:0.375rem;font-size:0.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;word-break:break-all;white-space:pre-wrap}[data-theme='dark'] .typeit{--ti-cursor-color: #a9a9b3}.wrapper{display:flex;flex-direction:column;min-height:100vh;width:100%}.wrapper main{flex:1 0 auto}.wrapper main aside{flex:1;padding-inline:0.5rem}.wrapper main aside:first-child{order:2}.wrapper main.container{display:flex;align-items:flex-start;justify-content:center;padding:0 1rem}.wrapper main.container.container-reverse{flex-direction:row-reverse}.wrapper main.container:has(.home:not(.posts)){align-items:center}header{width:100%;background-color:#f8f8f8;z-index:200;-webkit-transition:box-shadow 0.3s ease;-moz-transition:box-shadow 0.3s ease;-o-transition:box-shadow 0.3s ease;transition:box-shadow 0.3s ease}[data-theme='dark'] header{background-color:#0d132c}header:hover{-webkit-box-shadow:0 0 1.5rem 0 rgba(0,0,0,0.1);box-shadow:0 0 1.5rem 0 rgba(0,0,0,0.1)}[data-theme='dark'] header:hover{-webkit-box-shadow:0 0 1.5rem 0 rgba(255,255,255,0.1);box-shadow:0 0 1.5rem 0 rgba(255,255,255,0.1)}.header-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%}.header-title{font-family:system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;margin-right:0.5rem;min-width:10%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-flex:10;flex:10}.header-title .logo{min-height:1.5em;height:1.5em;vertical-align:middle;width:auto}.header-title .header-title-text{margin-left:0.25rem;margin-right:0.25rem}.header-title .header-subtitle{margin-left:0.25rem;font-size:0.6em}.menu{margin:0;padding:0}.menu .menu-item{list-style:none}.menu .menu-item .dropdown-icon{margin-left:0.25rem;font-size:.875em;color:#161209}[data-theme='dark'] .menu .menu-item .dropdown-icon{color:#a9a9b3}.menu .menu-item .dropdown-icon.open::before{content:"\f078"}.menu .menu-item.active>.menu-link,.menu .menu-item.active>.nested-item>.menu-link{font-weight:bold;color:#EC008C}[data-theme='dark'] .menu .menu-item.active>.menu-link,[data-theme='dark'] .menu .menu-item.active>.nested-item>.menu-link{color:#ba0066}.menu .menu-item.language-switch,.menu .menu-item.theme-switch{cursor:pointer}.search{position:relative}.search input{color:transparent;box-sizing:border-box;height:2.5rem;width:1.25rem;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;border-radius:.5rem;border:none;outline:none;background-color:transparent;vertical-align:baseline !important;-webkit-transition:width 0.3s ease;-moz-transition:width 0.3s ease;-o-transition:width 0.3s ease;transition:width 0.3s ease}.search input::-webkit-input-placeholder{color:rgba(0,0,0,0)}.search input:-moz-placeholder{color:rgba(0,0,0,0)}.search input::-moz-placeholder{color:rgba(0,0,0,0)}.search input:-ms-input-placeholder{color:rgba(0,0,0,0)}.search input::placeholder{color:rgba(0,0,0,0)}.search .search-button{margin:0;position:absolute;left:auto;right:1rem}.search .search-toggle{left:0.5rem;right:auto}#header-desktop.open .search .search-toggle{left:1rem}.search .search-loading{display:none}.search .search-clear{display:none}.open .search input,.search.mobile input{color:#161209;background-color:#e9e9e9;padding:0 2rem 0 2rem}[data-theme='dark'] .open .search input,[data-theme='dark'] .search.mobile input{color:#8e8e9b;background-color:#070b18}[data-theme='dark'] .open .search input::-webkit-input-placeholder,[data-theme='dark'] .search.mobile input::-webkit-input-placeholder{color:#909092}[data-theme='dark'] .open .search input:-moz-placeholder,[data-theme='dark'] .search.mobile input:-moz-placeholder{color:#909092}[data-theme='dark'] .open .search input::-moz-placeholder,[data-theme='dark'] .search.mobile input::-moz-placeholder{color:#909092}[data-theme='dark'] .open .search input:-ms-input-placeholder,[data-theme='dark'] .search.mobile input:-ms-input-placeholder{color:#909092}[data-theme='dark'] .open .search input::placeholder,[data-theme='dark'] .search.mobile input::placeholder{color:#909092}.open .search input::-webkit-input-placeholder,.search.mobile input::-webkit-input-placeholder{color:#b1b1ba}.open .search input:-moz-placeholder,.search.mobile input:-moz-placeholder{color:#b1b1ba}.open .search input::-moz-placeholder,.search.mobile input::-moz-placeholder{color:#b1b1ba}.open .search input:-ms-input-placeholder,.search.mobile input:-ms-input-placeholder{color:#b1b1ba}.open .search input::placeholder,.search.mobile input::placeholder{color:#b1b1ba}.open .search .search-button,.search.mobile .search-button{color:#b1b1ba}[data-theme='dark'] .open .search .search-button,[data-theme='dark'] .search.mobile .search-button{color:#909092}.open .search .search-clear:hover,.search.mobile .search-clear:hover{color:#ff6b6b}.open .search .search-toggle:hover,.search.mobile .search-toggle:hover{cursor:default}.theme-switch i{-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);-o-transform:rotate(225deg);transform:rotate(225deg);-webkit-transition:transform 0.4s ease;-moz-transition:transform 0.4s ease;-o-transition:transform 0.4s ease;transition:transform 0.4s ease}.theme-switch:hover i{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}#header-desktop{display:block;position:sticky;top:0;height:3.5rem;line-height:3.5rem;box-sizing:border-box}[data-header-desktop='normal'] #header-desktop{position:static}#header-desktop nav{overflow:hidden;white-space:nowrap}#header-desktop .header-wrapper{padding:0 2rem 0 MAX(10vh, 3.5rem);height:100%}#header-desktop .header-wrapper[data-github-corner='right']{padding-right:3.5rem}#header-desktop .header-wrapper .header-title{font-size:1.5rem;height:100%}#header-desktop .header-wrapper .menu{display:flex;flex-direction:row;flex-wrap:nowrap;float:right}#header-desktop .header-wrapper .menu>.menu-item:hover .sub-menu{display:block;-webkit-transform:translateX(-0.5rem);-ms-transform:translateX(-0.5rem);-o-transform:translateX(-0.5rem);transform:translateX(-0.5rem)}#header-desktop .header-wrapper .menu>.menu-item.language-switch:hover .sub-menu{-webkit-transform:translateX(calc(1.75rem - 100%));-ms-transform:translateX(calc(1.75rem - 100%));-o-transform:translateX(calc(1.75rem - 100%));transform:translateX(calc(1.75rem - 100%))}#header-desktop .header-wrapper .menu .menu-item{padding:0 0.5rem}#header-desktop .header-wrapper .menu .menu-item.delimiter{width:0;margin:0.125rem 0.25rem;padding:0;border-left:1px dashed #dadade}[data-theme='dark'] #header-desktop .header-wrapper .menu .menu-item.delimiter{border-left-color:#6a6a6c}#header-desktop .header-wrapper .menu .sub-menu{position:absolute;margin:0;padding:0.25rem 0;display:none;top:calc(3.5rem - 0.75rem);border-radius:5px;border:1px solid #ba0066;background-color:#f8f8f8;-webkit-transition:box-shadow 0.3s ease;-moz-transition:box-shadow 0.3s ease;-o-transition:box-shadow 0.3s ease;transition:box-shadow 0.3s ease;-webkit-box-shadow:0 0 1.5rem 0 rgba(0,0,0,0.1);box-shadow:0 0 1.5rem 0 rgba(0,0,0,0.1)}[data-theme='dark'] #header-desktop .header-wrapper .menu .sub-menu{background-color:#0d132c;border-color:#EC008C;-webkit-box-shadow:0 0 1.5rem 0 rgba(255,255,255,0.1);box-shadow:0 0 1.5rem 0 rgba(255,255,255,0.1)}#header-desktop .header-wrapper .menu .sub-menu .menu-item{height:1.75rem;line-height:1.75rem;max-width:15rem;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}#header-desktop.open .header-wrapper .menu .menu-item.search input{width:24rem}#header-mobile{display:none;position:sticky;top:0;min-height:3.5rem;line-height:3.5rem}[data-header-mobile='normal'] #header-mobile{position:static}#header-mobile .header-container{padding:0;margin:0}#header-mobile .header-container .header-wrapper{padding:0 1rem;font-size:1.125rem;-webkit-transition:margin-top 0.3s ease;-moz-transition:margin-top 0.3s ease;-o-transition:margin-top 0.3s ease;transition:margin-top 0.3s ease}#header-mobile .header-container .header-wrapper .header-title{font-size:1.5rem;max-width:80%}#header-mobile .header-container .header-wrapper .menu-toggle{line-height:4rem;cursor:pointer;-webkit-transition:width 0.3s ease;-moz-transition:width 0.3s ease;-o-transition:width 0.3s ease;transition:width 0.3s ease}#header-mobile .header-container .header-wrapper .menu-toggle span{display:block;background:#161209;width:1.5rem;height:2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-transition:all 0.3s ease-in-out;-moz-transition:all 0.3s ease-in-out;-o-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}[data-theme='dark'] #header-mobile .header-container .header-wrapper .menu-toggle span{background:#a9a9b3}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(1){margin-bottom:0.5rem}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(3){margin-top:0.5rem}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(1){-webkit-transform:rotate(45deg) translate(0.4rem, 0.5rem);-ms-transform:rotate(45deg) translate(0.4rem, 0.5rem);-o-transform:rotate(45deg) translate(0.4rem, 0.5rem);transform:rotate(45deg) translate(0.4rem, 0.5rem)}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(2){opacity:0}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(3){-webkit-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-ms-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-o-transform:rotate(-45deg) translate(0.4rem, -0.5rem);transform:rotate(-45deg) translate(0.4rem, -0.5rem)}#header-mobile .header-container .menu{background:#f8f8f8;border-top:2px solid #ba0066;display:none;overflow-y:overlay;max-height:70vh;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}[data-theme='dark'] #header-mobile .header-container .menu{-webkit-box-shadow:0 0.125rem 0.25rem rgba(255,255,255,0.1);box-shadow:0 0.125rem 0.25rem rgba(255,255,255,0.1)}#header-mobile .header-container .menu::-webkit-scrollbar{width:0}#header-mobile .header-container .menu .search-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:.5rem 1rem;line-height:2.5rem;position:sticky;top:0;background-color:#f8f8f8;z-index:50}[data-theme='dark'] #header-mobile .header-container .menu .search-wrapper{background-color:#0d132c}#header-mobile .header-container .menu .search{flex-grow:10}#header-mobile .header-container .menu .search .algolia-autocomplete,#header-mobile .header-container .menu .search input{width:100%}#header-mobile .header-container .menu .search-loading,#header-mobile .header-container .menu .search-clear{right:0.5rem}#header-mobile .header-container .menu .search-button{top:0}#header-mobile .header-container .menu .search-cancel{display:none;margin-left:0.75rem}#header-mobile .header-container .menu .menu-item{display:block;position:relative;line-height:2.5rem;padding:0 1rem}#header-mobile .header-container .menu .menu-item:not(.menu-system):hover{background-color:#fff}[data-theme='dark'] #header-mobile .header-container .menu .menu-item:not(.menu-system):hover{background-color:#131c40}#header-mobile .header-container .menu .menu-item .menu-link{display:block;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;-webkit-flex:4;flex:4}#header-mobile .header-container .menu .menu-item .nested-item{display:flex;justify-content:space-between;align-items:center}#header-mobile .header-container .menu .menu-item .nested-item .menu-link{max-width:80%}#header-mobile .header-container .menu .menu-system{display:flex;justify-content:center;gap:0.25rem;position:sticky;bottom:0;line-height:2.5rem;padding:0 1rem;background-color:#f8f8f8}[data-theme='dark'] #header-mobile .header-container .menu .menu-system{background-color:#0d132c}#header-mobile .header-container .menu .menu-system .menu-system-item{padding-inline:0.5rem}#header-mobile .header-container .menu .menu-system .language-switch{position:relative}#header-mobile .header-container .menu .menu-system .language-switch .language-select{position:absolute;opacity:0;left:0;top:0;width:100%;height:100%}#header-mobile .header-container .menu .sub-menu{padding-left:0;display:none}#header-mobile .header-container .menu .sub-menu.open{display:block}#header-mobile .header-container .menu .sub-menu .menu-item:hover{background-color:#e7e7ea}[data-theme='dark'] #header-mobile .header-container .menu .sub-menu .menu-item:hover{background-color:#5d5d5f}#header-mobile .header-container .menu.active{display:block}[data-theme='dark'] #header-mobile .header-container .menu{background:#0d132c;border-top-color:#EC008C}#header-mobile.open .header-wrapper{margin-top:-3.5rem}#header-mobile.open .menu{padding-top:0;border-top:none}#header-mobile.open .menu .menu-item{display:none}#header-mobile.open .menu .search-cancel{display:inline}.search-dropdown{position:fixed;top:3.5rem;z-index:200;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}[data-theme='dark'] .search-dropdown{-webkit-box-shadow:0 0.125rem 0.25rem rgba(255,255,255,0.1);box-shadow:0 0.125rem 0.25rem rgba(255,255,255,0.1)}.search-dropdown.desktop{right:2rem;width:30rem}.search-dropdown.mobile{right:0;width:100%}.search-dropdown .dropdown-menu{right:0 !important;background-color:#fff}[data-theme='dark'] .search-dropdown .dropdown-menu{background-color:#221531}.search-dropdown .dropdown-menu .suggestions{overflow-y:auto;max-height:calc(100vh - 3.5rem)}.search-dropdown .dropdown-menu .suggestions .suggestion{padding:0.75rem 1rem}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-title{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;font-weight:bold;max-width:75%}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{font-size:0.875rem;float:right;text-align:right;color:#b1b1ba}[data-theme='dark'] .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{color:#909092}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{line-height:1.25rem;display:-moz-box;display:-webkit-box;display:box;-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;overflow-wrap:break-word;color:#b1b1ba}[data-theme='dark'] .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{color:#909092}.search-dropdown .dropdown-menu .suggestions .suggestion em{font-style:normal;background-color:rgba(73,0,40,0.4)}[data-theme='dark'] .search-dropdown .dropdown-menu .suggestions .suggestion em{background-color:rgba(73,0,40,0.4)}.search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#e6ebf1}[data-theme='dark'] .search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#131c40}.search-dropdown .dropdown-menu .suggestions .suggestion:hover{cursor:pointer}.search-dropdown .dropdown-menu .search-empty{padding:1rem;text-align:center}.search-dropdown .dropdown-menu .search-empty .search-query{font-weight:bold}[data-theme='dark'] .search-dropdown .dropdown-menu .search-empty .search-query{color:#ddd}.search-dropdown .dropdown-menu .search-footer{padding:0.5rem 1rem;float:right;font-size:0.8rem;color:#b1b1ba}.search-dropdown .dropdown-menu .search-footer [data-theme='dark']{color:#909092}.search-dropdown .dropdown-menu .search-footer a,.search-dropdown .dropdown-menu .search-footer a::before,.search-dropdown .dropdown-menu .search-footer a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .search-dropdown .dropdown-menu .search-footer a,[data-theme='dark'] .search-dropdown .dropdown-menu .search-footer a::before,[data-theme='dark'] .search-dropdown .dropdown-menu .search-footer a::after{color:#EC008C}.search-dropdown .dropdown-menu .search-footer a:active,.search-dropdown .dropdown-menu .search-footer a:hover{color:#EC008C}[data-theme='dark'] .search-dropdown .dropdown-menu .search-footer a:active,[data-theme='dark'] .search-dropdown .dropdown-menu .search-footer a:hover{color:#ba0066}.search-dropdown .dropdown-menu .search-footer a{font-size:1rem}.breadcrumb-container{padding-inline:1rem;font-size:0.75rem;z-index:100}.breadcrumb-container.sticky{position:sticky;top:3.5rem}.breadcrumb-container .breadcrumb{display:flex;flex-wrap:wrap;padding:0.5rem 0;margin:0 auto;list-style:none;border-bottom:1px inset #ba0066;background-color:#fff}[data-theme='dark'] .breadcrumb-container .breadcrumb{border-bottom-color:#EC008C;background-color:#221531}.breadcrumb-container .breadcrumb .breadcrumb-item{display:flex}.breadcrumb-container .breadcrumb .breadcrumb-item+.breadcrumb-item::before{content:"/";display:inline-block;padding-inline:0.5rem;color:#b1b1ba}[data-theme='dark'] .breadcrumb-container .breadcrumb .breadcrumb-item+.breadcrumb-item::before{color:#909092}footer{height:auto;width:100%;text-align:center;line-height:1.25rem;padding:1rem 0}footer .footer-container{display:flex;flex-direction:column;font-size:0.875rem}footer .footer-container .footer-line{width:100%}footer .footer-container .footer-line .footer-divider:not(:first-child)::before{content:'|';margin-left:0.25rem;margin-right:0.25rem}footer .footer-container .footer-line .fixit-icon{top:0.25em}footer .footer-container .footer-line .animate-icon{color:#dc143c;animation:icon-animate 1.33s ease-in-out infinite}footer .footer-container .footer-line .run-times{font-variant-numeric:tabular-nums lining-nums}.blur footer{-webkit-filter:blur(1.5px);filter:blur(1.5px)}@keyframes icon-animate{0%,100%{-webkit-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%,30%{-webkit-transform:scale(0.9);-ms-transform:scale(0.9);-o-transform:scale(0.9);transform:scale(0.9)}20%,40%,60%,80%{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}50%,70%{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}}.pagination{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap;list-style:none;white-space:nowrap;width:100%;padding:1rem 0}.pagination a{font-size:0.8rem;color:#bfbfbf;letter-spacing:0.1rem;font-weight:700;padding:5px 5px;text-decoration:none;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s}[data-theme='dark'] .pagination a{color:#b1b1ba}.pagination li{padding:5px;margin:0 10px;box-sizing:border-box;position:relative;display:inline}.pagination li.disabled{display:none}.pagination li:hover a{color:#ba0066}[data-theme='dark'] .pagination li:hover a{color:#EC008C}.pagination li::before,.pagination li::after{position:absolute;content:'';width:0;height:3px;background:#ba0066;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s;bottom:0px}[data-theme='dark'] .pagination li::before,[data-theme='dark'] .pagination li::after{background:#EC008C}.pagination li::before{left:50%}.pagination li::after{right:50%}.pagination li:hover::before,.pagination li:hover::after{width:50%}.pagination li.active a{color:#ba0066}[data-theme='dark'] .pagination li.active a{color:#EC008C}.pagination li.active::before,.pagination li.active::after{width:50%}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-start{text-align:left !important}.text-end{text-align:right !important}.text-center{text-align:center !important}.d-none{display:none !important}.d-none-desktop{display:none}.d-none-mobile{display:block}.ms-1,.mx-1{margin-left:0.25rem !important}.me-1,.mx-1{margin-right:0.25rem !important}.ps-1,.px-1{padding-left:0.25rem !important}.pe-1,.px-1{padding-right:0.25rem !important}.text-primary{color:#1772ee !important}[data-theme='dark'] .text-primary{color:#1066db !important}.text-secondary,.breadcrumb-container .breadcrumb .breadcrumb-item.active{color:#919191 !important}[data-theme='dark'] .text-secondary,[data-theme='dark'] .breadcrumb-container .breadcrumb .breadcrumb-item.active,.breadcrumb-container .breadcrumb [data-theme='dark'] .breadcrumb-item.active{color:#848484 !important}.text-success{color:#13ce66 !important}[data-theme='dark'] .text-success{color:#11b75a !important}.text-info{color:#0dcaf0 !important}[data-theme='dark'] .text-info{color:#0cb6d8 !important}.text-warning{color:#ffba00 !important}[data-theme='dark'] .text-warning{color:#e6a700 !important}.text-danger{color:#ff4949 !important}[data-theme='dark'] .text-danger{color:#ff3030 !important}.order-first{order:-1 !important}.order-0{order:0 !important}.order-1{order:1 !important}.order-2{order:2 !important}.order-3{order:3 !important}.order-4{order:4 !important}.order-5{order:5 !important}.order-last{order:6 !important}.variant-numeric{font-variant-numeric:tabular-nums lining-nums}@keyframes fi-pulse{from{-webkit-transform:scale3d(1, 1, 1);-ms-transform:scale3d(1, 1, 1);-o-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}50%{-webkit-transform:scale3d(1.05, 1.05, 1.05);-ms-transform:scale3d(1.05, 1.05, 1.05);-o-transform:scale3d(1.05, 1.05, 1.05);transform:scale3d(1.05, 1.05, 1.05)}to{-webkit-transform:scale3d(1, 1, 1);-ms-transform:scale3d(1, 1, 1);-o-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}}.animate__pulse{-webkit-animation-name:fi-pulse !important;animation-name:fi-pulse !important}.page{position:relative}.page .content [id]{scroll-margin-top:var(--fi-scroll-mt)}.blur .page{-webkit-filter:blur(1.5px);filter:blur(1.5px)}.toc .toc-title{font-size:1.2rem;font-weight:bold;text-transform:uppercase}.toc .toc-content{font-size:1rem}.toc .toc-content ul{text-indent:-0.8rem;padding-left:0.8rem;list-style:none}.toc .toc-content ul a:first-child::before{content:'|';font-weight:bolder;margin-right:0.5rem;color:#ba0066}[data-theme='dark'] .toc .toc-content ul a:first-child::before{color:#EC008C}.toc .toc-content ul ul{padding-left:1.5rem}.toc ruby{background:#f6f8fa}.toc ruby rt{color:#b1b1ba}[data-theme='dark'] .toc ruby{background:#0d132c}[data-theme='dark'] .toc ruby rt{color:#909092}#toc-auto{display:block;position:sticky;top:var(--fi-scroll-mt);box-sizing:border-box;visibility:hidden;z-index:100;word-wrap:break-word;overflow-wrap:break-word}.blur #toc-auto{-webkit-filter:blur(1.5px);filter:blur(1.5px)}[data-header-desktop='normal'] #toc-auto{--fi-scroll-mt: .5rem}#toc-auto .toc-title{margin:0.5rem 0;cursor:pointer;-webkit-user-select:none !important;-moz-user-select:none !important;user-select:none !important}#toc-auto .toc-title::before{content:'|';font-weight:bolder;margin-right:0.5rem;color:#ba0066}[data-theme='dark'] #toc-auto .toc-title::before{color:#EC008C}#toc-auto .toc-title i.toc-icon{-webkit-transition:transform 0.2s ease;-moz-transition:transform 0.2s ease;-o-transition:transform 0.2s ease;transition:transform 0.2s ease}#toc-auto.toc-hidden i.toc-icon{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transition:transform 0.2s ease;-moz-transition:transform 0.2s ease;-o-transition:transform 0.2s ease;transition:transform 0.2s ease}#toc-auto .toc-content{overflow-y:scroll;max-height:calc(100vh - 7rem)}#toc-auto .toc-content::-webkit-scrollbar{width:0}#toc-auto .toc-content.always-active ul{display:block}#toc-auto .toc-content>nav>ul{margin:0}#toc-auto .toc-content ul ul{display:none}#toc-auto .toc-content ul .has-active>ul{display:block}#toc-auto .toc-content a.active{font-weight:bold;color:#ba0066}[data-theme='dark'] #toc-auto .toc-content a.active{color:#EC008C}#toc-auto .toc-content a.active::before{color:#EC008C}[data-theme='dark'] #toc-auto .toc-content a.active::before{color:#ba0066}#toc-static{display:none;margin:0.8rem 0}#toc-static[data-kept='true']{display:block}#toc-static .toc-title{display:flex;justify-content:space-between;line-height:2em;padding:0 0.75rem;background:#ecf0f5}[data-theme='dark'] #toc-static .toc-title{background:#060914}#toc-static .toc-content{background-color:#f6f8fa}#toc-static .toc-content>nav>ul{margin:0;padding:0.4rem 1rem 0.4rem 1.8rem}[data-theme='dark'] #toc-static .toc-content{background-color:#0d132c}#toc-static.open .toc-title{background:#e2e9ef}[data-theme='dark'] #toc-static.open .toc-title{background:#0a0e20}.fixit-decryptor-container{font-family:system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;text-align:center;margin-top:3rem}.fixit-encryptor-shortcode .fixit-decryptor-container{margin-top:1rem}.fixit-decryptor-container #fixit-decryptor-input,.fixit-decryptor-container .fixit-decryptor-input,.fixit-decryptor-container .fixit-encryptor-btn{display:inline-block;box-sizing:border-box;outline:none;color:#161209;border:1px solid #6e003c;border-radius:5px;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;-o-transition:all 0.1s ease-out;transition:all 0.1s ease-out;box-shadow:0px 0px 5px 0px #6e003c}.fixit-decryptor-container #fixit-decryptor-input:active,.fixit-decryptor-container #fixit-decryptor-input:focus,.fixit-decryptor-container #fixit-decryptor-input:hover,.fixit-decryptor-container .fixit-decryptor-input:active,.fixit-decryptor-container .fixit-decryptor-input:focus,.fixit-decryptor-container .fixit-decryptor-input:hover,.fixit-decryptor-container .fixit-encryptor-btn:active,.fixit-decryptor-container .fixit-encryptor-btn:focus,.fixit-decryptor-container .fixit-encryptor-btn:hover{color:#cd007a;border-color:#EC008C;box-shadow:0px 0px 5px 0px #ff53b9}[data-theme='dark'] .fixit-decryptor-container #fixit-decryptor-input:active,[data-theme='dark'] .fixit-decryptor-container #fixit-decryptor-input:focus,[data-theme='dark'] .fixit-decryptor-container #fixit-decryptor-input:hover,[data-theme='dark'] .fixit-decryptor-container .fixit-decryptor-input:active,[data-theme='dark'] .fixit-decryptor-container .fixit-decryptor-input:focus,[data-theme='dark'] .fixit-decryptor-container .fixit-decryptor-input:hover,[data-theme='dark'] .fixit-decryptor-container .fixit-encryptor-btn:active,[data-theme='dark'] .fixit-decryptor-container .fixit-encryptor-btn:focus,[data-theme='dark'] .fixit-decryptor-container .fixit-encryptor-btn:hover{color:#d90077;border-color:#ba0066;box-shadow:0px 0px 5px 0px #54002e}[data-theme='dark'] .fixit-decryptor-container #fixit-decryptor-input,[data-theme='dark'] .fixit-decryptor-container .fixit-decryptor-input,[data-theme='dark'] .fixit-decryptor-container .fixit-encryptor-btn{color:#a9a9b3;border-color:#ff3aaf;box-shadow:0px 0px 5px 0px #ff3aaf}.fixit-decryptor-container #fixit-decryptor-input,.fixit-decryptor-container .fixit-decryptor-input{width:clamp(50%, 400px, 100%);height:3rem;padding-left:1rem;padding-right:1rem;background-color:#fff}[data-theme='dark'] .fixit-decryptor-container #fixit-decryptor-input,[data-theme='dark'] .fixit-decryptor-container .fixit-decryptor-input{background-color:#221531}.fixit-decryptor-container .fixit-encryptor-btn{cursor:pointer;-webkit-transition:all 0.1s ease-out;-moz-transition:all 0.1s ease-out;-o-transition:all 0.1s ease-out;transition:all 0.1s ease-out;padding:0.6rem 1rem;background-color:#f8f8f8}[data-theme='dark'] .fixit-decryptor-container .fixit-encryptor-btn{background-color:#0d132c}.single .single-title{padding:1rem 0 0.5rem;margin:0;font-size:1.6rem;font-weight:bold;line-height:140%}.single .single-title .icon-repost{color:var(--fi-success);display:inline-block;width:max-content;margin-right:0.25rem}[data-theme='dark'] .single .single-title .icon-repost{color:var(--fi-success-dark)}.single .single-subtitle{margin:0.5rem 0;font-size:1.2rem;font-weight:normal;line-height:100%}.single .post-meta{font-size:0.875rem;color:#b1b1ba}.single .post-meta span{display:inline-block}[data-theme='dark'] .single .post-meta{color:#909092}.single .post-meta a,.single .post-meta a::before,.single .post-meta a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .post-meta a,[data-theme='dark'] .single .post-meta a::before,[data-theme='dark'] .single .post-meta a::after{color:#EC008C}.single .post-meta a:active,.single .post-meta a:hover{color:#EC008C}[data-theme='dark'] .single .post-meta a:active,[data-theme='dark'] .single .post-meta a:hover{color:#ba0066}.single .post-meta .author{font-size:1.05rem}.single .post-meta .author img.avatar{width:1.3rem;height:1.3rem;border-radius:50%;vertical-align:text-bottom;border:0.25px solid #ba0066;box-sizing:border-box;object-position:center;-o-object-fit:cover;object-fit:cover;font-family:"object-fit: cover;"}[data-theme='dark'] .single .post-meta .author img.avatar{border-color:#EC008C}.single .featured-image{margin:0.5rem 0 1rem 0}.single .featured-image img{display:block;width:100%;max-width:100%;height:auto;margin:0 auto;overflow:hidden}.single #content[data-end-flag]:not([data-password])::after{content:attr(data-end-flag);display:block;text-align:center;color:#b1b1ba;font-size:15px;padding:5px}.single .content>h1,.single .content>h2{font-size:1.5rem}.single .content>h1 code,.single .content>h2 code{font-size:1.25rem}.single .content>h3{font-size:1.375rem}.single .content>h3 code{font-size:1.125rem}.single .content>h4{font-size:1.25rem}.single .content>h4 code{font-size:1rem}.single .content>h5{font-size:1.125rem}.single .content>h6{font-size:1rem}.single .content h2,.single .content h3,.single .content h4,.single .content h5,.single .content h6{font-weight:bold;margin:1.2rem 0}[data-theme='dark'] .single .content h2,[data-theme='dark'] .single .content h3,[data-theme='dark'] .single .content h4,[data-theme='dark'] .single .content h5,[data-theme='dark'] .single .content h6{font-weight:bolder}.single .content>h2>.header-mark::before,.single .content>h3>.header-mark::before,.single .content>h4>.header-mark::before,.single .content>h5>.header-mark::before,.single .content>h6>.header-mark::before{content:'|';margin-right:0.3125rem;color:#ba0066}[data-theme='dark'] .single .content>h2>.header-mark::before,[data-theme='dark'] .single .content>h3>.header-mark::before,[data-theme='dark'] .single .content>h4>.header-mark::before,[data-theme='dark'] .single .content>h5>.header-mark::before,[data-theme='dark'] .single .content>h6>.header-mark::before{color:#EC008C}.single .content>h2>.header-mark::before{content:'#'}.single .content p{margin:0.5rem 0}.single .content b,.single .content strong{font-weight:bold}[data-theme='dark'] .single .content b,[data-theme='dark'] .single .content strong{color:#ddd}.single .content a,.single .content a::before,.single .content a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .content a,[data-theme='dark'] .single .content a::before,[data-theme='dark'] .single .content a::after{color:#EC008C}.single .content a:active,.single .content a:hover{color:#EC008C}[data-theme='dark'] .single .content a:active,[data-theme='dark'] .single .content a:hover{color:#ba0066}.single .content a{white-space:normal;word-wrap:break-word;overflow-wrap:break-word}[data-theme='dark'] .single .content a b,[data-theme='dark'] .single .content a strong{color:#EC008C}.single .content [data-theme='dark'] a:hover b,.single .content [data-theme='dark'] a:hover strong{color:#ba0066}.single .content ul,.single .content ol{margin:0.5rem 0;padding-left:2.5rem}.single .content ul{list-style-type:disc}.single .content ruby{background:#f6f8fa}.single .content ruby rt{color:#b1b1ba}[data-theme='dark'] .single .content ruby{background:#0d132c}[data-theme='dark'] .single .content ruby rt{color:#909092}.single .content .table-wrapper{overflow-x:auto}.single .content .table-wrapper::-webkit-scrollbar{background-color:#f6f8fa}[data-theme='dark'] .single .content .table-wrapper::-webkit-scrollbar{background-color:#0d132c}.single .content .table-wrapper>table{width:100%;max-width:100%;margin:0.625rem 0;border-spacing:0;background:#f6f8fa;border-collapse:collapse}[data-theme='dark'] .single .content .table-wrapper>table{background:#0d132c}.single .content .table-wrapper>table thead{background:#EC008C}[data-theme='dark'] .single .content .table-wrapper>table thead{background-color:#0d132c}.single .content .table-wrapper>table:not([class]) tbody tr:nth-child(odd){background:#eff2f6}[data-theme='dark'] .single .content .table-wrapper>table:not([class]) tbody tr:nth-child(odd){background-color:#101837}.single .content .table-wrapper>table:not([class]) tbody tr:hover{background:#e7edf2}[data-theme='dark'] .single .content .table-wrapper>table:not([class]) tbody tr:hover{background-color:#131c42}.single .content .table-wrapper>table th,.single .content .table-wrapper>table td{padding:0.3rem 1rem;border:1px solid #e20086}[data-theme='dark'] .single .content .table-wrapper>table th,[data-theme='dark'] .single .content .table-wrapper>table td{border-color:#0b1024}.single .content img{max-width:100%;min-height:1em}.single .content img:not([data-h]){height:auto}.single .content img.version{height:1.25em;vertical-align:text-bottom}.single .content svg{max-width:100%}.single .content figure{margin:0.5rem;text-align:center}.single .content figure .image-caption:not(:empty){min-width:20%;max-width:80%;display:inline-block;padding:0.5rem;margin:0 auto;font-size:0.875rem;color:#969696}.single .content figure img{display:block;margin:0 auto;overflow:hidden}.single .content figure img:not([width]){width:100%}.single .content blockquote{display:block;border-left:0.25em solid #ba0066;color:#697681;padding:0 1em;margin:1rem 0}.single .content blockquote ul,.single .content blockquote ol{padding-left:1.5em}[data-theme='dark'] .single .content blockquote{color:#2d333b;border-left-color:#EC008C}.single .content blockquote a,.single .content blockquote a::before,.single .content blockquote a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .content blockquote a,[data-theme='dark'] .single .content blockquote a::before,[data-theme='dark'] .single .content blockquote a::after{color:#EC008C}.single .content blockquote a:active,.single .content blockquote a:hover{color:#EC008C}[data-theme='dark'] .single .content blockquote a:active,[data-theme='dark'] .single .content blockquote a:hover{color:#ba0066}.single .content .footnotes{color:#b1b1ba}[data-theme='dark'] .single .content .footnotes{color:#909092}.single .content .footnotes p{margin:0.25rem 0}.single .content code{padding:0.2em 0.4em;margin:0;font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;color:#24292f;background-color:rgba(175,184,193,0.2);text-decoration:inherit;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;word-wrap:break-word;overflow-wrap:break-word;-webkit-line-break:auto;-ms-line-break:auto;line-break:auto}[data-theme='dark'] .single .content code{color:#adbac7;background-color:rgba(99,110,123,0.4)}.single .content pre{margin:0;line-height:1.45em;padding:0.5rem;overflow:auto;font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-moz-tab-size:4;-o-tab-size:4;tab-size:4;background-color:#f6f8fa}[data-theme='dark'] .single .content pre{background-color:#0d132c}.single .content pre code{padding:0;background-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:intrinsic;min-width:max-content}[data-theme='dark'] .single .content pre code{background-color:transparent}.single .content pre img{min-height:1em;max-height:1.2em;vertical-align:text-bottom}.single .content .highlight,.single .content .gist{font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.single .content .highlight .table-wrapper>table,.single .content .highlight .table-wrapper>table thead,.single .content .highlight .table-wrapper>table tr,.single .content .highlight .table-wrapper>table td,.single .content .gist .table-wrapper>table,.single .content .gist .table-wrapper>table thead,.single .content .gist .table-wrapper>table tr,.single .content .gist .table-wrapper>table td{margin:0;padding:0;border:none !important;white-space:nowrap}.single .content .highlight{margin:0.5rem 0}.single .content .highlight>.chroma{position:relative}.single .content .highlight>.chroma .code-header{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;line-height:1.4em;color:#EC008C;background-color:#ecf0f5;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-transition:border-radius 0.2s ease;-moz-transition:border-radius 0.2s ease;-o-transition:border-radius 0.2s ease;transition:border-radius 0.2s ease}[data-theme='dark'] .single .content .highlight>.chroma .code-header{color:#ba0066;background-color:#060914}.single .content .highlight>.chroma .code-header:hover{cursor:pointer}.single .content .highlight>.chroma .code-header .code-title{width:100%;padding:0.4rem}.single .content .highlight>.chroma .code-header .code-title .arrow{padding:0 0.2rem;-webkit-transition:transform 0.2s ease;-moz-transition:transform 0.2s ease;-o-transition:transform 0.2s ease;transition:transform 0.2s ease}.single .content .highlight>.chroma .code-header .code-title .title-inner{position:absolute;left:50%;transform:translateX(-50%)}.single .content .highlight>.chroma .code-header .code-title::after{padding-left:0.2rem;content:'Code'}.single .content .highlight>.chroma .code-header .ellipses{padding:0.4rem}.single .content .highlight>.chroma .code-header .edit,.single .content .highlight>.chroma .code-header .copy{display:none;padding:0.4rem}.single .content .highlight>.chroma .code-header .edit:hover,.single .content .highlight>.chroma .code-header .copy:hover{cursor:pointer;color:#EC008C}[data-theme='dark'] .single .content .highlight>.chroma .code-header .edit:hover,[data-theme='dark'] .single .content .highlight>.chroma .code-header .copy:hover{color:#ba0066}.single .content .highlight>.chroma .code-header.language-abap .code-title::after{content:"ABAP"}.single .content .highlight>.chroma .code-header.language-abnf .code-title::after{content:"ABNF"}.single .content .highlight>.chroma .code-header.language-as .code-title::after{content:"ActionScript"}.single .content .highlight>.chroma .code-header.language-actionscript .code-title::after{content:"ActionScript"}.single .content .highlight>.chroma .code-header.language-as3 .code-title::after{content:"ActionScript 3"}.single .content .highlight>.chroma .code-header.language-actionscript3 .code-title::after{content:"ActionScript 3"}.single .content .highlight>.chroma .code-header.language-ada .code-title::after{content:"Ada"}.single .content .highlight>.chroma .code-header.language-ada95 .code-title::after{content:"Ada"}.single .content .highlight>.chroma .code-header.language-ada2005 .code-title::after{content:"Ada"}.single .content .highlight>.chroma .code-header.language-al .code-title::after{content:"AL"}.single .content .highlight>.chroma .code-header.language-ng2 .code-title::after{content:"Angular2"}.single .content .highlight>.chroma .code-header.language-antlr .code-title::after{content:"ANTLR"}.single .content .highlight>.chroma .code-header.language-apacheconf .code-title::after{content:"ApacheConf"}.single .content .highlight>.chroma .code-header.language-aconf .code-title::after{content:"ApacheConf"}.single .content .highlight>.chroma .code-header.language-apache .code-title::after{content:"ApacheConf"}.single .content .highlight>.chroma .code-header.language-apl .code-title::after{content:"APL"}.single .content .highlight>.chroma .code-header.language-applescript .code-title::after{content:"AppleScript"}.single .content .highlight>.chroma .code-header.language-arduino .code-title::after{content:"Arduino"}.single .content .highlight>.chroma .code-header.language-armasm .code-title::after{content:"ArmAsm"}.single .content .highlight>.chroma .code-header.language-awk .code-title::after{content:"Awk"}.single .content .highlight>.chroma .code-header.language-gawk .code-title::after{content:"Awk"}.single .content .highlight>.chroma .code-header.language-mawk .code-title::after{content:"Awk"}.single .content .highlight>.chroma .code-header.language-nawk .code-title::after{content:"Awk"}.single .content .highlight>.chroma .code-header.language-ballerina .code-title::after{content:"Ballerina"}.single .content .highlight>.chroma .code-header.language-make .code-title::after{content:"Base Makefile"}.single .content .highlight>.chroma .code-header.language-makefile .code-title::after{content:"Base Makefile"}.single .content .highlight>.chroma .code-header.language-mf .code-title::after{content:"Base Makefile"}.single .content .highlight>.chroma .code-header.language-bsdmake .code-title::after{content:"Base Makefile"}.single .content .highlight>.chroma .code-header.language-bash .code-title::after{content:"Bash"}.single .content .highlight>.chroma .code-header.language-sh .code-title::after{content:"Bash"}.single .content .highlight>.chroma .code-header.language-ksh .code-title::after{content:"Bash"}.single .content .highlight>.chroma .code-header.language-zsh .code-title::after{content:"Bash"}.single .content .highlight>.chroma .code-header.language-shell .code-title::after{content:"Bash"}.single .content .highlight>.chroma .code-header.language-bash-session .code-title::after{content:"BashSession"}.single .content .highlight>.chroma .code-header.language-console .code-title::after{content:"BashSession"}.single .content .highlight>.chroma .code-header.language-shell-session .code-title::after{content:"BashSession"}.single .content .highlight>.chroma .code-header.language-bat .code-title::after{content:"Batchfile"}.single .content .highlight>.chroma .code-header.language-batch .code-title::after{content:"Batchfile"}.single .content .highlight>.chroma .code-header.language-dosbatch .code-title::after{content:"Batchfile"}.single .content .highlight>.chroma .code-header.language-winbatch .code-title::after{content:"Batchfile"}.single .content .highlight>.chroma .code-header.language-bib .code-title::after{content:"BibTeX"}.single .content .highlight>.chroma .code-header.language-bibtex .code-title::after{content:"BibTeX"}.single .content .highlight>.chroma .code-header.language-bicep .code-title::after{content:"Bicep"}.single .content .highlight>.chroma .code-header.language-blitzbasic .code-title::after{content:"BlitzBasic"}.single .content .highlight>.chroma .code-header.language-b3d .code-title::after{content:"BlitzBasic"}.single .content .highlight>.chroma .code-header.language-bplus .code-title::after{content:"BlitzBasic"}.single .content .highlight>.chroma .code-header.language-bnf .code-title::after{content:"BNF"}.single .content .highlight>.chroma .code-header.language-brainfuck .code-title::after{content:"Brainfuck"}.single .content .highlight>.chroma .code-header.language-bf .code-title::after{content:"Brainfuck"}.single .content .highlight>.chroma .code-header.language-c .code-title::after{content:"C"}.single .content .highlight>.chroma .code-header.language-csharp .code-title::after{content:"C#"}.single .content .highlight>.chroma .code-header.language-c\# .code-title::after{content:"C#"}.single .content .highlight>.chroma .code-header.language-cpp .code-title::after{content:"C++"}.single .content .highlight>.chroma .code-header.language-c\+\+ .code-title::after{content:"C++"}.single .content .highlight>.chroma .code-header.language-caddyfile .code-title::after{content:"Caddyfile"}.single .content .highlight>.chroma .code-header.language-caddy .code-title::after{content:"Caddyfile"}.single .content .highlight>.chroma .code-header.language-caddyfile-directives .code-title::after{content:"Caddyfile Directives"}.single .content .highlight>.chroma .code-header.language-caddyfile-d .code-title::after{content:"Caddyfile Directives"}.single .content .highlight>.chroma .code-header.language-caddy-d .code-title::after{content:"Caddyfile Directives"}.single .content .highlight>.chroma .code-header.language-capnp .code-title::after{content:"Cap'n Proto"}.single .content .highlight>.chroma .code-header.language-cassandra .code-title::after{content:"Cassandra CQL"}.single .content .highlight>.chroma .code-header.language-cql .code-title::after{content:"Cassandra CQL"}.single .content .highlight>.chroma .code-header.language-ceylon .code-title::after{content:"Ceylon"}.single .content .highlight>.chroma .code-header.language-cfengine3 .code-title::after{content:"CFEngine3"}.single .content .highlight>.chroma .code-header.language-cf3 .code-title::after{content:"CFEngine3"}.single .content .highlight>.chroma .code-header.language-cfs .code-title::after{content:"cfstatement"}.single .content .highlight>.chroma .code-header.language-chai .code-title::after{content:"ChaiScript"}.single .content .highlight>.chroma .code-header.language-chaiscript .code-title::after{content:"ChaiScript"}.single .content .highlight>.chroma .code-header.language-cheetah .code-title::after{content:"Cheetah"}.single .content .highlight>.chroma .code-header.language-spitfire .code-title::after{content:"Cheetah"}.single .content .highlight>.chroma .code-header.language-clojure .code-title::after{content:"Clojure"}.single .content .highlight>.chroma .code-header.language-clj .code-title::after{content:"Clojure"}.single .content .highlight>.chroma .code-header.language-cmake .code-title::after{content:"CMake"}.single .content .highlight>.chroma .code-header.language-cobol .code-title::after{content:"COBOL"}.single .content .highlight>.chroma .code-header.language-coffee-script .code-title::after{content:"CoffeeScript"}.single .content .highlight>.chroma .code-header.language-coffeescript .code-title::after{content:"CoffeeScript"}.single .content .highlight>.chroma .code-header.language-coffee .code-title::after{content:"CoffeeScript"}.single .content .highlight>.chroma .code-header.language-common-lisp .code-title::after{content:"Common Lisp"}.single .content .highlight>.chroma .code-header.language-cl .code-title::after{content:"Common Lisp"}.single .content .highlight>.chroma .code-header.language-lisp .code-title::after{content:"Common Lisp"}.single .content .highlight>.chroma .code-header.language-coq .code-title::after{content:"Coq"}.single .content .highlight>.chroma .code-header.language-cr .code-title::after{content:"Crystal"}.single .content .highlight>.chroma .code-header.language-crystal .code-title::after{content:"Crystal"}.single .content .highlight>.chroma .code-header.language-css .code-title::after{content:"CSS"}.single .content .highlight>.chroma .code-header.language-cython .code-title::after{content:"Cython"}.single .content .highlight>.chroma .code-header.language-pyx .code-title::after{content:"Cython"}.single .content .highlight>.chroma .code-header.language-pyrex .code-title::after{content:"Cython"}.single .content .highlight>.chroma .code-header.language-d .code-title::after{content:"D"}.single .content .highlight>.chroma .code-header.language-dart .code-title::after{content:"Dart"}.single .content .highlight>.chroma .code-header.language-diff .code-title::after{content:"Diff"}.single .content .highlight>.chroma .code-header.language-udiff .code-title::after{content:"Diff"}.single .content .highlight>.chroma .code-header.language-django .code-title::after{content:"Django/Jinja"}.single .content .highlight>.chroma .code-header.language-jinja .code-title::after{content:"Django/Jinja"}.single .content .highlight>.chroma .code-header.language-docker .code-title::after{content:"Docker"}.single .content .highlight>.chroma .code-header.language-dockerfile .code-title::after{content:"Docker"}.single .content .highlight>.chroma .code-header.language-dtd .code-title::after{content:"DTD"}.single .content .highlight>.chroma .code-header.language-dylan .code-title::after{content:"Dylan"}.single .content .highlight>.chroma .code-header.language-ebnf .code-title::after{content:"EBNF"}.single .content .highlight>.chroma .code-header.language-elixir .code-title::after{content:"Elixir"}.single .content .highlight>.chroma .code-header.language-ex .code-title::after{content:"Elixir"}.single .content .highlight>.chroma .code-header.language-exs .code-title::after{content:"Elixir"}.single .content .highlight>.chroma .code-header.language-elm .code-title::after{content:"Elm"}.single .content .highlight>.chroma .code-header.language-emacs .code-title::after{content:"EmacsLisp"}.single .content .highlight>.chroma .code-header.language-elisp .code-title::after{content:"EmacsLisp"}.single .content .highlight>.chroma .code-header.language-emacs-lisp .code-title::after{content:"EmacsLisp"}.single .content .highlight>.chroma .code-header.language-erlang .code-title::after{content:"Erlang"}.single .content .highlight>.chroma .code-header.language-factor .code-title::after{content:"Factor"}.single .content .highlight>.chroma .code-header.language-fennel .code-title::after{content:"Fennel"}.single .content .highlight>.chroma .code-header.language-fnl .code-title::after{content:"Fennel"}.single .content .highlight>.chroma .code-header.language-fish .code-title::after{content:"Fish"}.single .content .highlight>.chroma .code-header.language-fishshell .code-title::after{content:"Fish"}.single .content .highlight>.chroma .code-header.language-forth .code-title::after{content:"Forth"}.single .content .highlight>.chroma .code-header.language-fortran .code-title::after{content:"Fortran"}.single .content .highlight>.chroma .code-header.language-fortranfixed .code-title::after{content:"FortranFixed"}.single .content .highlight>.chroma .code-header.language-fsharp .code-title::after{content:"FSharp"}.single .content .highlight>.chroma .code-header.language-gas .code-title::after{content:"GAS"}.single .content .highlight>.chroma .code-header.language-asm .code-title::after{content:"GAS"}.single .content .highlight>.chroma .code-header.language-gdscript .code-title::after{content:"GDScript"}.single .content .highlight>.chroma .code-header.language-gd .code-title::after{content:"GDScript"}.single .content .highlight>.chroma .code-header.language-genshi .code-title::after{content:"Genshi"}.single .content .highlight>.chroma .code-header.language-kid .code-title::after{content:"Genshi"}.single .content .highlight>.chroma .code-header.language-xml\+genshi .code-title::after{content:"Genshi"}.single .content .highlight>.chroma .code-header.language-xml\+kid .code-title::after{content:"Genshi"}.single .content .highlight>.chroma .code-header.language-html\+genshi .code-title::after{content:"Genshi HTML"}.single .content .highlight>.chroma .code-header.language-html\+kid .code-title::after{content:"Genshi HTML"}.single .content .highlight>.chroma .code-header.language-genshitext .code-title::after{content:"Genshi Text"}.single .content .highlight>.chroma .code-header.language-cucumber .code-title::after{content:"Gherkin"}.single .content .highlight>.chroma .code-header.language-Cucumber .code-title::after{content:"Gherkin"}.single .content .highlight>.chroma .code-header.language-gherkin .code-title::after{content:"Gherkin"}.single .content .highlight>.chroma .code-header.language-Gherkin .code-title::after{content:"Gherkin"}.single .content .highlight>.chroma .code-header.language-glsl .code-title::after{content:"GLSL"}.single .content .highlight>.chroma .code-header.language-gnuplot .code-title::after{content:"Gnuplot"}.single .content .highlight>.chroma .code-header.language-go .code-title::after{content:"Go"}.single .content .highlight>.chroma .code-header.language-golang .code-title::after{content:"Go"}.single .content .highlight>.chroma .code-header.language-go-html-template .code-title::after{content:"Go HTML Template"}.single .content .highlight>.chroma .code-header.language-go-text-template .code-title::after{content:"Go Text Template"}.single .content .highlight>.chroma .code-header.language-graphql .code-title::after{content:"GraphQL"}.single .content .highlight>.chroma .code-header.language-graphqls .code-title::after{content:"GraphQL"}.single .content .highlight>.chroma .code-header.language-gql .code-title::after{content:"GraphQL"}.single .content .highlight>.chroma .code-header.language-groff .code-title::after{content:"Groff"}.single .content .highlight>.chroma .code-header.language-nroff .code-title::after{content:"Groff"}.single .content .highlight>.chroma .code-header.language-man .code-title::after{content:"Groff"}.single .content .highlight>.chroma .code-header.language-groovy .code-title::after{content:"Groovy"}.single .content .highlight>.chroma .code-header.language-handlebars .code-title::after{content:"Handlebars"}.single .content .highlight>.chroma .code-header.language-hbs .code-title::after{content:"Handlebars"}.single .content .highlight>.chroma .code-header.language-haskell .code-title::after{content:"Haskell"}.single .content .highlight>.chroma .code-header.language-hs .code-title::after{content:"Haskell"}.single .content .highlight>.chroma .code-header.language-hx .code-title::after{content:"Haxe"}.single .content .highlight>.chroma .code-header.language-haxe .code-title::after{content:"Haxe"}.single .content .highlight>.chroma .code-header.language-hxsl .code-title::after{content:"Haxe"}.single .content .highlight>.chroma .code-header.language-hcl .code-title::after{content:"HCL"}.single .content .highlight>.chroma .code-header.language-hexdump .code-title::after{content:"Hexdump"}.single .content .highlight>.chroma .code-header.language-hlb .code-title::after{content:"HLB"}.single .content .highlight>.chroma .code-header.language-html .code-title::after{content:"HTML"}.single .content .highlight>.chroma .code-header.language-http .code-title::after{content:"HTTP"}.single .content .highlight>.chroma .code-header.language-hylang .code-title::after{content:"Hy"}.single .content .highlight>.chroma .code-header.language-idris .code-title::after{content:"Idris"}.single .content .highlight>.chroma .code-header.language-idr .code-title::after{content:"Idris"}.single .content .highlight>.chroma .code-header.language-igor .code-title::after{content:"Igor"}.single .content .highlight>.chroma .code-header.language-igorpro .code-title::after{content:"Igor"}.single .content .highlight>.chroma .code-header.language-ini .code-title::after{content:"INI"}.single .content .highlight>.chroma .code-header.language-cfg .code-title::after{content:"INI"}.single .content .highlight>.chroma .code-header.language-dosini .code-title::after{content:"INI"}.single .content .highlight>.chroma .code-header.language-io .code-title::after{content:"Io"}.single .content .highlight>.chroma .code-header.language-j .code-title::after{content:"J"}.single .content .highlight>.chroma .code-header.language-java .code-title::after{content:"Java"}.single .content .highlight>.chroma .code-header.language-js .code-title::after{content:"JavaScript"}.single .content .highlight>.chroma .code-header.language-javascript .code-title::after{content:"JavaScript"}.single .content .highlight>.chroma .code-header.language-json .code-title::after{content:"JSON"}.single .content .highlight>.chroma .code-header.language-julia .code-title::after{content:"Julia"}.single .content .highlight>.chroma .code-header.language-jl .code-title::after{content:"Julia"}.single .content .highlight>.chroma .code-header.language-jungle .code-title::after{content:"Jungle"}.single .content .highlight>.chroma .code-header.language-kotlin .code-title::after{content:"Kotlin"}.single .content .highlight>.chroma .code-header.language-lighty .code-title::after{content:"Lighttpd configuration file"}.single .content .highlight>.chroma .code-header.language-lighttpd .code-title::after{content:"Lighttpd configuration file"}.single .content .highlight>.chroma .code-header.language-llvm .code-title::after{content:"LLVM"}.single .content .highlight>.chroma .code-header.language-lua .code-title::after{content:"Lua"}.single .content .highlight>.chroma .code-header.language-mako .code-title::after{content:"Mako"}.single .content .highlight>.chroma .code-header.language-md .code-title::after{content:"markdown"}.single .content .highlight>.chroma .code-header.language-mkd .code-title::after{content:"markdown"}.single .content .highlight>.chroma .code-header.language-mason .code-title::after{content:"Mason"}.single .content .highlight>.chroma .code-header.language-mathematica .code-title::after{content:"Mathematica"}.single .content .highlight>.chroma .code-header.language-mma .code-title::after{content:"Mathematica"}.single .content .highlight>.chroma .code-header.language-nb .code-title::after{content:"Mathematica"}.single .content .highlight>.chroma .code-header.language-matlab .code-title::after{content:"Matlab"}.single .content .highlight>.chroma .code-header.language-mcfunction .code-title::after{content:"mcfunction"}.single .content .highlight>.chroma .code-header.language-meson .code-title::after{content:"Meson"}.single .content .highlight>.chroma .code-header.language-meson\.build .code-title::after{content:"Meson"}.single .content .highlight>.chroma .code-header.language-metal .code-title::after{content:"Metal"}.single .content .highlight>.chroma .code-header.language-minizinc .code-title::after{content:"MiniZinc"}.single .content .highlight>.chroma .code-header.language-MZN .code-title::after{content:"MiniZinc"}.single .content .highlight>.chroma .code-header.language-mzn .code-title::after{content:"MiniZinc"}.single .content .highlight>.chroma .code-header.language-mlir .code-title::after{content:"MLIR"}.single .content .highlight>.chroma .code-header.language-modula2 .code-title::after{content:"Modula-2"}.single .content .highlight>.chroma .code-header.language-m2 .code-title::after{content:"Modula-2"}.single .content .highlight>.chroma .code-header.language-monkeyc .code-title::after{content:"MonkeyC"}.single .content .highlight>.chroma .code-header.language-morrowind .code-title::after{content:"MorrowindScript"}.single .content .highlight>.chroma .code-header.language-mwscript .code-title::after{content:"MorrowindScript"}.single .content .highlight>.chroma .code-header.language-myghty .code-title::after{content:"Myghty"}.single .content .highlight>.chroma .code-header.language-mysql .code-title::after{content:"MySQL"}.single .content .highlight>.chroma .code-header.language-mariadb .code-title::after{content:"MySQL"}.single .content .highlight>.chroma .code-header.language-nasm .code-title::after{content:"NASM"}.single .content .highlight>.chroma .code-header.language-newspeak .code-title::after{content:"Newspeak"}.single .content .highlight>.chroma .code-header.language-nginx .code-title::after{content:"Nginx configuration file"}.single .content .highlight>.chroma .code-header.language-nim .code-title::after{content:"Nim"}.single .content .highlight>.chroma .code-header.language-nimrod .code-title::after{content:"Nim"}.single .content .highlight>.chroma .code-header.language-nixos .code-title::after{content:"Nix"}.single .content .highlight>.chroma .code-header.language-nix .code-title::after{content:"Nix"}.single .content .highlight>.chroma .code-header.language-objective-c .code-title::after{content:"Objective-C"}.single .content .highlight>.chroma .code-header.language-objectivec .code-title::after{content:"Objective-C"}.single .content .highlight>.chroma .code-header.language-obj-c .code-title::after{content:"Objective-C"}.single .content .highlight>.chroma .code-header.language-objc .code-title::after{content:"Objective-C"}.single .content .highlight>.chroma .code-header.language-ocaml .code-title::after{content:"OCaml"}.single .content .highlight>.chroma .code-header.language-octave .code-title::after{content:"Octave"}.single .content .highlight>.chroma .code-header.language-ones .code-title::after{content:"OnesEnterprise"}.single .content .highlight>.chroma .code-header.language-onesenterprise .code-title::after{content:"OnesEnterprise"}.single .content .highlight>.chroma .code-header.language-1S .code-title::after{content:"OnesEnterprise"}.single .content .highlight>.chroma .code-header.language-1S:Enterprise .code-title::after{content:"OnesEnterprise"}.single .content .highlight>.chroma .code-header.language-openedge .code-title::after{content:"OpenEdge ABL"}.single .content .highlight>.chroma .code-header.language-abl .code-title::after{content:"OpenEdge ABL"}.single .content .highlight>.chroma .code-header.language-progress .code-title::after{content:"OpenEdge ABL"}.single .content .highlight>.chroma .code-header.language-openedgeabl .code-title::after{content:"OpenEdge ABL"}.single .content .highlight>.chroma .code-header.language-openscad .code-title::after{content:"OpenSCAD"}.single .content .highlight>.chroma .code-header.language-org .code-title::after{content:"Org Mode"}.single .content .highlight>.chroma .code-header.language-orgmode .code-title::after{content:"Org Mode"}.single .content .highlight>.chroma .code-header.language-pacmanconf .code-title::after{content:"PacmanConf"}.single .content .highlight>.chroma .code-header.language-perl .code-title::after{content:"Perl"}.single .content .highlight>.chroma .code-header.language-pl .code-title::after{content:"Perl"}.single .content .highlight>.chroma .code-header.language-php .code-title::after{content:"PHP"}.single .content .highlight>.chroma .code-header.language-php3 .code-title::after{content:"PHP"}.single .content .highlight>.chroma .code-header.language-php4 .code-title::after{content:"PHP"}.single .content .highlight>.chroma .code-header.language-php5 .code-title::after{content:"PHP"}.single .content .highlight>.chroma .code-header.language-phtml .code-title::after{content:"PHTML"}.single .content .highlight>.chroma .code-header.language-pig .code-title::after{content:"Pig"}.single .content .highlight>.chroma .code-header.language-pkgconfig .code-title::after{content:"PkgConfig"}.single .content .highlight>.chroma .code-header.language-plpgsql .code-title::after{content:"PL/pgSQL"}.single .content .highlight>.chroma .code-header.language-text .code-title::after{content:"plaintext"}.single .content .highlight>.chroma .code-header.language-plain .code-title::after{content:"plaintext"}.single .content .highlight>.chroma .code-header.language-no-highlight .code-title::after{content:"plaintext"}.single .content .highlight>.chroma .code-header.language-plutus-core .code-title::after{content:"Plutus Core"}.single .content .highlight>.chroma .code-header.language-plc .code-title::after{content:"Plutus Core"}.single .content .highlight>.chroma .code-header.language-pony .code-title::after{content:"Pony"}.single .content .highlight>.chroma .code-header.language-postgresql .code-title::after{content:"PostgreSQL SQL dialect"}.single .content .highlight>.chroma .code-header.language-postgres .code-title::after{content:"PostgreSQL SQL dialect"}.single .content .highlight>.chroma .code-header.language-postscript .code-title::after{content:"PostScript"}.single .content .highlight>.chroma .code-header.language-postscr .code-title::after{content:"PostScript"}.single .content .highlight>.chroma .code-header.language-pov .code-title::after{content:"POVRay"}.single .content .highlight>.chroma .code-header.language-powerquery .code-title::after{content:"PowerQuery"}.single .content .highlight>.chroma .code-header.language-pq .code-title::after{content:"PowerQuery"}.single .content .highlight>.chroma .code-header.language-powershell .code-title::after{content:"PowerShell"}.single .content .highlight>.chroma .code-header.language-posh .code-title::after{content:"PowerShell"}.single .content .highlight>.chroma .code-header.language-ps1 .code-title::after{content:"PowerShell"}.single .content .highlight>.chroma .code-header.language-psm1 .code-title::after{content:"PowerShell"}.single .content .highlight>.chroma .code-header.language-psd1 .code-title::after{content:"PowerShell"}.single .content .highlight>.chroma .code-header.language-prolog .code-title::after{content:"Prolog"}.single .content .highlight>.chroma .code-header.language-promql .code-title::after{content:"PromQL"}.single .content .highlight>.chroma .code-header.language-protobuf .code-title::after{content:"Protocol Buffer"}.single .content .highlight>.chroma .code-header.language-proto .code-title::after{content:"Protocol Buffer"}.single .content .highlight>.chroma .code-header.language-puppet .code-title::after{content:"Puppet"}.single .content .highlight>.chroma .code-header.language-python .code-title::after{content:"Python"}.single .content .highlight>.chroma .code-header.language-py .code-title::after{content:"Python"}.single .content .highlight>.chroma .code-header.language-sage .code-title::after{content:"Python"}.single .content .highlight>.chroma .code-header.language-python3 .code-title::after{content:"Python"}.single .content .highlight>.chroma .code-header.language-py3 .code-title::after{content:"Python"}.single .content .highlight>.chroma .code-header.language-python2 .code-title::after{content:"Python 2"}.single .content .highlight>.chroma .code-header.language-py2 .code-title::after{content:"Python 2"}.single .content .highlight>.chroma .code-header.language-qbasic .code-title::after{content:"QBasic"}.single .content .highlight>.chroma .code-header.language-basic .code-title::after{content:"QBasic"}.single .content .highlight>.chroma .code-header.language-qml .code-title::after{content:"QML"}.single .content .highlight>.chroma .code-header.language-qbs .code-title::after{content:"QML"}.single .content .highlight>.chroma .code-header.language-splus .code-title::after{content:"R"}.single .content .highlight>.chroma .code-header.language-s .code-title::after{content:"R"}.single .content .highlight>.chroma .code-header.language-r .code-title::after{content:"R"}.single .content .highlight>.chroma .code-header.language-racket .code-title::after{content:"Racket"}.single .content .highlight>.chroma .code-header.language-rkt .code-title::after{content:"Racket"}.single .content .highlight>.chroma .code-header.language-ragel .code-title::after{content:"Ragel"}.single .content .highlight>.chroma .code-header.language-perl6 .code-title::after{content:"Raku"}.single .content .highlight>.chroma .code-header.language-pl6 .code-title::after{content:"Raku"}.single .content .highlight>.chroma .code-header.language-raku .code-title::after{content:"Raku"}.single .content .highlight>.chroma .code-header.language-jsx .code-title::after{content:"react"}.single .content .highlight>.chroma .code-header.language-react .code-title::after{content:"react"}.single .content .highlight>.chroma .code-header.language-reason .code-title::after{content:"ReasonML"}.single .content .highlight>.chroma .code-header.language-reasonml .code-title::after{content:"ReasonML"}.single .content .highlight>.chroma .code-header.language-registry .code-title::after{content:"reg"}.single .content .highlight>.chroma .code-header.language-rst .code-title::after{content:"reStructuredText"}.single .content .highlight>.chroma .code-header.language-rest .code-title::after{content:"reStructuredText"}.single .content .highlight>.chroma .code-header.language-restructuredtext .code-title::after{content:"reStructuredText"}.single .content .highlight>.chroma .code-header.language-rexx .code-title::after{content:"Rexx"}.single .content .highlight>.chroma .code-header.language-arexx .code-title::after{content:"Rexx"}.single .content .highlight>.chroma .code-header.language-rb .code-title::after{content:"Ruby"}.single .content .highlight>.chroma .code-header.language-ruby .code-title::after{content:"Ruby"}.single .content .highlight>.chroma .code-header.language-duby .code-title::after{content:"Ruby"}.single .content .highlight>.chroma .code-header.language-rust .code-title::after{content:"Rust"}.single .content .highlight>.chroma .code-header.language-rs .code-title::after{content:"Rust"}.single .content .highlight>.chroma .code-header.language-sas .code-title::after{content:"SAS"}.single .content .highlight>.chroma .code-header.language-sass .code-title::after{content:"Sass"}.single .content .highlight>.chroma .code-header.language-scala .code-title::after{content:"Scala"}.single .content .highlight>.chroma .code-header.language-scheme .code-title::after{content:"Scheme"}.single .content .highlight>.chroma .code-header.language-scm .code-title::after{content:"Scheme"}.single .content .highlight>.chroma .code-header.language-scilab .code-title::after{content:"Scilab"}.single .content .highlight>.chroma .code-header.language-scss .code-title::after{content:"SCSS"}.single .content .highlight>.chroma .code-header.language-sieve .code-title::after{content:"Sieve"}.single .content .highlight>.chroma .code-header.language-smalltalk .code-title::after{content:"Smalltalk"}.single .content .highlight>.chroma .code-header.language-squeak .code-title::after{content:"Smalltalk"}.single .content .highlight>.chroma .code-header.language-st .code-title::after{content:"Smalltalk"}.single .content .highlight>.chroma .code-header.language-smarty .code-title::after{content:"Smarty"}.single .content .highlight>.chroma .code-header.language-snobol .code-title::after{content:"Snobol"}.single .content .highlight>.chroma .code-header.language-sol .code-title::after{content:"Solidity"}.single .content .highlight>.chroma .code-header.language-solidity .code-title::after{content:"Solidity"}.single .content .highlight>.chroma .code-header.language-sparql .code-title::after{content:"SPARQL"}.single .content .highlight>.chroma .code-header.language-sql .code-title::after{content:"SQL"}.single .content .highlight>.chroma .code-header.language-squidconf .code-title::after{content:"SquidConf"}.single .content .highlight>.chroma .code-header.language-squid\.conf .code-title::after{content:"SquidConf"}.single .content .highlight>.chroma .code-header.language-squid .code-title::after{content:"SquidConf"}.single .content .highlight>.chroma .code-header.language-sml .code-title::after{content:"Standard ML"}.single .content .highlight>.chroma .code-header.language-stylus .code-title::after{content:"Stylus"}.single .content .highlight>.chroma .code-header.language-svelte .code-title::after{content:"Svelte"}.single .content .highlight>.chroma .code-header.language-swift .code-title::after{content:"Swift"}.single .content .highlight>.chroma .code-header.language-systemd .code-title::after{content:"SYSTEMD"}.single .content .highlight>.chroma .code-header.language-systemverilog .code-title::after{content:"systemverilog"}.single .content .highlight>.chroma .code-header.language-sv .code-title::after{content:"systemverilog"}.single .content .highlight>.chroma .code-header.language-tablegen .code-title::after{content:"TableGen"}.single .content .highlight>.chroma .code-header.language-tasm .code-title::after{content:"TASM"}.single .content .highlight>.chroma .code-header.language-tcl .code-title::after{content:"Tcl"}.single .content .highlight>.chroma .code-header.language-tcsh .code-title::after{content:"Tcsh"}.single .content .highlight>.chroma .code-header.language-csh .code-title::after{content:"Tcsh"}.single .content .highlight>.chroma .code-header.language-termcap .code-title::after{content:"Termcap"}.single .content .highlight>.chroma .code-header.language-terminfo .code-title::after{content:"Terminfo"}.single .content .highlight>.chroma .code-header.language-terraform .code-title::after{content:"Terraform"}.single .content .highlight>.chroma .code-header.language-tf .code-title::after{content:"Terraform"}.single .content .highlight>.chroma .code-header.language-tex .code-title::after{content:"TeX"}.single .content .highlight>.chroma .code-header.language-latex .code-title::after{content:"TeX"}.single .content .highlight>.chroma .code-header.language-thrift .code-title::after{content:"Thrift"}.single .content .highlight>.chroma .code-header.language-toml .code-title::after{content:"TOML"}.single .content .highlight>.chroma .code-header.language-tradingview .code-title::after{content:"TradingView"}.single .content .highlight>.chroma .code-header.language-tv .code-title::after{content:"TradingView"}.single .content .highlight>.chroma .code-header.language-tsql .code-title::after{content:"Transact-SQL"}.single .content .highlight>.chroma .code-header.language-t-sql .code-title::after{content:"Transact-SQL"}.single .content .highlight>.chroma .code-header.language-turing .code-title::after{content:"Turing"}.single .content .highlight>.chroma .code-header.language-turtle .code-title::after{content:"Turtle"}.single .content .highlight>.chroma .code-header.language-twig .code-title::after{content:"Twig"}.single .content .highlight>.chroma .code-header.language-ts .code-title::after{content:"TypeScript"}.single .content .highlight>.chroma .code-header.language-tsx .code-title::after{content:"TypeScript"}.single .content .highlight>.chroma .code-header.language-typescript .code-title::after{content:"TypeScript"}.single .content .highlight>.chroma .code-header.language-typoscript .code-title::after{content:"TypoScript"}.single .content .highlight>.chroma .code-header.language-typoscriptcssdata .code-title::after{content:"TypoScriptCssData"}.single .content .highlight>.chroma .code-header.language-typoscripthtmldata .code-title::after{content:"TypoScriptHtmlData"}.single .content .highlight>.chroma .code-header.language-v .code-title::after{content:"verilog"}.single .content .highlight>.chroma .code-header.language-vlang .code-title::after{content:"V"}.single .content .highlight>.chroma .code-header.language-vsh .code-title::after{content:"V shell"}.single .content .highlight>.chroma .code-header.language-vshell .code-title::after{content:"V shell"}.single .content .highlight>.chroma .code-header.language-vb\.net .code-title::after{content:"VB.net"}.single .content .highlight>.chroma .code-header.language-vbnet .code-title::after{content:"VB.net"}.single .content .highlight>.chroma .code-header.language-verilog .code-title::after{content:"verilog"}.single .content .highlight>.chroma .code-header.language-vhdl .code-title::after{content:"VHDL"}.single .content .highlight>.chroma .code-header.language-vim .code-title::after{content:"VimL"}.single .content .highlight>.chroma .code-header.language-vue .code-title::after{content:"vue"}.single .content .highlight>.chroma .code-header.language-vuejs .code-title::after{content:"vue"}.single .content .highlight>.chroma .code-header.language-whiley .code-title::after{content:"Whiley"}.single .content .highlight>.chroma .code-header.language-xml .code-title::after{content:"XML"}.single .content .highlight>.chroma .code-header.language-xorg\.conf .code-title::after{content:"Xorg"}.single .content .highlight>.chroma .code-header.language-yaml .code-title::after{content:"YAML"}.single .content .highlight>.chroma .code-header.language-yang .code-title::after{content:"YANG"}.single .content .highlight>.chroma .code-header.language-zed .code-title::after{content:"Zed"}.single .content .highlight>.chroma .code-header.language-zig .code-title::after{content:"Zig"}.single .content .highlight>.chroma .code-header.language-markdown .code-title::after{content:"markdown"}.single .content .highlight>.chroma .code-header.language-yml .code-title::after{content:"YAML"}.single .content .highlight>.chroma .table-wrapper{max-height:0;overflow:hidden;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s;-moz-transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s;-o-transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s;transition:max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s}.single .content .highlight>.chroma table{border-spacing:0;width:auto;overflow:auto;display:block;background-color:#f6f8fa}[data-theme='dark'] .single .content .highlight>.chroma table{background-color:#0d132c}.single .content .highlight>.chroma table td{vertical-align:top;padding:0}.single .content .highlight>.chroma table pre{padding:0.25rem;outline-offset:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.single .content .highlight>.chroma table .ln{min-width:1.25rem}.single .content .highlight>.chroma table .lntd:first-child{min-width:1.6rem;text-align:right;position:sticky;left:0}.single .content .highlight>.chroma table .lntd:first-child pre{-webkit-user-select:none !important;-moz-user-select:none !important;user-select:none !important}.single .content .highlight>.chroma table .lntd:last-child{width:100%}.single .content .highlight>.chroma table .lntd:last-child pre{padding-left:0.5rem;padding-right:0.5rem}.single .content .highlight>.chroma table .lntd:last-child code{width:100%}.single .content .highlight>.chroma.open .code-header{background-color:#e2e9ef;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}[data-theme='dark'] .single .content .highlight>.chroma.open .code-header{background-color:#0a0e20}.single .content .highlight>.chroma.open .table-wrapper{max-height:100%;-webkit-transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s;-moz-transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s;-o-transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s;transition:max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s}.single .content .highlight>.chroma.open .arrow{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.single .content .highlight>.chroma.open .ellipses{display:none}.single .content .highlight>.chroma.open .edit,.single .content .highlight>.chroma.open .copy{display:inline}.single .content .highlight .hl{display:block;background-color:#fff8c5;box-shadow:-0.5rem 0 0 #fff8c5,0.5rem 0 0 #fff8c5}[data-theme='dark'] .single .content .highlight .hl{background-color:rgba(174,124,20,0.15);box-shadow:-0.5rem 0 0 rgba(174,124,20,0.15),0.5rem 0 0 rgba(174,124,20,0.15)}.single .content .highlight .gl{text-decoration:underline}.single .content .highlight .gs{font-weight:bold}.single .content .highlight .ge{font-style:italic}.single .content .highlight .ln{padding-right:0.5rem;display:inline-block;min-width:1.1rem;text-align:right}.single .content .highlight .lnt,.single .content .highlight .ln{color:#b1b1ba}[data-theme='dark'] .single .content .highlight .lnt,[data-theme='dark'] .single .content .highlight .ln{color:#909092}.single .content .highlight .err{font-style:italic;border-bottom:1px dotted #dc3545}.single .content .highlight .gd{background-color:#ffebe9}[data-theme='dark'] .single .content .highlight .gd{background-color:#78191b}.single .content .highlight .gi{background-color:#dafbe1}[data-theme='dark'] .single .content .highlight .gi{background-color:#1b4721}.single .content .highlight .err{color:#dc3545}.single .content .highlight .k{color:#cf222e}.single .content .highlight .kc{color:#0550ae}.single .content .highlight .kd{color:#cf222e}.single .content .highlight .kn{color:#cf222e}.single .content .highlight .kp{color:#cf222e}.single .content .highlight .kr{color:#cf222e}.single .content .highlight .kt{color:#cf222e}.single .content .highlight .n{color:#24292f}.single .content .highlight .na{color:#0550ae}.single .content .highlight .nb{color:#0550ae}.single .content .highlight .bp{color:#24292f}.single .content .highlight .nc{color:#8250df}.single .content .highlight .no{color:#cf222e}.single .content .highlight .nd{color:#8250df}.single .content .highlight .ni{color:#0550ae}.single .content .highlight .ne{color:#0550ae}.single .content .highlight .nf{color:#0550ae}.single .content .highlight .fm{color:#0550ae}.single .content .highlight .nl{color:#0550ae}.single .content .highlight .nn{color:#8250df}.single .content .highlight .nx{color:#0550ae}.single .content .highlight .py{color:#0550ae}.single .content .highlight .nt{color:#116329}.single .content .highlight .nv{color:#953800}.single .content .highlight .vc{color:#0550ae}.single .content .highlight .vg{color:#0550ae}.single .content .highlight .vi{color:#0550ae}.single .content .highlight .vm{color:#0550ae}.single .content .highlight .l{color:#0550ae}.single .content .highlight .ld{color:#0a3069}.single .content .highlight .s{color:#0a3069}.single .content .highlight .sa{color:#0a3069}.single .content .highlight .sb{color:#0a3069}.single .content .highlight .sc{color:#0a3069}.single .content .highlight .dl{color:#0a3069}.single .content .highlight .sd{color:#0a3069}.single .content .highlight .s2{color:#0a3069}.single .content .highlight .se{color:#0a3069}.single .content .highlight .sh{color:#0a3069}.single .content .highlight .si{color:#0a3069}.single .content .highlight .sx{color:#0a3069}.single .content .highlight .sr{color:#0a3069}.single .content .highlight .s1{color:#0a3069}.single .content .highlight .ss{color:#0a3069}.single .content .highlight .m{color:#0550ae}.single .content .highlight .mb{color:#0550ae}.single .content .highlight .mf{color:#0550ae}.single .content .highlight .mh{color:#0550ae}.single .content .highlight .mi{color:#0550ae}.single .content .highlight .il{color:#0550ae}.single .content .highlight .mo{color:#0550ae}.single .content .highlight .o{color:#cf222e}.single .content .highlight .ow{color:#cf222e}.single .content .highlight .p{color:#24292f}.single .content .highlight .c{color:#6e7781}.single .content .highlight .ch{color:#6e7781}.single .content .highlight .cm{color:#6e7781}.single .content .highlight .c1{color:#6e7781}.single .content .highlight .cs{color:#6e7781}.single .content .highlight .cp{color:#0550ae}.single .content .highlight .cpf{color:#6e7781}.single .content .highlight .g{color:#24292f}.single .content .highlight .gd{color:#82071e}.single .content .highlight .ge{color:#24292f}.single .content .highlight .gr{color:#dc3545}.single .content .highlight .gh{color:#24292f}.single .content .highlight .gi{color:#116329}.single .content .highlight .go{color:#24292f}.single .content .highlight .gp{color:#24292f}.single .content .highlight .gs{color:#24292f}.single .content .highlight .gu{color:#24292f}.single .content .highlight .gt{color:#dc3545}.single .content .highlight .gl{color:#24292f}.single .content .highlight .w{color:#24292f}.single .content .highlight .x{color:#24292f}[data-theme='dark'] .single .content .highlight .err{color:#dc3545}[data-theme='dark'] .single .content .highlight .k{color:#f47067}[data-theme='dark'] .single .content .highlight .kc{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .kd{color:#f47067}[data-theme='dark'] .single .content .highlight .kn{color:#f47067}[data-theme='dark'] .single .content .highlight .kp{color:#f47067}[data-theme='dark'] .single .content .highlight .kr{color:#f47067}[data-theme='dark'] .single .content .highlight .kt{color:#f47067}[data-theme='dark'] .single .content .highlight .n{color:#adbac7}[data-theme='dark'] .single .content .highlight .na{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .nb{color:#dcbdfb}[data-theme='dark'] .single .content .highlight .bp{color:#adbac7}[data-theme='dark'] .single .content .highlight .nc{color:#dcbdfb}[data-theme='dark'] .single .content .highlight .no{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .nd{color:#dcbdfb}[data-theme='dark'] .single .content .highlight .ni{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .ne{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .nf{color:#dcbdfb}[data-theme='dark'] .single .content .highlight .fm{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .nl{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .nn{color:#f47067}[data-theme='dark'] .single .content .highlight .nx{color:#dcbdfb}[data-theme='dark'] .single .content .highlight .py{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .nt{color:#8ddb8c}[data-theme='dark'] .single .content .highlight .nv{color:#f69d50}[data-theme='dark'] .single .content .highlight .vc{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .vg{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .vi{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .vm{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .l{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .ld{color:#96d0ff}[data-theme='dark'] .single .content .highlight .s{color:#96d0ff}[data-theme='dark'] .single .content .highlight .sa{color:#96d0ff}[data-theme='dark'] .single .content .highlight .sb{color:#96d0ff}[data-theme='dark'] .single .content .highlight .sc{color:#96d0ff}[data-theme='dark'] .single .content .highlight .dl{color:#96d0ff}[data-theme='dark'] .single .content .highlight .sd{color:#96d0ff}[data-theme='dark'] .single .content .highlight .s2{color:#96d0ff}[data-theme='dark'] .single .content .highlight .se{color:#96d0ff}[data-theme='dark'] .single .content .highlight .sh{color:#96d0ff}[data-theme='dark'] .single .content .highlight .si{color:#96d0ff}[data-theme='dark'] .single .content .highlight .sx{color:#96d0ff}[data-theme='dark'] .single .content .highlight .sr{color:#96d0ff}[data-theme='dark'] .single .content .highlight .s1{color:#96d0ff}[data-theme='dark'] .single .content .highlight .ss{color:#96d0ff}[data-theme='dark'] .single .content .highlight .m{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .mb{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .mf{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .mh{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .mi{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .il{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .mo{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .o{color:#f47067}[data-theme='dark'] .single .content .highlight .ow{color:#f47067}[data-theme='dark'] .single .content .highlight .p{color:#adbac7}[data-theme='dark'] .single .content .highlight .c{color:#768390}[data-theme='dark'] .single .content .highlight .ch{color:#768390}[data-theme='dark'] .single .content .highlight .cm{color:#768390}[data-theme='dark'] .single .content .highlight .c1{color:#768390}[data-theme='dark'] .single .content .highlight .cs{color:#768390}[data-theme='dark'] .single .content .highlight .cp{color:#6cb6ff}[data-theme='dark'] .single .content .highlight .cpf{color:#768390}[data-theme='dark'] .single .content .highlight .g{color:#adbac7}[data-theme='dark'] .single .content .highlight .gd{color:#ffd8d3}[data-theme='dark'] .single .content .highlight .ge{color:#adbac7}[data-theme='dark'] .single .content .highlight .gr{color:#dc3545}[data-theme='dark'] .single .content .highlight .gh{color:#adbac7}[data-theme='dark'] .single .content .highlight .gi{color:#b4f1b4}[data-theme='dark'] .single .content .highlight .go{color:#adbac7}[data-theme='dark'] .single .content .highlight .gp{color:#adbac7}[data-theme='dark'] .single .content .highlight .gs{color:#adbac7}[data-theme='dark'] .single .content .highlight .gu{color:#adbac7}[data-theme='dark'] .single .content .highlight .gt{color:#dc3545}[data-theme='dark'] .single .content .highlight .gl{color:#adbac7}[data-theme='dark'] .single .content .highlight .w{color:#adbac7}[data-theme='dark'] .single .content .highlight .x{color:#adbac7}.single .content .gist .gist-file,.single .content .gist .gist-data,.single .content .gist .gist-meta{border:none}.single .content .gist .gist-data{background-color:transparent}.single .content .gist .gist-meta{padding:0.4rem 0.8rem;background-color:#e6ebf1}.single .content .gist .gist-meta a,.single .content .gist .gist-meta a::before,.single .content .gist .gist-meta a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .content .gist .gist-meta a,[data-theme='dark'] .single .content .gist .gist-meta a::before,[data-theme='dark'] .single .content .gist .gist-meta a::after{color:#EC008C}.single .content .gist .gist-meta a:active,.single .content .gist .gist-meta a:hover{color:#EC008C}[data-theme='dark'] .single .content .gist .gist-meta a:active,[data-theme='dark'] .single .content .gist .gist-meta a:hover{color:#ba0066}[data-theme='dark'] .single .content .gist .gist-meta{background-color:#070b18}.single .content .gist .table-wrapper .highlight,.single .content .gist .table-wrapper::-webkit-scrollbar{background-color:#f6f8fa}[data-theme='dark'] .single .content .gist .table-wrapper .highlight,[data-theme='dark'] .single .content .gist .table-wrapper::-webkit-scrollbar{background-color:#2d333b}[data-theme='dark'] .single .content .gist{--color-fg-default: #adbac7;--color-prettylights-syntax-comment: #768390;--color-prettylights-syntax-constant: #6cb6ff;--color-prettylights-syntax-entity: #dcbdfb;--color-prettylights-syntax-storage-modifier-import: #adbac7;--color-prettylights-syntax-entity-tag: #8ddb8c;--color-prettylights-syntax-keyword: #f47067;--color-prettylights-syntax-string: #96d0ff;--color-prettylights-syntax-variable: #f69d50;--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;--color-prettylights-syntax-invalid-illegal-bg: #922323;--color-prettylights-syntax-carriage-return-text: #cdd9e5;--color-prettylights-syntax-carriage-return-bg: #ad2e2c;--color-prettylights-syntax-string-regexp: #8ddb8c;--color-prettylights-syntax-markup-list: #eac55f;--color-prettylights-syntax-markup-heading: #316dca;--color-prettylights-syntax-markup-italic: #adbac7;--color-prettylights-syntax-markup-bold: #adbac7;--color-prettylights-syntax-markup-deleted-text: #ffd8d3;--color-prettylights-syntax-markup-deleted-bg: #78191b;--color-prettylights-syntax-markup-inserted-text: #b4f1b4;--color-prettylights-syntax-markup-inserted-bg: #1b4721;--color-prettylights-syntax-markup-changed-text: #ffddb0;--color-prettylights-syntax-markup-changed-bg: #682d0f;--color-prettylights-syntax-markup-ignored-text: #adbac7;--color-prettylights-syntax-markup-ignored-bg: #255ab2;--color-prettylights-syntax-meta-diff-range: #dcbdfb;--color-prettylights-syntax-brackethighlighter-angle: #768390;--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;--color-prettylights-syntax-constant-other-reference-link: #96d0ff}[data-theme='dark'] .single .content .gist .blob-num,[data-theme='dark'] .single .content .gist .blob-code-inner{color:val(--color-fg-default)}[data-theme='dark'] .single .content .gist .pl-c{color:var(--color-prettylights-syntax-comment)}[data-theme='dark'] .single .content .gist .pl-c1,[data-theme='dark'] .single .content .gist .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}[data-theme='dark'] .single .content .gist .pl-e,[data-theme='dark'] .single .content .gist .pl-en{color:var(--color-prettylights-syntax-entity)}[data-theme='dark'] .single .content .gist .pl-smi,[data-theme='dark'] .single .content .gist .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}[data-theme='dark'] .single .content .gist .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}[data-theme='dark'] .single .content .gist .pl-k{color:var(--color-prettylights-syntax-keyword)}[data-theme='dark'] .single .content .gist .pl-s,[data-theme='dark'] .single .content .gist .pl-pds,[data-theme='dark'] .single .content .gist .pl-s .pl-pse .pl-s1,[data-theme='dark'] .single .content .gist .pl-sr,[data-theme='dark'] .single .content .gist .pl-sr .pl-cce,[data-theme='dark'] .single .content .gist .pl-sr .pl-sre,[data-theme='dark'] .single .content .gist .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}[data-theme='dark'] .single .content .gist .pl-v,[data-theme='dark'] .single .content .gist .pl-smw{color:var(--color-prettylights-syntax-variable)}[data-theme='dark'] .single .content .gist .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}[data-theme='dark'] .single .content .gist .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}[data-theme='dark'] .single .content .gist .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}[data-theme='dark'] .single .content .gist .pl-c2::before{content:'^M'}[data-theme='dark'] .single .content .gist .pl-sr .pl-cce{font-weight:bold;color:var(--color-prettylights-syntax-string-regexp)}[data-theme='dark'] .single .content .gist .pl-ml{color:var(--color-prettylights-syntax-markup-list)}[data-theme='dark'] .single .content .gist .pl-mh,[data-theme='dark'] .single .content .gist .pl-mh .pl-en,[data-theme='dark'] .single .content .gist .pl-ms{font-weight:bold;color:var(--color-prettylights-syntax-markup-heading)}[data-theme='dark'] .single .content .gist .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}[data-theme='dark'] .single .content .gist .pl-mb{font-weight:bold;color:var(--color-prettylights-syntax-markup-bold)}[data-theme='dark'] .single .content .gist .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}[data-theme='dark'] .single .content .gist .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}[data-theme='dark'] .single .content .gist .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}[data-theme='dark'] .single .content .gist .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}[data-theme='dark'] .single .content .gist .pl-mdr{font-weight:bold;color:var(--color-prettylights-syntax-meta-diff-range)}[data-theme='dark'] .single .content .gist .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}[data-theme='dark'] .single .content .gist .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}[data-theme='dark'] .single .content .gist .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.single .content .admonition{position:relative;margin:1rem 0;padding:0 0.75rem;border-left:.25rem solid;overflow:auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-color:rgba(68,138,255,0.1);border-left-color:#448aff}.single .content .admonition .admonition-title{font-weight:bold;margin:0 -0.75rem;padding:0.25rem 1.8rem;border-bottom:1px solid;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.single .content .admonition .admonition-content{padding:0.5rem 0}.single .content .admonition i.icon{font-size:0.85rem;position:absolute;top:0.6rem;left:0.4rem}.single .content .admonition i.details-icon{position:absolute;top:0.6rem;right:0.3rem}.single .content .admonition .admonition-title{border-bottom-color:rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.25)}.single .content .admonition.open .admonition-title{background-color:rgba(68,138,255,0.1)}.single .content .admonition i.icon{color:#448aff}.single .content .admonition.abstract{background-color:rgba(0,176,255,0.1);border-left-color:#00b0ff}.single .content .admonition.abstract .admonition-title{border-bottom-color:rgba(0,176,255,0.1);background-color:rgba(0,176,255,0.25)}.single .content .admonition.abstract.open .admonition-title{background-color:rgba(0,176,255,0.1)}.single .content .admonition.abstract i.icon{color:#00b0ff}.single .content .admonition.info{background-color:rgba(0,184,212,0.1);border-left-color:#00b8d4}.single .content .admonition.info .admonition-title{border-bottom-color:rgba(0,184,212,0.1);background-color:rgba(0,184,212,0.25)}.single .content .admonition.info.open .admonition-title{background-color:rgba(0,184,212,0.1)}.single .content .admonition.info i.icon{color:#00b8d4}.single .content .admonition.tip{background-color:rgba(0,191,165,0.1);border-left-color:#00bfa5}.single .content .admonition.tip .admonition-title{border-bottom-color:rgba(0,191,165,0.1);background-color:rgba(0,191,165,0.25)}.single .content .admonition.tip.open .admonition-title{background-color:rgba(0,191,165,0.1)}.single .content .admonition.tip i.icon{color:#00bfa5}.single .content .admonition.success{background-color:rgba(0,200,83,0.1);border-left-color:#00c853}.single .content .admonition.success .admonition-title{border-bottom-color:rgba(0,200,83,0.1);background-color:rgba(0,200,83,0.25)}.single .content .admonition.success.open .admonition-title{background-color:rgba(0,200,83,0.1)}.single .content .admonition.success i.icon{color:#00c853}.single .content .admonition.question{background-color:rgba(100,221,23,0.1);border-left-color:#64dd17}.single .content .admonition.question .admonition-title{border-bottom-color:rgba(100,221,23,0.1);background-color:rgba(100,221,23,0.25)}.single .content .admonition.question.open .admonition-title{background-color:rgba(100,221,23,0.1)}.single .content .admonition.question i.icon{color:#64dd17}.single .content .admonition.warning{background-color:rgba(255,145,0,0.1);border-left-color:#ff9100}.single .content .admonition.warning .admonition-title{border-bottom-color:rgba(255,145,0,0.1);background-color:rgba(255,145,0,0.25)}.single .content .admonition.warning.open .admonition-title{background-color:rgba(255,145,0,0.1)}.single .content .admonition.warning i.icon{color:#ff9100}.single .content .admonition.failure{background-color:rgba(255,82,82,0.1);border-left-color:#ff5252}.single .content .admonition.failure .admonition-title{border-bottom-color:rgba(255,82,82,0.1);background-color:rgba(255,82,82,0.25)}.single .content .admonition.failure.open .admonition-title{background-color:rgba(255,82,82,0.1)}.single .content .admonition.failure i.icon{color:#ff5252}.single .content .admonition.danger{background-color:rgba(255,23,68,0.1);border-left-color:#ff1744}.single .content .admonition.danger .admonition-title{border-bottom-color:rgba(255,23,68,0.1);background-color:rgba(255,23,68,0.25)}.single .content .admonition.danger.open .admonition-title{background-color:rgba(255,23,68,0.1)}.single .content .admonition.danger i.icon{color:#ff1744}.single .content .admonition.bug{background-color:rgba(245,0,87,0.1);border-left-color:#f50057}.single .content .admonition.bug .admonition-title{border-bottom-color:rgba(245,0,87,0.1);background-color:rgba(245,0,87,0.25)}.single .content .admonition.bug.open .admonition-title{background-color:rgba(245,0,87,0.1)}.single .content .admonition.bug i.icon{color:#f50057}.single .content .admonition.example{background-color:rgba(101,31,255,0.1);border-left-color:#651fff}.single .content .admonition.example .admonition-title{border-bottom-color:rgba(101,31,255,0.1);background-color:rgba(101,31,255,0.25)}.single .content .admonition.example.open .admonition-title{background-color:rgba(101,31,255,0.1)}.single .content .admonition.example i.icon{color:#651fff}.single .content .admonition.quote{background-color:rgba(159,159,159,0.1);border-left-color:#9e9e9e}.single .content .admonition.quote .admonition-title{border-bottom-color:rgba(159,159,159,0.1);background-color:rgba(159,159,159,0.25)}.single .content .admonition.quote.open .admonition-title{background-color:rgba(159,159,159,0.1)}.single .content .admonition.quote i.icon{color:#9e9e9e}.single .content .admonition:last-child{margin-bottom:0.75rem}.single .content .bilibili{position:relative;width:100%;height:0;padding-bottom:75%;margin:3% auto;text-align:center}.single .content .bilibili iframe{position:absolute;width:100%;height:100%;left:0;top:0}.single .content .card-link{position:relative;display:block;margin:0.5rem auto;box-sizing:border-box;width:clamp(50%, 400px, 100%);max-width:100%;overflow:hidden;text-decoration:none;border:none;-webkit-border-radius:.75rem;-moz-border-radius:.75rem;border-radius:.75rem}.single .content .cl-backdrop{position:absolute;top:0.75rem;bottom:0.75rem;left:0;right:0;background-image:var(--cl-bg-url);background-repeat:no-repeat;filter:blur(0.5rem);opacity:0.5;background-size:contain;background-position:center}.single .content .cl-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding:0.75rem;background-color:rgba(245,245,245,0.88)}.single .content .cl-text{overflow:hidden}.single .content .cl-title{display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;max-height:calc(1rem * 1.25 * 2);font-size:1rem;font-weight:500;line-height:1.25;color:#161209}.single .content .cl-meta{display:flex;align-items:center;margin-top:0.25rem;font-size:0.825rem;color:#b1b1ba}.single .content .cl-icon-link{width:1rem;height:1rem;flex-shrink:0;margin-right:0.25rem}.single .content .cl-url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.single .content .cl-icon-globe{width:4rem;height:4rem;flex-shrink:0;margin-left:0.25rem}[data-theme='dark'] .single .content .cl-content{background-color:rgba(61,62,65,0.88)}[data-theme='dark'] .single .content .cl-title{color:#a9a9b3}[data-theme='dark'] .single .content .cl-meta{color:#909092}.single .content .blockquote-center{border-left:none;margin:40px 0;padding:0;position:relative;text-align:center;color:initial}.single .content .blockquote-center::after,.single .content .blockquote-center::before{left:0;line-height:1;opacity:0.6;position:absolute;width:100%}.single .content .blockquote-center::before{border-top:1px solid #ba0066;text-align:left;top:-20px;content:'\f10d';font-family:'Font Awesome 5 Free';font-weight:900}[data-theme='dark'] .single .content .blockquote-center::before{border-top-color:#EC008C}.single .content .blockquote-center::after{border-bottom:1px solid #ba0066;bottom:-20px;text-align:right;content:'\f10e';font-family:'Font Awesome 5 Free';font-weight:900}[data-theme='dark'] .single .content .blockquote-center::after{border-bottom-color:#EC008C}.single .content .echarts{margin:0.5rem 0;text-align:center}[data-theme='dark'] .single .content iframe.instagram-media{border:none !important}.single .content .mapbox{margin:0.5rem 0;padding:0.5rem 0;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.single .content .mermaid{text-align:center}.single .content .mermaid svg{max-width:100%;height:auto}.single .content hr{margin:1rem 0;position:relative;border-top:1px dashed #ba0066;border-bottom:none}[data-theme='dark'] .single .content hr{border-top:1px dashed #EC008C}.single .content kbd{display:inline-block;padding:0 0.25rem;background-color:#fff;border:1px solid #ba0066;border-bottom-color:#ba0066;font-size:0.8rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system-ui,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;color:#24292f;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:inset 0 -1px 0 #ba0066;box-shadow:inset 0 -1px 0 #ba0066}[data-theme='dark'] .single .content kbd{background-color:#221531;border:1px solid #EC008C;border-bottom-color:#EC008C;color:#adbac7;-webkit-box-shadow:inset 0 -1px 0 #EC008C;box-shadow:inset 0 -1px 0 #EC008C}.single .post-reward{padding:1rem;text-align:center}.single .post-reward~.post-footer{margin-top:0}.single .post-reward:has(.reward-ways:empty){display:none}.single .post-reward .comment{margin:0.5rem 0;font-weight:500}.single .post-reward .reward-ways{display:none}.single .post-reward .reward-input:checked~.reward-ways{display:block;padding-top:20px}.single .post-reward .reward-input:checked~.reward-ways div{display:inline-block;-webkit-user-select:none !important;-moz-user-select:none !important;user-select:none !important}.single .post-reward .reward-input:checked~.reward-ways div span{display:block}.single .post-reward .reward-input:checked~.reward-ways div:hover span[data-animation]{animation:var(--animation-reward, jackInTheBox) 0.8s infinite linear;pointer-events:none}.single .post-reward .reward-input:checked~.reward-ways div img{display:inline-block;margin:0.8em 2em 0;max-width:100%;width:180px}.single .post-reward .reward-input:checked~.reward-ways[data-mode='fixed']{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:1rem;background-color:#fff;z-index:200;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 0 1.5rem 0 rgba(0,0,0,0.2);box-shadow:0 0 1.5rem 0 rgba(0,0,0,0.2)}[data-theme='dark'] .single .post-reward .reward-input:checked~.reward-ways[data-mode='fixed']{background-color:#221531;-webkit-box-shadow:0 0 1.5rem 0 rgba(255,255,255,0.2);box-shadow:0 0 1.5rem 0 rgba(255,255,255,0.2)}.single .post-reward .reward-button{display:inline-block;box-sizing:border-box;cursor:pointer;outline:none;color:#ff7961;border:2px solid #ff8e7a;border-radius:5px;padding:0.6rem 1rem;background-color:#fff;vertical-align:text-top;line-height:1rem;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.single .post-reward .reward-button:active,.single .post-reward .reward-button:hover{color:#ffffff;border-color:tomato;background-color:tomato}[data-theme='dark'] .single .post-reward .reward-button:active,[data-theme='dark'] .single .post-reward .reward-button:hover{color:#ffffff;border-color:#ff4d2e;background-color:#ff4d2e}[data-theme='dark'] .single .post-reward .reward-button{color:tomato;border-color:#ff7961;background-color:#221531}.single .post-footer{margin:2rem 0}.single .post-footer:has(~.post-reward){margin-bottom:0}.single .post-footer .post-info{border-bottom:1px solid #ba0066;padding:1rem 0 0.3rem}[data-theme='dark'] .single .post-footer .post-info{border-bottom:1px solid #EC008C}.single .post-footer .post-info .post-info-line{display:flex;justify-content:space-between}.single .post-footer .post-info .post-info-line .post-info-mod{font-size:0.8em;color:#b1b1ba}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-mod{color:#909092}.single .post-footer .post-info .post-info-line .post-info-mod a,.single .post-footer .post-info .post-info-line .post-info-mod a::before,.single .post-footer .post-info .post-info-line .post-info-mod a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-mod a,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-mod a::before,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-mod a::after{color:#EC008C}.single .post-footer .post-info .post-info-line .post-info-mod a:active,.single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#EC008C}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-mod a:active,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#ba0066}.single .post-footer .post-info .post-info-line .post-info-license{font-size:0.8em;color:#b1b1ba}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-license{color:#909092}.single .post-footer .post-info .post-info-line .post-info-license a,.single .post-footer .post-info .post-info-line .post-info-license a::before,.single .post-footer .post-info .post-info-line .post-info-license a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-license a,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-license a::before,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-license a::after{color:#EC008C}.single .post-footer .post-info .post-info-line .post-info-license a:active,.single .post-footer .post-info .post-info-line .post-info-license a:hover{color:#EC008C}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-license a:active,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-license a:hover{color:#ba0066}.single .post-footer .post-info .post-info-line .post-info-md{font-size:0.8rem;width:fit-content}.single .post-footer .post-info .post-info-line .post-info-md a,.single .post-footer .post-info .post-info-line .post-info-md a::before,.single .post-footer .post-info .post-info-line .post-info-md a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-md a,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-md a::before,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-md a::after{color:#EC008C}.single .post-footer .post-info .post-info-line .post-info-md a:active,.single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#EC008C}[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-md a:active,[data-theme='dark'] .single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#ba0066}.single .post-footer .post-info .post-info-line .post-info-md>span:not(:first-child)::before{content:'|';margin-left:0.25rem;margin-right:0.25rem}.single .post-footer .post-info .post-info-line .post-info-share a *{vertical-align:text-bottom}.single .post-footer .post-info-more{padding:0.3rem 0 1rem;display:flex;justify-content:space-between;font-size:0.9rem}.single .post-footer .post-tags{max-width:65%}.single .post-footer .post-tags *{display:inline}.single .post-footer .post-tags a,.single .post-footer .post-tags a::before,.single .post-footer .post-tags a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .single .post-footer .post-tags a,[data-theme='dark'] .single .post-footer .post-tags a::before,[data-theme='dark'] .single .post-footer .post-tags a::after{color:#EC008C}.single .post-footer .post-tags a:active,.single .post-footer .post-tags a:hover{color:#EC008C}[data-theme='dark'] .single .post-footer .post-tags a:active,[data-theme='dark'] .single .post-footer .post-tags a:hover{color:#ba0066}.single .post-footer .post-tags .post-tag:not(:last-child)::after{content:',';margin-right:0.25rem}.single .post-footer .post-nav{display:flex;justify-content:space-between;gap:1.5rem}.single .post-footer .post-nav .post-nav-item{flex:1;font-size:1rem;font-weight:600;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.single .post-footer .post-nav .post-nav-item[rel='next']{text-align:right}.single .post-footer .post-nav .post-nav-item[rel='prev']:hover{-webkit-transform:translateX(-4px);-ms-transform:translateX(-4px);-o-transform:translateX(-4px);transform:translateX(-4px)}.single .post-footer .post-nav .post-nav-item[rel='next']:hover{-webkit-transform:translateX(4px);-ms-transform:translateX(4px);-o-transform:translateX(4px);transform:translateX(4px)}.single>#comments{padding:2rem 0}.lg-toolbar .lg-icon::after{color:#999}.special .single-title,.special .single-subtitle{text-align:right}.archive .single-title{padding:1rem 0 0.5rem;margin:0;font-size:1.6rem;font-weight:bold;line-height:140%;text-align:right}.archive .single-subtitle{margin:0.5rem 0;font-size:1.2rem;font-weight:normal;line-height:100%;text-align:right}.archive .group-title{font-size:1.2rem;margin-top:1.5rem;margin-bottom:1rem}.archive .categories-card{margin:0 auto;display:flex;align-items:flex-start;justify-content:space-between;flex-direction:row;flex-wrap:wrap;line-height:1.6rem}.archive .categories-card .card-item{font-size:0.875rem;text-align:left;width:45%;display:flex;align-items:flex-start;min-height:10rem;padding:0 2%;position:relative}.archive .categories-card .card-item:nth-child(n+3){margin-top:2rem}.archive .categories-card .card-item .card-item-wrapper{width:100%;overflow:hidden}.archive .categories-card .card-item .card-item-wrapper .card-item-title{font-size:1.2rem;font-weight:bold;display:inline-block;margin-top:1rem;margin-bottom:0.75rem}.archive .categories-card .card-item .card-item-wrapper span{float:right;padding-right:1rem}.archive .archive-item{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;margin:0.25rem 0 0.25rem 1.5rem}.archive .archive-item-link{min-width:10%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.archive .archive-item-link:hover{color:#EC008C;background-color:transparent}[data-theme='dark'] .archive .archive-item-link{color:#EC008C}[data-theme='dark'] .archive .archive-item-link:hover{color:#ba0066}.archive .archive-item-date{text-align:right;color:#b1b1ba;white-space:nowrap;font-variant-numeric:tabular-nums lining-nums}[data-theme='dark'] .archive .archive-item-date{color:#909092}.archive .more-post{text-align:right}.archive .tag-cloud-tags{margin:10px 0}.archive .tag-cloud-tags a,.archive .tag-cloud-tags a::before,.archive .tag-cloud-tags a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .archive .tag-cloud-tags a,[data-theme='dark'] .archive .tag-cloud-tags a::before,[data-theme='dark'] .archive .tag-cloud-tags a::after{color:#EC008C}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:hover{color:#EC008C}[data-theme='dark'] .archive .tag-cloud-tags a:active,[data-theme='dark'] .archive .tag-cloud-tags a:hover{color:#ba0066}.archive .tag-cloud-tags a{display:inline-block;position:relative;margin:5px 10px;word-wrap:break-word;overflow-wrap:break-word;-webkit-transition:all ease-out 0.3s;-moz-transition:all ease-out 0.3s;-o-transition:all ease-out 0.3s;transition:all ease-out 0.3s}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:focus,.archive .tag-cloud-tags a:hover{-webkit-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}.archive .tag-cloud-tags a:active sup,.archive .tag-cloud-tags a:focus sup,.archive .tag-cloud-tags a:hover sup{color:#161209;-webkit-transition:all ease-out 0.3s;-moz-transition:all ease-out 0.3s;-o-transition:all ease-out 0.3s;transition:all ease-out 0.3s}[data-theme='dark'] .archive .tag-cloud-tags a:active sup,[data-theme='dark'] .archive .tag-cloud-tags a:focus sup,[data-theme='dark'] .archive .tag-cloud-tags a:hover sup{color:#a9a9b3}.archive .tag-cloud-tags a sup{color:#b1b1ba}[data-theme='dark'] .archive .tag-cloud-tags a sup{color:#909092}.archive .tag-cloud-0{color:#b1b1ba !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-0:active,.archive .tag-cloud-0:focus,.archive .tag-cloud-0:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-0:active,[data-theme='dark'] .archive .tag-cloud-0:focus,[data-theme='dark'] .archive .tag-cloud-0:hover{color:#ba0066}.archive .tag-cloud-0:active sup,.archive .tag-cloud-0:focus sup,.archive .tag-cloud-0:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-0{color:#909092 !important}.archive .tag-cloud-0 sup{opacity:0}.archive .tag-cloud-1{color:#a2a1a8 !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-1:active,.archive .tag-cloud-1:focus,.archive .tag-cloud-1:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-1:active,[data-theme='dark'] .archive .tag-cloud-1:focus,[data-theme='dark'] .archive .tag-cloud-1:hover{color:#ba0066}.archive .tag-cloud-1:active sup,.archive .tag-cloud-1:focus sup,.archive .tag-cloud-1:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-1{color:#939395 !important}.archive .tag-cloud-1 sup{opacity:0}.archive .tag-cloud-2{color:#929197 !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-2:active,.archive .tag-cloud-2:focus,.archive .tag-cloud-2:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-2:active,[data-theme='dark'] .archive .tag-cloud-2:focus,[data-theme='dark'] .archive .tag-cloud-2:hover{color:#ba0066}.archive .tag-cloud-2:active sup,.archive .tag-cloud-2:focus sup,.archive .tag-cloud-2:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-2{color:#959599 !important}.archive .tag-cloud-2 sup{opacity:0}.archive .tag-cloud-3{color:#838185 !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-3:active,.archive .tag-cloud-3:focus,.archive .tag-cloud-3:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-3:active,[data-theme='dark'] .archive .tag-cloud-3:focus,[data-theme='dark'] .archive .tag-cloud-3:hover{color:#ba0066}.archive .tag-cloud-3:active sup,.archive .tag-cloud-3:focus sup,.archive .tag-cloud-3:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-3{color:#98989c !important}.archive .tag-cloud-3 sup{opacity:0}.archive .tag-cloud-4{color:#737173 !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-4:active,.archive .tag-cloud-4:focus,.archive .tag-cloud-4:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-4:active,[data-theme='dark'] .archive .tag-cloud-4:focus,[data-theme='dark'] .archive .tag-cloud-4:hover{color:#ba0066}.archive .tag-cloud-4:active sup,.archive .tag-cloud-4:focus sup,.archive .tag-cloud-4:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-4{color:#9a9a9f !important}.archive .tag-cloud-4 sup{opacity:0}.archive .tag-cloud-5{color:#646262 !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-5:active,.archive .tag-cloud-5:focus,.archive .tag-cloud-5:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-5:active,[data-theme='dark'] .archive .tag-cloud-5:focus,[data-theme='dark'] .archive .tag-cloud-5:hover{color:#ba0066}.archive .tag-cloud-5:active sup,.archive .tag-cloud-5:focus sup,.archive .tag-cloud-5:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-5{color:#9d9da3 !important}.archive .tag-cloud-5 sup{opacity:0}.archive .tag-cloud-6{color:#545250 !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-6:active,.archive .tag-cloud-6:focus,.archive .tag-cloud-6:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-6:active,[data-theme='dark'] .archive .tag-cloud-6:focus,[data-theme='dark'] .archive .tag-cloud-6:hover{color:#ba0066}.archive .tag-cloud-6:active sup,.archive .tag-cloud-6:focus sup,.archive .tag-cloud-6:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-6{color:#9f9fa6 !important}.archive .tag-cloud-6 sup{opacity:0}.archive .tag-cloud-7{color:#45423e !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-7:active,.archive .tag-cloud-7:focus,.archive .tag-cloud-7:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-7:active,[data-theme='dark'] .archive .tag-cloud-7:focus,[data-theme='dark'] .archive .tag-cloud-7:hover{color:#ba0066}.archive .tag-cloud-7:active sup,.archive .tag-cloud-7:focus sup,.archive .tag-cloud-7:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-7{color:#a2a2a9 !important}.archive .tag-cloud-7 sup{opacity:0}.archive .tag-cloud-8{color:#35322c !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-8:active,.archive .tag-cloud-8:focus,.archive .tag-cloud-8:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-8:active,[data-theme='dark'] .archive .tag-cloud-8:focus,[data-theme='dark'] .archive .tag-cloud-8:hover{color:#ba0066}.archive .tag-cloud-8:active sup,.archive .tag-cloud-8:focus sup,.archive .tag-cloud-8:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-8{color:#a4a4ac !important}.archive .tag-cloud-8 sup{opacity:0}.archive .tag-cloud-9{color:#26221b !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-9:active,.archive .tag-cloud-9:focus,.archive .tag-cloud-9:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-9:active,[data-theme='dark'] .archive .tag-cloud-9:focus,[data-theme='dark'] .archive .tag-cloud-9:hover{color:#ba0066}.archive .tag-cloud-9:active sup,.archive .tag-cloud-9:focus sup,.archive .tag-cloud-9:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-9{color:#a7a7b0 !important}.archive .tag-cloud-9 sup{opacity:0}.archive .tag-cloud-10{color:#161209 !important;font-size:var(--tag-font);margin:10px !important}.archive .tag-cloud-10:active,.archive .tag-cloud-10:focus,.archive .tag-cloud-10:hover{color:#EC008C !important}[data-theme='dark'] .archive .tag-cloud-10:active,[data-theme='dark'] .archive .tag-cloud-10:focus,[data-theme='dark'] .archive .tag-cloud-10:hover{color:#ba0066}.archive .tag-cloud-10:active sup,.archive .tag-cloud-10:focus sup,.archive .tag-cloud-10:hover sup{opacity:1}[data-theme='dark'] .archive .tag-cloud-10{color:#a9a9b3 !important}.archive .tag-cloud-10 sup{opacity:0}.home .home-profile{text-align:center}.home .home-profile .home-avatar{padding:0.5rem}.home .home-profile .home-avatar img{display:inline-block;width:8rem;height:auto;margin:0 auto;-webkit-border-radius:100%;-moz-border-radius:100%;border-radius:100%;-webkit-box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);-webkit-transition:all 0.4s ease;-moz-transition:all 0.4s ease;-o-transition:all 0.4s ease;transition:all 0.4s ease}[data-theme='dark'] .home .home-profile .home-avatar img{-webkit-box-shadow:0 0 0 0.3618em rgba(255,255,255,0.05);box-shadow:0 0 0 0.3618em rgba(255,255,255,0.05)}.home .home-profile .home-avatar img:hover{position:relative;-webkit-transform:translateY(-0.75rem);-ms-transform:translateY(-0.75rem);-o-transform:translateY(-0.75rem);transform:translateY(-0.75rem)}.home .home-profile .home-title{font-size:1.25rem;font-weight:bold;margin:0;padding:0.5rem}.home .home-profile .home-subtitle{font-size:1rem;font-weight:normal;margin:0;padding:0.5rem}.home .home-profile .links{padding:0.5rem;font-size:1.5rem}.home .home-profile .links a *{vertical-align:text-bottom}.home .home-profile .links img{height:1.5rem;padding:0 0.25rem}.home .home-profile .home-disclaimer{font-size:1rem;line-height:1.5rem;font-weight:normal;margin:0;padding:0.5rem;color:#b1b1ba}[data-theme='dark'] .home .home-profile .home-disclaimer{color:#909092}.home.posts .home-profile{padding:2rem 0}.home.posts .home-avatar img{width:6rem}.home.posts .summary{padding-top:1rem;padding-bottom:0.8rem;color:#161209;border-bottom:1px dashed #ba0066}.home.posts .summary:first-of-type{padding-top:0}[data-theme='dark'] .home.posts .summary{color:#a9a9b3;border-bottom:1px dashed #EC008C}.home.posts .summary .featured-image-preview{width:100%;padding:30% 0 0;position:relative;margin:0.6rem auto;-webkit-transition:transform 0.4s ease;-moz-transition:transform 0.4s ease;-o-transition:transform 0.4s ease;transition:transform 0.4s ease}.home.posts .summary .featured-image-preview img{position:absolute;width:100%;height:100%;left:0;top:0;-o-object-fit:cover;object-fit:cover;font-family:"object-fit: cover;"}.home.posts .summary .featured-image-preview:hover{-webkit-transform:scale(1.01);-ms-transform:scale(1.01);-o-transform:scale(1.01);transform:scale(1.01)}.home.posts .summary .single-title{font-size:1.25rem;line-height:140%;margin:0.4rem 0}.home.posts .summary .content{display:-moz-box;display:-webkit-box;display:box;-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:3;margin-top:0.3rem;width:100%;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;overflow-wrap:break-word;color:#b1b1ba}[data-theme='dark'] .home.posts .summary .content{color:#909092}.home.posts .summary .content h2,.home.posts .summary .content h3,.home.posts .summary .content h4,.home.posts .summary .content h5,.home.posts .summary .content h6,.home.posts .summary .content p{font-size:1rem;line-height:1.5;display:inline}.home.posts .summary .content h2::after,.home.posts .summary .content h3::after,.home.posts .summary .content h4::after,.home.posts .summary .content h5::after,.home.posts .summary .content h6::after,.home.posts .summary .content p::after{content:'\A';white-space:pre}.home.posts .summary .content h2{font-size:1.125rem}.home.posts .summary .content a,.home.posts .summary .content a::before,.home.posts .summary .content a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .home.posts .summary .content a,[data-theme='dark'] .home.posts .summary .content a::before,[data-theme='dark'] .home.posts .summary .content a::after{color:#EC008C}.home.posts .summary .content a:active,.home.posts .summary .content a:hover{color:#EC008C}[data-theme='dark'] .home.posts .summary .content a:active,[data-theme='dark'] .home.posts .summary .content a:hover{color:#ba0066}.home.posts .summary .content b,.home.posts .summary .content strong{color:#b1b1ba}[data-theme='dark'] .home.posts .summary .content b,[data-theme='dark'] .home.posts .summary .content strong{color:#909092}.home.posts .summary .post-footer{margin-top:0.4rem;display:flex;justify-content:space-between;align-items:center;font-size:0.875rem}.home.posts .summary .post-footer a,.home.posts .summary .post-footer a::before,.home.posts .summary .post-footer a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .home.posts .summary .post-footer a,[data-theme='dark'] .home.posts .summary .post-footer a::before,[data-theme='dark'] .home.posts .summary .post-footer a::after{color:#EC008C}.home.posts .summary .post-footer a:active,.home.posts .summary .post-footer a:hover{color:#EC008C}[data-theme='dark'] .home.posts .summary .post-footer a:active,[data-theme='dark'] .home.posts .summary .post-footer a:hover{color:#ba0066}.home.posts .summary .post-footer .post-tags{padding:0}.home.posts .summary .post-footer .post-tags a,.home.posts .summary .post-footer .post-tags a::before,.home.posts .summary .post-footer .post-tags a::after{text-decoration:none;color:#ba0066}[data-theme='dark'] .home.posts .summary .post-footer .post-tags a,[data-theme='dark'] .home.posts .summary .post-footer .post-tags a::before,[data-theme='dark'] .home.posts .summary .post-footer .post-tags a::after{color:#EC008C}.home.posts .summary .post-footer .post-tags a:active,.home.posts .summary .post-footer .post-tags a:hover{color:#EC008C}[data-theme='dark'] .home.posts .summary .post-footer .post-tags a:active,[data-theme='dark'] .home.posts .summary .post-footer .post-tags a:hover{color:#ba0066}.home.posts .summary .post-footer .post-tags .post-tag:not(:last-child)::after{content:',';margin-right:0.25rem}#content-404{font-size:1.8rem;line-height:3rem;-webkit-transform:translateY(30vh);-ms-transform:translateY(30vh);-o-transform:translateY(30vh);transform:translateY(30vh);text-align:center}#content-offline{-webkit-transform:translateY(30vh);-ms-transform:translateY(30vh);-o-transform:translateY(30vh);transform:translateY(30vh);text-align:center}#content-offline .offline-title{font-size:3.6rem}#content-offline .offline-subtitle{margin:0.4rem 0;font-size:1rem;font-weight:normal;font-style:italic;line-height:100%;color:#57606a}#content-offline .error-text{font-size:1.2rem}.friend-links{margin-top:1rem;display:flex;flex-direction:row;justify-content:space-between;flex-wrap:wrap}@media (max-width: 576px){.friend-links{justify-content:space-around}}.friend-link{width:150px;height:200px;font-size:1rem;text-align:center;background:rgba(255,255,255,0.3);box-sizing:border-box;box-shadow:3px 3px 5px #aaa;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;transition-duration:0.3s;margin-bottom:1rem;display:flex;flex-direction:column;justify-content:space-between}.friend-link:hover{background:#fff;-webkit-transform:scale(1.03);-ms-transform:scale(1.03);-o-transform:scale(1.03);transform:scale(1.03);box-shadow:0 0 3px #aaa}.friend-avatar{object-fit:cover;object-position:center;width:100% !important;height:150px !important;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;margin:0;padding:0}.friend-nickname{display:block;position:relative;color:#2bbc8a;font-weight:bold;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:18px;margin-bottom:1rem}.friend-nickname:hover{color:#d480aa}@media only screen and (min-width: 1441px){.breadcrumb-container .breadcrumb,.page{width:60%}[data-page-style='wide'] .breadcrumb-container .breadcrumb,.breadcrumb-container [data-page-style='wide'] .breadcrumb,[data-page-style='wide'] .page{width:64%}[data-page-style='narrow'] .breadcrumb-container .breadcrumb,.breadcrumb-container [data-page-style='narrow'] .breadcrumb,[data-page-style='narrow'] .page{max-width:800px}}@media only screen and (max-width: 1440px){.breadcrumb-container .breadcrumb,.page{width:56%}[data-page-style='wide'] .breadcrumb-container .breadcrumb,.breadcrumb-container [data-page-style='wide'] .breadcrumb,[data-page-style='wide'] .page{width:60%}}@media only screen and (max-width: 1200px){.breadcrumb-container .breadcrumb,.page{width:52%}[data-page-style='wide'] .breadcrumb-container .breadcrumb,.breadcrumb-container [data-page-style='wide'] .breadcrumb,[data-page-style='wide'] .page{width:56%}#header-desktop .header-wrapper{padding-right:1rem}.search-dropdown.desktop{right:1rem}}@media only screen and (max-width: 960px){.breadcrumb-container .breadcrumb,.page{width:80% !important}aside{display:none !important}#toc-static{display:block}#header-desktop .header-wrapper{padding-left:1rem}}@media only screen and (min-width: 681px){body:not([data-header-desktop='sticky']) .breadcrumb-container.sticky{top:0}body:not([data-header-desktop='auto']) .breadcrumb-container.sticky+.container .content [id]{scroll-margin-top:calc(var(--fi-scroll-mt) + var(--fi-breadcrumb-offset))}[data-header-desktop='normal'] .page .content [id]{--fi-scroll-mt: .5rem}}@media only screen and (max-width: 680px){#header-desktop{display:none}#header-mobile,.d-none-desktop{display:block}.d-none-mobile{display:none !important}body:not([data-header-mobile='sticky']) .breadcrumb-container.sticky{top:0}body:not([data-header-mobile='auto']) .breadcrumb-container.sticky+.container .content [id]{scroll-margin-top:calc(var(--fi-scroll-mt) + var(--fi-breadcrumb-offset))}[data-header-mobile='normal'] .page .content [id]{--fi-scroll-mt: .5rem}.breadcrumb-container .breadcrumb,.page{width:100% !important}.page .categories-card .card-item{width:100%}footer .footer-container{font-size:0.618rem}.pagination .page-item{margin:0 5px}}@media only print{@page{size:A4 portrait;margin:1.27cm}.page{width:100% !important;padding-top:0 !important}.page.single .single-title,.page.single .single-subtitle,.page.single .post-meta{text-align:center}.page h1:not(.single-title),.page .page-break-before{page-break-before:always}.page .page-break-after{page-break-after:always}.print-d-none,.fixed-button,.github-corner,.reading-progress-bar,header,.breadcrumb-container,footer,#toc-auto,.single .post-meta .comment-visitors,.single .post-meta .comment-count,.single .content .highlight>.chroma .code-header .ellipses,.single .content .highlight>.chroma .code-header .edit,.single .content .highlight>.chroma .code-header .copy,.single .post-reward,.single .post-footer .post-info .post-info-line .post-info-share,.single .post-footer .post-info-more section:last-child,.single .post-footer .post-nav,.single>#comments{display:none !important}}.button{background-color:#ba0066;transition-duration:0.4s;border:none;border-radius:5px;color:#fff;padding:8px 16px;text-align:center;text-decoration:none;display:inline-block;font-weight:bold;margin:4px 2px;transition-duration:0.4s}.button:hover{background-color:#EC008C}[data-theme="dark"] .button{background-color:#EC008C;transition-duration:0.4s;border:none;border-radius:5px;color:#221531;padding:8px 16px;text-align:center;text-decoration:none;display:inline-block;font-weight:bold;margin:4px 2px;transition-duration:0.4s}[data-theme="dark"] .button:hover{background-color:#ba0066}.field{background-color:#fff;transition-duration:0.4s;border:2px solid #ba0066;border-radius:5px;color:#161209;padding:8px 16px;font-weight:bold;margin:4px 2px;transition-duration:0.4s}[data-theme="dark"] .field{background-color:#221531;transition-duration:0.4s;border:2px solid #EC008C;border-radius:5px;color:#a9a9b3;padding:8px 16px;font-weight:bold;margin:4px 2px;transition-duration:0.4s}.newsletter{border-top:1px dashed #ba0066;margin-top:20px}[theme="dark"] .newsletter{border-top:1px dashed #EC008C;margin-top:20px} + +/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file diff --git a/resources/_gen/assets/scss/css/style.scss_26962b449d539ee5c1301a7879e5bb0e.json b/resources/_gen/assets/scss/css/style.scss_26962b449d539ee5c1301a7879e5bb0e.json new file mode 100644 index 0000000..0095485 --- /dev/null +++ b/resources/_gen/assets/scss/css/style.scss_26962b449d539ee5c1301a7879e5bb0e.json @@ -0,0 +1 @@ +{"Target":"css/style.min.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/static/img/about/joystick.png b/static/img/about/joystick.png new file mode 100644 index 0000000..03244ad Binary files /dev/null and b/static/img/about/joystick.png differ diff --git a/static/img/bitwarden/bitwarden.gif b/static/img/bitwarden/bitwarden.gif new file mode 100644 index 0000000..db99acb Binary files /dev/null and b/static/img/bitwarden/bitwarden.gif differ diff --git a/static/img/bitwarden/bitwarden1.gif b/static/img/bitwarden/bitwarden1.gif new file mode 100644 index 0000000..a54da58 Binary files /dev/null and b/static/img/bitwarden/bitwarden1.gif differ diff --git a/static/img/dgraph/dgraph-1.png b/static/img/dgraph/dgraph-1.png new file mode 100644 index 0000000..37bfbbd Binary files /dev/null and b/static/img/dgraph/dgraph-1.png differ diff --git a/static/img/dgraph/schema-nquad.png b/static/img/dgraph/schema-nquad.png new file mode 100644 index 0000000..7b59c97 Binary files /dev/null and b/static/img/dgraph/schema-nquad.png differ diff --git a/static/img/dgraph/schema-ratel.png b/static/img/dgraph/schema-ratel.png new file mode 100644 index 0000000..7ae9114 Binary files /dev/null and b/static/img/dgraph/schema-ratel.png differ diff --git a/static/img/dgraph1.png b/static/img/dgraph1.png new file mode 100644 index 0000000..d2bc60b Binary files /dev/null and b/static/img/dgraph1.png differ diff --git a/static/img/email-hoelle/actions.png b/static/img/email-hoelle/actions.png new file mode 100644 index 0000000..889089b Binary files /dev/null and b/static/img/email-hoelle/actions.png differ diff --git a/static/img/email-hoelle/sanebox-folders.png b/static/img/email-hoelle/sanebox-folders.png new file mode 100644 index 0000000..723ac6c Binary files /dev/null and b/static/img/email-hoelle/sanebox-folders.png differ diff --git a/static/img/email-hoelle/sanebox.png b/static/img/email-hoelle/sanebox.png new file mode 100644 index 0000000..e4c7d55 Binary files /dev/null and b/static/img/email-hoelle/sanebox.png differ diff --git a/static/img/email-hoelle/snooze.png b/static/img/email-hoelle/snooze.png new file mode 100644 index 0000000..67c36da Binary files /dev/null and b/static/img/email-hoelle/snooze.png differ diff --git a/static/img/evans/evans.gif b/static/img/evans/evans.gif new file mode 100644 index 0000000..e08dc8f Binary files /dev/null and b/static/img/evans/evans.gif differ diff --git a/static/img/evans/evans1.gif b/static/img/evans/evans1.gif new file mode 100644 index 0000000..fe4b8f5 Binary files /dev/null and b/static/img/evans/evans1.gif differ diff --git a/static/img/evans/evans2.gif b/static/img/evans/evans2.gif new file mode 100644 index 0000000..16faa1c Binary files /dev/null and b/static/img/evans/evans2.gif differ diff --git a/static/img/evans/evans3.gif b/static/img/evans/evans3.gif new file mode 100644 index 0000000..33e3108 Binary files /dev/null and b/static/img/evans/evans3.gif differ diff --git a/static/img/evans/evans4.gif b/static/img/evans/evans4.gif new file mode 100644 index 0000000..a23a7f8 Binary files /dev/null and b/static/img/evans/evans4.gif differ diff --git a/static/img/evans/evans5.gif b/static/img/evans/evans5.gif new file mode 100644 index 0000000..a8aaf93 Binary files /dev/null and b/static/img/evans/evans5.gif differ diff --git a/static/img/kitty.jpg b/static/img/kitty.jpg new file mode 100644 index 0000000..3798e8c Binary files /dev/null and b/static/img/kitty.jpg differ diff --git a/static/img/laptop-cyber.png b/static/img/laptop-cyber.png new file mode 100644 index 0000000..57b9444 Binary files /dev/null and b/static/img/laptop-cyber.png differ diff --git a/static/img/n8n/2023-03-17_12-10.png b/static/img/n8n/2023-03-17_12-10.png new file mode 100644 index 0000000..7f4fb5d Binary files /dev/null and b/static/img/n8n/2023-03-17_12-10.png differ diff --git a/static/img/orchid/account.gif b/static/img/orchid/account.gif new file mode 100644 index 0000000..bd673f7 Binary files /dev/null and b/static/img/orchid/account.gif differ diff --git a/static/img/orchid/connect.gif b/static/img/orchid/connect.gif new file mode 100644 index 0000000..ee34315 Binary files /dev/null and b/static/img/orchid/connect.gif differ diff --git a/static/img/orchid/hop.gif b/static/img/orchid/hop.gif new file mode 100644 index 0000000..2242120 Binary files /dev/null and b/static/img/orchid/hop.gif differ diff --git a/static/img/orchid/multihop.gif b/static/img/orchid/multihop.gif new file mode 100644 index 0000000..c008a5c Binary files /dev/null and b/static/img/orchid/multihop.gif differ diff --git a/static/img/orchid/orchid.gif b/static/img/orchid/orchid.gif new file mode 100644 index 0000000..f560890 Binary files /dev/null and b/static/img/orchid/orchid.gif differ diff --git a/static/img/productivity-8020/productivity-8020.png b/static/img/productivity-8020/productivity-8020.png new file mode 100644 index 0000000..a50fbf4 Binary files /dev/null and b/static/img/productivity-8020/productivity-8020.png differ diff --git a/static/img/tutorials/baserow/baserow-excel-title.png b/static/img/tutorials/baserow/baserow-excel-title.png new file mode 100644 index 0000000..a2d4e3c Binary files /dev/null and b/static/img/tutorials/baserow/baserow-excel-title.png differ diff --git a/static/img/tutorials/baserow/baserow-single-source-of-truth.png b/static/img/tutorials/baserow/baserow-single-source-of-truth.png new file mode 100644 index 0000000..90a040d Binary files /dev/null and b/static/img/tutorials/baserow/baserow-single-source-of-truth.png differ diff --git a/static/img/tutorials/baserow/baserow-views.png b/static/img/tutorials/baserow/baserow-views.png new file mode 100644 index 0000000..629a4b0 Binary files /dev/null and b/static/img/tutorials/baserow/baserow-views.png differ diff --git a/static/img/tutorials/baserow/spreadsheet-cyberpunk.png b/static/img/tutorials/baserow/spreadsheet-cyberpunk.png new file mode 100644 index 0000000..cc66bb9 Binary files /dev/null and b/static/img/tutorials/baserow/spreadsheet-cyberpunk.png differ diff --git a/static/img/wallet.png b/static/img/wallet.png new file mode 100644 index 0000000..c829c56 Binary files /dev/null and b/static/img/wallet.png differ diff --git a/static/img/yt-1/dns.png b/static/img/yt-1/dns.png new file mode 100644 index 0000000..e1e65f5 Binary files /dev/null and b/static/img/yt-1/dns.png differ diff --git a/static/img/yt-1/godaddy-dns1.png b/static/img/yt-1/godaddy-dns1.png new file mode 100644 index 0000000..6668d10 Binary files /dev/null and b/static/img/yt-1/godaddy-dns1.png differ diff --git a/static/img/yt-1/godaddy-dns2.png b/static/img/yt-1/godaddy-dns2.png new file mode 100644 index 0000000..8a42b8b Binary files /dev/null and b/static/img/yt-1/godaddy-dns2.png differ diff --git a/static/img/yt-1/n8n-admin.png b/static/img/yt-1/n8n-admin.png new file mode 100644 index 0000000..6367898 Binary files /dev/null and b/static/img/yt-1/n8n-admin.png differ diff --git a/static/img/yt-1/n8n-stack-config.png b/static/img/yt-1/n8n-stack-config.png new file mode 100644 index 0000000..f31a044 Binary files /dev/null and b/static/img/yt-1/n8n-stack-config.png differ diff --git a/static/img/yt-1/n8n-stack-env.png b/static/img/yt-1/n8n-stack-env.png new file mode 100644 index 0000000..d0afcfa Binary files /dev/null and b/static/img/yt-1/n8n-stack-env.png differ diff --git a/static/img/yt-1/n8n-stack-erstellen.png b/static/img/yt-1/n8n-stack-erstellen.png new file mode 100644 index 0000000..3f8110a Binary files /dev/null and b/static/img/yt-1/n8n-stack-erstellen.png differ diff --git a/static/img/yt-1/n8n-templates.png b/static/img/yt-1/n8n-templates.png new file mode 100644 index 0000000..29103ac Binary files /dev/null and b/static/img/yt-1/n8n-templates.png differ diff --git a/static/img/yt-1/portainer-1st-login.png b/static/img/yt-1/portainer-1st-login.png new file mode 100644 index 0000000..d979a4e Binary files /dev/null and b/static/img/yt-1/portainer-1st-login.png differ diff --git a/static/img/yt-1/portainer-admin.png b/static/img/yt-1/portainer-admin.png new file mode 100644 index 0000000..ba5f0a5 Binary files /dev/null and b/static/img/yt-1/portainer-admin.png differ diff --git a/static/img/yt-1/portainer-start.png b/static/img/yt-1/portainer-start.png new file mode 100644 index 0000000..4bbe887 Binary files /dev/null and b/static/img/yt-1/portainer-start.png differ diff --git a/themes/FixIt/.babelrc b/themes/FixIt/.babelrc new file mode 100644 index 0000000..d5ad11e --- /dev/null +++ b/themes/FixIt/.babelrc @@ -0,0 +1,12 @@ +{ + "comments": false, + "minified": true, + "presets": [ + [ + "@babel/preset-env", + { + "targets": "> 0.25%, not dead" + } + ] + ] +} diff --git a/themes/FixIt/.github/FUNDING.yml b/themes/FixIt/.github/FUNDING.yml new file mode 100644 index 0000000..b842b80 --- /dev/null +++ b/themes/FixIt/.github/FUNDING.yml @@ -0,0 +1,3 @@ +custom: [ + "https://paypal.me/Lruihao" +] \ No newline at end of file diff --git a/themes/FixIt/.github/ISSUE_TEMPLATE/bug-report.yml b/themes/FixIt/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..3f6f88d --- /dev/null +++ b/themes/FixIt/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,51 @@ +name: "Bug Report 错误报告" +description: "Create a bug report 创建一个错误报告" +title: "[BUG] Some problem ..." +labels: ["bug"] +body: + - type: textarea + id: describe + attributes: + label: Describe the bug 描述你遇到的错误 + description: | + A clear and concise description of what the bug is. + 一段简短的对于你遇到的错误的描述。 + - type: textarea + id: expected + attributes: + label: Expected behavior 期待的行为 + description: | + A clear and concise description of what you expected to happen. + 一段简短的对于你期待的行为的描述。 + - type: textarea + id: screenshots + attributes: + label: Screenshots 屏幕截图 + description: | + If applicable, add screenshots to help explain your problem. + 如果可以的话,提供屏幕截图对解决问题很有帮助。 + - type: textarea + id: environment + attributes: + label: Build Environment 构建环境 + description: | + Please try to use Hugo **extended** version before opening the issue. + 请在创建 issue 之前尝试使用 Hugo **extended** 版本。 + placeholder: | + - OS: [e.g. Windows 10, macOS, Ubuntu] + - Theme version/commit [e.g. 0.2.0, 2ccba79] + - Hugo version [e.g. 0.69.0] + - type: textarea + id: preview + attributes: + label: Preview Environment 预览环境 + placeholder: | + - OS: [e.g. Windows 10, macOS, Ubuntu, iOS, Android] + - Browser [e.g. Chrome, Safari, Firefox] + - type: textarea + id: additional + attributes: + label: Additional Information 补充信息 + description: | + Configuration files or front matter code ... + 配置文件或者前置参数的代码…… diff --git a/themes/FixIt/.github/ISSUE_TEMPLATE/config.yml b/themes/FixIt/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..eabd25a --- /dev/null +++ b/themes/FixIt/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,13 @@ +blank_issues_enabled: false +contact_links: + - name: Questions 问题讨论 + url: https://github.com/hugo-fixit/FixIt/discussions/new + about: Please ask questions in Discussion. 请在讨论中提问。 + + - name: 官方 QQ 群 + url: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi + about: '加入 FixIt 主题交流群: 814031017' + + - name: Theme Documentation 主题文档 + url: https://fixit.lruihao.cn/categories/documentation/ + about: Please read the documentation carefully. 请先仔细阅读主题文档。 diff --git a/themes/FixIt/.github/ISSUE_TEMPLATE/feature-request.yml b/themes/FixIt/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..add0d8e --- /dev/null +++ b/themes/FixIt/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,22 @@ +name: "Feature request 功能请求" +description: "Suggest an idea for this project 为这个项目提供一个建议" +title: "[FEATURE] Some feature" +labels: ["enhancement"] +body: + - type: textarea + id: describe + attributes: + label: Describe the feature you want 描述你的功能需求 + description: | + Please submit new issues for different features. + 请针对不同的功能建议提交新的 issue。 + placeholder: | + I recommend adding this feature ... + 我希望添加这样的一个功能…… + - type: textarea + id: reference + attributes: + label: Useful reference 有价值的参考 + description: | + If available, provide useful links to fulfill the feature. + 如果可以的话,提供实现这个功能的相关参考链接。 diff --git a/themes/FixIt/.github/configs/auto-assign.yml b/themes/FixIt/.github/configs/auto-assign.yml new file mode 100644 index 0000000..a4ccf68 --- /dev/null +++ b/themes/FixIt/.github/configs/auto-assign.yml @@ -0,0 +1,27 @@ +# Set to true to add reviewers to PRs +addReviewers: true + +# Set to 'author' to add PR's author as a assignee +addAssignees: author + +# A list of reviewers to be added to PRs (GitHub user name) +reviewers: + - Lruihao + +# A number of reviewers added to the PR +# Set 0 to add all the reviewers (default: 0) +numberOfReviewers: 1 + +# A list of assignees, overrides reviewers if set +assignees: + - Lruihao + +# A number of assignees to add to the PRs +# Set to 0 to add all of the assignees. +# Uses numberOfReviewers if unset. +numberOfAssignees: 0 + +# A list of keywords to be skipped the process if PR's title include it +skipKeywords: + - wip + - deps-dev \ No newline at end of file diff --git a/themes/FixIt/.github/configs/codeql.yml b/themes/FixIt/.github/configs/codeql.yml new file mode 100644 index 0000000..cd53f35 --- /dev/null +++ b/themes/FixIt/.github/configs/codeql.yml @@ -0,0 +1,5 @@ +name: "CodeQL config" + +paths-ignore: + - assets/lib/** + - docs/** \ No newline at end of file diff --git a/themes/FixIt/.github/dependabot.yml b/themes/FixIt/.github/dependabot.yml new file mode 100644 index 0000000..16e1f20 --- /dev/null +++ b/themes/FixIt/.github/dependabot.yml @@ -0,0 +1,34 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "monthly" + open-pull-requests-limit: 1000 + assignees: + - "Lruihao" + labels: + - "dependencies" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 1000 + assignees: + - "Lruihao" + labels: + - "dependencies" + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 1000 + assignees: + - "Lruihao" + labels: + - "dependencies" diff --git a/themes/FixIt/.github/workflows/algolia-atomic.yml b/themes/FixIt/.github/workflows/algolia-atomic.yml new file mode 100644 index 0000000..a8891ed --- /dev/null +++ b/themes/FixIt/.github/workflows/algolia-atomic.yml @@ -0,0 +1,48 @@ +name: Update Algolia Search Index + +on: + push: + branches: + - master + paths: + - "docs" + workflow_dispatch: + +jobs: + algolia-atomic: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: + submodules: recursive # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: "latest" + extended: true + + - name: Build + run: | + npm install + npm run build + + - name: Update Algolia Index (en) + env: + ALGOLIA_APP_ID: YKOM6PKLUY + ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} + ALGOLIA_INDEX_NAME: "index.en" + ALGOLIA_INDEX_FILE: "./docs/public/index.json" + run: | + npm run algolia + + - name: Update Algolia Index (zh-cn) + env: + ALGOLIA_APP_ID: YKOM6PKLUY + ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} + ALGOLIA_INDEX_NAME: "index.zh-cn" + ALGOLIA_INDEX_FILE: "./docs/public/zh-cn/index.json" + run: | + npm run algolia diff --git a/themes/FixIt/.github/workflows/auto-assign.yml b/themes/FixIt/.github/workflows/auto-assign.yml new file mode 100644 index 0000000..22d2e1b --- /dev/null +++ b/themes/FixIt/.github/workflows/auto-assign.yml @@ -0,0 +1,14 @@ +name: Auto Assign +on: + issues: + types: [opened] + pull_request_target: + types: [opened] +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: wow-actions/auto-assign@v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CONFIG_FILE: .github/configs/auto-assign.yml \ No newline at end of file diff --git a/themes/FixIt/.github/workflows/build.yml b/themes/FixIt/.github/workflows/build.yml new file mode 100644 index 0000000..4205a16 --- /dev/null +++ b/themes/FixIt/.github/workflows/build.yml @@ -0,0 +1,21 @@ +name: Hugo build check +on: + pull_request: + branches: [ master ] + workflow_dispatch: +jobs: + Actions-Hugo-Check: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: + submodules: recursive # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: latest + extended: true + - name: Build Hugo static files + run: hugo -v --source=docs --gc --minify diff --git a/themes/FixIt/.github/workflows/codeql-analysis.yml b/themes/FixIt/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..3765e17 --- /dev/null +++ b/themes/FixIt/.github/workflows/codeql-analysis.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: + - master + pull_request: + branches: + - master + schedule: + - cron: "30 18 * * 5" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ "javascript" ] + # CodeQL supports [ "cpp", "csharp", "go", "java", "javascript", "python" ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + config-file: ./.github/configs/codeql.yml + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/themes/FixIt/.github/workflows/contributors.yml b/themes/FixIt/.github/workflows/contributors.yml new file mode 100644 index 0000000..96cfafb --- /dev/null +++ b/themes/FixIt/.github/workflows/contributors.yml @@ -0,0 +1,27 @@ +name: Generate Contribute List +on: + push: + branches: + - master + workflow_dispatch: +jobs: + contrib-readme-job: + runs-on: ubuntu-latest + name: A job to automate contribute list in contributors.md file + steps: + - name: First Contribution Check + id: first-check + uses: sukki37/first-contribution-check-action@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }} + - name: Contribute List + uses: akhilmhdh/contributors-readme-action@master + if: ${{ steps.first-check.outputs.isNewContributor == 'true' }} + with: + readme_path: "contributors.md" + image_size: 100 + commit_message: ":busts_in_silhouette: Chore(contributor): contrib-readme-action has updated contributors.md" + committer_username: "github-actions[bot]" + committer_email: "github-actions[bot]@users.noreply.github.com" + env: + GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }} diff --git a/themes/FixIt/.gitignore b/themes/FixIt/.gitignore new file mode 100644 index 0000000..023533b --- /dev/null +++ b/themes/FixIt/.gitignore @@ -0,0 +1,28 @@ +# Hugo default output directory +public/ +resources/ + +# Hugo +.hugo_build.lock +jsconfig.json + +# NPM +node_modules/ + +# VSCode +.vscode + +# OS Files +## Windows +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ + +## OSX +.DS_Store + +## Linux +.directory + + diff --git a/themes/FixIt/.gitmodules b/themes/FixIt/.gitmodules new file mode 100644 index 0000000..55356b0 --- /dev/null +++ b/themes/FixIt/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs"] + path = docs + url = https://github.com/hugo-fixit/docs.git diff --git a/themes/FixIt/.npmrc b/themes/FixIt/.npmrc new file mode 100644 index 0000000..7dba618 --- /dev/null +++ b/themes/FixIt/.npmrc @@ -0,0 +1,2 @@ +tag-version-prefix="v" +message=":bookmark: Chore(release): %s" \ No newline at end of file diff --git a/themes/FixIt/CHANGELOG.md b/themes/FixIt/CHANGELOG.md new file mode 100644 index 0000000..3b241da --- /dev/null +++ b/themes/FixIt/CHANGELOG.md @@ -0,0 +1,330 @@ +# Changelog + +All notable changes to this project will be documented in this file. + + +## v0.2.18-lts + +- :sparkles: Feat: add code block attributes support ([#330](https://github.com/hugo-fixit/FixIt/issues/330)) + +## v0.2.18 [2023.3.31] + +> **Note** +> This will be the last relatively stable 0.x release, after which the first major release will be incompatible with all previous 0.x releases +> Snapshot: <> + +## :boom: Breaking Updates + +- Refactor author data config [#288](https://github.com/hugo-fixit/FixIt/pull/288) + +## :new: What's New + +- :tada: Feat: add natively support mermaid with code fences ([#230](https://github.com/hugo-fixit/FixIt/issues/230)) +- :tada: Feat: add breadcrumb navigation ([#309](https://github.com/hugo-fixit/FixIt/pull/309)) +- :sparkles: Feat: add instant page (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279)) +- :sparkles: Feat: add `force` option value to `params.page.lightgallery` +- :sparkles: Feat: add loop parameter for typeit ([#303](https://github.com/hugo-fixit/FixIt/pull/303)) +- :sparkles: Feat: add paramater strict for giscus comment +- :bug: Fix: donate images without lazy loading (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279)) +- :bug: Fix: discordinvite typo (@mathieu-gilloots [#282](https://github.com/hugo-fixit/FixIt/pull/282)) +- :bug: Fix: missing parameter `requiredFields` for Valine +- :bug: Fix: js.build is executed after fingerprint, resulting in the destruction of js integrity +- :bug: Fix: toc fails when the toc aside is on the left +- :bug: Fix: APlayer invades the click event of the anchor links, resulting in invalid Chinese anchor links scrolling ([#292](https://github.com/hugo-fixit/FixIt/issues/292)) +- :bug: Fix: resolve style conflicts between valine and animate.css ([#304](https://github.com/hugo-fixit/FixIt/issues/304)) +- :bug: Fix: version `v0.2.17` is not compatible with previous versions +- :bug: Fix: `crypto-js/md5.js` and `crypto-js/sha256.js` cdn path error +- :bug: Fix: HackTheBox social link not in the right format ([#308](https://github.com/hugo-fixit/FixIt/issues/308)) +- :recycle: Refactor: image lazy loading ([#283](https://github.com/hugo-fixit/FixIt/pull/283)) +- :recycle: Refactor: author's avatar of post or profile ([#288](https://github.com/hugo-fixit/FixIt/pull/288)) +- :recycle: Refactor: language switch in desktop header ([#306](https://github.com/hugo-fixit/FixIt/pull/306)) +- :recycle: Refactor(reward): add parameter `mode` for post reward and refactor shortcode `reward` +- :wheelchair: Feat: add post update date to post meta ([#285](https://github.com/hugo-fixit/FixIt/issues/285)) +- :art: Style: fix `#comments` css style conflict ([#269](https://github.com/hugo-fixit/FixIt/issues/269)) +- :art: Style: adjust the mobile header style and fix the bug that scrolling is invalid when there are too many menus on mobile ([#289](https://github.com/hugo-fixit/FixIt/issues/289)) +- :art: Perf: optimize the scroll bar style of body and toc-auto elements +- :memo: Docs: refactor the theme documentation +- :wrench: Chore: change the theme minimum supported Hugo versions above **0.109.0** +- :arrow_up: Chore(libs): + - Update Update @waline/client from 2.10.0 to 2.14.7 (@Mejituu [#279](https://github.com/hugo-fixit/FixIt/pull/279)) + - Update typeit from 8.7.0 to 8.7.1 + - Update mermaid from 9.1.7 to 9.4.3 + - Update Artalk from 2.3.4 to 2.5.2 +- **Full Changelog:** @Lruihao [`v0.2.17...v0.2.18`](https://github.com/hugo-fixit/FixIt/compare/v0.2.17...v0.2.18) + +## v0.2.17 [2023.1.29] + +> Snapshot: + +- :tada: Feat: add support for [Fusejs search](https://fusejs.io/) ([#203](https://github.com/hugo-fixit/FixIt/issues/203)) +- :sparkles: Feat: add feature post reward support ([#216](https://github.com/hugo-fixit/FixIt/issues/216), @Lruihao[#234](https://github.com/hugo-fixit/FixIt/pull/234)) +- :sparkles: Feat: add reward shortcode support ([#216](https://github.com/hugo-fixit/FixIt/issues/216)) +- :sparkles: Feat: add TagCloud config support for tags page, see parameter `params.tagcloud` ([#235](https://github.com/hugo-fixit/FixIt/issues/235)) +- :sparkles: Feat: add [pace](https://github.com/CodeByZach/pace) support ([#190](https://github.com/hugo-fixit/FixIt/issues/190)) +- :sparkles: Feat: add custom templates and parameter `params.customFilePath` support +- :sparkles: Feat: add feature end of post flag support ([#236](https://github.com/hugo-fixit/FixIt/issues/236)) +- :sparkles: Feat: refactor parameter `params.footer.siteTime` +- :sparkles: Feat: add params to close wordcount and readingTime in post ([#209](https://github.com/hugo-fixit/FixIt/issues/209)) +- :sparkles: Feat: add parameter `params.footer.order` to order footer lines +- :sparkles: Feat: add parameter `params.home.profile.avatarMenu` +- :truck: Feat: migrate parameter `params.autoBookmark` to `params.page.autoBookmark` ([#55](https://github.com/hugo-fixit/FixIt/issues/55)) +- :truck: Feat: move `assets/data/emoji` to `assets/lib/valine/emoji/` +- :zap: Perf: optimize close comment feature when the post has expired ([#204](https://github.com/hugo-fixit/FixIt/issues/204)) +- :zap: Perf: optimize sub menu position calculation in desktop header with css replace of javascript +- :zap: Perf: enhance pangu spelling correction +- :bug: Fix: remove the leading and trailing whitespace of the code string ([#205](https://github.com/hugo-fixit/FixIt/issues/205)) +- :bento: Fix: update webfonts for fontawesome 6.2.0 (@NicoDreamzZ [#228](https://github.com/hugo-fixit/FixIt/pull/228)) +- :bug: Fix: image shortcode/plugin lose the support for svg type files ([#210](https://github.com/hugo-fixit/FixIt/issues/210)) +- :bug: Fix: can't keep the static table of the contents in front of the post +- :bug: Fix: escape hashtag character `#` in tag and category ([#245](https://github.com/hugo-fixit/FixIt/issues/245)) +- :bug: Fix: pangu.js cdn error +- :bug: Fix: sitemap.xml link in robots.txt doesn't point to main sitemap (@Mejituu [#276](https://github.com/hugo-fixit/FixIt/pull/276)) +- :recycle: Refactor(i18n): hierarchize translation fields for supported languages +- :globe_with_meridians: Docs(i18n): add missing translations for French + enhancements (@Kapusch [#247](https://github.com/hugo-fixit/FixIt/pull/247)) +- :lipstick: Style: refactor css style +- :lipstick: Style: update home page stylesheet +- :arrow_up: Chore(libs): + - Update Twikoo from 1.4.10 to 1.6.8 and add Katex support for it ([#215](https://github.com/hugo-fixit/FixIt/issues/215) [#243](https://github.com/hugo-fixit/FixIt/issues/243)) +- :wrench: Chore(deps-dev): + - Bump @babel/cli from 7.18.10 to 7.20.7 + - Bump @babel/core from 7.19.1 to 7.20.12 + - Bump @babel/preset-env from 7.18.10 to 7.20.2 + - Bump core-js from 3.25.2 to 3.27.2 +- :wrench: Chore(deps-dev): + - Bump @babel/cli from 7.20.7 to 7.17.10 + - Bump @babel/core from 7.20.12 to 7.21.4 + - Bump @babel/preset-env from 7.20.2 to 7.21.4 + - Bump core-js from 3.27.2 to 3.29.1 +- **Full Changelog:** @Lruihao [`v0.2.16...v0.2.17`](https://github.com/hugo-fixit/FixIt/compare/v0.2.16...v0.2.17) + +## v0.2.16 [2022.9.24] + +> This version fixes several bugs, adds a few new features and SEO optimizations, and refactors part of the project structure and code. +> Snapshot: + +- :tada: Feat: add reading progress bar support ([#191](https://github.com/hugo-fixit/FixIt/issues/191)) +- :tada: Feat: add b2t scroll percent support ([#192](https://github.com/hugo-fixit/FixIt/issues/192)) +- :sparkles: Feat: add auto bookmark support ([#55](https://github.com/hugo-fixit/FixIt/issues/55)) +- :sparkles: Feat: add `raw` shortcode +- :sparkles: Feat(menu): add params: `icon`, `type` for menu items +- :sparkles: Feat: add custom aside template in post page ([#172](https://github.com/hugo-fixit/FixIt/issues/172)) +- :sparkles: Feat(math): add more block delimiter support for math +- :sparkles: Feat(highlight): add full support for Chroma highlighting languages in the [list](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages) +- :sparkles: Feat: add optional parameter `noreferrer` for the shortcode `link` +- :sparkles: Feat: update echarts theme config +- :sparkles: Feat: add noscript warning banner ([#194](https://github.com/hugo-fixit/FixIt/issues/194)) +- :sparkles: Feat: add 12 newly supported social links ([#175](https://github.com/hugo-fixit/FixIt/issues/175) [#197](https://github.com/hugo-fixit/FixIt/issues/197)) +- :zap: Perf: remove extra spaces in plugin link +- :wheelchair: Feat(accessibility): use `aria-hidden=true` on icons that AT should ignore +- :recycle: Refactor: image rendering +- :recycle: Refactor: back to top and scroll to comments +- :recycle: Refactor: custom.js rendering and remove `params.customJS` ([#189](https://github.com/hugo-fixit/FixIt/pull/189)) +- :recycle: Refactor: scss directory ([#185](https://github.com/hugo-fixit/FixIt/issues/185)) +- :recycle: Refactor: plugin script +- :recycle: Refactor: version.template.svg +- :recycle: Refactor: config ([#187](https://github.com/hugo-fixit/FixIt/issues/187)) +- :bug: Fix: add function `dos2unix` to unify new lines symbol between Windows and Unix/Mac OS +- :bug: Fix: author display error in post and markdown file +- :bug: Fix: use data attributes or class replace for custom attributes +- :bug: Fix: attribute `media` not allowed on element meta in `[name=theme-color]` +- :bug: Fix: support smooth migration from LoveIt to FixIt ([#174](https://github.com/hugo-fixit/FixIt/discussions/174) [#182](https://github.com/hugo-fixit/FixIt/issues/182)) +- :bug: Fix: `center-quote` shortcode rendering error when config `unsafe = false` (@yureiita [#160](https://github.com/hugo-fixit/FixIt/pull/160)) +- :bug: Fix: menu item invalid params `draft` in submenu +- :bug: Fix: missing height and weight of img element and lazyload object-fit style +- :bug: Fix: image shortcode invalid params `height` and `weight` ([#200](https://github.com/hugo-fixit/FixIt/issues/200)) +- :bug: Fix: typeit shortcode invalid config `duration = -1` and fix style +- :bug: Fix: typeit shortcode prints consecutive spaces and newline errors +- :art: Style: change the default icons of some social links +- :bug: Fix: component `paginator` style error ([#188](https://github.com/hugo-fixit/FixIt/issues/188)) +- :lipstick: Style: fix language and theme switch cursor style ([#193](https://github.com/hugo-fixit/FixIt/issues/193)) +- :lipstick: Style: change line-break style of code element from `anywhere` to `auto` +- :globe_with_meridians: Docs(i18n): update pt-br, de in i18n +- :mag: Perf(SEO): enhance SEO performance +- :wrench: Chore: modify babel config and optimize theme.js compilation and loading (revert [`65371a1`](https://github.com/hugo-fixit/FixIt/commit/65371a19a40591c3f403f7fde2b7001c3390354d)) +- :wrench: Chore: creating new go.mod: module github.com/hugo-fixit/FixIt +- :arrow_up: Chore(libs): + - Update simple-icons from 6.3.0 to 7.12.0 + - Update emoji-data from 5.0.1 to 14.0.0 + - Update mermaid from 9.1.3 to 9.1.7 + - Update typeit from 7.0.4 to 8.7.0 + - Update lightgallery from 1.4.0 to 2.6.1 + - Update Valine from 1.5.0 to 1.5.1 + - Update @waline/client from 2.6.1 to 2.10.0 + - Update mapbox-gl from 2.8.2 to 2.10.0 + - Update fontawesome-free from 6.1.1 to 6.2.0 + - Update katex from 0.15.3 to 0.16.2 + - Update echarts from 5.2.2 to 5.3.3 + - Update algoliasearch from 4.13.0 to 4.14.2 +- :wrench: Chore(deps-dev): + - Remove dependencies: minimist, babel-preset-minify + - Bump core-js from 3.24.1 to 3.25.2 (@dependabot [#201](https://github.com/hugo-fixit/FixIt/pull/201)) + - Bump @babel/core from 7.18.10 to 7.19.1 (@dependabot [#202](https://github.com/hugo-fixit/FixIt/pull/202)) +- **Full Changelog:** @Lruihao [`v0.2.15...v0.2.16`](https://github.com/hugo-fixit/FixIt/compare/v0.2.15...v0.2.16) + +## v0.2.15 [2022.8.4] + +> Add content encryption feature(pages, partial), total word count, enhance auto toc, developer options and more. +> Snapshot: + +- :truck: Feat: ransfer repository from Lruihao to hugo-fixit +- :tada: Feat: add content encryption of pages ([#123](https://github.com/hugo-fixit/FixIt/issues/123)) +- :tada: Feat: add `fixit-encryptor` shortcode ([#123](https://github.com/hugo-fixit/FixIt/issues/123)) +- :sparkles: Feat: add total word count feature in section and remove from footer ([#124](https://github.com/hugo-fixit/FixIt/issues/124)) +- :sparkles: Feat: enhance auto toc feature ([#104](https://github.com/hugo-fixit/FixIt/issues/104) [#136](https://github.com/hugo-fixit/FixIt/issues/136)) +- :sparkles: Feat: add repost feature ([#156](https://github.com/hugo-fixit/FixIt/issues/156)) +- :sparkles: Feat: add developer options + - Check for updates option + - Mobile Devtools config ([#163](https://github.com/hugo-fixit/FixIt/pull/163)) +- :bug: Fix: unable to show search bar of header at mobile mode ([#143](https://github.com/hugo-fixit/FixIt/issues/143)) +- :bug: Fix: Giscus comment invalid config `inputPosition` +- :bug: Fix: Waline comment invalid config `imageUploader = false` & `highlighter = false` (@yureiita [#161](https://github.com/hugo-fixit/FixIt/pull/161)) +- :bug: Fix: busuanzi logic error +- :bug: Fix: close comment system logic error when the article was expired +- :bug: Style: fix typos for rel attribute value noreferrer (@yureiita [#157](https://github.com/hugo-fixit/FixIt/pull/157)) +- :recycle: Refactor: migrate theme js from src to assets by js.build +- :recycle: Refactor: change the post edit url splicing rules +- :mag: Feat(SEO): add options to make output `baidu_urls.txt` file ([#138](https://github.com/hugo-fixit/FixIt/issues/138)) +- :truck: Feat: migrate exampleSite to docs submodule +- :art: Style: add theme colors variables and add common color styles +- :art: Style: add scroll bar for auto toc ([#136](https://github.com/hugo-fixit/FixIt/issues/136)) +- :art: Style: change the version badge style form flat-square to flat +- :memo: Docs: revise theme documentations +- :heavy_plus_sign: Feat: add theme core configuration settings file +- :wrench: Feat(cdn): add unpkg cdn support +- :wrench: Chore: change the theme minimum supported Hugo versions above **0.84.0** +- :arrow_up: Chore(libs): update some third-party libraries + - Update Artalk from 2.2.12 to 2.3.4 ([#150](https://github.com/hugo-fixit/FixIt/issues/150)) + - Update Waline from 1.5.2 to 2.6.1 + - Update Valine from 1.4.18 to 1.5.0 + - Update mermaid from 8.13.3 to 9.1.3 +- :arrow_up: Chore(deps-dev): + - Bump babel-preset-minify from 0.5.1 to 0.5.2 ([#145](https://github.com/hugo-fixit/FixIt/pull/145)) + - Bump core-js from 3.22.0 to 3.24.1 ([#168](https://github.com/hugo-fixit/FixIt/pull/168)) + - Bump @babel/preset-env from 7.16.11 to 7.18.10 ([#169](https://github.com/hugo-fixit/FixIt/pull/169)) + - Bump @babel/cli from 7.17.6 to 7.18.10 ([#170](https://github.com/hugo-fixit/FixIt/pull/170)) + - Bump @babel/core from 7.17.9 to 7.18.10 ([#171](https://github.com/hugo-fixit/FixIt/pull/171)) +- **Full Changelog:** @Lruihao [`v0.2.14...v0.2.15`](https://github.com/hugo-fixit/FixIt/compare/v0.2.14...v0.2.15) + +## v0.2.14 [2022.5.15] + +> Add hugo new features support. +> Snapshot: + +- :recycle: Refactor: header layout + - :tada: Feat: add sub menu (nested menu) support ([#31](https://github.com/hugo-fixit/FixIt/issues/31)) + - :sparkles: Feat: add user-defined content to menu items via the `params` field ([#99](https://github.com/hugo-fixit/FixIt/issues/99)) + - :sparkles: Feat: modified language selector to submenu (@pandaoh [`eced169`](https://github.com/hugo-fixit/FixIt/commit/eced169713ce4a0208ce70ab556824e47eb671d5), @Lruihao [#31](https://github.com/hugo-fixit/FixIt/issues/31)) + - :bug: Fix: add "no more translations" judgment logic ([#100](https://github.com/hugo-fixit/FixIt/issues/100)) + - :bug: Fix: fix some header css bug ([#31](https://github.com/hugo-fixit/FixIt/issues/31)) +- :sparkles: Feat: enhance link render ([#96](https://github.com/hugo-fixit/FixIt/issues/96)) + - Add external icon for external links automatically + - Add download icon for downloadable links +- :sparkles: Feat: add giscus comment system ([#130](https://github.com/hugo-fixit/FixIt/issues/130)) +- :sparkles: Feat: link shortcode add `external-icon` option ([#96](https://github.com/hugo-fixit/FixIt/issues/96)) +- :sparkles: Feat: add GitHub Corners support ([#106](https://github.com/hugo-fixit/FixIt/issues/106)) +- :sparkles: Feat: add local avatar and gravatar support for post author ([#125](https://github.com/hugo-fixit/FixIt/issues/125)) +- :sparkles: Feat: add ~~total word count support in footer~~ ([#124](https://github.com/hugo-fixit/FixIt/issues/124)) +- :sparkles: Feat: add "Edit this page" button support ([#103](https://github.com/hugo-fixit/FixIt/issues/103)) +- :sparkles: Feat: add count badge for taxonomy ([#122](https://github.com/hugo-fixit/FixIt/issues/122)) +- :zap: Perf: add Gravatar config support +- :bug: Fix: invalid front matter `comment: true` ([#108](https://github.com/hugo-fixit/FixIt/issues/108)) +- :bug: Fix: ibruce and watermark option negative value error ([#114](https://github.com/hugo-fixit/FixIt/issues/114)) +- :truck: Feat: *migrate ~~`home.profile.gravatarSite`~~ to `gravatar.host`* +- :truck: Feat: *migrate ~~`ibruce.siteTime`~~ to `footer.siteTime`* +- :lipstick: Style: add some common CSS styles Class ([#101](https://github.com/hugo-fixit/FixIt/issues/101)) +- :lipstick: Style: add the gap between and icon and text at blending typesetting (@ctj12461 @Lruihao [#118](https://github.com/hugo-fixit/FixIt/pull/118)) +- :lipstick: Style: modify blockquote CSS +- :memo: Docs: revise theme documentations +- :zap: Perf: remove third-party library clipboard.js ([#84](https://github.com/hugo-fixit/FixIt/issues/84)) +- :pencil2: Docs: fix highlight url typo in `theme-documentation-built-in-shortcodes` (@d-baer [#85](https://github.com/hugo-fixit/FixIt/pull/85)) +- :wrench: Chore(i18n): improve translations for the supported languages ([#119](https://github.com/hugo-fixit/FixIt/issues/119)) +- :wrench: Chore(i18n): add i18n support for console messages +- :wrench: Chore: add deprecated parameter detection in cli +- :arrow_up: Chore: update some third-party libraries +- :wrench: Chore(deps-dev): + - Bump minimist from 1.2.5 to 1.2.6 ([#92](https://github.com/hugo-fixit/FixIt/pull/92)) + - Bump @babel/core from 7.17.5 to 7.17.10 ([#126](https://github.com/hugo-fixit/FixIt/pull/126)) + - Bump core-js from 3.21.1 to 3.22.5 ([#129](https://github.com/hugo-fixit/FixIt/pull/129)) + - Bump @babel/cli from 7.17.6 to 7.17.10 ([#127](https://github.com/hugo-fixit/FixIt/pull/127)) + - Bump @babel/preset-env from 7.16.11 to 7.17.10 ([`bc74d14`](https://github.com/hugo-fixit/FixIt/commit/bc74d149c16b36644fecdd5bef325bf8087f8593)) +- **Full Changelog:** @Lruihao [`v0.2.13...v0.2.14`](https://github.com/hugo-fixit/FixIt/compare/v0.2.13...v0.2.14) + +## v0.2.13 [2022.3.14] + +> Improve and add some new features. +> Snapshot: + +- :recycle: Refactor: page layout ([#65](https://github.com/hugo-fixit/FixIt/issues/65)) +- :tada: Feat: add Artalk comment support ([#54](https://github.com/hugo-fixit/FixIt/issues/54), @hiifong [#57](https://github.com/hugo-fixit/FixIt/pull/57)) +- :tada: Feat: add Waline comment support ([#36](https://github.com/hugo-fixit/FixIt/issues/36)) +- :tada: Feat: add Twikoo comment support ([#64](https://github.com/hugo-fixit/FixIt/issues/64)) +- :sparkles: Feat: add recently updated section ([#50](https://github.com/hugo-fixit/FixIt/issues/50)) +- :sparkles: Feat: add article expiration reminder support ([#51](https://github.com/hugo-fixit/FixIt/issues/51)) +- :sparkles: Feat: add pageStyle option ([#62](https://github.com/hugo-fixit/FixIt/issues/62)) +- :sparkles: Style: add media style for print view ([#61](https://github.com/hugo-fixit/FixIt/issues/61)) +- :sparkles: Feat: add Gravatar mirror site support (@ctj12461 [#66](https://github.com/hugo-fixit/FixIt/pull/66)) +- :sparkles: Feat: add archive count display ([#33](https://github.com/hugo-fixit/FixIt/issues/33)) +- :sparkles: Feat: add `details` shortcode ([#68](https://github.com/hugo-fixit/FixIt/issues/68)) +- :sparkles: Feat: add `center-quote` shortcode ([#69](https://github.com/hugo-fixit/FixIt/issues/69)) +- :sparkles: Feat: add markdown support for **title** parameter of the admonition shortcode +- :sparkles: Feat: add 9 newly supported social links ([#17](https://github.com/hugo-fixit/FixIt/issues/17)) +- :zap: Perf: enhance highlight feature (GitHub syntax supported) and fix some css bugs ([#43](https://github.com/hugo-fixit/FixIt/issues/43)) + - Inline Code + - Indented Code + - Block Fenced Code + - gist shortcode +- :sparkles: Feat: add `params.page.code.edit` option support ([#76](https://github.com/hugo-fixit/FixIt/issues/76)) +- :mag: Feat: add 360 and sougou seo support +- :bug: Fix: remove source map of local libraries to avoid 404 error ([#67](https://github.com/hugo-fixit/FixIt/issues/67)) +- :fire: Feat: remove shortcode cardlink ([#42](https://github.com/hugo-fixit/FixIt/issues/42)) +- :lipstick: Style: more refined theme style ([#40](https://github.com/hugo-fixit/FixIt/issues/40)) +- :pencil2: Style: fix typo *discription* should be **description** ([#60](https://github.com/hugo-fixit/FixIt/issues/60)) +- :wrench: Chore(update-libs): + - Update cell-watermark 1.0.3 and CDN support (fontFamily supported) + - Update animate.css 3.7.2 -> 4.1.1 ([#74](https://github.com/hugo-fixit/FixIt/issues/74)) +- :wrench: Chore: add atomic-algolia for exampleSite ([#70](https://github.com/hugo-fixit/FixIt/issues/70)) +- **Full Changelog:** @Lruihao [`v0.2.12...v0.2.13`](https://github.com/hugo-fixit/FixIt/compare/v0.2.12...v0.2.13) + +## v0.2.12 [2022-1-27] + +> Fix most known bugs and add some new features. +> Snapshot: + +- :tada: Feat: add PWA support +- :tada: Feat: add Watermark support ([#16](https://github.com/hugo-fixit/FixIt/issues/16)) +- :tada: Feat: add "不蒜子" count and site run time ([#18](https://github.com/hugo-fixit/FixIt/issues/18)) +- :sparkles: Feat: add pangu.js support ([#20](https://github.com/hugo-fixit/FixIt/issues/20)) +- :sparkles: Feat: add public network security config (only in China) ([#15](https://github.com/hugo-fixit/FixIt/issues/15)) +- :sparkles: Feat: add CustomJS option ([#24](https://github.com/hugo-fixit/FixIt/issues/24)) +- :sparkles: Feat: add theme embedded archeTypes +- :mag: Feat(SEO): optimize SEO meta ([#30](https://github.com/hugo-fixit/FixIt/issues/30)) +- :zap: Feat: remove lib smooth-scroll ([#1](https://github.com/hugo-fixit/FixIt/issues/1)) replaced by CSS native properties scroll-margin, scroll-behavior ([#39](https://github.com/hugo-fixit/FixIt/issues/39)) +- :zap: Perf: merge shortcode cardlink (deprecated v0.2.13) into shortcode link and add 'download' param ([#42](https://github.com/hugo-fixit/FixIt/issues/42)) +- :zap: Perf: optimize JS loading ([#25](https://github.com/hugo-fixit/FixIt/issues/25)) +- :recycle: Refactor: header title DOM and add subtitle option ([#26](https://github.com/hugo-fixit/FixIt/issues/26)) +- :bug: Fix: set mermaid theme as 'default' when initialization ([#38](https://github.com/hugo-fixit/FixIt/issues/38)) +- :bug: Fix: typeit print code error ([#19](https://github.com/hugo-fixit/FixIt/issues/19)) +- :bug: Fix: pre element overflow error ([#29](https://github.com/hugo-fixit/FixIt/issues/29)) +- :bug: Fix: toc display error without content header ([#21](https://github.com/hugo-fixit/FixIt/issues/21)) +- :lipstick: Style: style detail adjustments, change scroll-behavior to smooth, taxonomy, header, footer, shortcode style etc. +- :pencil: Docs: improve demo site documentation ([#37](https://github.com/hugo-fixit/FixIt/issues/37)) +- :wrench: Chore: add commands `fixit_checker.sh` +- :wrench: Chore(i18n): change some translations +- :arrow_up: Chore: update all third-party libraries +- **Full Changelog:** @Lruihao [`v0.2.11...v0.2.12`](https://github.com/hugo-fixit/FixIt/compare/v0.2.11...v0.2.12) + +## v0.2.11 [2021-12-19] + +> :tada: The beginning of FixIt to fix the theme LoveIt. + +- :sparkles: Feat: add cardlink shortcode ([Lruihao/hugo-blog@`df9eca2`](https://github.com/Lruihao/hugo-blog/commit/df9eca26af43287748fd8d4654014357a8269b0b)) +- :tada: Feat: add friends layout template +- :wrench: Chore(i18n): add translations for Traditional Chinese ([Lruihao/hugo-blog@`df9eca2`](https://github.com/Lruihao/hugo-blog/commit/b86157d8b84830bda415ab2488580afd843acac2)) +- :bug: Fix: mobile style ([Lruihao/hugo-blog#19](https://github.com/Lruihao/hugo-blog/issues/19)) +- :bug: Style: fix content h1 style ([Lruihao/hugo-blog#8](https://github.com/Lruihao/hugo-blog/issues/8)) +- :bug: Fix: `.params.author` should be `$params.author` ([Lruihao/hugo-blog#1](https://github.com/Lruihao/hugo-blog/issues/1)) +- **Full Changelog:** @Lruihao [`v0.2.10...v0.2.11`](https://github.com/hugo-fixit/FixIt/compare/v0.2.10...v0.2.11) + +## v0.2.10 :arrow_down: [2020-5-29 before] + +Thanks [dillonzq/LoveIt](https://github.com/dillonzq/LoveIt/releases) diff --git a/themes/FixIt/CODE_OF_CONDUCT.md b/themes/FixIt/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..0f5d75b --- /dev/null +++ b/themes/FixIt/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +1024@lruihao.cn. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/themes/FixIt/CONTRIBUTING.md b/themes/FixIt/CONTRIBUTING.md new file mode 100644 index 0000000..5c07d8c --- /dev/null +++ b/themes/FixIt/CONTRIBUTING.md @@ -0,0 +1,90 @@ +# CONTRIBUTING + +## How to contribute to this project + +First, fork this repository by clicking the fork button. + +Next, clone your forked repo. + +```bash +git clone --recursive https://github.com/hugo-fixit/FixIt.git && cd FixIt +``` + +Then, install the dev dependencies. + +```bash +npm install +``` + +And now you are ready to go! + +Here are some useful commands. + +```bash +# build theme.js with babel +npm run babel +# build theme.js and then build the static site +npm run build +# run a local debugging server with watch +npm run server +# run a local debugging server with watch in production environment +npm run server:production +# build theme.js and then run a local debugging server +npm run start +# build theme.js and then run a local debugging server in production environment +npm run start:production + +``` + +Finally, create a new pull request at to submit your contribution 🎉 + +## Git standard for developers + +### Branches + +| Branch | Description | +| :-- | :-- | +| master | _The branch open to the public and release versions_ | +| dev | _The development branch of the next version_ | +| RC branch | _The release candidate branch of the next version, e.g. v0.2.12-RC_ | +| single feature | _The branch to enhancements or fixes_ | + +### Merge events + +| event | merge | +| :-- | :-- | +| release | **RC branch => master:** `--rebase` | +| PR | **others:master => master:** `--rebase` | +| single feature| **feature branch => RC branch:** `--merge` | + +### Commit message + +#### Format + +`[{emoji} ]{type}[({module})]: {subject within 50 words}[ (#{issue/pull request})]` + +example: + +- :tada: Feat: add shortcode fixit-encryptor shortcode (#123) +- :arrow_up: Chore(libs): update Artalk from 2.2.12 to 2.3.4 (#150) + +#### Emoji + +- +- [vscode plugin](https://github.com/maixiaojie/git-emoji-zh.git) +- utools plugin `GitEmoji` + +#### Message + +| Emoji | Type | Example | Description (No Ambiguous) | +| :-------------------------------------------- | :------- | :----------------------------------------------------------- | :----------------------------------------------------------- | +| :tada:
:sparkles: | Feat | Feat: add {feature} | new feature | +| :truck: | | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) | +| :fire: | | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained | +| :bug:
:construction:
:rotating_light: | Fix | Fix: fix {bug description} | Fix known bugs | +| :art:
:lipstick:
:pencil2: | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change | +| :recycle: | Refactor | Refactor: override {feature name} | It is neither a new function nor a code change to fix a bug. Simply rewriting the code of a function does not affect the function result | +| :zap: | Perf | Perf: improve performance {function name}, {improve content} | Optimize code performance | +| :rewind: | Revert | Revert: restore version {commit message of restore version} | Restore the version of one commit | +| :pencil:
:pencil2: | Docs | Docs: revise comments/update documents | Adjustment of documents and notes | +| :wrench: | Chore | Chore: update plugin version | Changes in the construction process or auxiliary tools | diff --git a/themes/FixIt/LICENSE b/themes/FixIt/LICENSE new file mode 100644 index 0000000..8548604 --- /dev/null +++ b/themes/FixIt/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2018 LIUZHICHAO.COM +Copyright (c) 2019-2020 DILLONZQ.COM +Copyright (c) 2021-2023 LRUIHAO.CN + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/themes/FixIt/README.md b/themes/FixIt/README.md new file mode 100644 index 0000000..e431a34 --- /dev/null +++ b/themes/FixIt/README.md @@ -0,0 +1,248 @@ +# FixIt Theme | Hugo + +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases) +[![Hugo](https://img.shields.io/badge/Hugo-%5E0.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/) +[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE) + +👉 English README | [简体中文说明](README.zh-cn.md) + +> [FixIt](https://github.com/hugo-fixit/FixIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/). + +It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [KeepIt Theme](https://github.com/Fastbyte01/KeepIt) and [LeaveIt Theme](https://github.com/liuzc/LeaveIt). + +The FixIt theme inherits the excellent features of these themes, and adds new features and optimizations on those basis. Please read [Why Choose FixIt](#why-choose-fixit) to learn more. + +![Hugo Theme FixIt](https://fixit.lruihao.cn/images/Apple-Devices-Preview.jpg) + +## Getting started + +Head to the [getting started page](http://fixit.lruihao.cn/documentation/getting-started/) or start with a template: + +* [hugo-fixit/hugo-fixit-blog-git](https://github.com/hugo-fixit/hugo-fixit-blog-git) +* [hugo-fixit/hugo-fixit-blog-go](https://github.com/hugo-fixit/hugo-fixit-blog-go) + +## [Documentation](https://fixit.lruihao.cn/categories/documentation/) + +Head to this [documentation page](https://fixit.lruihao.cn/documentation/basics/) for a complete guidence to get started with the FixIt theme. + +Or run [Documentation Site](https://fixit.lruihao.cn) locally, see more details from [Contributing](#contributing). + +In addition, there is the [FixIt wiki](https://github.com/hugo-fixit/FixIt/wiki). + +## Migrate from LoveIt + +If you are currently using the LoveIt theme (or some other themes), it is very easy to migrate to FixIt. + +You can add this repo as a submodule of your site directory. Alternatively, you can install the theme in [other ways](https://fixit.lruihao.cn/documentation/basics/#install-theme). + +```bash +git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt +``` + +And later you can update the submodule in your site directory to the latest commit using this command: + +```bash +git submodule update --remote --merge +``` + +Next, go to the `config.toml` and change the default theme to `FixIt`. + +```diff +- theme = "LoveIt" ++ theme = "FixIt" +``` + +Now the migration is finished and everything is ready 🎉 + +## Why choose FixIt + +The FixIt theme inherits the excellent features of themes such as LoveIt, and adds new features and optimizations on those basis, as detailed in [Features](#features). In addition, the FixIt theme has the following advantages: + +* Complete Chinese and English official documentations +* Community support: Theme official website, Discussions and official QQ group +* Continuously and actively update +* Constantly incorporate suggestions and ideas from all sides +* Highly open theme customizable section + +In short, if you prefer the design language and freedom of the FixIt theme, and if you like to personalize your own themes as I do, the FixIt theme may be more suitable for you. + +## Who used FixIt + +To see this theme in action, here are some [live demo sites](https://fixit.lruihao.cn/friends/) which are rendered with **FixIt** theme. + +## Features + +### Performance and SEO + +* Optimized for **performance**: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) +* Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD +* **[Google Analytics](https://analytics.google.com/analytics)** supported +* **[Fathom Analytics](https://usefathom.com/)** supported +* Search engine **verification** supported (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou) +* **CDN** for third-party libraries supported + +### Appearance and Layout + +* **Responsive** layout +* **Light/Dark** mode +* Globally consistent **design language** +* **Pagination** supported +* Easy-to-use and self-expanding **table of contents** +* **Multilanguage** supported and i18n ready +* Beautiful **CSS animation** + +### Social and Comment Systems + +* **Gravatar** supported by [Gravatar](https://gravatar.com) +* Local **Avatar** supported +* Up to **87** social links supported +* Up to **28** share sites supported +* **Disqus** comment system supported by [Disqus](https://disqus.com) +* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk) +* **Valine** comment system supported by [Valine](https://valine.js.org/) +* **Waline** comment system supported by [Waline](https://waline.js.org/) +* **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/) +* **Telegram comments** system supported by [Telegram Comments](https://comments.app/) +* **Commento** comment system supported by [Commento](https://commento.io/) +* **Utterances** comment system supported by [Utterances](https://utteranc.es/) +* **Artalk** comment system supported by [Artalk](https://artalk.js.org/) +* **Twikoo** comment system supported by [Twikoo](https://twikoo.js.org/) +* **giscus** comment system supported by [giscus](https://giscus.app/) + +### Extended Features + +* **PWA (Progressive Web App)** supported +* **Sub Menu** supported +* **Content Encryption** supported (Pages, Partial) +* **Friends** page embedded template +* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/) +* **Twemoji** supported +* Automatically **highlighting** code +* **Copy code** to clipboard with one click +* **Images gallery** supported by [lightgallery](https://github.com/sachinchoolur/lightgallery) +* Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** +* Extended Markdown syntax for **ruby annotation** +* Extended Markdown syntax for **fraction** +* **Mathematical formula** supported by [KaTeX](https://katex.org/) +* **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid) +* **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) +* **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) +* **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS) +* **Bilibili player** shortcode +* Kinds of **admonitions** shortcode +* **Custom style** shortcode +* **Custom script** shortcode +* **Animated typing** supported by [TypeIt](https://typeitjs.com/) +* **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent) +* **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark) +* **Chinese typesetting** supported by [pangu.js](https://github.com/vinta/pangu.js) +* ... + +## Multilingual and i18n + +FixIt supports the following languages: + +* English +* Simplified Chinese +* Traditional Chinese +* French +* Polish +* Brazilian Portuguese +* Italian +* Spanish +* German +* Serbian +* Russian +* Romanian +* Vietnamese +* [Contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls) + +[Languages Compatibility](https://fixit.lruihao.cn/documentation/basics/#language-compatibility) + +## [Roadmap](https://github.com/hugo-fixit/FixIt/projects/1) + +## [Changelog](/CHANGELOG.md) + +## Questions, ideas, bugs, pull requests + +All feedback is welcome! Head over to the [issues](https://github.com/hugo-fixit/FixIt/issues) or [discussions](https://github.com/hugo-fixit/FixIt/discussions) tracker. + +## Contributing + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for getting started with the contribution. + +Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions. + +**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**. + +## [Contributors](contributors.md) + +## Acknowledgements + +
+Thanks to the authors of following resources included in the theme: + +* [normalize.css](https://github.com/necolas/normalize.css) +* [Font Awesome](https://fontawesome.com/) +* [Simple Icons](https://github.com/simple-icons/simple-icons) +* [Animate.css](https://daneden.github.io/animate.css/) +* [autocomplete-js](https://github.com/algolia/autocomplete) +* [Lunr.js](https://lunrjs.com/) +* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Fuse.js](https://fusejs.io/) +* [object-fit-images](https://github.com/fregante/object-fit-images) +* [Twemoji](https://github.com/twitter/twemoji) +* [emoji-data](https://github.com/iamcal/emoji-data) +* [lightgallery](https://github.com/sachinchoolur/lightgallery) +* [Sharer.js](https://github.com/ellisonleao/sharer.js) +* [TypeIt](https://typeitjs.com/) +* [KaTeX](https://katex.org/) +* [mermaid](https://github.com/mermaid-js/mermaid) +* [ECharts](https://echarts.apache.org/) +* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) +* [APlayer](https://github.com/MoePlayer/APlayer) +* [MetingJS](https://github.com/metowolf/MetingJS) +* [Gitalk](https://github.com/gitalk/gitalk) +* [Valine](https://valine.js.org/) +* [cookieconsent](https://github.com/osano/cookieconsent) +* [cell-watermark](https://github.com/Lruihao/watermark) +* [不蒜子](http://busuanzi.ibruce.info/) +* [pangu.js](https://github.com/vinta/pangu.js) +* [Artalk](https://artalk.js.org/) +* [Waline](https://waline.js.org/) +* [Twikoo](https://twikoo.js.org/) +* [github-corners](https://github.com/tholman/github-corners) +* [giscus](https://giscus.app/) +* [crypto-js](https://github.com/brix/crypto-js) +* [vConsole](https://github.com/Tencent/vConsole) +* [eruda](https://github.com/liriliri/eruda) +* [pace](https://github.com/CodeByZach/pace) + +
+ +
+The FixIt also draws on some features of the following projects, and thanks to their authors as well: + +* [DoIt](https://github.com/HEIGE-PCloud/DoIt) +* [NexT](https://github.com/next-theme/hexo-theme-next) + +
+ +## License + +FixIt is licensed under the **MIT** license. Check the [LICENSE file](LICENSE) for details. + +## Author + +[Lruihao](https://github.com/Lruihao "Follow me on GitHub") + +## Sponsor + +Giving me a Star 🌟 is already the greatest encouragement and support for me.\ +If you enjoy the theme, please consider buying me a coffee ☕️. + +* [PayPal](https://paypal.me/Lruihao) +* [Alipay](images/alipay.jpg) +* [Wechat](images/wechatpay.jpg) + +Thanks! ❤️ diff --git a/themes/FixIt/README.zh-cn.md b/themes/FixIt/README.zh-cn.md new file mode 100644 index 0000000..1721818 --- /dev/null +++ b/themes/FixIt/README.zh-cn.md @@ -0,0 +1,252 @@ +# FixIt 主题 | Hugo + +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases) +[![Hugo](https://img.shields.io/badge/Hugo-%5E0.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/) +[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE) + +👉 [English README](README.md) | 简体中文说明 + +> [FixIt](https://github.com/hugo-fixit/FixIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 + +它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt),[KeepIt 主题](https://github.com/Fastbyte01/KeepIt) 和 [LeaveIt 主题](https://github.com/liuzc/LeaveIt)。 + +FixIt 主题继承了这些主题的优秀功能,并在此基础上添加了新的功能与优化,请阅读 [为什么选择 FixIt](#为什么选择-FixIt) 来了解更多。 + +![Hugo Theme FixIt](https://fixit.lruihao.cn/images/Apple-Devices-Preview.jpg) + +## 快速上手 + +前往 [快速上手页面](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/) 或从一个模板直接开始: + +* [hugo-fixit/hugo-fixit-blog-git](https://github.com/hugo-fixit/hugo-fixit-blog-git) +* [hugo-fixit/hugo-fixit-blog-go](https://github.com/hugo-fixit/hugo-fixit-blog-go) + +## [完整文档](https://fixit.lruihao.cn/zh-cn/categories/documentation/) + +前往这篇 [文档](https://fixit.lruihao.cn/zh-cn/documentation/basics/),阅读关于安装与使用的详细指南。 + +或者在本地运行 [文档站点](https://fixit.lruihao.cn/zh-cn/),更多细节详见 [参与贡献](#参与贡献)。 + +除此之外,还有 [FixIt 主题维基](https://github.com/hugo-fixit/FixIt/wiki)。 + +## 从 LoveIt 迁移 + +如果你现在正在使用 LoveIt 主题(或者一些其他的主题),你可以很容易地迁移至 FixIt。 + +你可以将这个主题仓库添加为你的网站目录的子模块。或者,您可以通过 [其他方式](https://fixit.lruihao.cn/zh-cn/documentation/basics/#install-theme) 安装主题。 + +```bash +git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt +``` + +之后,你可以在站点目录通过这条命令来将主题更新至最新版本: + +```bash +git submodule update --remote --merge +``` + +接着,前往 `config.toml` 并将默认主题更改为 `FixIt`。 + +```diff +- theme = "LoveIt" ++ theme = "FixIt" +``` + +这样就完成了迁移工作,现在一切准备就绪 🎉 + +## 为什么选择 FixIt + +FixIt 主题继承了 LoveIt 等主题的优秀功能,并在它们的基础上添加了新的功能与优化,详见 [特性](#特性)。除此之外,FixIt 主题还有以下优点: + +* 完善的中英文官方文档 +* 社区支持:主题官网、Discussions 和官方 QQ 群 +* 持续积极地更新 +* 不断收纳各方的建议和想法 +* 高度开放主题可自定义部分 + +总之,如果你更偏好 FixIt 主题的设计语言和自由度,如果你和我一样喜欢个性化自定义主题,那么,FixIt 主题可能是更适合你。 + +## 谁在用 FixIt + +为了直观地浏览主题特性,这里有一些基于 **FixIt** 主题渲染的 [预览网站](https://fixit.lruihao.cn/zh-cn/friends/)。 + +## 特性 + +### 性能和 SEO + +* **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, 99/100 的移动设备得分和 100/100 的桌面设备得分 +* 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化 +* 支持 **[Google Analytics](https://analytics.google.com/analytics)** +* 支持 **[Fathom Analytics](https://usefathom.com/)** +* 支持搜索引擎的**网站验证** (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou) +* 支持所有第三方库的 **CDN** + +### 外观和布局 + +* **响应式**布局 +* **浅色/深色** 主题模式 +* 全局一致的**设计语言** +* 支持**分页** +* 易用和自动展开的**文章目录** +* 支持**多语言**和国际化 +* 美观的 **CSS 动画** + +### 社交和评论系统 + +* 支持 **[Gravatar](https://gravatar.com)** 头像 +* 支持本地**头像** +* 支持多达 **87** 种社交链接 +* 支持多达 **28** 种网站分享 +* 支持 **[Disqus](https://disqus.com)** 评论系统 +* 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统 +* 支持 **[Valine](https://valine.js.org/)** 评论系统 +* 支持 **[Waline](https://waline.js.org/)** 评论系统 +* 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统 +* 支持 **[Telegram comments](https://comments.app/) 评论**系统 +* 支持 **[Commento](https://commento.io/)** 评论系统 +* 支持 **[Utterances](https://utteranc.es/)** 评论系统 +* 支持 **[Artalk](https://artalk.js.org/)** 评论系统 +* 支持 **[Twikoo](https://twikoo.js.org/)** 评论系统 +* 支持 **[giscus](https://giscus.app/zh-CN/)** 评论系统 + +### 扩展功能 + +* 支持**渐进式网页应用** +* 支持**二级菜单** +* 支持**内容加密**(页面、局部) +* 支持**友情链接**的页面模板 +* 支持基于 [Lunr.js](https://lunrjs.com/) 或 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索** +* 支持 **Twemoji** +* 支持**代码高亮** +* 一键**复制代码**到剪贴板 +* 支持基于 [lightgallery](https://github.com/sachinchoolur/lightgallery) 的**图片画廊** +* 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 +* 支持**上标注释**的扩展 Markdown 语法 +* 支持**分数**的扩展 Markdown 语法 +* 支持基于 [KaTeX](https://katex.org/) 的**数学公式** +* 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode +* 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode +* 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode +* 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode +* 支持 **Bilibili 视频** shortcode +* 支持多种**注释**的 shortcode +* 支持**自定义样式**的 shortcode +* 支持**自定义脚本**的 shortcode +* 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode +* 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅** +* 支持基于 [cell-watermark](https://github.com/Lruihao/watermark) 的**网页水印** +* 支持基于 [pangu.js](https://github.com/vinta/pangu.js) 的**中文排版** +* …… + +## 多语言和国际化 + +FixIt 支持下列语言: + +* 英语 +* 简体中文 +* 繁体中文 +* 法语 +* 波兰语 +* 巴西葡萄牙语 +* 意大利语 +* 西班牙语 +* 德语 +* 塞尔维亚语 +* 俄语 +* 罗马尼亚语 +* 越南语 +* [贡献一种新的语言](https://github.com/hugo-fixit/FixIt/pulls) + +[语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility) + +## [路线图](https://github.com/hugo-fixit/FixIt/projects/1) + +## [更新日志](/CHANGELOG.md) + +## 问题、想法、bugs 和 PRs + +所有的反馈都是欢迎的!详见 [议题](https://github.com/hugo-fixit/FixIt/issues) 或者 [讨论](https://github.com/hugo-fixit/FixIt/discussions)。 + +## 参与贡献 + +请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 以了解贡献该项目的基本信息。 + +确保在贡献和参与讨论时遵守 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)。 + +**贡献时,请先通过此存储库上的问题讨论您希望进行的更改,然后再进行实际更改**。 + +## [所有贡献者](contributors.md) + +## 镜像 + +* Gitee 镜像仓库: + +## 致谢 + +
+FixIt 主题中用到了以下项目,感谢它们的作者: + +* [normalize.css](https://github.com/necolas/normalize.css) +* [Font Awesome](https://fontawesome.com/) +* [Simple Icons](https://github.com/simple-icons/simple-icons) +* [Animate.css](https://daneden.github.io/animate.css/) +* [autocomplete-js](https://github.com/algolia/autocomplete) +* [Lunr.js](https://lunrjs.com/) +* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript) +* [Fuse.js](https://fusejs.io/) +* [object-fit-images](https://github.com/fregante/object-fit-images) +* [Twemoji](https://github.com/twitter/twemoji) +* [emoji-data](https://github.com/iamcal/emoji-data) +* [lightgallery](https://github.com/sachinchoolur/lightgallery) +* [Sharer.js](https://github.com/ellisonleao/sharer.js) +* [TypeIt](https://typeitjs.com/) +* [KaTeX](https://katex.org/) +* [mermaid](https://github.com/mermaid-js/mermaid) +* [ECharts](https://echarts.apache.org/) +* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) +* [APlayer](https://github.com/MoePlayer/APlayer) +* [MetingJS](https://github.com/metowolf/MetingJS) +* [Gitalk](https://github.com/gitalk/gitalk) +* [Valine](https://valine.js.org/) +* [cookieconsent](https://github.com/osano/cookieconsent) +* [cell-watermark](https://github.com/Lruihao/watermark) +* [不蒜子](http://busuanzi.ibruce.info/) +* [pangu.js](https://github.com/vinta/pangu.js) +* [Artalk](https://artalk.js.org/) +* [Waline](https://waline.js.org/) +* [Twikoo](https://twikoo.js.org/) +* [github-corners](https://github.com/tholman/github-corners) +* [giscus](https://giscus.app/zh-CN) +* [crypto-js](https://github.com/brix/crypto-js) +* [vConsole](https://github.com/Tencent/vConsole) +* [eruda](https://github.com/liriliri/eruda) +* [pace](https://github.com/CodeByZach/pace) + +
+ +
+FixIt 主题还借鉴了以下项目的部分功能,同样感谢它们的作者: + +* [DoIt](https://github.com/HEIGE-PCloud/DoIt) +* [NexT](https://github.com/next-theme/hexo-theme-next) + +
+ +## 许可协议 + +FixIt 根据 **MIT** 许可协议授权。 更多信息请查看 [LICENSE 文件](LICENSE)。 + +## 作者 + +[Lruihao](https://github.com/Lruihao "在 GitHub 上关注我") + +## 赞助支持 + +给我一个 Star 🌟 已经是对我最大的鼓励和支持了。\ +如果你喜爱这个主题,请考虑给我买杯咖啡 ☕️。 + +* [PayPal](https://paypal.me/Lruihao) +* [支付宝](images/alipay.jpg) +* [微信支付](images/wechatpay.jpg) + +谢谢!❤️ diff --git a/themes/FixIt/archetypes/default.md b/themes/FixIt/archetypes/default.md new file mode 100644 index 0000000..6f07bbd --- /dev/null +++ b/themes/FixIt/archetypes/default.md @@ -0,0 +1,8 @@ +--- +title: {{ replace .TranslationBaseName "-" " " | title }} +subtitle: +date: {{ .Date }} +description: +keywords: +draft: true +--- diff --git a/themes/FixIt/archetypes/friends.md b/themes/FixIt/archetypes/friends.md new file mode 100644 index 0000000..bd4c99d --- /dev/null +++ b/themes/FixIt/archetypes/friends.md @@ -0,0 +1,37 @@ +--- +title: {{ replace .TranslationBaseName "-" " " | title }} +subtitle: +type: friends +date: {{ .Date }} +description: "{{ .Site.Author.name }}'s friends" +keywords: + - 'Hugo FixIt' + - 'friends template' + - 友情链接 +comment: false +--- + + + +--- + + + +## Base info + +```yaml +- nickname: Lruihao + avatar: https://lruihao.cn/images/avatar.jpg + url: https://lruihao.cn + description: Lruihao's Note +``` + +## Friendly Reminder + +{{< admonition info "Notice" true >}} + +1. If you want to exchange link, please leave a comment in the above format. (personal non-commercial blogs / websites only) +2. :(fa-solid fa-exclamation-triangle): Website failure, stop maintenance and improper content may be unlinked! +3. Those websites that do not respect other people's labor achievements, reprint without source, or malicious acts, please do not come to exchange. + +{{< /admonition >}} diff --git a/themes/FixIt/archetypes/offline.md b/themes/FixIt/archetypes/offline.md new file mode 100644 index 0000000..eb757c9 --- /dev/null +++ b/themes/FixIt/archetypes/offline.md @@ -0,0 +1,9 @@ +--- +type: offline +description: '{{ T "offlineTitle" }} - {{ .Site.Title }}' +keywords: + - PWA + - {{ T "offlineTitle" }} +--- + + diff --git a/themes/FixIt/archetypes/post-bundle/index.md b/themes/FixIt/archetypes/post-bundle/index.md new file mode 100644 index 0000000..7c899af --- /dev/null +++ b/themes/FixIt/archetypes/post-bundle/index.md @@ -0,0 +1,40 @@ +--- +title: {{ replace .TranslationBaseName "-" " " | title }} +subtitle: +date: {{ .Date }} +draft: true +author: + name: + link: + email: + avatar: +description: +keywords: +license: +comment: false +weight: 0 +tags: + - draft +categories: + - draft +hiddenFromHomePage: false +hiddenFromSearch: false +summary: +resources: + - name: featured-image + src: featured-image.jpg + - name: featured-image-preview + src: featured-image-preview.jpg +toc: true +math: false +lightgallery: false +password: +message: +repost: + enable: true + url: + +# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter +--- + + \ No newline at end of file diff --git a/themes/FixIt/archetypes/posts.md b/themes/FixIt/archetypes/posts.md new file mode 100644 index 0000000..7548f53 --- /dev/null +++ b/themes/FixIt/archetypes/posts.md @@ -0,0 +1,40 @@ +--- +title: {{ replace .TranslationBaseName "-" " " | title }} +subtitle: +date: {{ .Date }} +draft: true +author: + name: + link: + email: + avatar: +description: +keywords: +license: +comment: false +weight: 0 +tags: + - draft +categories: + - draft +hiddenFromHomePage: false +hiddenFromSearch: false +summary: +resources: + - name: featured-image + src: featured-image.jpg + - name: featured-image-preview + src: featured-image-preview.jpg +toc: true +math: false +lightgallery: false +password: +message: +repost: + enable: true + url: + +# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter +--- + + diff --git a/themes/FixIt/assets/css/#_variables.scss# b/themes/FixIt/assets/css/#_variables.scss# new file mode 100644 index 0000000..374081c --- /dev/null +++ b/themes/FixIt/assets/css/#_variables.scss# @@ -0,0 +1,168 @@ +// ============================== +// Variables +// ============================== + +// ========== Global ========== // +// Prefix for :root CSS variables. +$prefix: fi- !default; + +// Font and Line Height +$global-font-family: system-ui, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei UI, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif !default; +$global-font-size: 16px !default; +$global-font-weight: 400 !default; +$global-line-height: 1.5rem !default; + +// scroll-margin-top of content anchor +$global-scroll-margin-top: 0.5rem; + +// Radius of the border +$global-border-radius: 5px !default; + +// Color of the background +$global-background-color: #ffffff !default; +$global-background-color-dark: #292a2d !default; + +// Color of the text +$global-font-color: #161209 !default; +$global-font-color-dark: #a9a9b3 !default; + +// Color of the secondary text +$global-font-secondary-color: #b1b1ba !default; +$global-font-secondary-color-dark: #909092 !default; + +// Color of the link +$global-link-color: #ba0066 !default; +$global-link-color-dark: #EC008C !default; + +// Color of the hover link +$global-link-hover-color: #EC008C !default; // 潮蓝 +$global-link-hover-color-dark: #ba0066 !default; + +// Color of m3tam3re-border-color: #ba0066 !default; +$global-border-color-dark: #EC008C !lets-encrypt; +// ========== Global =====m3tam3re===== Scrollbar ========== // +// Color of the scrollbar +$scrollbar-color: #ba0066 !default; + +// Color of the hover scrollbar +$scrollbar-hover-color: #EC008C !default; +// ========== Scrollbar ========== // + +// ========== Selection ========== // +// Color of the selected text +$selection-color: rgba(72.9, 0, 40, 0.4) !default; +$selection-color-dark: rgba(72.9, 0, 40, 0.4) !default; +// ========== Selection ========== // + +// ========== Header ========== // +// Height of the header +$header-height: 3.5rem !default; + +// Color of the header background +$header-background-color: #f8f8f8 !default; +$header-background-color-dark: #252627 !default; + +// Font style of the header title +$header-title-font-family: $global-font-family !default; +$header-title-font-size: 1.5rem !default; + +// Color of the active menu item +$menu-active-color: #EC008C !default; +$menu-active-color-dark: #ba0066 !default; + +// Color of the search background +$search-background-color: #e9e9e9 !default; +$search-background-color-dark: #363636 !default; +// ========== Header ========== // + +// ========== Tag Cloud ========== // +// Color range of tag cloud +$tag-cloud-start: $global-font-secondary-color!default; +$tag-cloud-end: $global-font-color!default; +$tag-cloud-start-dark: $global-font-secondary-color-dark!default; +$tag-cloud-end-dark: $global-font-color-dark!default; +// ========== Tag Cloud ========== // + +// ========== Single Content ========== // +// Font size of the TOC +$toc-title-font-size: 1.2rem !default; +$toc-content-font-size: 1rem !default; + +// Color of the single link +$single-link-color: #ba0066 !default; // 花青 +$single-link-color-dark: #EC008C !default; // 釉蓝 + +// Color of the hover single link +$single-link-hover-color: #EC008C !default; // 莲瓣红 +$single-link-hover-color-dark: #ba0066 !default; // 羽扇豆蓝 + +// Color of the table background +$table-background-color: #f6f8fa !default; +$table-background-color-dark: #2d333b !default; + +// Color of the table thead +$table-thead-color: #EC008C !default; +$table-thead-color-dark: #ba0066 !default; + +// Color of the blockquote +$blockquote-color: #697681 !default; +$blockquote-color-dark: #9ba3aa !default; + +// Color of reward +$reward-color: tomato !default; +$reward-color-dark: darken($reward-color, 5%) !default; + +// Width of reward image +$reward-img-width: 180px !default; +// ========== Single Content ========== // + +// ========== Pagination ========== // +// Color of the link in pagination +$pagination-link-color: #bfbfbf !default; +$pagination-link-color-dark: #b1b1ba !default; + +// Color of the hover link in pagination +$pagination-link-hover-color: #ba0066 !default; +$pagination-link-hover-color-dark: #EC008C !default; +// ========== Pagination ========== // + +// ========== Code ========== // +// Color of the code +$code-color: #24292f !default; +$code-color-dark: #adbac7 !default; + +// Color of the code background +$code-background-color: #f6f8fa !default; +$code-background-color-dark: #2d333b !default; + +$code-error-color: #dc3545 !default; + +// Color of the hightlight code +$code-hightlight-color: #fff8c5 !default; +$code-hightlight-color-dark: rgba(174, 124, 20, 0.15) !default; + +$code-info-color: #EC008C !default; +$code-info-color-dark: #ba0066 !default; + +// Font size of the code +$code-font-size: 0.875rem !default; + +// Font family of the code +$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace, $global-font-family !default; +// ========== Code ========== // + +// ========== GitHub Corners ========== // +// Color of the GitHub Corners +$github-corner-color: white !default; +$github-corner-color-dark: black !default; + +// Color of the GitHub Corners background +$github-corner-fill: $header-background-color-dark !default; +$github-corner-fill-dark: $header-background-color !default; +// ========== GitHub Corners ========== // + +@import '_partials/_maps/admonition'; +@import '_partials/_maps/code-highlight'; +@import '_partials/_maps/code-type'; +@import '_partials/_maps/colors'; +@import '_partials/_maps/utilities'; diff --git a/themes/FixIt/assets/css/_core/_base.scss b/themes/FixIt/assets/css/_core/_base.scss new file mode 100644 index 0000000..300306f --- /dev/null +++ b/themes/FixIt/assets/css/_core/_base.scss @@ -0,0 +1,96 @@ +@import "../../lib/normalize/normalize"; + +html { + font-family: $global-font-family; + font-weight: $global-font-weight; + font-display: swap; + font-size: $global-font-size; + line-height: $global-line-height; + width: 100%; + scroll-behavior: smooth; + overflow: overlay; +} + +@media screen and (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } +} + +/* scrollbar, only support webkit */ +::-webkit-scrollbar { + width: 0.5rem; + height: 0.5rem; +} + +::-webkit-scrollbar-thumb { + background-color: $scrollbar-color; + @include border-radius($global-border-radius); + + &:hover { + background-color: $scrollbar-hover-color; + } +} + +::selection { + background-color: $selection-color; + + [data-theme='dark'] & { + background-color: $selection-color-dark; + } +} + +body { + background-color: $global-background-color; + color: $global-font-color; + scrollbar-color: auto; + @include overflow-wrap(break-word); + + &::-webkit-scrollbar { + width: 0.75rem; + height: 0.75rem; + background-color: transparent; + } + + &::-webkit-scrollbar-thumb { + background-color: transparent; + background-clip: content-box; + border: 2px solid transparent; + @include border-radius(0.5rem); + } + + &[data-scroll]::-webkit-scrollbar-thumb { + background-color: $scrollbar-color; + } + + &[data-theme='dark'] { + color: $global-font-color-dark; + background-color: $global-background-color-dark; + } +} + +iframe { + border: 0; + @include border-radius($global-border-radius); +} + +[role='button'] { + cursor: pointer; +} + +summary { + cursor: pointer; +} + +abbr[title] { + cursor: help; + text-decoration-skip-ink: none; +} + +@include link(true, true); + +@import '../_partials/mask'; +@import '../_partials/img'; +@import '../_partials/icon'; +@import '../_partials/details'; +@import '../_partials/widgets'; diff --git a/themes/FixIt/assets/css/_core/_breadcrumb.scss b/themes/FixIt/assets/css/_core/_breadcrumb.scss new file mode 100644 index 0000000..0ca54f4 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_breadcrumb.scss @@ -0,0 +1,46 @@ +.breadcrumb-container { + padding-inline: 1rem; + font-size: 0.75rem; + @include z-index(1); + @extend .print-d-none; + + &.sticky { + position: sticky; + top: $header-height; + } + + .breadcrumb { + display: flex; + flex-wrap: wrap; + padding: 0.5rem 0; + margin: 0 auto; + list-style: none; + border-bottom: 1px inset $global-border-color; + background-color: $global-background-color; + @extend %page-style; + + [data-theme='dark'] & { + border-bottom-color: $global-border-color-dark; + background-color: $global-background-color-dark; + } + + .breadcrumb-item { + display: flex; + + +.breadcrumb-item::before { + content: "/"; + display: inline-block; + padding-inline: 0.5rem; + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + + &.active { + @extend .text-secondary; + } + } + } +} diff --git a/themes/FixIt/assets/css/_core/_common.scss b/themes/FixIt/assets/css/_core/_common.scss new file mode 100644 index 0000000..c845a56 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_common.scss @@ -0,0 +1,66 @@ +// ============================== +// Common Styles +// 常用样式 +// ============================== + +.text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.text-start { + text-align: left !important; +} +.text-end { + text-align: right !important; +} +.text-center { + text-align: center !important; +} + +.d-none { + display: none !important; +} +.d-none-desktop { + display: none; +} +.d-none-mobile { + display: block; +} + +.ms-1, +.mx-1 { + margin-left: 0.25rem !important; +} +.me-1, +.mx-1 { + margin-right: 0.25rem !important; +} +.ps-1, +.px-1 { + padding-left: 0.25rem !important; +} +.pe-1, +.px-1 { + padding-right: 0.25rem !important; +} + +@each $color, $value in $theme-colors { + .text-#{$color} { + color: #{$value} !important; + + [data-theme='dark'] & { + color: #{darken($value, 5%)} !important; + } + } +} + +@each $key, $value in $orders { + .order-#{$key} { + order: #{$value} !important; + } +} + +.variant-numeric { + font-variant-numeric: tabular-nums lining-nums; +} diff --git a/themes/FixIt/assets/css/_core/_footer.scss b/themes/FixIt/assets/css/_core/_footer.scss new file mode 100644 index 0000000..adcd755 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_footer.scss @@ -0,0 +1,63 @@ +footer { + height: auto; + width: 100%; + text-align: center; + line-height: 1.25rem; + padding: 1rem 0; + @extend .print-d-none; + + .footer-container { + display: flex; + flex-direction: column; + font-size: 0.875rem; + + .footer-line { + width: 100%; + + .footer-divider:not(:first-child)::before { + content: '|'; + margin-left: 0.25rem; + margin-right: 0.25rem; + } + + .fixit-icon { + top: 0.25em; + } + + .animate-icon { + color: #dc143c; + animation: icon-animate 1.33s ease-in-out infinite; + } + + .run-times { + font-variant-numeric: tabular-nums lining-nums; + } + } + } + + @include blur; +} + +@keyframes icon-animate { + 0%, + 100% { + @include transform(scale(1)); + } + + 10%, + 30% { + @include transform(scale(0.9)); + } + + 20%, + 40%, + 60%, + 80% { + @include transform(scale(1.1)); + } + + 50%, + 70% { + @include transform(scale(1.1)); + } +} diff --git a/themes/FixIt/assets/css/_core/_header.scss b/themes/FixIt/assets/css/_core/_header.scss new file mode 100644 index 0000000..037ecf9 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_header.scss @@ -0,0 +1,645 @@ +header { + width: 100%; + background-color: $header-background-color; + @include z-index(2); + @include transition(box-shadow 0.3s ease); + @extend .print-d-none; + + [data-theme='dark'] & { + background-color: $header-background-color-dark; + } + + &:hover { + @include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1)); + + [data-theme='dark'] & { + @include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1)); + } + } +} + +.header-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + width: 100%; +} + +.header-title { + font-family: $header-title-font-family; + font-weight: bold; + margin-right: 0.5rem; + min-width: 10%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + @include flex(10); + + .logo { + min-height: 1.5em; + height: 1.5em; + vertical-align: middle; + width: auto; + } + + .header-title-text { + margin-left: 0.25rem; + margin-right: 0.25rem; + } + + .header-subtitle { + margin-left: 0.25rem; + font-size: 0.6em; + } +} + +.menu { + margin: 0; + padding: 0; + + .menu-item { + list-style: none; + + & .dropdown-icon { + margin-left: 0.25rem; + font-size: .875em; + color: $global-font-color; + + [data-theme='dark'] & { + color: $global-font-color-dark; + } + + &.open::before { + content: "\f078"; + } + } + + &.active { + >.menu-link, + >.nested-item>.menu-link { + font-weight: bold; + color: $menu-active-color; + + [data-theme='dark'] & { + color: $menu-active-color-dark; + } + } + } + + &.language-switch, + &.theme-switch { + cursor: pointer; + } + } +} + +.search { + position: relative; + + input { + color: transparent; + box-sizing: border-box; + height: 2.5rem; + width: 1.25rem; + @include border-radius(0.5rem); + border: none; + outline: none; + background-color: transparent; + vertical-align: baseline !important; + @include transition(width 0.3s ease); + } + + @include placeholder(transparent); + + .search-button { + margin: 0; + position: absolute; + left: auto; + right: 1rem; + } + + .search-toggle { + left: 0.5rem; + right: auto; + + #header-desktop.open & { + left: 1rem; + } + } + + .search-loading { + display: none; + } + + .search-clear { + display: none; + } + + .open &, + &.mobile { + input { + color: $global-font-color; + background-color: $search-background-color; + padding: 0 2rem 0 2rem; + } + + [data-theme='dark'] & { + input { + color: darken($global-font-color-dark, 10%); + background-color: darken($code-background-color-dark, 5%); + } + + @include placeholder($global-font-secondary-color-dark); + } + + @include placeholder($global-font-secondary-color); + + .search-button { + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + + .search-clear:hover { + color: #ff6b6b; + } + + .search-toggle:hover { + cursor: default; + } + } +} + +.theme-switch { + i { + @include transform(rotate(225deg)); + @include transition(transform 0.4s ease); + } + + &:hover i { + @include transform(rotate(45deg)); + } +} + +#header-desktop { + display: block; + position: sticky; + top: 0; + height: $header-height; + line-height: $header-height; + box-sizing: border-box; + + [data-header-desktop='normal'] & { + position: static; + } + + nav { + overflow: hidden; + white-space: nowrap; + } + + .header-wrapper { + // use css native function to calculate max value + padding: 0 2rem 0 MAX(10vh, $header-height); + height: 100%; + + &[data-github-corner='right'] { + padding-right: $header-height; + } + + .header-title { + font-size: $header-title-font-size; + height: 100%; + } + + .menu { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + float: right; + + >.menu-item { + &:hover .sub-menu { + display: block; + @include transform(translateX(-0.5rem)); + } + &.language-switch:hover .sub-menu { + @include transform(translateX(calc(1.75rem - 100%))); + } + } + + .menu-item { + padding: 0 0.5rem; + + &.delimiter { + width: 0; + margin: 0.125rem 0.25rem; + padding: 0; + border-left: 1px dashed lighten($global-font-secondary-color, 15%); + + [data-theme='dark'] & { + border-left-color: darken($global-font-secondary-color-dark, 15%); + } + } + } + + .sub-menu { + position: absolute; + margin: 0; + padding: 0.25rem 0; + display: none; + top: calc(#{$header-height} - 0.75rem); + border-radius: $global-border-radius; + border: 1px solid $global-border-color; + background-color: $header-background-color; + @include transition(box-shadow 0.3s ease); + @include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1)); + + [data-theme='dark'] & { + background-color: $header-background-color-dark; + border-color: $global-border-color-dark; + @include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1)); + } + + .menu-item { + height: $header-height*0.5; + line-height: $header-height*0.5; + max-width: 15rem; + white-space: nowrap; + text-overflow: ellipsis; + overflow-x: hidden; + } + } + } + } + + &.open .header-wrapper .menu .menu-item.search { + input { + width: 24rem; + } + } +} + +#header-mobile { + display: none; + position: sticky; + top: 0; + min-height: $header-height; + line-height: $header-height; + + [data-header-mobile='normal'] & { + position: static; + } + + .header-container { + padding: 0; + margin: 0; + + .header-wrapper { + padding: 0 1rem; + font-size: 1.125rem; + @include transition(margin-top 0.3s ease); + + .header-title { + font-size: $header-title-font-size; + max-width: 80%; + } + + .menu-toggle { + line-height: 4rem; + cursor: pointer; + @include transition(width 0.3s ease); + + span { + display: block; + background: $global-font-color; + width: 1.5rem; + height: 2px; + @include border-radius(3px); + @include transition(all 0.3s ease-in-out); + + [data-theme='dark'] & { + background: $global-font-color-dark; + } + } + + span:nth-child(1) { + margin-bottom: 0.5rem; + } + + span:nth-child(3) { + margin-top: 0.5rem; + } + + &.active { + span:nth-child(1) { + @include transform(rotate(45deg) translate(0.4rem, 0.5rem)); + } + + span:nth-child(2) { + opacity: 0; + } + + span:nth-child(3) { + @include transform(rotate(-45deg) translate(0.4rem, -0.5rem)); + } + } + } + } + + .menu { + background: $header-background-color; + border-top: 2px solid $global-border-color; + display: none; + overflow-y: overlay; + max-height: 70vh; + @include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1)); + + [data-theme='dark'] & { + @include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1)); + } + + &::-webkit-scrollbar { + width: 0; + } + + .search-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + padding: ($header-height - 2.5rem) / 2 1rem; + line-height: 2.5rem; + position: sticky; + top: 0; + background-color: $header-background-color; + @include z-index(0, 50); + + [data-theme='dark'] & { + background-color: $header-background-color-dark; + } + } + + .search { + flex-grow: 10; + + .algolia-autocomplete, + input { + width: 100%; + } + } + + .search-loading, + .search-clear { + right: 0.5rem; + } + + .search-button { + top: 0; + } + + .search-cancel { + display: none; + margin-left: 0.75rem; + } + + .menu-item { + display: block; + position: relative; + line-height: 2.5rem; + padding: 0 1rem; + + &:not(.menu-system):hover { + background-color: lighten($code-background-color, 24%); + + [data-theme='dark'] & { + background-color: lighten($code-background-color-dark, 5%); + } + } + + .menu-link { + display: block; + white-space: nowrap; + text-overflow: ellipsis; + overflow-x: hidden; + @include flex(4); + } + + & .nested-item { + display: flex; + justify-content: space-between; + align-items: center; + + .menu-link { + max-width: 80%; + } + } + } + + .menu-system { + display: flex; + justify-content: center; + gap: 0.25rem; + position: sticky; + bottom: 0; + line-height: 2.5rem; + padding: 0 1rem; + background-color: $header-background-color; + + [data-theme='dark'] & { + background-color: $header-background-color-dark; + } + + .menu-system-item { + padding-inline: 0.5rem; + } + + .language-switch { + position: relative; + + .language-select { + position: absolute; + opacity: 0; + left: 0; + top: 0; + width: 100%; + height: 100%; + } + } + } + + .sub-menu { + padding-left: 0; + display: none; + + &.open { + display: block; + } + + .menu-item:hover { + background-color: lighten($global-font-secondary-color, 20%); + + [data-theme='dark'] & { + background-color: darken($global-font-secondary-color-dark, 20%); + } + } + } + + &.active { + display: block; + } + + [data-theme='dark'] & { + background: $header-background-color-dark; + border-top-color: $global-border-color-dark; + } + } + } + + &.open { + .header-wrapper { + margin-top: -$header-height; + } + + .menu { + padding-top: 0; + border-top: none; + + .menu-item { + display: none; + } + + .search-cancel { + display: inline; + } + } + } +} + +.search-dropdown { + position: fixed; + top: $header-height; + @include z-index(2); + @include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1)); + + [data-theme='dark'] & { + @include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1)); + } + + &.desktop { + right: 2rem; + width: 30rem; + } + + &.mobile { + right: 0; + width: 100%; + } + + .dropdown-menu { + right: 0 !important; + background-color: $global-background-color; + + [data-theme='dark'] & { + background-color: $global-background-color-dark; + } + + .suggestions { + overflow-y: auto; + max-height: calc(100vh - #{$header-height}); + + .suggestion { + padding: 0.75rem 1rem; + + .suggestion-title { + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 1rem; + font-weight: bold; + max-width: 75%; + } + + .suggestion-date { + font-size: 0.875rem; + float: right; + text-align: right; + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + + .suggestion-context { + line-height: 1.25rem; + @include box(vertical); + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; + @include overflow-wrap(break-word); + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + + em { + font-style: normal; + background-color: $selection-color; + + [data-theme='dark'] & { + background-color: $selection-color-dark; + } + } + + &.cursor { + background: darken($code-background-color, 5%); + + [data-theme='dark'] & { + background: lighten($code-background-color-dark, 5%); + } + } + + &:hover { + cursor: pointer; + } + } + } + + .search-empty { + padding: 1rem; + text-align: center; + + .search-query { + font-weight: bold; + + [data-theme='dark'] & { + color: #ddd; + } + } + } + + .search-footer { + padding: 0.5rem 1rem; + float: right; + font-size: 0.8rem; + color: $global-font-secondary-color; + + [data-theme='dark'] { + color: $global-font-secondary-color-dark; + } + + @include link(false, false); + + a { + font-size: 1rem; + } + } + } +} diff --git a/themes/FixIt/assets/css/_core/_layout.scss b/themes/FixIt/assets/css/_core/_layout.scss new file mode 100644 index 0000000..38e0b89 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_layout.scss @@ -0,0 +1,41 @@ +/** Layout **/ +.wrapper { + display: flex; + flex-direction: column; + min-height: 100vh; + width: 100%; + + main { + flex: 1 0 auto; + + aside { + flex: 1; + padding-inline: 0.5rem; + + &:first-child { + order: 2; + } + } + + + &.container { + display: flex; + align-items: flex-start; + justify-content: center; + padding: 0 1rem; + + &.container-reverse { + flex-direction: row-reverse; + } + + &:has(.home:not(.posts)) { + align-items: center; + } + } + } +} + +@import "_core/header"; +@import "_core/breadcrumb"; +@import "_core/footer"; +@import "_core/pagination"; diff --git a/themes/FixIt/assets/css/_core/_media.scss b/themes/FixIt/assets/css/_core/_media.scss new file mode 100644 index 0000000..b60a688 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_media.scss @@ -0,0 +1,160 @@ +@media only screen and (min-width: 1441px) { + %page-style { + width: 60%; + + [data-page-style='wide'] & { + width: 64%; + } + + [data-page-style='narrow'] & { + max-width: 800px; + } + } +} + +@media only screen and (max-width: 1440px) { + %page-style { + width: 56%; + + [data-page-style='wide'] & { + width: 60%; + } + } +} + +@media only screen and (max-width: 1200px) { + %page-style { + width: 52%; + + [data-page-style='wide'] & { + width: 56%; + } + } + + #header-desktop .header-wrapper { + padding-right: 1rem; + } + + .search-dropdown.desktop { + right: 1rem; + } +} + +@media only screen and (max-width: 960px) { + %page-style { + width: 80% !important; + } + + aside { + display: none !important; + } + + #toc-static { + display: block; + } + + #header-desktop .header-wrapper { + padding-left: 1rem; + } +} + + +@media only screen and (min-width: 681px) { + .breadcrumb-container.sticky { + body:not([data-header-desktop='sticky']) & { + top: 0; + } + // adjust the scroll margin top of the content anchors on the page + body:not([data-header-desktop='auto']) &+.container .content [id] { + scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset)); + } + } + + [data-header-desktop='normal'] .page .content [id] { + --#{$prefix}scroll-mt: #{$global-scroll-margin-top}; + } +} + +@media only screen and (max-width: 680px) { + #header-desktop { + display: none; + } + + #header-mobile, + .d-none-desktop { + display: block; + } + + .d-none-mobile { + display: none !important; + } + + .breadcrumb-container.sticky { + body:not([data-header-mobile='sticky']) & { + top: 0; + } + // adjust the scroll margin top of the content anchors on the page + body:not([data-header-mobile='auto']) &+.container .content [id] { + scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset)); + } + } + + [data-header-mobile='normal'] .page .content [id] { + --#{$prefix}scroll-mt: #{$global-scroll-margin-top}; + } + + %page-style { + width: 100% !important; + } + + .page { + .categories-card { + .card-item { + width: 100%; + } + } + } + + footer { + .footer-container { + font-size: 0.618rem; + } + } + + .pagination .page-item { + margin: 0 5px; + } +} + +@media only print { + @page { + size: A4 portrait; + margin: 1.27cm; + } + + .page { + width: 100% !important; + padding-top: 0 !important; + + &.single { + .single-title, + .single-subtitle, + .post-meta { + text-align: center; + } + } + + h1:not(.single-title), + .page-break-before { + page-break-before: always; + } + + .page-break-after { + page-break-after: always; + } + } + + .print-d-none { + display: none !important; + } +} diff --git a/themes/FixIt/assets/css/_core/_pagination.scss b/themes/FixIt/assets/css/_core/_pagination.scss new file mode 100644 index 0000000..f837474 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_pagination.scss @@ -0,0 +1,90 @@ +.pagination { + display: flex; + flex-direction: row; + justify-content: center; + flex-wrap: wrap; + list-style: none; + white-space: nowrap; + width: 100%; + padding: 1rem 0; + + a { + font-size: 0.8rem; + color: $pagination-link-color; + letter-spacing: 0.1rem; + font-weight: 700; + padding: 5px 5px; + text-decoration: none; + @include transition(0.3s); + + [data-theme='dark'] & { + color: $pagination-link-color-dark; + } + } + + li { + padding: 5px; + margin: 0 10px; + box-sizing: border-box; + position: relative; + display: inline; + + &.disabled { + display: none; + } + + &:hover a { + color: $pagination-link-hover-color; + } + + [data-theme='dark'] &:hover a { + color: $pagination-link-hover-color-dark; + } + + &::before, + &::after { + position: absolute; + content: ''; + width: 0; + height: 3px; + background: $pagination-link-hover-color; + @include transition(0.3s); + bottom: 0px; + } + + [data-theme='dark'] &::before, + [data-theme='dark'] &::after { + background: $pagination-link-hover-color-dark; + } + + &::before { + left: 50%; + } + + &::after { + right: 50%; + } + + &:hover { + &::before, + &::after { + width: 50%; + } + } + + &.active { + a { + color: $pagination-link-hover-color; + } + + [data-theme='dark'] & a { + color: $pagination-link-hover-color-dark; + } + + &::before, + &::after { + width: 50%; + } + } + } +} diff --git a/themes/FixIt/assets/css/_core/_patch.scss b/themes/FixIt/assets/css/_core/_patch.scss new file mode 100644 index 0000000..6d232df --- /dev/null +++ b/themes/FixIt/assets/css/_core/_patch.scss @@ -0,0 +1,20 @@ +/* Resolve style conflicts between third-party plugins */ + +@keyframes #{$prefix}pulse { + from { + @include transform(scale3d(1, 1, 1)); + } + + 50% { + @include transform(scale3d(1.05, 1.05, 1.05)); + } + + to { + @include transform(scale3d(1, 1, 1)); + } +} + +.animate__pulse { + -webkit-animation-name: #{$prefix}pulse !important; + animation-name: #{$prefix}pulse !important; +} diff --git a/themes/FixIt/assets/css/_core/_root.scss b/themes/FixIt/assets/css/_core/_root.scss new file mode 100644 index 0000000..7554899 --- /dev/null +++ b/themes/FixIt/assets/css/_core/_root.scss @@ -0,0 +1,15 @@ +:root { + // Note: Custom variable values only support SassScript inside `#{}`. + + // Theme colors varibles + @each $color, $value in $theme-colors { + --#{$prefix}#{$color}: #{$value}; + } + @each $color, $value in $theme-colors { + --#{$prefix}#{$color}-dark: #{darken($value, 5%)}; + } + + // Scroll margin top and Stack sticky top related + --#{$prefix}scroll-mt: calc(#{$header-height} + #{$global-scroll-margin-top}); + --#{$prefix}breadcrumb-offset: 2.5rem; +} diff --git a/themes/FixIt/assets/css/_custom.scss b/themes/FixIt/assets/css/_custom.scss new file mode 100644 index 0000000..2f4e7e2 --- /dev/null +++ b/themes/FixIt/assets/css/_custom.scss @@ -0,0 +1,75 @@ +// ============================== +// Custom style +// 自定义样式 +// ============================== + +.button { + background-color: $global-link-color; + transition-duration: 0.4s; + border: none; + border-radius: 5px; + color: $global-background-color; + padding: 8px 16px; + text-align: center; + text-decoration: none; + display: inline-block; + font-weight: bold; + margin: 4px 2px; + transition-duration: 0.4s; +} + +.button:hover { + background-color: $global-link-color-dark; +} +[data-theme="dark"] .button { + background-color: $global-link-color-dark; + transition-duration: 0.4s; + border: none; + border-radius: 5px; + color: $global-background-color-dark; + padding: 8px 16px; + text-align: center; + text-decoration: none; + display: inline-block; + font-weight: bold; + margin: 4px 2px; + transition-duration: 0.4s; +} + +[data-theme="dark"] .button:hover { + background-color: $global-link-color; +} + +.field { + background-color: $global-background-color; + transition-duration: 0.4s; + border: 2px solid $global-link-color; + border-radius: 5px; + color: $global-font-color; + padding: 8px 16px; + font-weight: bold; + margin: 4px 2px; + transition-duration: 0.4s; +} + +[data-theme="dark"] .field { + background-color: $global-background-color-dark; + transition-duration: 0.4s; + border: 2px solid $global-link-color-dark; + border-radius: 5px; + color: $global-font-color-dark; + padding: 8px 16px; + font-weight: bold; + margin: 4px 2px; + transition-duration: 0.4s; +} + +.newsletter { + border-top: 1px dashed $global-link-color; + margin-top: 20px; +} + +[theme="dark"] .newsletter { + border-top: 1px dashed $global-link-color-dark; + margin-top: 20px; +} diff --git a/themes/FixIt/assets/css/_custom.scss.~1~ b/themes/FixIt/assets/css/_custom.scss.~1~ new file mode 100644 index 0000000..37edf90 --- /dev/null +++ b/themes/FixIt/assets/css/_custom.scss.~1~ @@ -0,0 +1,4 @@ +// ============================== +// Custom style +// 自定义样式 +// ============================== diff --git a/themes/FixIt/assets/css/_mixin/_blur.scss b/themes/FixIt/assets/css/_mixin/_blur.scss new file mode 100644 index 0000000..d68ac17 --- /dev/null +++ b/themes/FixIt/assets/css/_mixin/_blur.scss @@ -0,0 +1,5 @@ +@mixin blur { + .blur & { + @include filter(blur(1.5px)); + } +} diff --git a/themes/FixIt/assets/css/_mixin/_compatibility.scss b/themes/FixIt/assets/css/_mixin/_compatibility.scss new file mode 100644 index 0000000..79e78e3 --- /dev/null +++ b/themes/FixIt/assets/css/_mixin/_compatibility.scss @@ -0,0 +1,107 @@ +@mixin border-radius($value) { + -webkit-border-radius: $value; + -moz-border-radius: $value; + border-radius: $value; +} + +@mixin box-shadow($values...) { + -webkit-box-shadow: $values; + box-shadow: $values; +} + +@mixin transition($values...) { + -webkit-transition: $values; + -moz-transition: $values; + -o-transition: $values; + transition: $values; +} + +@mixin transform($value) { + -webkit-transform: $value; + -ms-transform: $value; + -o-transform: $value; + transform: $value; +} + +@mixin filter($value) { + -webkit-filter: $value; + filter: $value; +} + +@mixin flex($value) { + -webkit-flex: $value; + flex: $value; +} + +@mixin box($orient) { + display: -moz-box; + display: -webkit-box; + display: box; + + -webkit-box-orient: $orient; + -moz-box-orient: $orient; + box-orient: $orient; +} + +@mixin placeholder($color) { + input::-webkit-input-placeholder { + color: $color; + } + + input:-moz-placeholder { + color: $color; + } + + input::-moz-placeholder { + color: $color; + } + + input:-ms-input-placeholder { + color: $color; + } + + input::placeholder { + color: $color; + } +} + +@mixin max-content($property) { + #{$property}: -webkit-max-content; + #{$property}: -moz-max-content; + #{$property}: intrinsic; + #{$property}: max-content; +} + +@mixin tab-size($value) { + -moz-tab-size: $value; + -o-tab-size: $value; + tab-size: $value; +} + +@mixin appearance($value) { + -moz-appearance: $value; + -webkit-appearance: $value; +} + +@mixin overflow-wrap($value) { + word-wrap: $value; + overflow-wrap: $value; +} + +@mixin line-break($value) { + -webkit-line-break: $value; + -ms-line-break: $value; + line-break: $value; +} + +@mixin object-fit($value) { + -o-object-fit: $value; + object-fit: $value; + font-family: 'object-fit: #{$value};'; +} + +@mixin user-select($value) { + -webkit-user-select: $value !important; + -moz-user-select: $value !important; + user-select: $value !important; +} diff --git a/themes/FixIt/assets/css/_mixin/_details.scss b/themes/FixIt/assets/css/_mixin/_details.scss new file mode 100644 index 0000000..625e4c8 --- /dev/null +++ b/themes/FixIt/assets/css/_mixin/_details.scss @@ -0,0 +1,7 @@ +@mixin details-transition-open { + @include transition(max-height 0.2s cubic-bezier(0, 1, 0, 1) -0.1s); +} + +@mixin details-transition-close { + @include transition(max-height 0.2s cubic-bezier(0.5, 0, 1, 0) 0s); +} diff --git a/themes/FixIt/assets/css/_mixin/_index.scss b/themes/FixIt/assets/css/_mixin/_index.scss new file mode 100644 index 0000000..815d18c --- /dev/null +++ b/themes/FixIt/assets/css/_mixin/_index.scss @@ -0,0 +1,5 @@ +@import '_compatibility'; +@import '_link'; +@import '_blur'; +@import '_details'; +@import '_z-index'; diff --git a/themes/FixIt/assets/css/_mixin/_link.scss b/themes/FixIt/assets/css/_mixin/_link.scss new file mode 100644 index 0000000..e2b9b7d --- /dev/null +++ b/themes/FixIt/assets/css/_mixin/_link.scss @@ -0,0 +1,46 @@ +@mixin link($light, $dark) { + a, + a::before, + a::after { + text-decoration: none; + + @if $light { + color: $global-link-color; + } + + @else { + color: $single-link-color; + } + + [data-theme='dark'] & { + @if $dark { + color: $global-link-color-dark; + } + + @else { + color: $single-link-color-dark; + } + } + } + + a:active, + a:hover { + @if $light { + color: $global-link-hover-color; + } + + @else { + color: $single-link-hover-color; + } + + [data-theme='dark'] & { + @if $dark { + color: $global-link-hover-color-dark; + } + + @else { + color: $single-link-hover-color-dark; + } + } + } +} diff --git a/themes/FixIt/assets/css/_mixin/_z-index.scss b/themes/FixIt/assets/css/_mixin/_z-index.scss new file mode 100644 index 0000000..b9641ff --- /dev/null +++ b/themes/FixIt/assets/css/_mixin/_z-index.scss @@ -0,0 +1,3 @@ +@mixin z-index($level, $diff: 0) { + z-index: ($level * 100) + $diff; +} diff --git a/themes/FixIt/assets/css/_override.scss b/themes/FixIt/assets/css/_override.scss new file mode 100644 index 0000000..c37b4ec --- /dev/null +++ b/themes/FixIt/assets/css/_override.scss @@ -0,0 +1,4 @@ +// ============================== +// Override Variables +// 覆盖变量 +// ============================== diff --git a/themes/FixIt/assets/css/_page/_404.scss b/themes/FixIt/assets/css/_page/_404.scss new file mode 100644 index 0000000..774c7dd --- /dev/null +++ b/themes/FixIt/assets/css/_page/_404.scss @@ -0,0 +1,6 @@ +#content-404 { + font-size: 1.8rem; + line-height: 3rem; + @include transform(translateY(30vh)); + text-align: center; +} diff --git a/themes/FixIt/assets/css/_page/_archive.scss b/themes/FixIt/assets/css/_page/_archive.scss new file mode 100644 index 0000000..43193a8 --- /dev/null +++ b/themes/FixIt/assets/css/_page/_archive.scss @@ -0,0 +1,27 @@ +.archive { + .single-title { + padding: 1rem 0 0.5rem; + margin: 0; + font-size: 1.6rem; + font-weight: bold; + line-height: 140%; + text-align: right; + } + + .single-subtitle { + margin: 0.5rem 0; + font-size: 1.2rem; + font-weight: normal; + line-height: 100%; + text-align: right; + } + + .group-title { + font-size: 1.2rem; + margin-top: 1.5rem; + margin-bottom: 1rem; + } + + @import '../_partials/_archive/terms'; + @import '../_partials/_archive/tags'; +} diff --git a/themes/FixIt/assets/css/_page/_friends.scss b/themes/FixIt/assets/css/_page/_friends.scss new file mode 100644 index 0000000..5d0dce1 --- /dev/null +++ b/themes/FixIt/assets/css/_page/_friends.scss @@ -0,0 +1,63 @@ +/** + * @Description: Style of layout named 'friends'. + * @Author: Lruihao + * @Updated: 2022/3/11 21:36 + */ + +.friend-links { + margin-top: 1rem; + display: flex; + flex-direction: row; + justify-content: space-between; + flex-wrap: wrap; +} +@media (max-width: 576px) { + .friend-links { + justify-content: space-around; + } +} +.friend-link { + width: 150px; + height: 200px; + font-size: 1rem; + text-align: center; + background: rgba(255, 255, 255, 0.3); + box-sizing: border-box; + box-shadow: 3px 3px 5px #aaa; + @include border-radius($global-border-radius); + border: none; + transition-duration: 0.3s; + margin-bottom: 1rem; + display: flex; + flex-direction: column; + justify-content: space-between; +} +.friend-link:hover { + background: #fff; + @include transform(scale(1.03)); + box-shadow: 0 0 3px #aaa; +} +.friend-avatar { + object-fit: cover; + object-position: center; + width: 100% !important; + height: 150px !important; + @include border-radius($global-border-radius); + margin: 0; + padding: 0; +} +.friend-nickname { + display: block; + position: relative; + color: #2bbc8a; + font-weight: bold; + max-width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 18px; + margin-bottom: 1rem; +} +.friend-nickname:hover { + color: #d480aa; +} diff --git a/themes/FixIt/assets/css/_page/_home.scss b/themes/FixIt/assets/css/_page/_home.scss new file mode 100644 index 0000000..9a7e1f5 --- /dev/null +++ b/themes/FixIt/assets/css/_page/_home.scss @@ -0,0 +1,189 @@ +.home { + .home-profile { + text-align: center; + + .home-avatar { + padding: 0.5rem; + + img { + display: inline-block; + width: 8rem; + height: auto; + margin: 0 auto; + @include border-radius(100%); + @include box-shadow(0 0 0 0.3618em rgba(0, 0, 0, 0.05)); + @include transition(all 0.4s ease); + + [data-theme='dark'] & { + @include box-shadow(0 0 0 0.3618em rgba(255, 255, 255, 0.05)); + } + + &:hover { + position: relative; + @include transform(translateY(-0.75rem)); + } + } + } + + .home-title { + font-size: 1.25rem; + font-weight: bold; + margin: 0; + padding: 0.5rem; + } + + .home-subtitle { + font-size: 1rem; + font-weight: normal; + margin: 0; + padding: 0.5rem; + } + + .links { + padding: 0.5rem; + font-size: 1.5rem; + + a * { + vertical-align: text-bottom; + } + + img { + height: 1.5rem; + padding: 0 0.25rem; + } + } + + .home-disclaimer { + font-size: 1rem; + line-height: 1.5rem; + font-weight: normal; + margin: 0; + padding: 0.5rem; + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + } +} + +.home.posts { + .home-profile { + padding: 2rem 0; + } + + .home-avatar img { + width: 6rem; + } + + .summary { + padding-top: 1rem; + padding-bottom: 0.8rem; + color: $global-font-color; + border-bottom: 1px dashed $global-border-color; + + &:first-of-type { + padding-top: 0; + } + + [data-theme='dark'] & { + color: $global-font-color-dark; + border-bottom: 1px dashed $global-border-color-dark; + } + + .featured-image-preview { + width: 100%; + padding: 30% 0 0; + position: relative; + margin: 0.6rem auto; + @include transition(transform 0.4s ease); + + img { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + @include object-fit(cover); + } + + &:hover { + @include transform(scale(1.01)); + } + } + + .single-title { + font-size: 1.25rem; + line-height: 140%; + margin: 0.4rem 0; + } + + .content { + @include box(vertical); + -webkit-line-clamp: 3; + margin-top: 0.3rem; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + @include overflow-wrap(break-word); + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + + h2, + h3, + h4, + h5, + h6, + p { + font-size: 1rem; + line-height: 1.5; + display: inline; + + &::after { + content: '\A'; + white-space: pre; + } + } + + h2 { + font-size: 1.125rem; + } + + @include link(false, true); + + b, + strong { + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + } + + .post-footer { + margin-top: 0.4rem; + display: flex; + justify-content: space-between; + align-items: center; + font-size: 0.875rem; + + @include link(false, false); + + .post-tags { + padding: 0; + + @include link(true, true); + + .post-tag:not(:last-child)::after { + content: ','; + margin-right: 0.25rem; + } + } + } + } +} diff --git a/themes/FixIt/assets/css/_page/_index.scss b/themes/FixIt/assets/css/_page/_index.scss new file mode 100644 index 0000000..6ac5e31 --- /dev/null +++ b/themes/FixIt/assets/css/_page/_index.scss @@ -0,0 +1,20 @@ +.page { + position: relative; + @extend %page-style; + + .content { + [id] { + scroll-margin-top: var(--#{$prefix}scroll-mt); + } + } + + @include blur; +} + +@import '_single'; +@import '_special'; +@import '_archive'; +@import '_home'; +@import '_404'; +@import '_offline'; +@import '_friends'; diff --git a/themes/FixIt/assets/css/_page/_offline.scss b/themes/FixIt/assets/css/_page/_offline.scss new file mode 100644 index 0000000..e954b0e --- /dev/null +++ b/themes/FixIt/assets/css/_page/_offline.scss @@ -0,0 +1,19 @@ +#content-offline { + @include transform(translateY(30vh)); + text-align: center; + + .offline-title { + font-size: 3.6rem; + } + .offline-subtitle { + margin: 0.4rem 0; + font-size: 1rem; + font-weight: normal; + font-style: italic; + line-height: 100%; + color: #57606a; + } + .error-text { + font-size: 1.2rem; + } +} diff --git a/themes/FixIt/assets/css/_page/_single.scss b/themes/FixIt/assets/css/_page/_single.scss new file mode 100644 index 0000000..632a845 --- /dev/null +++ b/themes/FixIt/assets/css/_page/_single.scss @@ -0,0 +1,393 @@ +@import '../_partials/_single/toc'; +@import '../_partials/_single/fixit-decryptor'; + +.single { + .single-title { + padding: 1rem 0 0.5rem; + margin: 0; + font-size: 1.6rem; + font-weight: bold; + line-height: 140%; + + .icon-repost { + color: var(--#{$prefix}success); + display: inline-block; + width: max-content; + margin-right: 0.25rem; + + [data-theme='dark'] & { + color: var(--#{$prefix}success-dark); + } + } + } + + .single-subtitle { + margin: 0.5rem 0; + font-size: 1.2rem; + font-weight: normal; + line-height: 100%; + } + + .post-meta { + font-size: 0.875rem; + color: $global-font-secondary-color; + + .comment-visitors, + .comment-count { + @extend .print-d-none; + } + + span { + display: inline-block; + } + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + + @include link(false, true); + + .author { + font-size: 1.05rem; + + img.avatar { + width: 1.3rem; + height: 1.3rem; + border-radius: 50%; + vertical-align: text-bottom; + border: 0.25px solid $global-border-color; + box-sizing: border-box; + object-position: center; + @include object-fit(cover); + + [data-theme='dark'] & { + border-color: $global-border-color-dark; + } + } + } + } + + .featured-image { + margin: 0.5rem 0 1rem 0; + + img { + display: block; + width: 100%; + max-width: 100%; + height: auto; + margin: 0 auto; + overflow: hidden; + } + } + + #content[data-end-flag]:not([data-password])::after { + content: attr(data-end-flag); + display: block; + text-align: center; + color: $global-font-secondary-color; + font-size: 15px; + padding: 5px; + } + + .content { + > h1, + > h2 { + font-size: 1.5rem; + + & code { + font-size: 1.25rem; + } + } + + > h3 { + font-size: 1.375rem; + + & code { + font-size: 1.125rem; + } + } + + > h4 { + font-size: 1.25rem; + + & code { + font-size: 1rem; + } + } + + > h5 { + font-size: 1.125rem; + } + + > h6 { + font-size: 1rem; + } + + h2, + h3, + h4, + h5, + h6 { + font-weight: bold; + margin: 1.2rem 0; + + [data-theme='dark'] & { + font-weight: bolder; + } + } + + > h2, + > h3, + > h4, + > h5, + > h6 { + > .header-mark::before { + content: '|'; + margin-right: 0.3125rem; + color: $single-link-color; + + [data-theme='dark'] & { + color: $single-link-color-dark; + } + } + } + + > h2 > .header-mark::before { + content: '#'; + } + + p { + margin: 0.5rem 0; + } + + b, + strong { + font-weight: bold; + + [data-theme='dark'] & { + color: #ddd; + } + } + + @include link(false, false); + + a { + white-space: normal; + @include overflow-wrap(break-word); + + [data-theme='dark'] & b, + [data-theme='dark'] & strong { + color: $single-link-color-dark; + } + } + + [data-theme='dark'] a:hover b, + [data-theme='dark'] a:hover strong { + color: $single-link-hover-color-dark; + } + + ul, + ol { + margin: 0.5rem 0; + padding-left: 2.5rem; + } + + ul { + list-style-type: disc; + } + + ruby { + background: $code-background-color; + + rt { + color: $global-font-secondary-color; + } + + [data-theme='dark'] & { + background: $code-background-color-dark; + + rt { + color: $global-font-secondary-color-dark; + } + } + } + + .table-wrapper { + overflow-x: auto; + + &::-webkit-scrollbar { + background-color: $table-background-color; + + [data-theme='dark'] & { + background-color: $table-background-color-dark; + } + } + + > table { + width: 100%; + max-width: 100%; + margin: 0.625rem 0; + border-spacing: 0; + background: $table-background-color; + border-collapse: collapse; + + [data-theme='dark'] & { + background: $table-background-color-dark; + } + + thead { + background: $table-thead-color; + + [data-theme='dark'] & { + background-color: $table-thead-color-dark; + } + } + + &:not([class]) tbody { + & tr:nth-child(odd) { + background: darken($table-background-color, 2.25%); + + [data-theme='dark'] & { + background-color: lighten($table-background-color-dark, 2.75%); + } + } + + & tr:hover { + background: darken($table-background-color, 4.5%); + + [data-theme='dark'] & { + background-color: lighten($table-background-color-dark, 5.5%); + } + } + } + + th, + td { + padding: 0.3rem 1rem; + border: 1px solid darken($table-thead-color, 2%); + + [data-theme='dark'] & { + border-color: darken($table-thead-color-dark, 2%); + } + } + } + } + + img { + max-width: 100%; + min-height: 1em; + + &:not([data-h]) { + height: auto; + } + + &.version { + height: 1.25em; + vertical-align: text-bottom; + } + } + svg { + max-width: 100%; + } + + figure { + margin: 0.5rem; + text-align: center; + + .image-caption:not(:empty) { + min-width: 20%; + max-width: 80%; + display: inline-block; + padding: 0.5rem; + margin: 0 auto; + font-size: 0.875rem; + color: #969696; + } + + img { + display: block; + margin: 0 auto; + overflow: hidden; + + &:not([width]) { + width: 100%; + } + } + } + + blockquote { + display: block; + border-left: 0.25em solid $global-border-color; + color: $blockquote-color; + padding: 0 1em; + margin: 1rem 0; + + ul, + ol { + padding-left: 1.5em; + } + + [data-theme='dark'] & { + color: $blockquote-color-dark; + border-left-color: $global-border-color-dark; + } + + @include link(false, true); + } + + .footnotes { + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + + p { + margin: 0.25rem 0; + } + } + + @import '../_partials/_single/code'; + @import '../_shortcodes'; + + hr { + margin: 1rem 0; + position: relative; + border-top: 1px dashed $global-border-color; + border-bottom: none; + + [data-theme='dark'] & { + border-top: 1px dashed $global-border-color-dark; + } + } + + kbd { + display: inline-block; + padding: 0 0.25rem; + background-color: $global-background-color; + border: 1px solid $global-border-color; + border-bottom-color: $global-border-color; + font-size: 0.8rem; + font-family: $code-font-family; + color: $code-color; + @include border-radius($global-border-radius); + @include box-shadow(inset 0 -1px 0 $global-border-color); + + [data-theme='dark'] & { + background-color: $global-background-color-dark; + border: 1px solid $global-border-color-dark; + border-bottom-color: $global-border-color-dark; + color: $code-color-dark; + @include box-shadow(inset 0 -1px 0 $global-border-color-dark); + } + } + } + + @import '../_partials/_single/reward'; + @import '../_partials/_single/footer'; + @import '../_partials/_single/comment'; +} + +.lg-toolbar .lg-icon::after { + color: #999; +} diff --git a/themes/FixIt/assets/css/_page/_special.scss b/themes/FixIt/assets/css/_page/_special.scss new file mode 100644 index 0000000..3a8f18d --- /dev/null +++ b/themes/FixIt/assets/css/_page/_special.scss @@ -0,0 +1,6 @@ +.special { + .single-title, + .single-subtitle { + text-align: right; + } +} diff --git a/themes/FixIt/assets/css/_partials/_archive/_tags.scss b/themes/FixIt/assets/css/_partials/_archive/_tags.scss new file mode 100644 index 0000000..b8d4c33 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_archive/_tags.scss @@ -0,0 +1,69 @@ +.tag-cloud-tags { + margin: 10px 0; + + @include link(true, true); + + a { + display: inline-block; + position: relative; + margin: 5px 10px; + @include overflow-wrap(break-word); + @include transition(all ease-out 0.3s); + + &:active, + &:focus, + &:hover { + @include transform(scale(1.2)); + + sup { + color: $global-font-color; + @include transition(all ease-out 0.3s); + + [data-theme='dark'] & { + color: $global-font-color-dark; + } + } + } + + sup { + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + } +} + +@for $grade from 0 through 10 { + $tag-cloud-color: mix($tag-cloud-end, $tag-cloud-start, $grade * 10); + $tag-cloud-color-dark: mix($tag-cloud-end-dark, $tag-cloud-start-dark, $grade * 10); + + .tag-cloud-#{$grade} { + color: $tag-cloud-color!important; + font-size: var(--tag-font); + margin: 10px!important; + + &:active, + &:focus, + &:hover { + color: $global-link-hover-color!important; + + [data-theme='dark'] & { + color: $global-link-hover-color-dark; + } + + sup { + opacity: 1; + } + } + + [data-theme='dark'] & { + color: $tag-cloud-color-dark!important; + } + + sup { + opacity: 0; + } + } +} diff --git a/themes/FixIt/assets/css/_partials/_archive/_terms.scss b/themes/FixIt/assets/css/_partials/_archive/_terms.scss new file mode 100644 index 0000000..e3643da --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_archive/_terms.scss @@ -0,0 +1,85 @@ +.categories-card { + margin: 0 auto; + display: flex; + align-items: flex-start; + justify-content: space-between; + flex-direction: row; + flex-wrap: wrap; + line-height: 1.6rem; + + .card-item { + font-size: 0.875rem; + text-align: left; + width: 45%; + display: flex; + align-items: flex-start; + min-height: 10rem; + padding: 0 2%; + position: relative; + + &:nth-child(n+3){ + margin-top: 2rem; + } + + .card-item-wrapper { + width: 100%; + overflow: hidden; + + .card-item-title { + font-size: 1.2rem; + font-weight: bold; + display: inline-block; + margin-top: 1rem; + margin-bottom: 0.75rem; + } + + span { + float: right; + padding-right: 1rem; + } + } + } +} + +.archive-item { + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + margin: 0.25rem 0 0.25rem 1.5rem; +} + +.archive-item-link { + min-width: 10%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + + &:hover { + color: $global-link-hover-color; + background-color: transparent; + } + + [data-theme='dark'] & { + color: $global-link-color-dark; + + &:hover { + color: $global-link-hover-color-dark; + } + } +} + +.archive-item-date { + text-align: right; + color: $global-font-secondary-color; + white-space: nowrap; + font-variant-numeric: tabular-nums lining-nums; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } +} + +.more-post { + text-align: right; +} diff --git a/themes/FixIt/assets/css/_partials/_details.scss b/themes/FixIt/assets/css/_partials/_details.scss new file mode 100644 index 0000000..926288d --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_details.scss @@ -0,0 +1,40 @@ +.details { + .details-summary { + @include border-radius($global-border-radius); + + &:hover { + cursor: pointer; + } + } + + i.details-icon { + color: $global-font-secondary-color; + @include transition(transform 0.2s ease); + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + + .details-content { + max-height: 0; + overflow-y: hidden; + @include details-transition-open; + } + + &.open { + .details-summary { + @include border-radius($global-border-radius $global-border-radius 0 0); + } + + i.details-icon { + @include transform(rotate(90deg)); + } + + .details-content { + max-height: 100%; + @include border-radius(0 0 $global-border-radius $global-border-radius); + @include details-transition-close; + } + } +} diff --git a/themes/FixIt/assets/css/_partials/_icon.scss b/themes/FixIt/assets/css/_partials/_icon.scss new file mode 100644 index 0000000..8d50ba1 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_icon.scss @@ -0,0 +1,27 @@ +svg.icon { + display: inline-block; + width: 1.25em; + height: 1em; + text-align: center; + + path { + fill: currentColor; + } +} + +img.emoji { + display: inline-block; + height: 1em; + width: 1em; + margin: 0 0.05em 0 0.1em; + vertical-align: -0.1em; +} + +.fixit-icon { + display: inline-block; + height: 1.5em; + width: 1.5em; + line-height: 1.5em; + position: relative; + vertical-align: text-bottom; +} diff --git a/themes/FixIt/assets/css/_partials/_img.scss b/themes/FixIt/assets/css/_partials/_img.scss new file mode 100644 index 0000000..cd3b3ed --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_img.scss @@ -0,0 +1,3 @@ +img { + @include border-radius($global-border-radius/2); +} diff --git a/themes/FixIt/assets/css/_partials/_maps/_admonition.scss b/themes/FixIt/assets/css/_partials/_maps/_admonition.scss new file mode 100644 index 0000000..5c79eeb --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_maps/_admonition.scss @@ -0,0 +1,15 @@ +// Color map of admonition [$type $color $background-color, ... ] +$admonition-color-map: + 'note' #448aff rgba(68, 138, 255, 0.1), + 'abstract' #00b0ff rgba(0, 176, 255, 0.1), + 'info' #00b8d4 rgba(0, 184, 212, 0.1), + 'tip' #00bfa5 rgba(0, 191, 165, 0.1), + 'success' #00c853 rgba(0, 200, 83, 0.1), + 'question' #64dd17 rgba(100, 221, 23, 0.1), + 'warning' #ff9100 rgba(255, 145, 0, 0.1), + 'failure' #ff5252 rgba(255, 82, 82, 0.1), + 'danger' #ff1744 rgba(255, 23, 68, 0.1), + 'bug' #f50057 rgba(245, 0, 87, 0.1), + 'example' #651fff rgba(101, 31, 255, 0.1), + 'quote' #9e9e9e rgba(159, 159, 159, 0.1) + !default; diff --git a/themes/FixIt/assets/css/_partials/_maps/_code-highlight.scss b/themes/FixIt/assets/css/_partials/_maps/_code-highlight.scss new file mode 100644 index 0000000..35fb92d --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_maps/_code-highlight.scss @@ -0,0 +1,157 @@ +// Color map of the code highlight +$code-highlight-color-map: ( + /* Error */ 'err': $code-error-color, + /* Keyword */ 'k': #cf222e, + /* KeywordConstant */ 'kc': #0550ae, + /* KeywordDeclaration */ 'kd': #cf222e, + /* KeywordNamespace */ 'kn': #cf222e, + /* KeywordPseudo */ 'kp': #cf222e, + /* KeywordReserved */ 'kr': #cf222e, + /* KeywordType */ 'kt': #cf222e, + /* Name */ 'n': $code-color, + /* NameAttribute */ 'na': #0550ae, + /* NameBuiltin */ 'nb': #0550ae, + /* NameBuiltinPseudo */ 'bp': $code-color, + /* NameClass */ 'nc': #8250df, + /* NameConstant */ 'no': #cf222e, + /* NameDecorator */ 'nd': #8250df, + /* NameEntity */ 'ni': #0550ae, + /* NameException */ 'ne': #0550ae, + /* NameFunction */ 'nf': #0550ae, + /* NameFunctionMagic */ 'fm': #0550ae, + /* NameLabel */ 'nl': #0550ae, + /* NameNamespace */ 'nn': #8250df, + /* NameOther */ 'nx': #0550ae, + /* NameProperty */ 'py': #0550ae, + /* NameTag */ 'nt': #116329, + /* NameVariable */ 'nv': #953800, + /* NameVariableClass */ 'vc': #0550ae, + /* NameVariableGlobal */ 'vg': #0550ae, + /* NameVariableInstance */ 'vi': #0550ae, + /* NameVariableMagic */ 'vm': #0550ae, + /* Literal */ 'l': #0550ae, + /* LiteralDate */ 'ld': #0a3069, + /* LiteralString */ 's': #0a3069, + /* LiteralStringAffix */ 'sa': #0a3069, + /* LiteralStringBacktick */ 'sb': #0a3069, + /* LiteralStringChar */ 'sc': #0a3069, + /* LiteralStringDelimiter */ 'dl': #0a3069, + /* LiteralStringDoc */ 'sd': #0a3069, + /* LiteralStringDouble */ 's2': #0a3069, + /* LiteralStringEscape */ 'se': #0a3069, + /* LiteralStringHeredoc */ 'sh': #0a3069, + /* LiteralStringInterpol */ 'si': #0a3069, + /* LiteralStringOther */ 'sx': #0a3069, + /* LiteralStringRegex */ 'sr': #0a3069, + /* LiteralStringSingle */ 's1': #0a3069, + /* LiteralStringSymbol */ 'ss': #0a3069, + /* LiteralNumber */ 'm': #0550ae, + /* LiteralNumberBin */ 'mb': #0550ae, + /* LiteralNumberFloat */ 'mf': #0550ae, + /* LiteralNumberHex */ 'mh': #0550ae, + /* LiteralNumberInteger */ 'mi': #0550ae, + /* LiteralNumberIntegerLong */ 'il': #0550ae, + /* LiteralNumberOct */ 'mo': #0550ae, + /* Operator */ 'o': #cf222e, + /* OperatorWord */ 'ow': #cf222e, + /* Punctuation */ 'p': $code-color, + /* Comment */ 'c': #6e7781, + /* CommentHashbang */ 'ch': #6e7781, + /* CommentMultiline */ 'cm': #6e7781, + /* CommentSingle */ 'c1': #6e7781, + /* CommentSpecial */ 'cs': #6e7781, + /* CommentPreproc */ 'cp': #0550ae, + /* CommentPreprocFile */ 'cpf': #6e7781, + /* Generic */ 'g': $code-color, + /* GenericDeleted */ 'gd': #82071e, + /* GenericEmph */ 'ge': $code-color, + /* GenericError */ 'gr': $code-error-color, + /* GenericHeading */ 'gh': $code-color, + /* GenericInserted */ 'gi': #116329, + /* GenericOutput */ 'go': $code-color, + /* GenericPrompt */ 'gp': $code-color, + /* GenericStrong */ 'gs': $code-color, + /* GenericSubheading */ 'gu': $code-color, + /* GenericTraceback */ 'gt': $code-error-color, + /* GenericUnderline */ 'gl': $code-color, + /* TextWhitespace */ 'w': $code-color, + /* Other */ 'x': $code-color +) !default; +$code-highlight-color-map-dark: ( + /* Error */ 'err': $code-error-color, + /* Keyword */ 'k': #f47067, + /* KeywordConstant */ 'kc': #6cb6ff, + /* KeywordDeclaration */ 'kd': #f47067, + /* KeywordNamespace */ 'kn': #f47067, + /* KeywordPseudo */ 'kp': #f47067, + /* KeywordReserved */ 'kr': #f47067, + /* KeywordType */ 'kt': #f47067, + /* Name */ 'n': $code-color-dark, + /* NameAttribute */ 'na': #6cb6ff, + /* NameBuiltin */ 'nb': #dcbdfb, + /* NameBuiltinPseudo */ 'bp': $code-color-dark, + /* NameClass */ 'nc': #dcbdfb, + /* NameConstant */ 'no': #6cb6ff, + /* NameDecorator */ 'nd': #dcbdfb, + /* NameEntity */ 'ni': #6cb6ff, + /* NameException */ 'ne': #6cb6ff, + /* NameFunction */ 'nf': #dcbdfb, + /* NameFunctionMagic */ 'fm': #6cb6ff, + /* NameLabel */ 'nl': #6cb6ff, + /* NameNamespace */ 'nn': #f47067, + /* NameOther */ 'nx': #dcbdfb, + /* NameProperty */ 'py': #6cb6ff, + /* NameTag */ 'nt': #8ddb8c, + /* NameVariable */ 'nv': #f69d50, + /* NameVariableClass */ 'vc': #6cb6ff, + /* NameVariableGlobal */ 'vg': #6cb6ff, + /* NameVariableInstance */ 'vi': #6cb6ff, + /* NameVariableMagic */ 'vm': #6cb6ff, + /* Literal */ 'l': #6cb6ff, + /* LiteralDate */ 'ld': #96d0ff, + /* LiteralString */ 's': #96d0ff, + /* LiteralStringAffix */ 'sa': #96d0ff, + /* LiteralStringBacktick */ 'sb': #96d0ff, + /* LiteralStringChar */ 'sc': #96d0ff, + /* LiteralStringDelimiter */ 'dl': #96d0ff, + /* LiteralStringDoc */ 'sd': #96d0ff, + /* LiteralStringDouble */ 's2': #96d0ff, + /* LiteralStringEscape */ 'se': #96d0ff, + /* LiteralStringHeredoc */ 'sh': #96d0ff, + /* LiteralStringInterpol */ 'si': #96d0ff, + /* LiteralStringOther */ 'sx': #96d0ff, + /* LiteralStringRegex */ 'sr': #96d0ff, + /* LiteralStringSingle */ 's1': #96d0ff, + /* LiteralStringSymbol */ 'ss': #96d0ff, + /* LiteralNumber */ 'm': #6cb6ff, + /* LiteralNumberBin */ 'mb': #6cb6ff, + /* LiteralNumberFloat */ 'mf': #6cb6ff, + /* LiteralNumberHex */ 'mh': #6cb6ff, + /* LiteralNumberInteger */ 'mi': #6cb6ff, + /* LiteralNumberIntegerLong */ 'il': #6cb6ff, + /* LiteralNumberOct */ 'mo': #6cb6ff, + /* Operator */ 'o': #f47067, + /* OperatorWord */ 'ow': #f47067, + /* Punctuation */ 'p': $code-color-dark, + /* Comment */ 'c': #768390, + /* CommentHashbang */ 'ch': #768390, + /* CommentMultiline */ 'cm': #768390, + /* CommentSingle */ 'c1': #768390, + /* CommentSpecial */ 'cs': #768390, + /* CommentPreproc */ 'cp': #6cb6ff, + /* CommentPreprocFile */ 'cpf': #768390, + /* Generic */ 'g': $code-color-dark, + /* GenericDeleted */ 'gd': #ffd8d3, + /* GenericEmph */ 'ge': $code-color-dark, + /* GenericError */ 'gr': $code-error-color, + /* GenericHeading */ 'gh': $code-color-dark, + /* GenericInserted */ 'gi': #b4f1b4, + /* GenericOutput */ 'go': $code-color-dark, + /* GenericPrompt */ 'gp': $code-color-dark, + /* GenericStrong */ 'gs': $code-color-dark, + /* GenericSubheading */ 'gu': $code-color-dark, + /* GenericTraceback */ 'gt': $code-error-color, + /* GenericUnderline */ 'gl': $code-color-dark, + /* TextWhitespace */ 'w': $code-color-dark, + /* Other */ 'x': $code-color-dark +) !default; \ No newline at end of file diff --git a/themes/FixIt/assets/css/_partials/_maps/_code-type.scss b/themes/FixIt/assets/css/_partials/_maps/_code-type.scss new file mode 100644 index 0000000..808edb6 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_maps/_code-type.scss @@ -0,0 +1,373 @@ +// Code type map +$code-type-map: ( + // Chroma supported languages + // @generator https://github.com/hugo-fixit/.tools/blob/main/tampermonkey/code-type-map-fetcher.user.js + "abap": "ABAP", + "abnf": "ABNF", + "as": "ActionScript", + "actionscript": "ActionScript", + "as3": "ActionScript 3", + "actionscript3": "ActionScript 3", + "ada": "Ada", + "ada95": "Ada", + "ada2005": "Ada", + "al": "AL", + "ng2": "Angular2", + "antlr": "ANTLR", + "apacheconf": "ApacheConf", + "aconf": "ApacheConf", + "apache": "ApacheConf", + "apl": "APL", + "applescript": "AppleScript", + "arduino": "Arduino", + "armasm": "ArmAsm", + "awk": "Awk", + "gawk": "Awk", + "mawk": "Awk", + "nawk": "Awk", + "ballerina": "Ballerina", + "make": "Base Makefile", + "makefile": "Base Makefile", + "mf": "Base Makefile", + "bsdmake": "Base Makefile", + "bash": "Bash", + "sh": "Bash", + "ksh": "Bash", + "zsh": "Bash", + "shell": "Bash", + "bash-session": "BashSession", + "console": "BashSession", + "shell-session": "BashSession", + "bat": "Batchfile", + "batch": "Batchfile", + "dosbatch": "Batchfile", + "winbatch": "Batchfile", + "bib": "BibTeX", + "bibtex": "BibTeX", + "bicep": "Bicep", + "blitzbasic": "BlitzBasic", + "b3d": "BlitzBasic", + "bplus": "BlitzBasic", + "bnf": "BNF", + "brainfuck": "Brainfuck", + "bf": "Brainfuck", + "c": "C", + "csharp": "C#", + "c\\#": "C#", + "cpp": "C++", + "c\\+\\+": "C++", + "caddyfile": "Caddyfile", + "caddy": "Caddyfile", + "caddyfile-directives": "Caddyfile Directives", + "caddyfile-d": "Caddyfile Directives", + "caddy-d": "Caddyfile Directives", + "capnp": "Cap'n Proto", + "cassandra": "Cassandra CQL", + "cql": "Cassandra CQL", + "ceylon": "Ceylon", + "cfengine3": "CFEngine3", + "cf3": "CFEngine3", + "cfs": "cfstatement", + "chai": "ChaiScript", + "chaiscript": "ChaiScript", + "cheetah": "Cheetah", + "spitfire": "Cheetah", + "clojure": "Clojure", + "clj": "Clojure", + "cmake": "CMake", + "cobol": "COBOL", + "coffee-script": "CoffeeScript", + "coffeescript": "CoffeeScript", + "coffee": "CoffeeScript", + "common-lisp": "Common Lisp", + "cl": "Common Lisp", + "lisp": "Common Lisp", + "coq": "Coq", + "cr": "Crystal", + "crystal": "Crystal", + "css": "CSS", + "cython": "Cython", + "pyx": "Cython", + "pyrex": "Cython", + "d": "D", + "dart": "Dart", + "diff": "Diff", + "udiff": "Diff", + "django": "Django/Jinja", + "jinja": "Django/Jinja", + "docker": "Docker", + "dockerfile": "Docker", + "dtd": "DTD", + "dylan": "Dylan", + "ebnf": "EBNF", + "elixir": "Elixir", + "ex": "Elixir", + "exs": "Elixir", + "elm": "Elm", + "emacs": "EmacsLisp", + "elisp": "EmacsLisp", + "emacs-lisp": "EmacsLisp", + "erlang": "Erlang", + "factor": "Factor", + "fennel": "Fennel", + "fnl": "Fennel", + "fish": "Fish", + "fishshell": "Fish", + "forth": "Forth", + "fortran": "Fortran", + "fortranfixed": "FortranFixed", + "fsharp": "FSharp", + "gas": "GAS", + "asm": "GAS", + "gdscript": "GDScript", + "gd": "GDScript", + "genshi": "Genshi", + "kid": "Genshi", + "xml\\+genshi": "Genshi", + "xml\\+kid": "Genshi", + "html\\+genshi": "Genshi HTML", + "html\\+kid": "Genshi HTML", + "genshitext": "Genshi Text", + "cucumber": "Gherkin", + "Cucumber": "Gherkin", + "gherkin": "Gherkin", + "Gherkin": "Gherkin", + "glsl": "GLSL", + "gnuplot": "Gnuplot", + "go": "Go", + "golang": "Go", + "go-html-template": "Go HTML Template", + "go-text-template": "Go Text Template", + "graphql": "GraphQL", + "graphqls": "GraphQL", + "gql": "GraphQL", + "groff": "Groff", + "nroff": "Groff", + "man": "Groff", + "groovy": "Groovy", + "handlebars": "Handlebars", + "hbs": "Handlebars", + "haskell": "Haskell", + "hs": "Haskell", + "hx": "Haxe", + "haxe": "Haxe", + "hxsl": "Haxe", + "hcl": "HCL", + "hexdump": "Hexdump", + "hlb": "HLB", + "html": "HTML", + "http": "HTTP", + "hylang": "Hy", + "idris": "Idris", + "idr": "Idris", + "igor": "Igor", + "igorpro": "Igor", + "ini": "INI", + "cfg": "INI", + "dosini": "INI", + "io": "Io", + "j": "J", + "java": "Java", + "js": "JavaScript", + "javascript": "JavaScript", + "json": "JSON", + "julia": "Julia", + "jl": "Julia", + "jungle": "Jungle", + "kotlin": "Kotlin", + "lighty": "Lighttpd configuration file", + "lighttpd": "Lighttpd configuration file", + "llvm": "LLVM", + "lua": "Lua", + "mako": "Mako", + "md": "markdown", + "mkd": "markdown", + "mason": "Mason", + "mathematica": "Mathematica", + "mma": "Mathematica", + "nb": "Mathematica", + "matlab": "Matlab", + "mcfunction": "mcfunction", + "meson": "Meson", + "meson\\.build": "Meson", + "metal": "Metal", + "minizinc": "MiniZinc", + "MZN": "MiniZinc", + "mzn": "MiniZinc", + "mlir": "MLIR", + "modula2": "Modula-2", + "m2": "Modula-2", + "monkeyc": "MonkeyC", + "morrowind": "MorrowindScript", + "mwscript": "MorrowindScript", + "myghty": "Myghty", + "mysql": "MySQL", + "mariadb": "MySQL", + "nasm": "NASM", + "newspeak": "Newspeak", + "nginx": "Nginx configuration file", + "nim": "Nim", + "nimrod": "Nim", + "nixos": "Nix", + "nix": "Nix", + "objective-c": "Objective-C", + "objectivec": "Objective-C", + "obj-c": "Objective-C", + "objc": "Objective-C", + "ocaml": "OCaml", + "octave": "Octave", + "ones": "OnesEnterprise", + "onesenterprise": "OnesEnterprise", + "1S": "OnesEnterprise", + "1S:Enterprise": "OnesEnterprise", + "openedge": "OpenEdge ABL", + "abl": "OpenEdge ABL", + "progress": "OpenEdge ABL", + "openedgeabl": "OpenEdge ABL", + "openscad": "OpenSCAD", + "org": "Org Mode", + "orgmode": "Org Mode", + "pacmanconf": "PacmanConf", + "perl": "Perl", + "pl": "Perl", + "php": "PHP", + "php3": "PHP", + "php4": "PHP", + "php5": "PHP", + "phtml": "PHTML", + "pig": "Pig", + "pkgconfig": "PkgConfig", + "plpgsql": "PL/pgSQL", + "text": "plaintext", + "plain": "plaintext", + "no-highlight": "plaintext", + "plutus-core": "Plutus Core", + "plc": "Plutus Core", + "pony": "Pony", + "postgresql": "PostgreSQL SQL dialect", + "postgres": "PostgreSQL SQL dialect", + "postscript": "PostScript", + "postscr": "PostScript", + "pov": "POVRay", + "powerquery": "PowerQuery", + "pq": "PowerQuery", + "powershell": "PowerShell", + "posh": "PowerShell", + "ps1": "PowerShell", + "psm1": "PowerShell", + "psd1": "PowerShell", + "prolog": "Prolog", + "promql": "PromQL", + "protobuf": "Protocol Buffer", + "proto": "Protocol Buffer", + "puppet": "Puppet", + "python": "Python", + "py": "Python", + "sage": "Python", + "python3": "Python", + "py3": "Python", + "python2": "Python 2", + "py2": "Python 2", + "qbasic": "QBasic", + "basic": "QBasic", + "qml": "QML", + "qbs": "QML", + "splus": "R", + "s": "R", + "r": "R", + "racket": "Racket", + "rkt": "Racket", + "ragel": "Ragel", + "perl6": "Raku", + "pl6": "Raku", + "raku": "Raku", + "jsx": "react", + "react": "react", + "reason": "ReasonML", + "reasonml": "ReasonML", + "registry": "reg", + "rst": "reStructuredText", + "rest": "reStructuredText", + "restructuredtext": "reStructuredText", + "rexx": "Rexx", + "arexx": "Rexx", + "rb": "Ruby", + "ruby": "Ruby", + "duby": "Ruby", + "rust": "Rust", + "rs": "Rust", + "sas": "SAS", + "sass": "Sass", + "scala": "Scala", + "scheme": "Scheme", + "scm": "Scheme", + "scilab": "Scilab", + "scss": "SCSS", + "sieve": "Sieve", + "smalltalk": "Smalltalk", + "squeak": "Smalltalk", + "st": "Smalltalk", + "smarty": "Smarty", + "snobol": "Snobol", + "sol": "Solidity", + "solidity": "Solidity", + "sparql": "SPARQL", + "sql": "SQL", + "squidconf": "SquidConf", + "squid\\.conf": "SquidConf", + "squid": "SquidConf", + "sml": "Standard ML", + "stylus": "Stylus", + "svelte": "Svelte", + "swift": "Swift", + "systemd": "SYSTEMD", + "systemverilog": "systemverilog", + "sv": "systemverilog", + "tablegen": "TableGen", + "tasm": "TASM", + "tcl": "Tcl", + "tcsh": "Tcsh", + "csh": "Tcsh", + "termcap": "Termcap", + "terminfo": "Terminfo", + "terraform": "Terraform", + "tf": "Terraform", + "tex": "TeX", + "latex": "TeX", + "thrift": "Thrift", + "toml": "TOML", + "tradingview": "TradingView", + "tv": "TradingView", + "tsql": "Transact-SQL", + "t-sql": "Transact-SQL", + "turing": "Turing", + "turtle": "Turtle", + "twig": "Twig", + "ts": "TypeScript", + "tsx": "TypeScript", + "typescript": "TypeScript", + "typoscript": "TypoScript", + "typoscriptcssdata": "TypoScriptCssData", + "typoscripthtmldata": "TypoScriptHtmlData", + "v": "verilog", + "vlang": "V", + "vsh": "V shell", + "vshell": "V shell", + "vb\\.net": "VB.net", + "vbnet": "VB.net", + "verilog": "verilog", + "vhdl": "VHDL", + "vim": "VimL", + "vue": "vue", + "vuejs": "vue", + "whiley": "Whiley", + "xml": "XML", + "xorg\\.conf": "Xorg", + "yaml": "YAML", + "yang": "YANG", + "zed": "Zed", + "zig": "Zig", + // Custom code type + "markdown": "markdown", + "yml": "YAML" +) !default; diff --git a/themes/FixIt/assets/css/_partials/_maps/_colors.scss b/themes/FixIt/assets/css/_partials/_maps/_colors.scss new file mode 100644 index 0000000..28af46c --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_maps/_colors.scss @@ -0,0 +1,17 @@ +// Theme colors +$primary: #1772ee !default; +$secondary: #919191 !default; +$success: #13ce66 !default; +$info: #0dcaf0 !default; +$warning: #ffba00 !default; +$danger: #ff4949 !default; + +// Theme colors map +$theme-colors: ( + 'primary': $primary, + 'secondary': $secondary, + 'success': $success, + 'info': $info, + 'warning': $warning, + 'danger': $danger +) !default; diff --git a/themes/FixIt/assets/css/_partials/_maps/_utilities.scss b/themes/FixIt/assets/css/_partials/_maps/_utilities.scss new file mode 100644 index 0000000..57704e0 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_maps/_utilities.scss @@ -0,0 +1,13 @@ +// Utilities + +// property order +$orders: ( + first: -1, + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + last: 6, +) !default; \ No newline at end of file diff --git a/themes/FixIt/assets/css/_partials/_mask.scss b/themes/FixIt/assets/css/_partials/_mask.scss new file mode 100644 index 0000000..eae738c --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_mask.scss @@ -0,0 +1,16 @@ +#mask { + background-repeat: no-repeat; + background-position: center; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0); + @include z-index(0, -1); + + .blur & { + @include z-index(1); + background-color: rgba(0, 0, 0, 0.25); + } +} diff --git a/themes/FixIt/assets/css/_partials/_single/_code.scss b/themes/FixIt/assets/css/_partials/_single/_code.scss new file mode 100644 index 0000000..9410772 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_single/_code.scss @@ -0,0 +1,364 @@ +// inline code +code { + padding: 0.2em 0.4em; + margin: 0; + font-size: $code-font-size; + font-family: $code-font-family; + color: $code-color; + background-color: rgba(175, 184, 193, 0.2); + text-decoration: inherit; + @include border-radius($global-border-radius); + @include overflow-wrap(break-word); + @include line-break(auto); + + [data-theme='dark'] & { + color: $code-color-dark; + background-color: rgba(99, 110, 123, 0.4); + } +} + +// indented code +pre { + margin: 0; + line-height: 1.45em; + padding: 0.5rem; + overflow: auto; + font-size: $code-font-size; + font-family: $code-font-family; + @include border-radius($global-border-radius); + @include tab-size(4); + + background-color: $code-background-color; + + [data-theme='dark'] & { + background-color: $code-background-color-dark; + } + + code { + padding: 0; + background-color: transparent; + @include border-radius(0); + @include max-content(min-width); + + [data-theme='dark'] & { + background-color: transparent; + } + } + + img { + min-height: 1em; + max-height: 1.2em; + vertical-align: text-bottom; + } +} + +.highlight, +.gist { + font-size: $code-font-size; + font-family: $code-font-family; + + .table-wrapper { + > table, + > table thead, + > table tr, + > table td { + margin: 0; + padding: 0; + border: none !important; + white-space: nowrap; + } + } +} + +// block fenced code +.highlight { + margin: 0.5rem 0; + + > .chroma { + position: relative; + + .code-header { + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + width: 100%; + font-family: $global-font-family; + font-weight: bold; + line-height: 1.4em; + color: $code-info-color; + background-color: darken($code-background-color, 3%); + @include border-radius($global-border-radius); + @include transition(border-radius 0.2s ease); + + [data-theme='dark'] & { + color: $code-info-color-dark; + background-color: darken($code-background-color-dark, 6%); + } + + &:hover { + cursor: pointer; + } + + .ellipses, + .edit, + .copy { + @extend .print-d-none; + } + + .code-title { + width: 100%; + padding: 0.4rem; + + .arrow { + padding: 0 0.2rem; + @include transition(transform 0.2s ease); + } + + .title-inner { + position: absolute; + left: 50%; + transform: translateX(-50%); + } + } + + .code-title::after { + padding-left: 0.2rem; + content: 'Code'; + } + + .ellipses { + padding: 0.4rem; + } + + .edit, + .copy { + display: none; + padding: 0.4rem; + + &:hover { + cursor: pointer; + color: $global-link-hover-color; + + [data-theme='dark'] & { + color: $global-link-hover-color-dark; + } + } + } + + @each $type, $text in $code-type-map { + &.language-#{$type} .code-title::after { + content: $text; + } + } + } + + // delayed loading table-wrapper + .table-wrapper { + max-height: 0; + overflow: hidden; + @include border-radius(0 0 $global-border-radius $global-border-radius); + @include details-transition-open; + } + + table { + border-spacing: 0; + width: auto; + overflow: auto; + display: block; + background-color: $code-background-color; + + [data-theme='dark'] & { + background-color: $code-background-color-dark; + } + + td { + vertical-align: top; + padding: 0; + } + + pre { + padding: 0.25rem; + outline-offset: -1px; + @include border-radius(0); + } + + /* lineNumbersInTable=false */ + .ln { + min-width: 1.25rem; + } + + // ========== lineNumbersInTable ========== // + // line numbers + .lntd:first-child { + min-width: 1.6rem; + text-align: right; + position: sticky; + left: 0; + + pre { + @include user-select(none); + } + } + // code content + .lntd:last-child { + width: 100%; + + pre { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + code { + width: 100%; + } + } + // ========== lineNumbersInTable ========== // + } + + &.open { + .code-header { + background-color: darken($code-background-color, 6%); + @include border-radius($global-border-radius $global-border-radius 0 0); + + [data-theme='dark'] & { + background-color: darken($code-background-color-dark, 3%); + } + } + + .table-wrapper { + max-height: 100%; + @include details-transition-close; + } + + .arrow { + @include transform(rotate(90deg)); + } + + .ellipses { + display: none; + } + + .edit, + .copy { + display: inline; + } + } + } + + /* LineHighlight */ + .hl { + display: block; + background-color: $code-hightlight-color; + box-shadow: -0.5rem 0 0 $code-hightlight-color, 0.5rem 0 0 $code-hightlight-color; + + [data-theme='dark'] & { + background-color: $code-hightlight-color-dark; + box-shadow: -0.5rem 0 0 $code-hightlight-color-dark, 0.5rem 0 0 $code-hightlight-color-dark; + } + } + /* GenericUnderline */ + .gl { + text-decoration: underline; + } + /* GenericStrong */ + .gs { + font-weight: bold; + } + /* GenericEmph */ + .ge { + font-style: italic; + } + /* lineNumbersInTable=false */ + .ln { + padding-right: 0.5rem; + display: inline-block; + min-width: 1.1rem; + text-align: right; + } + /* LineNumbers */ + .lnt, + .ln { + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + } + + // ========== Higtlight Color ========== // + + /* Error */ + .err { + font-style: italic; + border-bottom: 1px dotted $code-error-color; + } + /* GenericDeleted */ + .gd { + background-color: #ffebe9; + + [data-theme='dark'] & { + background-color: #78191b; + } + } + /* GenericInserted */ + .gi { + background-color: #dafbe1; + + [data-theme='dark'] & { + background-color: #1b4721; + } + } + + @each $class, $color in $code-highlight-color-map { + .#{$class} { + color: $color; + } + } + + [data-theme='dark'] & { + @each $class, $color in $code-highlight-color-map-dark { + .#{$class} { + color: $color; + } + } + } + // ========== Higtlight Color ========== // +} + +// gist shortcode +.gist { + .gist-file, + .gist-data, + .gist-meta { + border: none; + } + + .gist-data { + background-color: transparent; + } + + .gist-meta { + padding: 0.4rem 0.8rem; + @include link(false, false); + background-color: darken($code-background-color, 5%); + + [data-theme='dark'] & { + background-color: darken($code-background-color-dark, 5%); + } + } + + .table-wrapper { + .highlight, + &::-webkit-scrollbar { + background-color: #f6f8fa; + + [data-theme='dark'] & { + background-color: #2d333b; + } + } + } + + [data-theme='dark'] & { + @import './github-dark-dimmed'; + } +} diff --git a/themes/FixIt/assets/css/_partials/_single/_comment.scss b/themes/FixIt/assets/css/_partials/_single/_comment.scss new file mode 100644 index 0000000..1eb452f --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_single/_comment.scss @@ -0,0 +1,4 @@ +>#comments { + padding: 2rem 0; + @extend .print-d-none; +} diff --git a/themes/FixIt/assets/css/_partials/_single/_fixit-decryptor.scss b/themes/FixIt/assets/css/_partials/_single/_fixit-decryptor.scss new file mode 100644 index 0000000..aa2a46d --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_single/_fixit-decryptor.scss @@ -0,0 +1,67 @@ +.fixit-decryptor-container { + font-family: $global-font-family; + text-align: center; + margin-top: 3rem; + + .fixit-encryptor-shortcode & { + margin-top: 1rem; + } + + #fixit-decryptor-input, + .fixit-decryptor-input, + .fixit-encryptor-btn { + display: inline-block; + box-sizing: border-box; + outline: none; + color: $global-font-color; + border: 1px solid darken($global-border-color, 15%); + border-radius: $global-border-radius; + @include transition(all 0.1s ease-out); + box-shadow: 0px 0px 5px 0px darken($global-border-color, 15%); + + &:active, + &:focus, + &:hover { + color: darken($global-link-hover-color, 6%); + border-color: $global-link-hover-color; + box-shadow: 0px 0px 5px 0px lighten($global-link-hover-color, 20%); + + [data-theme='dark'] & { + color: lighten($global-link-hover-color-dark, 6%); + border-color: $global-link-hover-color-dark; + box-shadow: 0px 0px 5px 0px darken($global-link-hover-color-dark, 20%); + } + } + + [data-theme='dark'] & { + color: $global-font-color-dark; + border-color: lighten($global-border-color-dark, 15%); + box-shadow: 0px 0px 5px 0px lighten($global-border-color-dark, 15%); + } + } + + #fixit-decryptor-input, + .fixit-decryptor-input { + width: clamp(50%, 400px, 100%); + height: 3rem; + padding-left: 1rem; + padding-right: 1rem; + background-color: $global-background-color; + + [data-theme='dark'] & { + background-color: $global-background-color-dark; + } + } + + .fixit-encryptor-btn { + cursor: pointer; + @include transition(all 0.1s ease-out); + padding: 0.6rem 1rem; + + background-color: $header-background-color; + + [data-theme='dark'] & { + background-color: $header-background-color-dark; + } + } +} diff --git a/themes/FixIt/assets/css/_partials/_single/_footer.scss b/themes/FixIt/assets/css/_partials/_single/_footer.scss new file mode 100644 index 0000000..0b73bab --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_single/_footer.scss @@ -0,0 +1,115 @@ +.post-footer { + margin: 2rem 0; + + &:has(~.post-reward) { + margin-bottom: 0; + } + + .post-info { + border-bottom: 1px solid $global-border-color; + padding: 1rem 0 0.3rem; + + [data-theme='dark'] & { + border-bottom: 1px solid $global-border-color-dark; + } + + .post-info-line { + display: flex; + justify-content: space-between; + + .post-info-mod { + font-size: 0.8em; + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + + @include link(false, false); + } + + .post-info-license { + font-size: 0.8em; + color: $global-font-secondary-color; + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + } + + @include link(false, false); + } + + .post-info-md { + font-size: 0.8rem; + width: fit-content; + + @include link(false, false); + + >span:not(:first-child)::before { + content: '|'; + margin-left: 0.25rem; + margin-right: 0.25rem; + } + } + + .post-info-share { + @extend .print-d-none; + a * { + vertical-align: text-bottom; + } + } + } + } + + .post-info-more { + padding: 0.3rem 0 1rem; + display: flex; + justify-content: space-between; + font-size: 0.9rem; + + section:last-child { + @extend .print-d-none; + } + } + + .post-tags { + max-width: 65%; + + * { + display: inline; + } + + @include link(true, true); + + .post-tag:not(:last-child)::after { + content: ','; + margin-right: 0.25rem; + } + } + + .post-nav { + display: flex; + justify-content: space-between; + gap: 1.5rem; + @extend .print-d-none; + + .post-nav-item { + flex: 1; + font-size: 1rem; + font-weight: 600; + @include transition(all 0.3s ease-out); + + &[rel='next'] { + text-align: right; + } + + &[rel='prev']:hover { + @include transform(translateX(-4px)); + } + + &[rel='next']:hover { + @include transform(translateX(4px)); + } + } + } +} diff --git a/themes/FixIt/assets/css/_partials/_single/_github-dark-dimmed.scss b/themes/FixIt/assets/css/_partials/_single/_github-dark-dimmed.scss new file mode 100644 index 0000000..110156e --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_single/_github-dark-dimmed.scss @@ -0,0 +1,169 @@ +/** + * Theme: GitHub Dark Dimmed + * Description: Dark Dimmed theme as seen on github.com + * Author: github.com + * Maintainer: https://github.com/hugo-fixit/FixIt + * Updated: 2022-03-01 + */ +& { + --color-fg-default: #adbac7; + --color-prettylights-syntax-comment: #768390; + --color-prettylights-syntax-constant: #6cb6ff; + --color-prettylights-syntax-entity: #dcbdfb; + --color-prettylights-syntax-storage-modifier-import: #adbac7; + --color-prettylights-syntax-entity-tag: #8ddb8c; + --color-prettylights-syntax-keyword: #f47067; + --color-prettylights-syntax-string: #96d0ff; + --color-prettylights-syntax-variable: #f69d50; + --color-prettylights-syntax-brackethighlighter-unmatched: #e5534b; + --color-prettylights-syntax-invalid-illegal-text: #cdd9e5; + --color-prettylights-syntax-invalid-illegal-bg: #922323; + --color-prettylights-syntax-carriage-return-text: #cdd9e5; + --color-prettylights-syntax-carriage-return-bg: #ad2e2c; + --color-prettylights-syntax-string-regexp: #8ddb8c; + --color-prettylights-syntax-markup-list: #eac55f; + --color-prettylights-syntax-markup-heading: #316dca; + --color-prettylights-syntax-markup-italic: #adbac7; + --color-prettylights-syntax-markup-bold: #adbac7; + --color-prettylights-syntax-markup-deleted-text: #ffd8d3; + --color-prettylights-syntax-markup-deleted-bg: #78191b; + --color-prettylights-syntax-markup-inserted-text: #b4f1b4; + --color-prettylights-syntax-markup-inserted-bg: #1b4721; + --color-prettylights-syntax-markup-changed-text: #ffddb0; + --color-prettylights-syntax-markup-changed-bg: #682d0f; + --color-prettylights-syntax-markup-ignored-text: #adbac7; + --color-prettylights-syntax-markup-ignored-bg: #255ab2; + --color-prettylights-syntax-meta-diff-range: #dcbdfb; + --color-prettylights-syntax-brackethighlighter-angle: #768390; + --color-prettylights-syntax-sublimelinter-gutter-mark: #545d68; + --color-prettylights-syntax-constant-other-reference-link: #96d0ff; + + .blob-num, + .blob-code-inner { + color: val(--color-fg-default); + } + + .pl-c /* comment, punctuation.definition.comment, string.comment */ { + color: var(--color-prettylights-syntax-comment); + } + + .pl-c1 /* constant, entity.name.constant, variable.other.constant, variable.language, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header, meta.output */, + .pl-s .pl-v /* string variable */ { + color: var(--color-prettylights-syntax-constant); + } + + .pl-e /* entity */, + .pl-en /* entity.name */ { + color: var(--color-prettylights-syntax-entity); + } + + .pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */, + .pl-s .pl-s1 /* string source */ { + color: var(--color-prettylights-syntax-storage-modifier-import); + } + + .pl-ent /* entity.name.tag, markup.quote */ { + color: var(--color-prettylights-syntax-entity-tag); + } + + .pl-k /* keyword, storage, storage.type */ { + color: var(--color-prettylights-syntax-keyword); + } + + .pl-s /* string */, + .pl-pds /* punctuation.definition.string, source.regexp, string.regexp.character-class */, + .pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */, + .pl-sr /* string.regexp */, + .pl-sr .pl-cce /* string.regexp constant.character.escape */, + .pl-sr .pl-sre /* string.regexp source.ruby.embedded */, + .pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ { + color: var(--color-prettylights-syntax-string); + } + + .pl-v /* variable */, + .pl-smw /* sublimelinter.mark.warning */ { + color: var(--color-prettylights-syntax-variable); + } + + .pl-bu /* invalid.broken, invalid.deprecated, invalid.unimplemented, message.error, brackethighlighter.unmatched, sublimelinter.mark.error */ { + color: var(--color-prettylights-syntax-brackethighlighter-unmatched); + } + + .pl-ii /* invalid.illegal */ { + color: var(--color-prettylights-syntax-invalid-illegal-text); + background-color: var(--color-prettylights-syntax-invalid-illegal-bg); + } + + .pl-c2 /* carriage-return */ { + color: var(--color-prettylights-syntax-carriage-return-text); + background-color: var(--color-prettylights-syntax-carriage-return-bg); + } + + .pl-c2::before /* carriage-return */ { + content: '^M'; + } + + .pl-sr .pl-cce /* string.regexp constant.character.escape */ { + font-weight: bold; + color: var(--color-prettylights-syntax-string-regexp); + } + + .pl-ml /* markup.list */ { + color: var(--color-prettylights-syntax-markup-list); + } + + .pl-mh /* markup.heading */, + .pl-mh .pl-en /* markup.heading entity.name */, + .pl-ms /* meta.separator */ { + font-weight: bold; + color: var(--color-prettylights-syntax-markup-heading); + } + + .pl-mi /* markup.italic */ { + font-style: italic; + color: var(--color-prettylights-syntax-markup-italic); + } + + .pl-mb /* markup.bold */ { + font-weight: bold; + color: var(--color-prettylights-syntax-markup-bold); + } + + .pl-md /* markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted */ { + color: var(--color-prettylights-syntax-markup-deleted-text); + background-color: var(--color-prettylights-syntax-markup-deleted-bg); + } + + .pl-mi1 /* markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted */ { + color: var(--color-prettylights-syntax-markup-inserted-text); + background-color: var(--color-prettylights-syntax-markup-inserted-bg); + } + + .pl-mc /* markup.changed, punctuation.definition.changed */ { + color: var(--color-prettylights-syntax-markup-changed-text); + background-color: var(--color-prettylights-syntax-markup-changed-bg); + } + + .pl-mi2 /* markup.ignored, markup.untracked */ { + color: var(--color-prettylights-syntax-markup-ignored-text); + background-color: var(--color-prettylights-syntax-markup-ignored-bg); + } + + .pl-mdr /* meta.diff.range */ { + font-weight: bold; + color: var(--color-prettylights-syntax-meta-diff-range); + } + + .pl-ba /* brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote */ { + color: var(--color-prettylights-syntax-brackethighlighter-angle); + } + + .pl-sg /* sublimelinter.gutter-mark */ { + color: var(--color-prettylights-syntax-sublimelinter-gutter-mark); + } + + .pl-corl /* constant.other.reference.link, string.other.link */ { + text-decoration: underline; + color: var(--color-prettylights-syntax-constant-other-reference-link); + } +} diff --git a/themes/FixIt/assets/css/_partials/_single/_reward.scss b/themes/FixIt/assets/css/_partials/_single/_reward.scss new file mode 100644 index 0000000..bed5deb --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_single/_reward.scss @@ -0,0 +1,101 @@ +.post-reward { + padding: 1rem; + text-align: center; + @extend .print-d-none; + + &~.post-footer { + margin-top: 0; + } + + &:has(.reward-ways:empty) { + display: none; + } + + .comment { + margin: 0.5rem 0; + font-weight: 500; + } + + .reward-ways { + display: none; + } + + .reward-input:checked~.reward-ways { + display: block; + padding-top: 20px; + + div { + display: inline-block; + @include user-select(none); + + span { + display: block; + } + + &:hover span[data-animation] { + animation: var(--animation-reward, jackInTheBox) 0.8s infinite linear; + // The animation may affect :hover of img in dark mode + pointer-events: none; + } + + img { + display: inline-block; + margin: 0.8em 2em 0; + max-width: 100%; + width: $reward-img-width; + } + } + + // `fixed` mode only supports desktop + &[data-mode='fixed'] { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + padding: 1rem; + background-color: $global-background-color; + @include z-index(2); + @include border-radius($global-border-radius); + @include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.2)); + + [data-theme='dark'] & { + background-color: $global-background-color-dark; + @include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.2)); + } + } + } + + .reward-button { + display: inline-block; + box-sizing: border-box; + cursor: pointer; + outline: none; + color: lighten($reward-color, 5%); + border: 2px solid lighten($reward-color, 10%); + border-radius: $global-border-radius; + padding: 0.6rem 1rem; + background-color: $global-background-color; + vertical-align: text-top; + line-height: 1rem; + @include transition(all 0.3s ease-out); + + &:active, + &:hover { + color: #ffffff; + border-color: $reward-color; + background-color: $reward-color; + + [data-theme='dark'] & { + color: #ffffff; + border-color: $reward-color-dark; + background-color: $reward-color-dark; + } + } + + [data-theme='dark'] & { + color: $reward-color; + border-color: lighten($reward-color, 5%); + background-color: $global-background-color-dark; + } + } +} diff --git a/themes/FixIt/assets/css/_partials/_single/_toc.scss b/themes/FixIt/assets/css/_partials/_single/_toc.scss new file mode 100644 index 0000000..d504483 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_single/_toc.scss @@ -0,0 +1,178 @@ +.toc { + .toc-title { + font-size: $toc-title-font-size; + font-weight: bold; + text-transform: uppercase; + } + + .toc-content { + font-size: $toc-content-font-size; + + ul { + text-indent: -0.8rem; + padding-left: 0.8rem; + list-style: none; + + a:first-child::before { + content: '|'; + font-weight: bolder; + margin-right: 0.5rem; + color: $single-link-color; + + [data-theme='dark'] & { + color: $single-link-color-dark; + } + } + + ul { + padding-left: 1.5rem; + } + } + } + + ruby { + background: $code-background-color; + + rt { + color: $global-font-secondary-color; + } + + [data-theme='dark'] & { + background: $code-background-color-dark; + + rt { + color: $global-font-secondary-color-dark; + } + } + } +} + +#toc-auto { + display: block; + position: sticky; + top: var(--#{$prefix}scroll-mt); + box-sizing: border-box; + visibility: hidden; + @include z-index(1); + @include overflow-wrap(break-word); + @include blur; + @extend .print-d-none; + + [data-header-desktop='normal'] & { + --#{$prefix}scroll-mt: #{$global-scroll-margin-top}; + } + + .toc-title { + margin: 0.5rem 0; + cursor: pointer; + @include user-select(none); + + &::before { + content: '|'; + font-weight: bolder; + margin-right: 0.5rem; + color: $global-border-color; + + [data-theme='dark'] & { + color: $global-border-color-dark; + } + } + + i.toc-icon { + @include transition(transform 0.2s ease); + } + } + + &.toc-hidden i.toc-icon { + @include transform(rotate(-90deg)); + @include transition(transform 0.2s ease); + } + + .toc-content { + overflow-y: scroll; + max-height: calc(100vh - #{2*$header-height}); + + &::-webkit-scrollbar { + width: 0; + } + + &.always-active ul { + display: block; + } + + > nav > ul { + margin: 0; + } + + ul { + ul { + display: none; + } + + .has-active > ul { + display: block; + } + } + + a.active { + font-weight: bold; + color: $single-link-color; + + [data-theme='dark'] & { + color: $single-link-color-dark; + } + + &::before { + color: $single-link-hover-color; + + [data-theme='dark'] & { + color: $single-link-hover-color-dark; + } + } + } + } +} + +#toc-static { + display: none; + margin: 0.8rem 0; + + &[data-kept='true'] { + display: block; + } + + .toc-title { + display: flex; + justify-content: space-between; + line-height: 2em; + padding: 0 0.75rem; + background: darken($code-background-color, 3%); + + [data-theme='dark'] & { + background: darken($code-background-color-dark, 6%); + } + } + + .toc-content { + background-color: $code-background-color; + + > nav > ul { + margin: 0; + padding: 0.4rem 1rem 0.4rem 1.8rem; + } + + [data-theme='dark'] & { + background-color: $code-background-color-dark; + } + } + + &.open { + .toc-title { + background: darken($code-background-color, 6%); + + [data-theme='dark'] & { + background: darken($code-background-color-dark, 3%); + } + } + } +} diff --git a/themes/FixIt/assets/css/_partials/_widgets.scss b/themes/FixIt/assets/css/_partials/_widgets.scss new file mode 100644 index 0000000..758fb06 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_widgets.scss @@ -0,0 +1,6 @@ +@import '_widgets/cookieconsent'; +@import '_widgets/fixed-button'; +@import '_widgets/github-corner'; +@import '_widgets/noscript-warning'; +@import '_widgets/reading-progress'; +@import '_widgets/typeit'; diff --git a/themes/FixIt/assets/css/_partials/_widgets/_cookieconsent.scss b/themes/FixIt/assets/css/_partials/_widgets/_cookieconsent.scss new file mode 100644 index 0000000..c15c713 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_widgets/_cookieconsent.scss @@ -0,0 +1,19 @@ +.cc-window.cc-banner { + .cc-btn { + color: $global-font-color; + + &:hover, + &:focus { + background-color: #ccc; + } + + [data-theme='dark'] & { + color: $global-font-color; + + &:hover, + &:focus { + background-color: #fff; + } + } + } +} diff --git a/themes/FixIt/assets/css/_partials/_widgets/_fixed-button.scss b/themes/FixIt/assets/css/_partials/_widgets/_fixed-button.scss new file mode 100644 index 0000000..9f955bc --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_widgets/_fixed-button.scss @@ -0,0 +1,44 @@ +.fixed-button { + position: fixed; + right: 1.5rem; + font-size: 1rem; + line-height: 1.5rem; + padding: 0.5rem 0.625rem; + color: $global-font-secondary-color; + background-color: $header-background-color; + @include z-index(1); + @include border-radius(1.25rem); + @include transition(color 0.4s ease); + @include blur; + @extend .print-d-none; + + &:hover, + &:active { + color: $global-font-color; + cursor: pointer; + } + + &:active, + &:focus, + &:hover { + outline: none; + } + + [data-theme='dark'] & { + color: $global-font-secondary-color-dark; + background-color: $header-background-color-dark; + + &:hover, + &:active { + color: $global-font-color-dark; + } + } +} + +.back-to-top { + bottom: 1.5rem; +} + +.view-comments { + bottom: 4.5rem; +} diff --git a/themes/FixIt/assets/css/_partials/_widgets/_github-corner.scss b/themes/FixIt/assets/css/_partials/_widgets/_github-corner.scss new file mode 100644 index 0000000..17b7afd --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_widgets/_github-corner.scss @@ -0,0 +1,47 @@ +@keyframes octocat-wave { + 0%, + 100% { + @include transform(rotate(0)); + } + 20%, + 60% { + @include transform(rotate(-25deg)); + } + 40%, + 80% { + @include transform(rotate(10deg)); + } +} + +.github-corner { + position: fixed; + top: 0; + @include z-index(2); + @extend .print-d-none; + + :hover .octo-arm { + animation: octocat-wave 560ms ease-in-out; + } + svg { + width: $header-height; + height: $header-height; + border: 0; + color: $github-corner-color; + fill: $github-corner-fill; + + [data-theme='dark'] & { + color: $github-corner-color-dark; + fill: $github-corner-fill-dark; + } + } + &.left { + left: 0; + + svg { + @include transform(scale(-1, 1)); + } + } + &.right { + right: 0; + } +} diff --git a/themes/FixIt/assets/css/_partials/_widgets/_noscript-warning.scss b/themes/FixIt/assets/css/_partials/_widgets/_noscript-warning.scss new file mode 100644 index 0000000..edb52e8 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_widgets/_noscript-warning.scss @@ -0,0 +1,16 @@ +.noscript-warning { + background-color: var(--#{$prefix}danger); + color: white; + font-size: 1rem; + font-weight: bold; + position: fixed; + text-align: center; + left: 0; + bottom: 0; + width: 100%; + @include z-index(2); + + [data-theme='dark'] & { + background-color: var(--#{$prefix}danger-dark); + } +} diff --git a/themes/FixIt/assets/css/_partials/_widgets/_reading-progress.scss b/themes/FixIt/assets/css/_partials/_widgets/_reading-progress.scss new file mode 100644 index 0000000..c8616f8 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_widgets/_reading-progress.scss @@ -0,0 +1,13 @@ +.reading-progress-bar { + --progress: 0; + height: var(--progress-h, 2px); + width: var(--progress); + background-color: var(--bg-progress, var(--#{$prefix}info)); + position: fixed; + @include z-index(2); + @extend .print-d-none; + + [data-theme="dark"] & { + background-color: var(--bg-progress-dark, var(--#{$prefix}info-dark)); + } +} diff --git a/themes/FixIt/assets/css/_partials/_widgets/_typeit.scss b/themes/FixIt/assets/css/_partials/_widgets/_typeit.scss new file mode 100644 index 0000000..1f59a17 --- /dev/null +++ b/themes/FixIt/assets/css/_partials/_widgets/_typeit.scss @@ -0,0 +1,22 @@ +.typeit { + .highlight { + padding: 0.375rem; + font-size: 0.875rem; + font-family: $code-font-family; + font-weight: bold; + word-break: break-all; + white-space: pre-wrap; + } + + --ti-cursor-font-family: #{$global-font-family}; + --ti-cursor-font-size: #{$global-font-size}; + --ti-cursor-font-style: normal; + --ti-cursor-font-weight: #{$global-font-weight}; + --ti-cursor-line-height: #{$global-line-height}; + --ti-cursor-color: #{$global-font-color}; + --ti-cursor-transform: translateX(0); + + [data-theme='dark'] & { + --ti-cursor-color: #{$global-font-color-dark}; + } +} diff --git a/themes/FixIt/assets/css/_shortcodes/_admonition.scss b/themes/FixIt/assets/css/_shortcodes/_admonition.scss new file mode 100644 index 0000000..e896b3f --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_admonition.scss @@ -0,0 +1,77 @@ +.admonition { + position: relative; + margin: 1rem 0; + padding: 0 0.75rem; + border-left: .25rem solid; + overflow: auto; + @include border-radius($global-border-radius); + + .admonition-title { + font-weight: bold; + margin: 0 -0.75rem; + padding: 0.25rem 1.8rem; + border-bottom: 1px solid; + @include border-radius(0); + } + + .admonition-content { + padding: 0.5rem 0; + } + + i.icon { + font-size: 0.85rem; + position: absolute; + top: 0.6rem; + left: 0.4rem; + } + + i.details-icon { + position: absolute; + top: 0.6rem; + right: 0.3rem; + } + + @each $type, $color, $background-color in $admonition-color-map { + @if $type == 'note' { + background-color: $background-color; + border-left-color: $color; + + .admonition-title { + border-bottom-color: $background-color; + background-color: opacify($background-color, 0.15); + } + + &.open .admonition-title { + background-color: $background-color; + } + + i.icon { + color: $color; + } + } + + @else { + &.#{$type} { + background-color: $background-color; + border-left-color: $color; + + .admonition-title { + border-bottom-color: $background-color; + background-color: opacify($background-color, 0.15); + } + + &.open .admonition-title { + background-color: $background-color; + } + + i.icon { + color: $color; + } + } + } + } + + &:last-child { + margin-bottom: 0.75rem; + } +} diff --git a/themes/FixIt/assets/css/_shortcodes/_bilibili.scss b/themes/FixIt/assets/css/_shortcodes/_bilibili.scss new file mode 100644 index 0000000..6eef8e6 --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_bilibili.scss @@ -0,0 +1,16 @@ +.bilibili { + position: relative; + width: 100%; + height: 0; + padding-bottom: 75%; + margin: 3% auto; + text-align: center; + + iframe { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + } +} diff --git a/themes/FixIt/assets/css/_shortcodes/_cardlink.scss b/themes/FixIt/assets/css/_shortcodes/_cardlink.scss new file mode 100644 index 0000000..7df2e12 --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_cardlink.scss @@ -0,0 +1,99 @@ +/** + * Card link style + * @author @Lruihao https://lruihao.cn + */ + +.card-link { + position: relative; + display: block; + margin: 0.5rem auto; + box-sizing: border-box; + width: clamp(50%, 400px, 100%); + max-width: 100%; + overflow: hidden; + text-decoration: none; + border: none; + @include border-radius(0.75rem); +} + +.cl- { + &backdrop { + position: absolute; + top: 0.75rem; + bottom: 0.75rem; + left: 0; + right: 0; + background-image: var(--cl-bg-url); + background-repeat: no-repeat; + filter: blur(0.5rem); + opacity: 0.5; + background-size: contain; + background-position: center; + } + + &content { + position: relative; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0.75rem; + background-color: rgba(245, 245, 245, 0.88); + } + + &text { + overflow: hidden; + } + + &title { + display: -webkit-box; + -webkit-line-clamp: 2; + overflow: hidden; + max-height: calc(1rem * 1.25 * 2); + font-size: 1rem; + font-weight: 500; + line-height: 1.25; + color: $global-font-color; + } + + &meta { + display: flex; + align-items: center; + margin-top: 0.25rem; + font-size: 0.825rem; + color: $global-font-secondary-color; + } + + &icon-link { + width: 1rem; + height: 1rem; + flex-shrink: 0; + margin-right: 0.25rem; + } + + &url { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + &icon-globe { + width: 4rem; + height: 4rem; + flex-shrink: 0; + margin-left: 0.25rem; + } + + [data-theme='dark'] & { + &content { + background-color: rgba(61, 62, 65, 0.88); + } + + &title { + color: $global-font-color-dark; + } + + &meta { + color: $global-font-secondary-color-dark; + } + } +} diff --git a/themes/FixIt/assets/css/_shortcodes/_center-quote.scss b/themes/FixIt/assets/css/_shortcodes/_center-quote.scss new file mode 100644 index 0000000..64f6b61 --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_center-quote.scss @@ -0,0 +1,43 @@ +.blockquote-center { + border-left: none; + margin: 40px 0; + padding: 0; + position: relative; + text-align: center; + color: initial; + + &::after, + &::before { + left: 0; + line-height: 1; + opacity: 0.6; + position: absolute; + width: 100%; + } + + &::before { + border-top: 1px solid $global-border-color; + text-align: left; + top: -20px; + content: '\f10d'; + font-family: 'Font Awesome 5 Free'; + font-weight: 900; + + [data-theme='dark'] & { + border-top-color: $global-border-color-dark; + } + } + + &::after { + border-bottom: 1px solid $global-border-color; + bottom: -20px; + text-align: right; + content: '\f10e'; + font-family: 'Font Awesome 5 Free'; + font-weight: 900; + + [data-theme='dark'] & { + border-bottom-color: $global-border-color-dark; + } + } +} diff --git a/themes/FixIt/assets/css/_shortcodes/_echarts.scss b/themes/FixIt/assets/css/_shortcodes/_echarts.scss new file mode 100644 index 0000000..12c5806 --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_echarts.scss @@ -0,0 +1,4 @@ +.echarts { + margin: 0.5rem 0; + text-align: center; +} diff --git a/themes/FixIt/assets/css/_shortcodes/_index.scss b/themes/FixIt/assets/css/_shortcodes/_index.scss new file mode 100644 index 0000000..e4b656a --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_index.scss @@ -0,0 +1,8 @@ +@import '_admonition'; +@import '_bilibili'; +@import '_cardlink'; +@import '_center-quote'; +@import '_echarts'; +@import '_instagram'; +@import '_mapbox'; +@import '_mermaid'; diff --git a/themes/FixIt/assets/css/_shortcodes/_instagram.scss b/themes/FixIt/assets/css/_shortcodes/_instagram.scss new file mode 100644 index 0000000..87df594 --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_instagram.scss @@ -0,0 +1,5 @@ +iframe.instagram-media { + [data-theme='dark'] & { + border: none !important; + } +} diff --git a/themes/FixIt/assets/css/_shortcodes/_mapbox.scss b/themes/FixIt/assets/css/_shortcodes/_mapbox.scss new file mode 100644 index 0000000..4148521 --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_mapbox.scss @@ -0,0 +1,5 @@ +.mapbox { + margin: 0.5rem 0; + padding: 0.5rem 0; + @include border-radius($global-border-radius); +} diff --git a/themes/FixIt/assets/css/_shortcodes/_mermaid.scss b/themes/FixIt/assets/css/_shortcodes/_mermaid.scss new file mode 100644 index 0000000..2efa6b1 --- /dev/null +++ b/themes/FixIt/assets/css/_shortcodes/_mermaid.scss @@ -0,0 +1,8 @@ +.mermaid { + text-align: center; + + svg { + max-width: 100%; + height: auto; + } +} diff --git a/themes/FixIt/assets/css/_variables.scss b/themes/FixIt/assets/css/_variables.scss new file mode 100644 index 0000000..7e11105 --- /dev/null +++ b/themes/FixIt/assets/css/_variables.scss @@ -0,0 +1,171 @@ +// ============================== +// Variables +// ============================== + +// ========== Global ========== // +// Prefix for :root CSS variables. +$prefix: fi- !default; + +// Font and Line Height +$global-font-family: system-ui, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei UI, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif !default; +$global-font-size: 16px !default; +$global-font-weight: 400 !default; +$global-line-height: 1.5rem !default; + +// scroll-margin-top of content anchor +$global-scroll-margin-top: 0.5rem; + +// Radius of the border +$global-border-radius: 5px !default; + +// Color of the background +$global-background-color: #ffffff !default; +$global-background-color-dark: #221531 !default; + +// Color of the text +$global-font-color: #161209 !default; +$global-font-color-dark: #a9a9b3 !default; + +// Color of the secondary text +$global-font-secondary-color: #b1b1ba !default; +$global-font-secondary-color-dark: #909092 !default; + +// Color of the link +$global-link-color: #ba0066 !default; +$global-link-color-dark: #EC008C !default; + +// Color of the hover link +$global-link-hover-color: #EC008C !default; // 潮蓝 +$global-link-hover-color-dark: #ba0066 !default; + +// Color of the border +$global-border-color: #ba0066 !default; +$global-border-color-dark: #EC008C !default; +// ========== Global ========== // + +// ========== Scrollbar ========== // +// Color of the scrollbar +$scrollbar-color: #ba0066 !default; + +// Color of the hover scrollbar +$scrollbar-hover-color: #EC008C !default; +// ========== Scrollbar ========== // + +// ========== Selection ========== // +// Color of the selected text +$selection-color: rgba(72.9, 0, 40, 0.4) !default; +$selection-color-dark: rgba(72.9, 0, 40, 0.4) !default; +// ========== Selection ========== // + +// ========== Header ========== // +// Height of the header +$header-height: 3.5rem !default; + +// Color of the header background +$header-background-color: #f8f8f8 !default; +$header-background-color-dark: #0d132c !default; + +// Font style of the header title +$header-title-font-family: $global-font-family !default; +$header-title-font-size: 1.5rem !default; + +// Color of the active menu item +$menu-active-color: #EC008C !default; +$menu-active-color-dark: #ba0066 !default; + +// Color of the search background +$search-background-color: #e9e9e9 !default; +$search-background-color-dark: #2d333b !default; +// ========== Header ========== // + +// ========== Tag Cloud ========== // +// Color range of tag cloud +$tag-cloud-start: $global-font-secondary-color!default; +$tag-cloud-end: $global-font-color!default; +$tag-cloud-start-dark: $global-font-secondary-color-dark!default; +$tag-cloud-end-dark: $global-font-color-dark!default; +// ========== Tag Cloud ========== // + +// ========== Single Content ========== // +// Font size of the TOC +$toc-title-font-size: 1.2rem !default; +$toc-content-font-size: 1rem !default; + +// Color of the single link +$single-link-color: #ba0066 !default; // 花青 +$single-link-color-dark: #EC008C !default; // 釉蓝 + +// Color of the hover single link +$single-link-hover-color: #EC008C !default; // 莲瓣红 +$single-link-hover-color-dark: #ba0066 !default; // 羽扇豆蓝 + +// Color of the table background +$table-background-color: #f6f8fa !default; +$table-background-color-dark: #0d132c !default; + +// Color of the table thead +$table-thead-color: #EC008C !default; +$table-thead-color-dark: #0d132c !default; + +// Color of the blockquote +$blockquote-color: #697681 !default; +$blockquote-color-dark: #2d333b !default; + +// Color of reward +$reward-color: tomato !default; +$reward-color-dark: darken($reward-color, 5%) !default; + +// Width of reward image +$reward-img-width: 180px !default; +// ========== Single Content ========== // + +// ========== Pagination ========== // +// Color of the link in pagination +$pagination-link-color: #bfbfbf !default; +$pagination-link-color-dark: #b1b1ba !default; + +// Color of the hover link in pagination +$pagination-link-hover-color: #ba0066 !default; +$pagination-link-hover-color-dark: #EC008C !default; +// ========== Pagination ========== // + +// ========== Code ========== // +// Color of the code +$code-color: #24292f !default; +$code-color-dark: #adbac7 !default; + +// Color of the code background +$code-background-color: #f6f8fa !default; +$code-background-color-dark: #0d132c !default; + +$code-error-color: #dc3545 !default; + +// Color of the hightlight code +$code-hightlight-color: #fff8c5 !default; +$code-hightlight-color-dark: rgba(174, 124, 20, 0.15) !default; + +$code-info-color: #EC008C !default; +$code-info-color-dark: #ba0066 !default; + +// Font size of the code +$code-font-size: 0.875rem !default; + +// Font family of the code +$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace, $global-font-family !default; +// ========== Code ========== // + +// ========== GitHub Corners ========== // +// Color of the GitHub Corners +$github-corner-color: white !default; +$github-corner-color-dark: black !default; + +// Color of the GitHub Corners background +$github-corner-fill: $header-background-color-dark !default; +$github-corner-fill-dark: $header-background-color !default; +// ========== GitHub Corners ========== // + +@import '_partials/_maps/admonition'; +@import '_partials/_maps/code-highlight'; +@import '_partials/_maps/code-type'; +@import '_partials/_maps/colors'; +@import '_partials/_maps/utilities'; diff --git a/themes/FixIt/assets/css/_variables.scss.~1~ b/themes/FixIt/assets/css/_variables.scss.~1~ new file mode 100644 index 0000000..45a283b --- /dev/null +++ b/themes/FixIt/assets/css/_variables.scss.~1~ @@ -0,0 +1,171 @@ +// ============================== +// Variables +// ============================== + +// ========== Global ========== // +// Prefix for :root CSS variables. +$prefix: fi- !default; + +// Font and Line Height +$global-font-family: system-ui, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei UI, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif !default; +$global-font-size: 16px !default; +$global-font-weight: 400 !default; +$global-line-height: 1.5rem !default; + +// scroll-margin-top of content anchor +$global-scroll-margin-top: 0.5rem; + +// Radius of the border +$global-border-radius: 5px !default; + +// Color of the background +$global-background-color: #ffffff !default; +$global-background-color-dark: #292a2e !default; + +// Color of the text +$global-font-color: #161209 !default; +$global-font-color-dark: #b1b1ba !default; + +// Color of the secondary text +$global-font-secondary-color: #b1b1ba !default; +$global-font-secondary-color-dark: #909092 !default; + +// Color of the link +$global-link-color: #161209 !default; +$global-link-color-dark: #b1b1ba !default; + +// Color of the hover link +$global-link-hover-color: #2983bb !default; // 潮蓝 +$global-link-hover-color-dark: #fff !default; + +// Color of the border +$global-border-color: #f0f0f0 !default; +$global-border-color-dark: #363636 !default; +// ========== Global ========== // + +// ========== Scrollbar ========== // +// Color of the scrollbar +$scrollbar-color: #87878d !default; + +// Color of the hover scrollbar +$scrollbar-hover-color: #b1b1ba !default; +// ========== Scrollbar ========== // + +// ========== Selection ========== // +// Color of the selected text +$selection-color: rgba(53, 166, 247, 0.25) !default; +$selection-color-dark: rgba(50, 112, 194, 0.4) !default; +// ========== Selection ========== // + +// ========== Header ========== // +// Height of the header +$header-height: 3.5rem !default; + +// Color of the header background +$header-background-color: #f8f8f8 !default; +$header-background-color-dark: #252627 !default; + +// Font style of the header title +$header-title-font-family: $global-font-family !default; +$header-title-font-size: 1.5rem !default; + +// Color of the active menu item +$menu-active-color: #161209 !default; +$menu-active-color-dark: #fff !default; + +// Color of the search background +$search-background-color: #e9e9e9 !default; +$search-background-color-dark: #363636 !default; +// ========== Header ========== // + +// ========== Tag Cloud ========== // +// Color range of tag cloud +$tag-cloud-start: $global-font-secondary-color!default; +$tag-cloud-end: $global-font-color!default; +$tag-cloud-start-dark: $global-font-secondary-color-dark!default; +$tag-cloud-end-dark: $global-font-color-dark!default; +// ========== Tag Cloud ========== // + +// ========== Single Content ========== // +// Font size of the TOC +$toc-title-font-size: 1.2rem !default; +$toc-content-font-size: 1rem !default; + +// Color of the single link +$single-link-color: #2376b7 !default; // 花青 +$single-link-color-dark: #1781b5 !default; // 釉蓝 + +// Color of the hover single link +$single-link-hover-color: #ea517f !default; // 莲瓣红 +$single-link-hover-color-dark: #619ac3 !default; // 羽扇豆蓝 + +// Color of the table background +$table-background-color: #fff !default; +$table-background-color-dark: #272c34 !default; + +// Color of the table thead +$table-thead-color: #ededed !default; +$table-thead-color-dark: #20252b !default; + +// Color of the blockquote +$blockquote-color: #697681 !default; +$blockquote-color-dark: #9ba3aa !default; + +// Color of reward +$reward-color: tomato !default; +$reward-color-dark: darken($reward-color, 5%) !default; + +// Width of reward image +$reward-img-width: 180px !default; +// ========== Single Content ========== // + +// ========== Pagination ========== // +// Color of the link in pagination +$pagination-link-color: #bfbfbf !default; +$pagination-link-color-dark: #b1b1ba !default; + +// Color of the hover link in pagination +$pagination-link-hover-color: #000 !default; +$pagination-link-hover-color-dark: #fff !default; +// ========== Pagination ========== // + +// ========== Code ========== // +// Color of the code +$code-color: #24292f !default; +$code-color-dark: #adbac7 !default; + +// Color of the code background +$code-background-color: #f6f8fa !default; +$code-background-color-dark: #2d333b !default; + +$code-error-color: #dc3545 !default; + +// Color of the hightlight code +$code-hightlight-color: #fff8c5 !default; +$code-hightlight-color-dark: rgba(174, 124, 20, 0.15) !default; + +$code-info-color: #9c9c9c !default; +$code-info-color-dark: #b1b0b0 !default; + +// Font size of the code +$code-font-size: 0.875rem !default; + +// Font family of the code +$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace, $global-font-family !default; +// ========== Code ========== // + +// ========== GitHub Corners ========== // +// Color of the GitHub Corners +$github-corner-color: white !default; +$github-corner-color-dark: black !default; + +// Color of the GitHub Corners background +$github-corner-fill: $header-background-color-dark !default; +$github-corner-fill-dark: $header-background-color !default; +// ========== GitHub Corners ========== // + +@import '_partials/_maps/admonition'; +@import '_partials/_maps/code-highlight'; +@import '_partials/_maps/code-type'; +@import '_partials/_maps/colors'; +@import '_partials/_maps/utilities'; diff --git a/themes/FixIt/assets/css/style.scss b/themes/FixIt/assets/css/style.scss new file mode 100644 index 0000000..d2b8092 --- /dev/null +++ b/themes/FixIt/assets/css/style.scss @@ -0,0 +1,13 @@ +@charset "utf-8"; + +@import "_variables"; +@import "_override"; +@import "_mixin/index"; +@import "_core/root"; +@import "_core/base"; +@import "_core/layout"; +@import "_core/common"; +@import "_core/patch"; +@import "_page"; +@import "_core/media"; +@import "_custom"; diff --git a/themes/FixIt/assets/data/cdn/jsdelivr.yml b/themes/FixIt/assets/data/cdn/jsdelivr.yml new file mode 100644 index 0000000..b969043 --- /dev/null +++ b/themes/FixIt/assets/data/cdn/jsdelivr.yml @@ -0,0 +1,87 @@ +# Tips: remove sourceMappingURL of local libraries to avoid source map 404 error. +# See https://github.com/hugo-fixit/FixIt/issues/67 + +prefix: + libFiles: https://cdn.jsdelivr.net/npm/ + # simple-icons@7.12.0 https://github.com/simple-icons/simple-icons + simpleIcons: https://cdn.jsdelivr.net/npm/simple-icons@7.12.0/icons/ +libFiles: + # algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript + algoliasearchJS: algoliasearch@4.14.2/dist/algoliasearch-lite.umd.min.js + # animate.css@4.1.1 https://github.com/daneden/animate.css + animateCSS: animate.css@4.1.1/animate.min.css + # aplayer@1.10.1 https://github.com/MoePlayer/APlayer + aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css + aplayerJS: aplayer@1.10.1/dist/APlayer.min.js + # artalk@2.5.2 https://github.com/ArtalkJS/Artalk + artalkCSS: artalk@2.5.2/dist/Artalk.css + artalkJS: artalk@2.5.2/dist/Artalk.js + # autocomplete-js@0.38.1 https://github.com/algolia/autocomplete + # TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js' + autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js + # cell-watermark@1.0.3 https://github.com/Lruihao/watermark + cellWatermarkJS: cell-watermark@1.0.3/src/watermark.min.js + # cookieconsent@3.1.1 https://github.com/osano/cookieconsent + cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css + cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js + # crypto-js@4.1.1 https://github.com/brix/crypto-js + cryptoCoreJS: crypto-js@4.1.1/core.js + cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js + cryptoMd5JS: crypto-js@4.1.1/md5.js + cryptoSha256JS: crypto-js@4.1.1/sha256.js + # echarts@5.3.3 https://github.com/apache/echarts + echartsJS: echarts@5.3.3/dist/echarts.min.js + # eruda@2.5.0 https://github.com/liriliri/eruda + erudaJS: eruda@2.5.0/eruda.js + # fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome + fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.2.0/css/all.min.css' + # fusejs@6.6.2 https://github.com/krisk/fuse + fuseJS: fuse.js@6.6.2/dist/fuse.min.js + # gitalk@1.7.2 https://github.com/gitalk/gitalk + gitalkCSS: gitalk@1.7.2/dist/gitalk.min.css + gitalkJS: gitalk@1.7.2/dist/gitalk.min.js + # instant.page@5.1.1 https://github.com/instantpage/instant.page + instantPage: instant.page@5.1.1/instantpage.min.js + # katex@0.16.2 https://github.com/KaTeX/KaTeX + katexAutoRenderJS: katex@0.16.2/dist/contrib/auto-render.min.js + katexCopyTexJS: katex@0.16.2/dist/contrib/copy-tex.min.js + katexCSS: katex@0.16.2/dist/katex.min.css + katexJS: katex@0.16.2/dist/katex.min.js + katexMhchemJS: katex@0.16.2/dist/contrib/mhchem.min.js + # lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery + lightgalleryCSS: lightgallery@2.6.1/css/lightgallery-bundle.min.css + lightgalleryJS: lightgallery@2.6.1/lightgallery.min.js + lightgalleryThumbnailJS: lightgallery@2.6.1/plugins/thumbnail/lg-thumbnail.min.js + lightgalleryZoomJS: lightgallery@2.6.1/plugins/zoom/lg-zoom.min.js + # lunr.js@2.3.9 https://github.com/olivernn/lunr.js + lunrJS: lunr@2.3.9/lunr.min.js + # mapbox-gl@2.10.0 https://docs.mapbox.com/mapbox-gl-js + mapboxGLCSS: mapbox-gl@2.10.0/dist/mapbox-gl.css + mapboxGLJS: mapbox-gl@2.10.0/dist/mapbox-gl.js + # mermaid@9.4.3 https://github.com/mermaid-js/mermaid + # TODO bump Mermaid from 9.x to 10.x + mermaidJS: mermaid@9.4.3/dist/mermaid.min.js + # meting@2.0.1 https://github.com/metowolf/MetingJS + metingJS: meting@2.0.1/dist/Meting.min.js + # object-fit-images@3.2.4 https://github.com/fregante/object-fit-images + objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js + # pangu.js@4.0.7 https://github.com/vinta/pangu.js + panguJS: pangu@4.0.7/dist/browser/pangu.min.js + # pace-js@1.2.4 https://github.com/CodeByZach/pace + paceJS: pace-js@1.2.4 + # sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js + sharerJS: sharer.js@0.5.1/sharer.min.js + # twemoji@13.1.0 https://github.com/twitter/twemoji + twemojiJS: twemoji@14.0.2/dist/twemoji.min.js + # twikoo@1.6.8 https://github.com/imaegoo/twikoo + twikooJS: twikoo@1.6.8/dist/twikoo.all.min.js + # typeit@8.7.1 https://github.com/alexmacarthur/typeit + typeitJS: typeit@8.7.1/dist/index.umd.js + # valine@1.5.1 https://github.com/xCss/Valine + valineJS: valine@1.5.1/dist/Valine.min.js + # vconsole@3.14.6 https://github.com/Tencent/vConsole + vconsoleJS: vconsole@3.14.6/dist/vconsole.min.js + # waline@2.14.7 https://github.com/walinejs/waline + walineCSS: '@waline/client@2.14.7/dist/waline.css' + walineJS: '@waline/client@2.14.7/dist/waline.js' + \ No newline at end of file diff --git a/themes/FixIt/assets/data/cdn/unpkg.yml b/themes/FixIt/assets/data/cdn/unpkg.yml new file mode 100644 index 0000000..d064ada --- /dev/null +++ b/themes/FixIt/assets/data/cdn/unpkg.yml @@ -0,0 +1,87 @@ +# Tips: remove sourceMappingURL of local libraries to avoid source map 404 error. +# See https://github.com/hugo-fixit/FixIt/issues/67 + +prefix: + libFiles: https://unpkg.com/ + # simple-icons@7.12.0 https://github.com/simple-icons/simple-icons + simpleIcons: https://unpkg.com/simple-icons@7.12.0/icons/ +libFiles: + # algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript + algoliasearchJS: algoliasearch@4.14.2/dist/algoliasearch-lite.umd.js + # animate.css@4.1.1 https://github.com/daneden/animate.css + animateCSS: animate.css@4.1.1/animate.min.css + # aplayer@1.10.1 https://github.com/MoePlayer/APlayer + aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css + aplayerJS: aplayer@1.10.1/dist/APlayer.min.js + # artalk@2.5.2 https://github.com/ArtalkJS/Artalk + artalkCSS: artalk@2.5.2/dist/Artalk.css + artalkJS: artalk@2.5.2/dist/Artalk.js + # autocomplete-js@0.38.1 https://github.com/algolia/autocomplete + # TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js' + autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js + # cell-watermark@1.0.3 https://github.com/Lruihao/watermark + cellWatermarkJS: cell-watermark@1.0.3/src/watermark.min.js + # cookieconsent@3.1.1 https://github.com/osano/cookieconsent + cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css + cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js + # crypto-js@4.1.1 https://github.com/brix/crypto-js + cryptoCoreJS: crypto-js@4.1.1/core.js + cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js + cryptoMd5JS: crypto-js@4.1.1/md5.js + cryptoSha256JS: crypto-js@4.1.1/sha256.js + # echarts@5.3.3 https://github.com/apache/echarts + echartsJS: echarts@5.3.3/dist/echarts.min.js + # eruda@2.5.0 https://github.com/liriliri/eruda + erudaJS: eruda@2.5.0/eruda.js + # fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome + fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.2.0/css/all.min.css' + # fusejs@6.6.2 https://github.com/krisk/fuse + fuseJS: fuse.js@6.6.2/dist/fuse.min.js + # gitalk@1.7.2 https://github.com/gitalk/gitalk + gitalkCSS: gitalk@1.7.2/dist/gitalk.min.css + gitalkJS: gitalk@1.7.2/dist/gitalk.min.js + # instant.page@5.1.1 https://github.com/instantpage/instant.page + instantPage: instant.page@5.1.1/instantpage.js + # katex@0.16.2 https://github.com/KaTeX/KaTeX + katexAutoRenderJS: katex@0.16.2/dist/contrib/auto-render.min.js + katexCopyTexJS: katex@0.16.2/dist/contrib/copy-tex.min.js + katexCSS: katex@0.16.2/dist/katex.min.css + katexJS: katex@0.16.2/dist/katex.min.js + katexMhchemJS: katex@0.16.2/dist/contrib/mhchem.min.js + # lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery + lightgalleryCSS: lightgallery@2.6.1/css/lightgallery-bundle.min.css + lightgalleryJS: lightgallery@2.6.1/lightgallery.min.js + lightgalleryThumbnailJS: lightgallery@2.6.1/plugins/thumbnail/lg-thumbnail.min.js + lightgalleryZoomJS: lightgallery@2.6.1/plugins/zoom/lg-zoom.min.js + # lunr.js@2.3.9 https://github.com/olivernn/lunr.js + lunrJS: lunr@2.3.9/lunr.min.js + # mapbox-gl@2.10.0 https://docs.mapbox.com/mapbox-gl-js + mapboxGLCSS: mapbox-gl@2.10.0/dist/mapbox-gl.css + mapboxGLJS: mapbox-gl@2.10.0/dist/mapbox-gl.js + # mermaid@9.4.3 https://github.com/mermaid-js/mermaid + # TODO bump Mermaid from 9.x to 10.x + mermaidJS: mermaid@9.4.3/dist/mermaid.min.js + # meting@2.0.1 https://github.com/metowolf/MetingJS + metingJS: meting@2.0.1/dist/Meting.min.js + # object-fit-images@3.2.4 https://github.com/fregante/object-fit-images + objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js + # pangu.js@4.0.7 https://github.com/vinta/pangu.js + panguJS: pangu@4.0.7/dist/browser/pangu.min.js + # pace-js@1.2.4 https://github.com/CodeByZach/pace + paceJS: pace-js@1.2.4 + # sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js + sharerJS: sharer.js@0.5.1/sharer.min.js + # twemoji@13.1.0 https://github.com/twitter/twemoji + twemojiJS: twemoji@14.0.2/dist/twemoji.min.js + # twikoo@1.6.8 https://github.com/imaegoo/twikoo + twikooJS: twikoo@1.6.8/dist/twikoo.all.min.js + # typeit@8.7.1 https://github.com/alexmacarthur/typeit + typeitJS: typeit@8.7.1/dist/index.umd.js + # valine@1.5.1 https://github.com/xCss/Valine + valineJS: valine@1.5.1/dist/Valine.min.js + # vconsole@3.14.6 https://github.com/Tencent/vConsole + vconsoleJS: vconsole@3.14.6/dist/vconsole.min.js + # waline@2.14.7 https://github.com/walinejs/waline + walineCSS: '@waline/client@2.14.7/dist/waline.css' + walineJS: '@waline/client@2.14.7/dist/waline.js' + \ No newline at end of file diff --git a/themes/FixIt/assets/data/polyfill.yml b/themes/FixIt/assets/data/polyfill.yml new file mode 100644 index 0000000..8ca0e46 --- /dev/null +++ b/themes/FixIt/assets/data/polyfill.yml @@ -0,0 +1,18 @@ +theme: + - html5shiv + - Object.values + - Promise + - fetch + - Element.prototype.after +algoliasearch: + - Promise + - Object.entries + - Object.assign +TypeIt: + - Array.prototype.fill + - Array.prototype.find + - Array.from + - IntersectionObserver + - Math.sign + - Object.assign + - Promise diff --git a/themes/FixIt/assets/data/social.yml b/themes/FixIt/assets/data/social.yml new file mode 100644 index 0000000..2c7acca --- /dev/null +++ b/themes/FixIt/assets/data/social.yml @@ -0,0 +1,699 @@ +# 001: Github +github: + Weight: 1 + Prefix: https://github.com/ + Title: GitHub + Icon: + Class: fa-brands fa-github-alt fa-fw + +# 002: LinkedIn +linkedin: + Weight: 2 + Prefix: https://linkedin.com/in/ + Title: LinkedIn + Icon: + Class: fa-brands fa-linkedin fa-fw + +# 003: Twitter +twitter: + Weight: 5 + Prefix: https://twitter.com/ + Title: Twitter + Icon: + Src: svg/icons/x.svg + +# 004: Instagram +instagram: + Weight: 4 + Prefix: https://www.instagram.com/ + Title: Instagram + Icon: + Class: fa-brands fa-instagram fa-fw + +# 005: facebook +facebook: + Weight: 5 + Prefix: https://facebook.com/ + Title: facebook + Icon: + Class: fa-brands fa-facebook fa-fw + +# 006: Telegram +telegram: + Weight: 6 + Prefix: https://t.me/ + Title: Telegram + Icon: + Class: fa-brands fa-telegram-plane fa-fw + +# 007: Medium +medium: + Weight: 7 + Prefix: https://medium.com/ + Title: Medium + Icon: + Class: fa-brands fa-medium fa-fw + +# 008: GitLab +gitlab: + Weight: 8 + Prefix: https://gitlab.com/ + Title: GitLab + Icon: + Class: fa-brands fa-gitlab fa-fw + +# 009: YouTube Legacy +youtubelegacy: + Weight: 9 + Prefix: https://www.youtube.com/user/ + Title: YouTube + Icon: + Class: fa-brands fa-youtube fa-fw + +# 010: YouTube Custom +youtubecustom: + Weight: 10 + Prefix: https://www.youtube.com/c/ + Title: YouTube + Icon: + Class: fa-brands fa-youtube fa-fw + +# 011: YouTube Channel +youtubechannel: + Weight: 11 + Prefix: https://www.youtube.com/channel/ + Title: YouTube + Icon: + Class: fa-brands fa-youtube fa-fw + +# 012: Tumblr +tumblr: + Weight: 12 + Template: https://%v.tumblr.com/ + Title: Tumblr + Icon: + Class: fa-brands fa-tumblr fa-fw + +# 013: Quora +quora: + Weight: 13 + Prefix: https://www.quora.com/profile/ + Title: Quora + Icon: + Class: fa-brands fa-quora fa-fw + +# 014: Keybase +keybase: + Weight: 14 + Prefix: https://keybase.io/ + Title: Keybase + Icon: + Class: fa-brands fa-keybase fa-fw + +# 015: Pinterest +pinterest: + Weight: 15 + Prefix: https://www.pinterest.com/ + Title: Pinterest + Icon: + Class: fa-brands fa-pinterest fa-fw + +# 016: Reddit +reddit: + Weight: 16 + Prefix: https://www.reddit.com/user/ + Title: Reddit + Icon: + Class: fa-brands fa-reddit fa-fw + +# 017: CodePen +codepen: + Weight: 17 + Prefix: https://codepen.io/ + Title: CodePen + Icon: + Class: fa-brands fa-codepen fa-fw + +# 018: freeCodeCamp +freecodecamp: + Weight: 18 + Prefix: https://freecodecamp.org/ + Title: freeCodeCamp + Icon: + Class: fa-brands fa-free-code-camp fa-fw + +# 019: Bitbucket +bitbucket: + Weight: 19 + Prefix: https://bitbucket.org/ + Title: Bitbucket + Icon: + Class: fa-brands fa-bitbucket fa-fw + +# 020: Stack Overflow +stackoverflow: + Weight: 20 + Prefix: https://stackoverflow.com/users/ + Title: Stack Overflow + Icon: + Class: fa-brands fa-stack-overflow fa-fw + +# 021: 微博 +weibo: + Weight: 21 + Prefix: https://weibo.com/ + Title: 微博 + Icon: + Class: fa-brands fa-weibo fa-fw + +# 022: OK.RU +odnoklassniki: + Weight: 22 + Prefix: https://ok.ru/ + Title: OK.RU + Icon: + Class: fa-brands fa-odnoklassniki fa-fw + +# 023: VK +vk: + Weight: 23 + Prefix: https://vk.com/ + Title: VK + Icon: + Class: fa-brands fa-vk fa-fw + +# 024: Flickr +flickr: + Weight: 24 + Prefix: https://www.flickr.com/photos/ + Title: Flickr + Icon: + Class: fa-brands fa-flickr fa-fw + +# 025: Xing +xing: + Weight: 25 + Prefix: https://www.xing.com/profile/ + Title: Xing + Icon: + Class: fa-brands fa-xing fa-fw + +# 026: Snapchat +snapchat: + Weight: 26 + Prefix: https://www.snapchat.com/add/ + Title: Snapchat + Icon: + Class: fa-brands fa-snapchat fa-fw + +# 027: SoundCloud +soundcloud: + Weight: 27 + Prefix: https://soundcloud.com/ + Title: SoundCloud + Icon: + Class: fa-brands fa-soundcloud fa-fw + +# 028: Spotify +spotify: + Weight: 28 + Prefix: https://open.spotify.com/user/ + Title: Spotify + Icon: + Class: fa-brands fa-spotify fa-fw + +# 029: Bandcamp +bandcamp: + Weight: 29 + Template: https://%v.bandcamp.com/ + Title: Bandcamp + Icon: + Class: fa-brands fa-bandcamp fa-fw + +# 030: PayPal +paypal: + Weight: 30 + Prefix: https://paypal.me/ + Title: PayPal + Icon: + Class: fa-brands fa-paypal fa-fw + +# 031: 500px +fivehundredpx: + Weight: 31 + Prefix: https://500px.com/ + Title: 500px + Icon: + Class: fa-brands fa-500px fa-fw + +# 032: Mix +mix: + Weight: 32 + Prefix: https://mix.com/ + Title: Mix + Icon: + Class: fa-brands fa-mix fa-fw + +# 033: Goodreads +goodreads: + Weight: 33 + Prefix: https://www.goodreads.com/user/show/ + Title: Goodreads + Icon: + Class: fa-brands fa-goodreads fa-fw + +# 034: Last.fm +lastfm: + Weight: 34 + Prefix: https://www.last.fm/user/ + Title: Last.fm + Icon: + Class: fa-brands fa-lastfm fa-fw + +# 035: Foursquare +foursquare: + Weight: 35 + Prefix: https://foursquare.com/ + Title: Foursquare + Icon: + Class: fa-brands fa-foursquare fa-fw + +# 036: Hacker News +hackernews: + Weight: 36 + Template: https://news.ycombinator.com/user?id=%v + Title: Hacker News + Icon: + Class: fa-brands fa-hacker-news fa-fw + +# 037: Kickstarter +kickstarter: + Weight: 37 + Prefix: https://kickstarter.com/profile/ + Title: Kickstarter + Icon: + Class: fa-brands fa-kickstarter fa-fw + +# 038: Patreon +patreon: + Weight: 38 + Prefix: https://patreon.com/ + Title: Patreon + Icon: + Class: fa-brands fa-patreon fa-fw + +# 039: Steam +steam: + Weight: 39 + Prefix: https://steamcommunity.com/id/ + Title: Steam + Icon: + Class: fa-brands fa-steam fa-fw + +# 040: Twitch +twitch: + Weight: 40 + Prefix: https://www.twitch.tv/ + Title: Twitch + Icon: + Class: fa-brands fa-twitch fa-fw + +# 041: Strava +strava: + Weight: 41 + Prefix: https://www.strava.com/athletes/ + Title: Strava + Icon: + Class: fa-brands fa-strava fa-fw + +# 042: Skype +skype: + Weight: 42 + Template: "skype:" + Title: Skype + Icon: + Class: fa-brands fa-skype fa-fw + +# 043: WhatsApp +whatsapp: + Weight: 43 + Prefix: https://wa.me/ + Title: WhatsApp + Icon: + Class: fa-brands fa-whatsapp fa-fw + +# 044: 知乎 +zhihu: + Weight: 44 + Prefix: https://www.zhihu.com/people/ + Title: 知乎 + Icon: + Class: fa-brands fa-zhihu fa-fw + +# 045: 豆瓣 +douban: + Weight: 45 + Prefix: https://www.douban.com/people/ + Title: 豆瓣 + Icon: + Simpleicons: douban + +# 046: Angellist +angellist: + Weight: 46 + Prefix: https://angel.co/ + Title: Angellist + Icon: + Class: fa-brands fa-angellist fa-fw + +# 047: SlideShare +slideshare: + Weight: 47 + Prefix: https://slideshare.com/ + Title: SlideShare + Icon: + Class: fa-brands fa-slideshare fa-fw + +# 048: JSFiddle +jsfiddle: + Weight: 48 + Prefix: https://jsfiddle.com/ + Title: JSFiddle + Icon: + Class: fa-brands fa-jsfiddle fa-fw + +# 049: DeviantArt +deviantart: + Weight: 49 + Template: https://%v.deviantart.com/ + Title: DeviantArt + Icon: + Class: fa-brands fa-deviantart fa-fw + +# 050: Behance +behance: + Weight: 50 + Prefix: https://behance.net/ + Title: Behance + Icon: + Class: fa-brands fa-behance fa-fw + +# 051: Dribbble +dribbble: + Weight: 51 + Prefix: https://dribbble.com/ + Title: Dribbble + Icon: + Class: fa-brands fa-dribbble fa-fw + +# 052: WordPress +wordpress: + Weight: 52 + Template: https://%v.wordpress.com/ + Title: WordPress + Icon: + Class: fa-brands fa-wordpress fa-fw + +# 053: Vine +vine: + Weight: 53 + Prefix: https://vine.co/ + Title: Vine + Icon: + Class: fa-brands fa-vine fa-fw + +# 054: Google Scholar +googlescholar: + Weight: 54 + Template: https://scholar.google.com/citations?%v + Title: Google Scholar + Icon: + Simpleicons: googlescholar + +# 055: ResearchGate +researchgate: + Weight: 55 + Prefix: https://www.researchgate.net/profile/ + Title: ResearchGate + Icon: + Class: fa-brands fa-researchgate fa-fw + +# 056: Mastodon +mastodon: + Weight: 2 + Prefix: https://fosstodon.org/ + Title: Mastodon + Icon: + Class: fa-brands fa-mastodon fa-fw + +# 057: Thingiverse +thingiverse: + Weight: 57 + Prefix: https://www.thingiverse.com/ + Title: Thingiverse + Icon: + Simpleicons: thingiverse + +# 058: Dev.To +devto: + Weight: 58 + Prefix: https://dev.to/ + Title: Dev.To + Icon: + Class: fa-brands fa-dev fa-fw + +# 059: Gitea +gitea: + Weight: 59 + Title: Gitea + Icon: + Simpleicons: gitea + +# 060: XMPP +xmpp: + Weight: 60 + Template: xmpp:%v + Title: XMPP + Icon: + Simpleicons: xmpp + +# 061: Matrix +matrix: + Weight: 1 + Prefix: https://matrix.to/#/ + Title: Matrix + Icon: + Simpleicons: matrix + +# 062: bilibili +bilibili: + Weight: 62 + Prefix: https://space.bilibili.com/ + Title: bilibili + Icon: + Class: fa-brands fa-bilibili + +# 063: ORCID +orcid: + Weight: 63 + Prefix: https://orcid.org/ + Title: ORCID + Icon: + Class: fa-brands fa-orcid fa-fw + +# 064 Liberapay +liberapay: + Weight: 64 + Prefix: https://liberapay.com/ + Title: Liberapay + Icon: + Simpleicons: liberapay + +# 065 Ko-Fi +ko-fi: + Weight: 65 + Prefix: https://ko-fi.com/ + Title: Ko-Fi + Icon: + Simpleicons: kofi + +# 066: BuyMeaCoffee +buymeacoffee: + Weight: 66 + Prefix: https://www.buymeacoffee.com/ + Title: BuyMeaCoffee + Icon: + Simpleicons: buymeacoffee + +# 067: Linktree +linktree: + Weight: 67 + Prefix: https://links.m3tam3re.com + Title: All My Links + Icon: + Class: fa-solid fa-square-share-nodes + +# 068: QQ +qq: + Weight: 68 + Template: https://wpa.qq.com/msgrd?v=3&uin=%v&site=qq&menu=yes + Title: QQ + Icon: + Simpleicons: tencentqq + +# 069: QQ Group +qqgroup: + Weight: 69 + Template: https://qm.qq.com/cgi-bin/qm/qr?k=%v&jump_from=webapi + Title: QQ Group + Icon: + Class: fa-solid fa-users + +# 070: Diaspora +diaspora: + Weight: 70 + Title: diaspora* + Icon: + Simpleicons: diaspora + +# 071: CSDN +csdn: + Weight: 71 + Prefix: https://blog.csdn.net/ + Title: CSDN + Icon: + Src: svg/icons/csdn.svg + +# 072: Discord User Profile / Revolt +discord: + Weight: 72 + Prefix: https://discordapp.com/users/ + Title: Discord + Icon: + Class: fa-brands fa-discord fa-fw + +# 073: Discord Server Invite Link +discordinvite: + Weight: 73 + Prefix: https://discord.gg/ + Title: Discord + Icon: + Class: fa-brands fa-discord fa-fw + +# 074: Lichess user profile +lichess: + Weight: 74 + Prefix: https://lichess.org/@/ + Title: Lichess + Icon: + Simpleicons: lichess + +# 075: Pleroma +pleroma: + Weight: 75 + Title: Pleroma + Icon: + Simpleicons: pleroma + +# 076: Kaggle +kaggle: + Weight: 76 + Prefix: https://kaggle.com/ + Title: Kaggle + Icon: + Class: fa-brands fa-kaggle fa-fw + +# 077: MediaWiki +mediawiki: + Weight: 77 + Title: MediaWiki + Icon: + Class: fa-brands fa-wikipedia-w fa-fw + +# 078: Plume +plume: + Weight: 78 + Title: Plume + Icon: + Src: svg/icons/plume.svg + +# 079: Hack The Box +hackthebox: + Weight: 79 + Title: Hack The Box + Prefix: https://app.hackthebox.com/users/ + Icon: + Simpleicons: hackthebox + +# 080: Root-Me +rootme: + Weight: 80 + Title: Root-Me + Prefix: https://www.root-me.org/ + Icon: + Src: svg/icons/rootme.svg + +# 081: Feishu +feishu: + Weight: 81 + Title: Feishu + Template: https://www.feishu.cn/invitation/page/add_contact/?token=%v + Icon: + Class: fa-solid fa-dove + +# 082: TryHackMe +tryhackme: + Weight: 82 + Title: TryHackMe + Prefix: https://tryhackme.com/p/ + Icon: + Simpleicons: tryhackme + +# 083 douyin +douyin: + Weight: 83 + Title: 抖音 + Prefix: https://www.douyin.com/user/ + Icon: + Class: fa-brands fa-tiktok + +# 084 TikTok +tiktok: + Weight: 84 + Title: TikTok + Prefix: https://www.tiktok.com/ + Icon: + Class: fa-brands fa-tiktok + +# 085 Revolt Server Invite +revoltinvite: + Weight: 3 + Prefix: https://rvlt.gg/ + Title: Revolt + Icon: + Simpleicons: revoltdotchat + +# Phone +phone: + Weight: 997 + Template: tel:%v + Title: Phone + Icon: + Class: fa-solid fa-phone fa-fw + +# Email +email: + Weight: 998 + Template: mailto:%v + Title: Email + Icon: + Class: fa-regular fa-envelope fa-fw + +# RSS +rss: + Weight: 999 + Url: /index.xml + Title: RSS + Newtab: true + Icon: + Class: fa-solid fa-rss fa-fw diff --git a/themes/FixIt/assets/fixit.svg b/themes/FixIt/assets/fixit.svg new file mode 100644 index 0000000..28f64b1 --- /dev/null +++ b/themes/FixIt/assets/fixit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/FixIt/assets/js/custom.js.example b/themes/FixIt/assets/js/custom.js.example new file mode 100644 index 0000000..2c4c28d --- /dev/null +++ b/themes/FixIt/assets/js/custom.js.example @@ -0,0 +1,35 @@ +/** + * Custom javascript for FixIt site. + * @author @Lruihao https://lruihao.cn + */ +const FixItCustom = new (function () { + /** + * Hello World + * You can define your own functions below. + * @returns {FixItCustom} + */ + this.hello = () => { + console.log('FixItCustom echo: Hello FixIt!'); + return this; + }; + /** + * Initialize. + * @returns {FixItCustom} + */ + this.init = () => { + // Custom infos. + this.hello(); + return this; + }; +})(); + +/** + * Immediate. + */ +(() => { + FixItCustom.init(); + // It will be executed when the DOM tree is built. + document.addEventListener('DOMContentLoaded', () => { + // FixItCustom.init(); + }); +})(); diff --git a/themes/FixIt/assets/js/fixit-decryptor.js b/themes/FixIt/assets/js/fixit-decryptor.js new file mode 100644 index 0000000..51f2d25 --- /dev/null +++ b/themes/FixIt/assets/js/fixit-decryptor.js @@ -0,0 +1,223 @@ +/** + * FixIt decryptor for encrypted pages and fixit-encryptor shortcode + * @param {Object} options + * @param {Function} [options.decrypted] [Lifecycle Hooks] handler after decrypting + * @param {Function} [options.reset] [Lifecycle Hooks] handler after encrypting again + * @param {Number} [options.duration=86400] number of seconds to cache decryption statistics. unit: s + * @author @Lruihao https://lruihao.cn + * @since v0.2.15 + */ +FixItDecryptor = function (options = {}) { + var _proto = FixItDecryptor.prototype; + this.options = options || {}; + this.options.duration = this.options.duration || 24 * 60 * 60; // default cache one day + this.decryptedEventSet = new Set(); + this.resetEventSet = new Set(); + this.$el = document.querySelector('.fixit-decryptor-container'); + + /** + * decrypt content + * @param {String} base64EncodeContent encrypted content + */ + var _decryptContent = (base64EncodeContent) => { + try { + this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none'); + this.$el.querySelector('#fixit-decryptor-input').classList.add('d-none'); + this.$el.querySelector('.fixit-encryptor-btn').classList.remove('d-none'); + document.querySelector('#content').insertAdjacentHTML( + 'afterbegin', + CryptoJS.enc.Base64.parse(base64EncodeContent).toString(CryptoJS.enc.Utf8) + ); + } catch (err) { + return console.error(err); + } + // decrypted hook + console.log(this.decryptedEventSet) + for (const event of this.decryptedEventSet) { + event(); + } + }; + + /** + * initialize FixIt decryptor + */ + _proto.init = () => { + this.addEventListener('decrypted', this.options?.decrypted); + this.addEventListener('reset', this.options?.reset); + this.validateCache(); + + const _decryptor = this; + this.$el.querySelector('#fixit-decryptor-input')?.addEventListener('keydown', function (e) { + if (e.key === 'Enter') { + e.preventDefault(); + const $content = document.querySelector('#content'); + const password = $content.getAttribute('data-password'); + const input = this.value.trim(); + const saltLen = input.length % 2 ? input.length : input.length + 1; + const inputMd5 = CryptoJS.MD5(input).toString(); + const inputSha256 = CryptoJS.SHA256(input).toString(); + + this.value = ''; + this.blur(); + if (!input) { + alert('Please enter the correct password!'); + return console.warn('Please enter the correct password!'); + } + if (inputMd5 !== password) { + alert(`Password error: ${input} not the correct password!`); + return console.warn(`Password error: ${input} not the correct password!`); + } + // cache decryption statistics + window.localStorage?.setItem( + `fixit-decryptor/#${location.pathname}`, + JSON.stringify({ + expiration: Math.ceil(Date.now() / 1000) + _decryptor.options.duration, + md5: inputMd5, + sha256: inputSha256.slice(saltLen) + }) + ); + _decryptContent($content.getAttribute('data-content').replace(inputSha256.slice(saltLen), '')); + } + }); + + this.$el.querySelector('.fixit-encryptor-btn')?.addEventListener('click', function (e) { + e.preventDefault(); + this.classList.add('d-none') + _decryptor.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none'); + document.querySelector('#content').innerHTML = ''; + document.querySelector('#content').insertAdjacentElement( + 'afterbegin', + _decryptor.$el + ); + window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`); + // reset hook + for (const event of _decryptor.resetEventSet) { + event(); + } + }); + }; + + /** + * initialize fixit-encryptor shortcodes + */ + _proto.initShortcodes = () => { + // TODO TODO shortcode decrypted event + // this.addEventListener('decrypted', this.options?.decrypted); + const _decryptor = this; + const $shortcodes = document.querySelectorAll('fixit-encryptor:not(.decrypted)'); + + $shortcodes.forEach($shortcode => { + $shortcode.querySelector('.fixit-decryptor-input')?.addEventListener('keydown', function (e) { + if (e.key === 'Enter') { + e.preventDefault(); + const $decryptor = this.parentElement.parentElement; + const $content = $decryptor.nextElementSibling; + const password = $content.getAttribute('data-password'); + const input = this.value.trim(); + const saltLen = input.length % 2 ? input.length : input.length + 1; + const inputMd5 = CryptoJS.MD5(input).toString(); + const inputSha256 = CryptoJS.SHA256(input).toString(); + + this.value = ''; + this.blur(); + if (!input) { + alert('Please enter the correct password!'); + return console.warn('Please enter the correct password!'); + } + if (inputMd5 !== password) { + alert(`Password error: ${input} not the correct password!`); + return console.warn(`Password error: ${input} not the correct password!`); + } + try { + const base64EncodeContent = $content.getAttribute('data-content').replace(inputSha256.slice(saltLen), ''); + $decryptor.querySelector('.fixit-decryptor-input').classList.add('d-none'); + $content.insertAdjacentHTML( + 'afterbegin', + CryptoJS.enc.Base64.parse(base64EncodeContent).toString(CryptoJS.enc.Utf8) + ); + $decryptor.parentElement.classList.add('decrypted'); + } catch (err) { + return console.error(err); + } + // TODO shortcode decrypted hook + // for (const event of _decryptor.decryptedEventSet) { + // event(); + // } + } + }); + }); + }; + + /** + * validate the cached decryption statistics in localStorage + * @returns {FixItDecryptor} + */ + _proto.validateCache = () => { + const $content = document.querySelector('#content'); + const password = $content.getAttribute('data-password'); + const cachedStat = JSON.parse(window.localStorage?.getItem(`fixit-decryptor/#${location.pathname}`)); + + if (!cachedStat) { + this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none'); + this.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none'); + return this; + } + if (cachedStat?.md5 !== password || Number(cachedStat?.expiration) < Math.ceil(Date.now() / 1000)) { + this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none'); + this.$el.querySelector('#fixit-decryptor-input').classList.remove('d-none'); + window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`); + console.warn('The password has expired, please re-enter!'); + return this; + } + _decryptContent($content.getAttribute('data-content').replace(cachedStat.sha256, '')); + return this; + }; + + /** + * add event listener for FixIt Decryptor + * @param {String} event event name + * @param {Function} listener event handler + * @returns {FixItDecryptor} + */ + _proto.addEventListener = (event, listener) => { + if (typeof listener !== 'function') { + return this; + } + switch (event) { + case 'decrypted': + this.decryptedEventSet.add(listener); + break; + case 'reset': + this.resetEventSet.add(listener); + break; + default: + console.warn(`Event ${event} not found in FixIt Decryptor!`); + break; + } + return this; + }; + + /** + * remove event listener for FixIt Decryptor + * @param {String} event event name + * @param {Function} listener event handler + * @returns {FixItDecryptor} + */ + _proto.removeEventListener = (event, listener) => { + if (typeof listener !== 'function') { + return this; + } + switch (event) { + case 'decrypted': + this.decryptedEventSet.delete(listener); + break; + case 'reset': + this.resetEventSet.delete(listener); + break; + default: + console.warn(`Event ${event} not found in FixIt Decryptor!`); + break; + } + return this; + }; +}; diff --git a/themes/FixIt/assets/js/service-worker.js b/themes/FixIt/assets/js/service-worker.js new file mode 100644 index 0000000..c0bebe6 --- /dev/null +++ b/themes/FixIt/assets/js/service-worker.js @@ -0,0 +1,269 @@ +/** + * Service Worker + * imported from https://github.com/HEIGE-PCloud/DoIt/blob/v0.2.11/src/js/sw.js + */ +CACHE_VERSION = 1; + +const BASE_CACHE_FILES = [ + '/css/style.min.css', + '/js/theme.min.js', + '/site.webmanifest', + '/fixit.min.svg' +]; + +const OFFLINE_CACHE_FILES = [ + '/css/style.min.css', + '/js/theme.min.js', + '/site.webmanifest', + '/fixit.min.svg', + '/offline/' +]; + +const NOT_FOUND_CACHE_FILES = [ + '/css/style.min.css', + '/js/theme.min.js', + '/site.webmanifest', + '/fixit.min.svg', + '/404.html' +]; + +const OFFLINE_PAGE = '/offline/'; +const NOT_FOUND_PAGE = '/404.html'; + +const CACHE_VERSIONS = { + assets: 'assets-v' + CACHE_VERSION, + content: 'content-v' + CACHE_VERSION, + offline: 'offline-v' + CACHE_VERSION, + notFound: '404-v' + CACHE_VERSION +}; + +// Define MAX_TTL's in SECONDS for specific file extensions +const MAX_TTL = { + '/': 3600, + html: 3600, + json: 86400, + js: 86400, + css: 86400 +}; + +const CACHE_BLACKLIST = [ + (str) => { + return !str.startsWith('http://localhost'); + } +]; + +const SUPPORTED_METHODS = ['GET']; + +/** + * isBlackListed + * @param {string} url + * @returns {boolean} + */ +function isBlacklisted(url) { + return CACHE_BLACKLIST.length > 0 + ? !CACHE_BLACKLIST.filter((rule) => { + if (typeof rule === 'function') { + return !rule(url); + } else { + return false; + } + }).length + : false; +} + +/** + * getFileExtension + * @param {string} url + * @returns {string} + */ +function getFileExtension(url) { + const extension = url.split('.').reverse()[0].split('?')[0]; + return extension.endsWith('/') ? '/' : extension; +} + +/** + * getTTL + * @param {string} url + */ +function getTTL(url) { + if (typeof url === 'string') { + const extension = getFileExtension(url); + if (typeof MAX_TTL[extension] === 'number') { + return MAX_TTL[extension]; + } else { + return null; + } + } else { + return null; + } +} + +/** + * installServiceWorker + * @returns {Promise} + */ +function installServiceWorker() { + return Promise.all([ + caches.open(CACHE_VERSIONS.assets).then((cache) => { + return cache.addAll(BASE_CACHE_FILES); + }), + caches.open(CACHE_VERSIONS.offline).then((cache) => { + return cache.addAll(OFFLINE_CACHE_FILES); + }), + caches.open(CACHE_VERSIONS.notFound).then((cache) => { + return cache.addAll(NOT_FOUND_CACHE_FILES); + }) + ]).then(() => { + return self.skipWaiting(); + }); +} + +/** + * cleanupLegacyCache + * @returns {Promise} + */ +function cleanupLegacyCache() { + const currentCaches = Object.keys(CACHE_VERSIONS).map((key) => { + return CACHE_VERSIONS[key]; + }); + + return new Promise((resolve, reject) => { + caches + .keys() + .then((keys) => { + return keys.filter((key) => { + return !~currentCaches.indexOf(key); + }); + }) + .then((legacy) => { + if (legacy.length) { + Promise.all( + legacy.map((legacyKey) => { + return caches.delete(legacyKey); + }) + ) + .then(() => { + resolve(); + }) + .catch((err) => { + reject(err); + }); + } else { + resolve(); + } + }) + .catch((err) => { + reject(err); + }); + }); +} + +self.addEventListener('install', (event) => { + event.waitUntil(Promise.all([installServiceWorker(), self.skipWaiting()])); +}); + +// The activate handler takes care of cleaning up old caches. +self.addEventListener('activate', (event) => { + event.waitUntil( + Promise.all([ + cleanupLegacyCache(), + self.clients.claim(), + self.skipWaiting() + ]).catch((err) => { + console.log(err); + self.skipWaiting(); + }) + ); +}); + +self.addEventListener('fetch', (event) => { + event.respondWith( + caches.open(CACHE_VERSIONS.content).then((cache) => { + return cache + .match(event.request) + .then((response) => { + if (response) { + const headers = response.headers.entries(); + let date = null; + + for (const pair of headers) { + if (pair[0] === 'date') { + date = new Date(pair[1]); + } + } + if (date) { + const age = parseInt( + (new Date().getTime() - date.getTime()) / 1000 + ); + const ttl = getTTL(event.request.url); + + if (ttl && age > ttl) { + return new Promise((resolve) => { + return fetch(event.request.clone()) + .then((updatedResponse) => { + if (updatedResponse) { + cache.put(event.request, updatedResponse.clone()); + resolve(updatedResponse); + } else { + resolve(response); + } + }) + .catch(() => { + resolve(response); + }); + }).catch((err) => { + console.log(err); + return response; + }); + } else { + return response; + } + } else { + return response; + } + } else { + return null; + } + }) + .then((response) => { + if (response) { + return response; + } else { + return fetch(event.request.clone()) + .then((response) => { + if (response.status < 400) { + if ( + ~SUPPORTED_METHODS.indexOf(event.request.method) && + !isBlacklisted(event.request.url) && + event.request.url.slice(0, 4) === 'http' + ) { + cache.put(event.request, response.clone()); + } + return response; + } else { + return caches.open(CACHE_VERSIONS.notFound).then((cache) => { + return cache.match(NOT_FOUND_PAGE); + }); + } + }) + .then((response) => { + if (response) { + return response; + } + }) + .catch(() => { + return caches + .open(CACHE_VERSIONS.offline) + .then((offlineCache) => { + return offlineCache.match(OFFLINE_PAGE); + }); + }); + } + }) + .catch((error) => { + console.error(' Error in fetch handler:', error); + throw error; + }); + }) + ); +}); diff --git a/themes/FixIt/assets/js/theme.min.js b/themes/FixIt/assets/js/theme.min.js new file mode 100644 index 0000000..f890311 --- /dev/null +++ b/themes/FixIt/assets/js/theme.min.js @@ -0,0 +1,3 @@ +"use strict";function _objectDestructuringEmpty(obj){if(obj==null)throw new TypeError("Cannot destructure "+obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return()}finally{if(didErr)throw err}}}}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i.nested-item"),function($nestedItem){$nestedItem.addEventListener("click",function(){this.parentNode.querySelector(".sub-menu").classList.toggle("open");this.querySelector(".dropdown-icon").classList.toggle("open")})})}},{key:"initSwitchTheme",value:function initSwitchTheme(){var _this4=this;this.util.forEach(document.getElementsByClassName("theme-switch"),function($themeSwitch){$themeSwitch.addEventListener("click",function(){var _window$localStorage;document.body.dataset.theme=document.body.dataset.theme==="dark"?"light":"dark";_this4.isDark=!_this4.isDark;(_window$localStorage=window.localStorage)===null||_window$localStorage===void 0?void 0:_window$localStorage.setItem("theme",_this4.isDark?"dark":"light");var _iterator=_createForOfIteratorHelper(_this4.switchThemeEventSet),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var event=_step.value;event()}}catch(err){_iterator.e(err)}finally{_iterator.f()}},false)})}},{key:"initSearch",value:function initSearch(){var _searchConfig$maxResu,_searchConfig$snippet,_searchConfig$highlig,_searchConfig$isCaseS,_searchConfig$minMatc,_searchConfig$findAll,_searchConfig$locatio,_searchConfig$thresho,_searchConfig$distanc,_searchConfig$ignoreL,_searchConfig$useExte,_searchConfig$ignoreF,_this5=this;var searchConfig=this.config.search;var isMobile=this.util.isMobile();if(!searchConfig||isMobile&&this._searchMobileOnce||!isMobile&&this._searchDesktopOnce){return}var maxResultLength=(_searchConfig$maxResu=searchConfig.maxResultLength)!==null&&_searchConfig$maxResu!==void 0?_searchConfig$maxResu:10;var snippetLength=(_searchConfig$snippet=searchConfig.snippetLength)!==null&&_searchConfig$snippet!==void 0?_searchConfig$snippet:50;var highlightTag=(_searchConfig$highlig=searchConfig.highlightTag)!==null&&_searchConfig$highlig!==void 0?_searchConfig$highlig:"em";var isCaseSensitive=(_searchConfig$isCaseS=searchConfig.isCaseSensitive)!==null&&_searchConfig$isCaseS!==void 0?_searchConfig$isCaseS:false;var minMatchCharLength=(_searchConfig$minMatc=searchConfig.minMatchCharLength)!==null&&_searchConfig$minMatc!==void 0?_searchConfig$minMatc:1;var findAllMatches=(_searchConfig$findAll=searchConfig.findAllMatches)!==null&&_searchConfig$findAll!==void 0?_searchConfig$findAll:false;var location=(_searchConfig$locatio=searchConfig.location)!==null&&_searchConfig$locatio!==void 0?_searchConfig$locatio:0;var threshold=(_searchConfig$thresho=searchConfig.threshold)!==null&&_searchConfig$thresho!==void 0?_searchConfig$thresho:0.3;var distance=(_searchConfig$distanc=searchConfig.distance)!==null&&_searchConfig$distanc!==void 0?_searchConfig$distanc:100;var ignoreLocation=(_searchConfig$ignoreL=searchConfig.ignoreLocation)!==null&&_searchConfig$ignoreL!==void 0?_searchConfig$ignoreL:false;var useExtendedSearch=(_searchConfig$useExte=searchConfig.useExtendedSearch)!==null&&_searchConfig$useExte!==void 0?_searchConfig$useExte:false;var ignoreFieldNorm=(_searchConfig$ignoreF=searchConfig.ignoreFieldNorm)!==null&&_searchConfig$ignoreF!==void 0?_searchConfig$ignoreF:false;var suffix=isMobile?"mobile":"desktop";var $header=document.getElementById("header-".concat(suffix));var $searchInput=document.getElementById("search-input-".concat(suffix));var $searchToggle=document.getElementById("search-toggle-".concat(suffix));var $searchLoading=document.getElementById("search-loading-".concat(suffix));var $searchClear=document.getElementById("search-clear-".concat(suffix));if(isMobile){this._searchMobileOnce=true;$searchInput.addEventListener("focus",function(){_this5.disableScrollEvent=true;document.body.classList.add("blur");$header.classList.add("open")},false);document.getElementById("search-cancel-mobile").addEventListener("click",function(){_this5.disableScrollEvent=false;$header.classList.remove("open");document.body.classList.remove("blur");document.getElementById("menu-toggle-mobile").classList.remove("active");document.getElementById("menu-mobile").classList.remove("active");$searchLoading.style.display="none";$searchClear.style.display="none";_this5._searchMobile&&_this5._searchMobile.autocomplete.setVal("")},false);$searchClear.addEventListener("click",function(){$searchClear.style.display="none";_this5._searchMobile&&_this5._searchMobile.autocomplete.setVal("")},false);this._searchMobileOnClickMask=this._searchMobileOnClickMask||function(){$header.classList.remove("open");$searchLoading.style.display="none";$searchClear.style.display="none";_this5._searchMobile&&_this5._searchMobile.autocomplete.setVal("")};this.clickMaskEventSet.add(this._searchMobileOnClickMask)}else{this._searchDesktopOnce=true;$searchToggle.addEventListener("click",function(){document.body.classList.add("blur");$header.classList.add("open");$searchInput.focus()},false);$searchClear.addEventListener("click",function(){$searchClear.style.display="none";_this5._searchDesktop&&_this5._searchDesktop.autocomplete.setVal("")},false);this._searchDesktopOnClickMask=this._searchDesktopOnClickMask||function(){$header.classList.remove("open");$searchLoading.style.display="none";$searchClear.style.display="none";_this5._searchDesktop&&_this5._searchDesktop.autocomplete.setVal("")};this.clickMaskEventSet.add(this._searchDesktopOnClickMask)}$searchInput.addEventListener("input",function(){if($searchInput.value==="")$searchClear.style.display="none";else $searchClear.style.display="inline"},false);var initAutosearch=function initAutosearch(){var autosearch=autocomplete("#search-input-".concat(suffix),{hint:false,autoselect:true,dropdownMenuContainer:"#search-dropdown-".concat(suffix),clearOnSelected:true,cssClasses:{noPrefix:true},debug:true},{name:"search",source:function source(query,callback){$searchLoading.style.display="inline";$searchClear.style.display="none";var finish=function finish(results){$searchLoading.style.display="none";$searchClear.style.display="inline";callback(results)};if(searchConfig.type==="lunr"){var search=function search(){if(lunr.queryHandler){query=lunr.queryHandler(query)}var results={};_this5._index.search(query).forEach(function(_ref){var ref=_ref.ref,metadata=_ref.matchData.metadata;var matchData=_this5._indexData[ref];var uri=matchData.uri,title=matchData.title,context=matchData.content;if(results[uri]){return}var position=0;Object.values(metadata).forEach(function(_ref2){var content=_ref2.content;if(content){var matchPosition=content.position[0][0];if(matchPosition0){position+=context.substr(position,20).lastIndexOf(" ")+1;context="..."+context.substr(position,snippetLength)}else{context=context.substr(0,snippetLength)}Object.keys(metadata).forEach(function(key){title=title.replace(new RegExp("(".concat(key,")"),"gi"),"<".concat(highlightTag,">$1"));context=context.replace(new RegExp("(".concat(key,")"),"gi"),"<".concat(highlightTag,">$1"))});results[uri]={uri:uri,title:title,date:matchData.date,context:context}});return Object.values(results).slice(0,maxResultLength)};if(!_this5._index){fetch(searchConfig.lunrIndexURL).then(function(response){return response.json()}).then(function(data){var indexData={};_this5._index=lunr(function(){var _this6=this;if(searchConfig.lunrLanguageCode)this.use(lunr[searchConfig.lunrLanguageCode]);this.ref("objectID");this.field("title",{boost:50});this.field("tags",{boost:20});this.field("categories",{boost:20});this.field("content",{boost:10});this.metadataWhitelist=["position"];data.forEach(function(record){indexData[record.objectID]=record;_this6.add(record)})});_this5._indexData=indexData;finish(search())}).catch(function(err){console.error(err);finish([])})}else finish(search())}else if(searchConfig.type==="algolia"){_this5._algoliaIndex=_this5._algoliaIndex||algoliasearch(searchConfig.algoliaAppID,searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);_this5._algoliaIndex.search(query,{offset:0,length:maxResultLength*8,attributesToHighlight:["title"],attributesToSnippet:["content:".concat(snippetLength)],highlightPreTag:"<".concat(highlightTag,">"),highlightPostTag:"")}).then(function(_ref3){var hits=_ref3.hits;var results={};hits.forEach(function(_ref4){var uri=_ref4.uri,date=_ref4.date,title=_ref4._highlightResult.title,content=_ref4._snippetResult.content;if(results[uri]&&results[uri].context.length>content.value){return}results[uri]={uri:uri,title:title.value,date:date,context:content.value}});finish(Object.values(results).slice(0,maxResultLength))}).catch(function(err){console.error(err);finish([])})}else if(searchConfig.type==="fuse"){var _search=function _search(){var results={};window._index.search(query).forEach(function(_ref5){var item=_ref5.item,refIndex=_ref5.refIndex,matches=_ref5.matches;var title=item.title;var content=item.content;matches.forEach(function(_ref6){var indices=_ref6.indices,value=_ref6.value,key=_ref6.key;if(key==="content"){var offset=0;for(var i=0;i")+substr+"");content=content.substring(0,indices[i][0]+offset)+tag+content.substring(indices[i][1]+1+offset,content.length);offset+=highlightTag.length*2+5}}else if(key==="title"){var _offset=0;for(var _i=0;_i")+_substr+"");title=title.substring(0,indices[_i][0]+_offset)+_tag+title.substring(indices[_i][1]+1+_offset,content.length);_offset+=highlightTag.length*2+5}}});results[item.uri]={uri:item.uri,title:title,date:item.date,context:content}});return Object.values(results).slice(0,maxResultLength)};if(!window._index){fetch(searchConfig.fuseIndexURL).then(function(response){return response.json()}).then(function(data){var options={isCaseSensitive:isCaseSensitive,findAllMatches:findAllMatches,minMatchCharLength:minMatchCharLength,location:location,threshold:threshold,distance:distance,ignoreLocation:ignoreLocation,useExtendedSearch:useExtendedSearch,ignoreFieldNorm:ignoreFieldNorm,includeScore:false,shouldSort:true,includeMatches:true,keys:["content","title"]};window._index=new Fuse(data,options);finish(_search())}).catch(function(err){console.error(err);finish([])})}else finish(_search())}},templates:{suggestion:function suggestion(_ref7){var title=_ref7.title,date=_ref7.date,context=_ref7.context;return"
".concat(title,"").concat(date,"
").concat(context,"
")},empty:function empty(_ref8){var query=_ref8.query;return"
".concat(searchConfig.noResultsFound,": \"").concat(query,"\"
")},footer:function footer(_ref9){_objectDestructuringEmpty(_ref9);var _ref10=searchConfig.type==="algolia"?{searchType:"algolia",icon:"",href:"https://www.algolia.com/"}:searchConfig.type==="lunr"?{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"}:{searchType:"Fuse.js",icon:"",href:"https://fusejs.io/"},searchType=_ref10.searchType,icon=_ref10.icon,href=_ref10.href;return"")}}});autosearch.on("autocomplete:selected",function(_event,suggestion,_dataset,_context){window.location.assign(suggestion.uri)});if(isMobile){_this5._searchMobile=autosearch}else{_this5._searchDesktop=autosearch}};if(searchConfig.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var script=document.createElement("script");script.id="lunr-segmentit";script.src=searchConfig.lunrSegmentitURL;script.async=true;if(script.readyState){script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;initAutosearch()}}}else{script.onload=function(){initAutosearch()}}document.body.appendChild(script)}else{initAutosearch()}}},{key:"initDetails",value:function initDetails(){this.util.forEach(document.getElementsByClassName("details"),function($details){var $summary=$details.querySelector(".details-summary");$summary.addEventListener("click",function(){$details.classList.toggle("open")},false)})}},{key:"initLightGallery",value:function initLightGallery(){if(this.config.lightgallery){lightGallery(document.getElementById("content"),{plugins:[lgThumbnail,lgZoom],selector:".lightgallery",speed:400,hideBarsDelay:2000,allowMediaOverlap:true,exThumbImage:"data-thumbnail",toggleThumb:true,thumbWidth:80,thumbHeight:"60px",actualSize:false,showZoomInOutIcons:true,licenseKey:"none"})}}},{key:"initHighlight",value:function initHighlight(){var _this7=this;this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function($preChroma){var $chroma=document.createElement("div");$chroma.className=$preChroma.className;var $table=document.createElement("table");$chroma.appendChild($table);var $tbody=document.createElement("tbody");$table.appendChild($tbody);var $tr=document.createElement("tr");$tbody.appendChild($tr);var $td=document.createElement("td");$tr.appendChild($td);$preChroma.parentElement.replaceChild($chroma,$preChroma);$td.appendChild($preChroma)});this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function($chroma){var $codeElements=$chroma.querySelectorAll("pre.chroma > code");if($codeElements.length){var _hlAttrs$title;var $code=$codeElements[$codeElements.length-1];var $header=document.createElement("div");$header.className="code-header "+$code.className.toLowerCase();var $title=document.createElement("span");$title.classList.add("code-title");var hlAttrs=_this7.data[$chroma.parentNode.id];$title.insertAdjacentHTML("afterbegin","".concat((_hlAttrs$title=hlAttrs===null||hlAttrs===void 0?void 0:hlAttrs.title)!==null&&_hlAttrs$title!==void 0?_hlAttrs$title:"",""));$title.addEventListener("click",function(){$chroma.classList.toggle("open")},false);$header.appendChild($title);var $ellipses=document.createElement("span");$ellipses.insertAdjacentHTML("afterbegin","");$ellipses.classList.add("ellipses");$ellipses.addEventListener("click",function(){$chroma.classList.add("open")},false);$header.appendChild($ellipses);if(_this7.config.code.editable){var $edit=document.createElement("span");$edit.classList.add("edit");$edit.insertAdjacentHTML("afterbegin",""));$edit.addEventListener("click",function(){var $iconKey=$edit.querySelector(".fa-key");var $iconLock=$edit.querySelector(".fa-lock");var $preChromas=$edit.parentElement.parentElement.querySelectorAll("pre.chroma");var $preChroma=$preChromas.length===2?$preChromas[1]:$preChromas[0];if($iconKey){$iconKey.classList.add("fa-lock");$iconKey.classList.remove("fa-key");$iconKey.title=_this7.config.code.editLockTitle;$preChroma.setAttribute("contenteditable",true);$preChroma.focus()}else{$iconLock.classList.add("fa-key");$iconLock.classList.remove("fa-lock");$iconLock.title=_this7.config.code.editUnLockTitle;$preChroma.setAttribute("contenteditable",false);$preChroma.blur()}},false);$header.appendChild($edit)}if(_this7.config.code.copyTitle){var $copy=document.createElement("span");$copy.insertAdjacentHTML("afterbegin","");$copy.classList.add("copy");var code=$code.innerText.trim();if(_this7.config.code.maxShownLines<0||code.split("\n").length<_this7.config.code.maxShownLines+2){$chroma.classList.add("open")}$copy.title=_this7.config.code.copyTitle;$copy.addEventListener("click",function(){navigator.clipboard.writeText(code).then(function(){_this7.util.animateCSS($code,"animate__flash")},function(){console.error("Clipboard write failed!","Your browser does not support clipboard API!")})},false);$header.appendChild($copy)}$chroma.insertBefore($header,$chroma.firstChild)}})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function($table){var $wrapper=document.createElement("div");$wrapper.className="table-wrapper";$table.parentElement.replaceChild($wrapper,$table);$wrapper.appendChild($table)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var num=1;num<=6;num++){this.util.forEach(document.querySelectorAll(".single .content > h"+num),function($header){$header.classList.add("header-link");$header.insertAdjacentHTML("afterbegin",""))})}}},{key:"initToc",value:function initToc(){var _this8=this;var $tocCore=document.getElementById("TableOfContents");if($tocCore===null){return}if(typeof APlayer==="function"){var $newTocCore=$tocCore.cloneNode(true);$tocCore.parentElement.replaceChild($newTocCore,$tocCore);$tocCore=$newTocCore}if(document.getElementById("toc-static").dataset.kept===true||this.util.isTocStatic()){var $tocContentStatic=document.getElementById("toc-content-static");if($tocCore.parentElement!==$tocContentStatic){$tocCore.parentElement.removeChild($tocCore);$tocContentStatic.appendChild($tocCore)}this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var $tocContentAuto=document.getElementById("toc-content-auto");if($tocCore.parentElement!==$tocContentAuto){$tocCore.parentElement.removeChild($tocCore);$tocContentAuto.appendChild($tocCore)}var $toc=document.getElementById("toc-auto");$toc.style.visibility="visible";this.util.animateCSS($toc,["animate__fadeIn","animate__faster"],true);var $postMeta=document.querySelector(".post-meta");$toc.style.marginTop="".concat($postMeta.offsetTop+$postMeta.clientHeight,"px");var $tocLinkElements=$tocCore.querySelectorAll("a:first-child");var $tocLiElements=$tocCore.getElementsByTagName("li");var $headerLinkElements=document.getElementsByClassName("header-link");var headerIsFixed=document.body.dataset.headerDesktop!=="normal";var headerHeight=document.getElementById("header-desktop").offsetHeight;document.querySelector(".container").addEventListener("resize",function(){$toc.style.marginBottom="".concat(document.querySelector(".container").clientHeight-document.querySelector(".post-footer").offsetTop,"px")});this._tocOnScroll=this._tocOnScroll||function(){$toc.style.marginBottom="".concat(document.querySelector(".container").clientHeight-document.querySelector(".post-footer").offsetTop,"px");_this8.util.forEach($tocLinkElements,function($tocLink){$tocLink.classList.remove("active")});_this8.util.forEach($tocLiElements,function($tocLi){$tocLi.classList.remove("has-active")});var INDEX_SPACING=20+(headerIsFixed?headerHeight:0);var activeTocIndex=$headerLinkElements.length-1;for(var i=0;i<$headerLinkElements.length-1;i++){var thisTop=$headerLinkElements[i].getBoundingClientRect().top;var nextTop=$headerLinkElements[i+1].getBoundingClientRect().top;if(i==0&&thisTop>INDEX_SPACING||thisTop<=INDEX_SPACING&&nextTop>INDEX_SPACING){activeTocIndex=i;break}}if(activeTocIndex!==-1){$tocLinkElements[activeTocIndex].classList.add("active");var $parent=$tocLinkElements[activeTocIndex].parentElement;while($parent!==$tocCore){$parent.classList.add("has-active");$parent=$parent.parentElement.parentElement}}};this._tocOnScroll();this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initTocListener",value:function initTocListener(){var _document$querySelect2,_this9=this;var $toc=document.getElementById("toc-auto");var $tocContentAuto=document.getElementById("toc-content-auto");(_document$querySelect2=document.querySelector("#toc-auto>.toc-title"))===null||_document$querySelect2===void 0?void 0:_document$querySelect2.addEventListener("click",function(){var animation=["animate__faster"];var tocHidden=$toc.classList.contains("toc-hidden");animation.push(tocHidden?"animate__fadeIn":"animate__fadeOut");$tocContentAuto.classList.remove(tocHidden?"animate__fadeOut":"animate__fadeIn");_this9.util.animateCSS($tocContentAuto,animation,true);$toc.classList.toggle("toc-hidden")},false)}},{key:"initMath",value:function initMath(){if(this.config.math){renderMathInElement(document.body,this.config.math)}}},{key:"switchMermaidTheme",value:function switchMermaidTheme(theme){var _this10=this;var $mermaidElements=document.getElementsByClassName("mermaid");if($mermaidElements.length){var _this$config$mermaid$;var themes=(_this$config$mermaid$=this.config.mermaid.themes)!==null&&_this$config$mermaid$!==void 0?_this$config$mermaid$:["default","dark","neutral"];mermaid.initialize({startOnLoad:false,theme:theme!==null&&theme!==void 0?theme:this.isDark?themes[1]:themes[0],securityLevel:"loose"});this.util.forEach($mermaidElements,function($mermaid){mermaid.render("svg-"+$mermaid.id,_this10.data[$mermaid.id],function(svgCode){$mermaid.innerHTML=svgCode},$mermaid)})}}},{key:"initMermaid",value:function initMermaid(){var _this11=this;this.switchMermaidTheme();this.switchThemeEventSet.add(function(){_this11.switchMermaidTheme()});this.beforeprintEventSet.add(function(){_this11.switchMermaidTheme("neutral")})}},{key:"initEcharts",value:function initEcharts(){var _this12=this;if(!this.config.echarts){return}echarts.registerTheme("light",this.config.echarts.lightTheme);echarts.registerTheme("dark",this.config.echarts.darkTheme);this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){_this12._echartsArr=_this12._echartsArr||[];for(var i=0;i<_this12._echartsArr.length;i++){_this12._echartsArr[i].dispose()}_this12._echartsArr=[];_this12.util.forEach(document.getElementsByClassName("echarts"),function($echarts){var chart=echarts.init($echarts,_this12.isDark?"dark":"light",{renderer:"svg"});chart.setOption(JSON.parse(_this12.data[$echarts.id]));_this12._echartsArr.push(chart)})};this.switchThemeEventSet.add(this._echartsOnSwitchTheme);this._echartsOnSwitchTheme();this._echartsOnResize=this._echartsOnResize||function(){for(var i=0;i<_this12._echartsArr.length;i++){_this12._echartsArr[i].resize()}};this.resizeEventSet.add(this._echartsOnResize)}},{key:"initMapbox",value:function initMapbox(){var _this13=this;if(this.config.mapbox){mapboxgl.accessToken=this.config.mapbox.accessToken;mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);this._mapboxArr=this._mapboxArr||[];this.util.forEach(document.getElementsByClassName("mapbox"),function($mapbox){var _this13$data$$mapbox$=_this13.data[$mapbox.id],lng=_this13$data$$mapbox$.lng,lat=_this13$data$$mapbox$.lat,zoom=_this13$data$$mapbox$.zoom,lightStyle=_this13$data$$mapbox$.lightStyle,darkStyle=_this13$data$$mapbox$.darkStyle,marked=_this13$data$$mapbox$.marked,navigation=_this13$data$$mapbox$.navigation,geolocate=_this13$data$$mapbox$.geolocate,scale=_this13$data$$mapbox$.scale,fullscreen=_this13$data$$mapbox$.fullscreen;var mapbox=new mapboxgl.Map({container:$mapbox,center:[lng,lat],zoom:zoom,minZoom:0.2,style:_this13.isDark?darkStyle:lightStyle,attributionControl:false});if(marked){new mapboxgl.Marker().setLngLat([lng,lat]).addTo(mapbox)}if(navigation){mapbox.addControl(new mapboxgl.NavigationControl,"bottom-right")}if(geolocate){mapbox.addControl(new mapboxgl.GeolocateControl({positionOptions:{enableHighAccuracy:true},showUserLocation:true,trackUserLocation:true}),"bottom-right")}if(scale){mapbox.addControl(new mapboxgl.ScaleControl)}if(fullscreen){mapbox.addControl(new mapboxgl.FullscreenControl)}mapbox.addControl(new MapboxLanguage);_this13._mapboxArr.push(mapbox)});this._mapboxOnSwitchTheme=this._mapboxOnSwitchTheme||function(){_this13.util.forEach(_this13._mapboxArr,function(mapbox){var $mapbox=mapbox.getContainer();var _this13$data$$mapbox$2=_this13.data[$mapbox.id],lightStyle=_this13$data$$mapbox$2.lightStyle,darkStyle=_this13$data$$mapbox$2.darkStyle;mapbox.setStyle(_this13.isDark?darkStyle:lightStyle);mapbox.addControl(new MapboxLanguage)})};this.switchThemeEventSet.add(this._mapboxOnSwitchTheme)}}},{key:"initTypeit",value:function initTypeit(){var _this14=this;if(this.config.typeit){var _typeitConfig$loop;var typeitConfig=this.config.typeit;var speed=typeitConfig.speed||100;var cursorSpeed=typeitConfig.cursorSpeed||1000;var cursorChar=typeitConfig.cursorChar||"|";var loop=(_typeitConfig$loop=typeitConfig.loop)!==null&&_typeitConfig$loop!==void 0?_typeitConfig$loop:false;Object.values(typeitConfig.data).forEach(function(group){var typeone=function typeone(i){var id=group[i];var shortcodeLoop=document.querySelector("#".concat(id)).parentElement.dataset.loop;var instance=new TypeIt("#".concat(id),{strings:_this14.data[id],speed:speed,lifeLike:true,cursorSpeed:cursorSpeed,cursorChar:cursorChar,waitUntilVisible:true,loop:shortcodeLoop?JSON.parse(shortcodeLoop):loop,afterComplete:function afterComplete(){if(i===group.length-1){if(typeitConfig.duration>=0){window.setTimeout(function(){instance.destroy()},typeitConfig.duration)}return}instance.destroy();typeone(i+1)}}).go()};typeone(0)})}}},{key:"initCommentLightGallery",value:function initCommentLightGallery(comments,images){document.querySelectorAll(comments).forEach(function($content){var $imgs=$content.querySelectorAll(images+":not([lightgallery-loaded])");$imgs.forEach(function($img){$img.setAttribute("lightgallery-loaded","");var $link=document.createElement("a");$link.setAttribute("class","comment-lightgallery");$link.setAttribute("href",$img.src);$link.append($img.cloneNode());$img.replaceWith($link)});if($imgs.length){lightGallery($content,{selector:".comment-lightgallery",actualSize:false,hideBarsDelay:2000,speed:400})}})}},{key:"initComment",value:function initComment(){var _this$config$comment,_this15=this;if(!((_this$config$comment=this.config.comment)!==null&&_this$config$comment!==void 0&&_this$config$comment.enable)){return}if(document.querySelector("#comments")){var $viewCommentsBtn=document.querySelector(".view-comments");$viewCommentsBtn.classList.remove("d-none");$viewCommentsBtn.addEventListener("click",function(){_this15.util.scrollIntoView("#comments")},false)}this.config.comment.expired&&document.querySelector("#comments").remove();if(this.config.comment.artalk){if(this.config.comment.expired){return Artalk.LoadCountWidget({server:this.config.comment.artalk.server,site:this.config.comment.artalk.site,pvEl:this.config.comment.artalk.pvEl,countEl:this.config.comment.artalk.countEl})}var artalk=Artalk.init(this.config.comment.artalk);artalk.setDarkMode(this.isDark);this.switchThemeEventSet.add(function(){artalk.setDarkMode(_this15.isDark)});artalk.on("comments-loaded",function(){_this15.config.comment.artalk.lightgallery&&_this15.initCommentLightGallery(".atk-comment .atk-content","img:not([atk-emoticon])")});return artalk}if(this.config.comment.gitalk){this.config.comment.gitalk.body=decodeURI(window.location.href);var gitalk=new Gitalk(this.config.comment.gitalk);gitalk.render("gitalk");return gitalk}if(this.config.comment.valine){return new Valine(this.config.comment.valine)}if(this.config.comment.waline){if(this.config.comment.expired){this.config.comment.waline.pageview&&Waline.pageviewCount({serverURL:this.config.comment.waline.serverURL,path:window.location.pathname});return}return Waline.init(this.config.comment.waline)}if(this.config.comment.utterances){var utterancesConfig=this.config.comment.utterances;var script=document.createElement("script");script.src="https://utteranc.es/client.js";script.setAttribute("repo",utterancesConfig.repo);script.setAttribute("issue-term",utterancesConfig.issueTerm);if(utterancesConfig.label)script.setAttribute("label",utterancesConfig.label);script.setAttribute("theme",this.isDark?utterancesConfig.darkTheme:utterancesConfig.lightTheme);script.crossOrigin="anonymous";script.async=true;document.getElementById("utterances").appendChild(script);this._utterancesOnSwitchTheme=this._utterancesOnSwitchTheme||function(){var _document$querySelect3;var message={type:"set-theme",theme:_this15.isDark?utterancesConfig.darkTheme:utterancesConfig.lightTheme};(_document$querySelect3=document.querySelector(".utterances-frame"))===null||_document$querySelect3===void 0?void 0:_document$querySelect3.contentWindow.postMessage(message,"https://utteranc.es")};this.switchThemeEventSet.add(this._utterancesOnSwitchTheme);return}if(this.config.comment.twikoo){var twikooConfig=this.config.comment.twikoo;if(twikooConfig.lightgallery){twikooConfig.onCommentLoaded=function(){_this15.initCommentLightGallery(".tk-comments .tk-content","img:not(.tk-owo-emotion)")}}twikoo.init(twikooConfig);if(twikooConfig.commentCount){twikoo.getCommentsCount({envId:twikooConfig.envId,region:twikooConfig.region,urls:[window.location.pathname],includeReply:false}).then(function(response){var twikooCommentCount=document.getElementById("twikoo-comment-count");if(twikooCommentCount)twikooCommentCount.innerHTML=response[0].count})}return}if(this.config.comment.giscus){var giscusConfig=this.config.comment.giscus;this._giscusOnSwitchTheme=this._giscusOnSwitchTheme||function(){var _document$querySelect4;var message={setConfig:{theme:_this15.isDark?giscusConfig.darkTheme:giscusConfig.lightTheme}};(_document$querySelect4=document.querySelector(".giscus-frame"))===null||_document$querySelect4===void 0?void 0:_document$querySelect4.contentWindow.postMessage({giscus:message},"https://giscus.app")};this.switchThemeEventSet.add(this._giscusOnSwitchTheme);this.giscus2parentMsg=window.addEventListener("message",function(event){var $script=document.querySelector("#giscus>script");if($script){_this15._giscusOnSwitchTheme();$script.parentElement.removeChild($script)}},{once:true});return}}},{key:"initCookieconsent",value:function initCookieconsent(){this.config.cookieconsent&&cookieconsent.initialise(this.config.cookieconsent)}},{key:"initSiteTime",value:function initSiteTime(){var _this16=this;if(this.config.siteTime){this.siteTime=setInterval(this.getSiteTime,500);document.addEventListener("visibilitychange",function(){if(document.hidden){return clearInterval(_this16.siteTime)}_this16.siteTime=setInterval(_this16.getSiteTime,500)},false)}}},{key:"initServiceWorker",value:function initServiceWorker(){if(this.config.enablePWA&&"serviceWorker"in navigator){navigator.serviceWorker.register("/service-worker.min.js",{scope:"/"}).then(function(registration){}).catch(function(error){console.error("error: ",error)});navigator.serviceWorker.ready.then(function(registration){})}}},{key:"initWatermark",value:function initWatermark(){var _this$config$watermar,_document$querySelect5,_document$querySelect6;((_this$config$watermar=this.config.watermark)===null||_this$config$watermar===void 0?void 0:_this$config$watermar.enable)&&new Watermark({content:this.config.watermark.content||"".concat((_document$querySelect5=(_document$querySelect6=document.querySelector("footer .fixit-icon"))===null||_document$querySelect6===void 0?void 0:_document$querySelect6.outerHTML)!==null&&_document$querySelect5!==void 0?_document$querySelect5:""," FixIt Theme"),appendTo:this.config.watermark.appendto||".wrapper>main",opacity:this.config.watermark.opacity,width:this.config.watermark.width,height:this.config.watermark.height,rowSpacing:this.config.watermark.rowspacing,colSpacing:this.config.watermark.colspacing,rotate:this.config.watermark.rotate,fontSize:this.config.watermark.fontsize,fontFamily:this.config.watermark.fontfamily})}},{key:"initPangu",value:function initPangu(){var _this$config$pangu;if(!((_this$config$pangu=this.config.pangu)!==null&&_this$config$pangu!==void 0&&_this$config$pangu.enable)){return}var selector=this.config.pangu.selector;if(selector){if(selector.startsWith("#")){pangu.spacingElementById(selector.slice(1))}else if(selector.startsWith(".")){pangu.spacingElementByClassName(selector.slice(1))}else{pangu.spacingElementByTagName(selector)}return}pangu.autoSpacingPage()}},{key:"initFixItDecryptor",value:function initFixItDecryptor(){var _this17=this,_this$config$encrypti,_this$config$encrypti2;var $tocNodes=document.querySelectorAll("#toc-auto>.d-none, #toc-static.d-none");this.decryptor=new FixItDecryptor({decrypted:function decrypted(){_this17.initTwemoji();_this17.initDetails();_this17.initLightGallery();_this17.initHighlight();_this17.initTable();_this17.initHeaderLink();_this17.initMath();_this17.initMermaid();_this17.initEcharts();_this17.initTypeit();_this17.initMapbox();_this17.util.forEach($tocNodes,function($element){$element.classList.remove("d-none")});_this17.initToc();_this17.initTocListener();_this17.initPangu()},reset:function reset(){_this17.util.forEach($tocNodes,function($element){$element.classList.add("d-none")})}});if((_this$config$encrypti=this.config.encryption)!==null&&_this$config$encrypti!==void 0&&_this$config$encrypti.shortcode){this.decryptor.addEventListener("decrypted",function(){_this17.decryptor.initShortcodes()});this.decryptor.initShortcodes()}((_this$config$encrypti2=this.config.encryption)===null||_this$config$encrypti2===void 0?void 0:_this$config$encrypti2.all)&&this.decryptor.init()}},{key:"initMDevtools",value:function initMDevtools(){var _this$config,_this18=this;var type=(_this$config=this.config)===null||_this$config===void 0?void 0:_this$config.mDevtools;if(typeof window.orientation==="undefined"){return}if(type==="vConsole"){var vConsole=new VConsole({target:".widgets",theme:this.isDark?"dark":"light"});this._vConsoleOnSwitchTheme=this._vConsoleOnSwitchTheme||function(){vConsole.setOption("theme",_this18.isDark?"dark":"light")};this.switchThemeEventSet.add(this._vConsoleOnSwitchTheme)}if(type==="eruda"){eruda.init({defaults:{theme:this.isDark?"Dark":"Light"}});this._erudaOnSwitchTheme=this._erudaOnSwitchTheme||function(){eruda.util.evalCss.setTheme(_this18.isDark?"Dark":"Light")};this.switchThemeEventSet.add(this._erudaOnSwitchTheme)}}},{key:"initAutoMark",value:function initAutoMark(){var _this19=this,_window$localStorage3;if(!this.config.autoBookmark){return}window.addEventListener("beforeunload",function(){var _window$localStorage2;(_window$localStorage2=window.localStorage)===null||_window$localStorage2===void 0?void 0:_window$localStorage2.setItem("fixit-bookmark/#".concat(location.pathname),_this19.util.getScrollTop())});var scrollTop=Number((_window$localStorage3=window.localStorage)===null||_window$localStorage3===void 0?void 0:_window$localStorage3.getItem("fixit-bookmark/#".concat(location.pathname)));if(scrollTop&&location.hash===""){window.scrollTo({top:scrollTop,behavior:"smooth"})}}},{key:"initReward",value:function initReward(){var _this20=this;var $rewards=document.querySelectorAll(".post-reward [data-mode=\"fixed\"]");if(!$rewards.length){return}if(this.util.isMobile()){this.util.forEach($rewards,function($reward){$reward.removeAttribute("data-mode")});return}var _closeRewardExclude=function _closeRewardExclude(id){_this20.util.forEach($rewards,function($reward){var $rewardInput=$reward.parentElement.querySelector(".reward-input");if($rewardInput.id!==id){$rewardInput.checked=false}})};this.util.forEach($rewards,function($reward){$reward.previousElementSibling.addEventListener("click",function(){_closeRewardExclude(this.getAttribute("for"))},false)});this.scrollEventSet.add(_closeRewardExclude)}},{key:"onScroll",value:function onScroll(){var _this21=this;var $headers=[];var ACCURACY=20;var $fixedButtons=document.querySelector(".fixed-buttons");var $backToTop=document.querySelector(".back-to-top");var $readingProgressBar=document.querySelector(".reading-progress-bar");var scrollTimer=void 0;if(document.body.dataset.headerDesktop==="auto"){$headers.push(document.getElementById("header-desktop"))}if(document.body.dataset.headerMobile==="auto"){$headers.push(document.getElementById("header-mobile"))}$backToTop===null||$backToTop===void 0?void 0:$backToTop.addEventListener("click",function(){_this21.util.scrollIntoView("body")});window.addEventListener("scroll",function(event){if(_this21.disableScrollEvent){event.preventDefault();return}var $mask=document.getElementById("mask");_this21.newScrollTop=_this21.util.getScrollTop();var scroll=_this21.newScrollTop-_this21.oldScrollTop;document.body.toggleAttribute("data-scroll",true);scrollTimer&&window.clearTimeout(scrollTimer);scrollTimer=window.setTimeout(function(){document.body.toggleAttribute("data-scroll")},500);_this21.util.forEach($headers,function($header){if(scroll>ACCURACY){$header.classList.remove("animate__fadeInDown");_this21.util.animateCSS($header,["animate__fadeOutUp"],true);$mask.click()}else if(scroll<-ACCURACY){$header.classList.remove("animate__fadeOutUp");_this21.util.animateCSS($header,["animate__fadeInDown"],true);$mask.click()}});var contentHeight=document.body.scrollHeight-window.innerHeight;var scrollPercent=Math.max(Math.min(100*Math.max(_this21.newScrollTop,0)/contentHeight,100),0);if($readingProgressBar){$readingProgressBar.style.setProperty("--progress","".concat(scrollPercent.toFixed(2),"%"))}if($fixedButtons){if(scrollPercent>1){$fixedButtons.classList.remove("d-none","animate__fadeOut");_this21.util.animateCSS($fixedButtons,["animate__fadeIn"],true)}else{$fixedButtons.classList.remove("animate__fadeIn");_this21.util.animateCSS($fixedButtons,["animate__fadeOut"],true,function(){$fixedButtons.classList.contains("animate__fadeOut")&&$fixedButtons.classList.add("d-none")})}if($backToTop){$backToTop.querySelector("span").innerText="".concat(Math.round(scrollPercent),"%")}}var _iterator2=_createForOfIteratorHelper(_this21.scrollEventSet),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _event2=_step2.value;_event2()}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}_this21.oldScrollTop=_this21.newScrollTop},false)}},{key:"onResize",value:function onResize(){var _this22=this;var resizeBefore=this.util.isMobile();window.addEventListener("resize",function(){if(!_this22._resizeTimeout){_this22._resizeTimeout=window.setTimeout(function(){_this22._resizeTimeout=null;var _iterator3=_createForOfIteratorHelper(_this22.resizeEventSet),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var event=_step3.value;event()}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}_this22.initToc();_this22.switchMermaidTheme();_this22.initSearch();var isMobile=_this22.util.isMobile();if(isMobile!==resizeBefore){document.getElementById("mask").click();resizeBefore=isMobile}},100)}},false)}},{key:"onClickMask",value:function onClickMask(){var _this23=this;document.getElementById("mask").addEventListener("click",function(){if(!document.body.classList.contains("blur")){return}var _iterator4=_createForOfIteratorHelper(_this23.clickMaskEventSet),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var event=_step4.value;event()}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}_this23.disableScrollEvent=false;document.body.classList.remove("blur")},false)}},{key:"beforeprint",value:function beforeprint(){var _this24=this;window.addEventListener("beforeprint",function(){_this24.util.forEach(document.querySelectorAll(".chroma"),function($el){$el.classList.toggle("open",true)});var _iterator5=_createForOfIteratorHelper(_this24.beforeprintEventSet),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var event=_step5.value;event()}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}},false)}},{key:"init",value:function init(){var _this25=this;try{var _this$config$encrypti3;if(this.config.encryption){this.initFixItDecryptor()}else if(!((_this$config$encrypti3=this.config.encryption)!==null&&_this$config$encrypti3!==void 0&&_this$config$encrypti3.all)){this.initTwemoji();this.initDetails();this.initLightGallery();this.initHighlight();this.initTable();this.initHeaderLink();this.initMath();this.initMermaid();this.initEcharts();this.initTypeit();this.initMapbox();this.initPangu()}this.initThemeColor();this.initSVGIcon();this.initMenu();this.initSwitchTheme();this.initSearch();this.initCookieconsent();this.initSiteTime();this.initServiceWorker();this.initWatermark();this.initMDevtools();this.initAutoMark();this.initReward();window.setTimeout(function(){var _this25$config$encryp;_this25.initComment();if(!((_this25$config$encryp=_this25.config.encryption)!==null&&_this25$config$encryp!==void 0&&_this25$config$encryp.all)){_this25.initToc();_this25.initTocListener()}_this25.onScroll();_this25.onResize();_this25.onClickMask();_this25.beforeprint()},100)}catch(err){console.error(err)}}}]);return FixIt}();var themeInit=function themeInit(){window.fixit=new FixIt;window.fixit.init()};if(document.readyState!=="loading"){themeInit()}else{document.addEventListener("DOMContentLoaded",themeInit,false)} + +//# sourceMappingURL=theme.min.js.map \ No newline at end of file diff --git a/themes/FixIt/assets/js/theme.min.js.map b/themes/FixIt/assets/js/theme.min.js.map new file mode 100644 index 0000000..63b5fea --- /dev/null +++ b/themes/FixIt/assets/js/theme.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"theme.min.js","names":["Util","_classCallCheck","_createClass","key","value","forEach","elements","handler","i","length","getScrollTop","_document$documentEle","document","documentElement","body","scrollTop","isMobile","window","matchMedia","matches","isTocStatic","animateCSS","element","animation","reserved","callback","_element$classList","Array","isArray","classList","add","apply","concat","_toConsumableArray","addEventListener","_element$classList2","remove","once","isValidDate","date","Date","isNaN","getTime","scrollIntoView","selector","startsWith","getElementById","slice","querySelector","behavior","FixIt","_this","_defineProperty","_document$querySelect","now","run","config","siteTime","$runTimes","util","clearInterval","parentNode","runTime","days","Math","floor","hours","minutes","seconds","innerHTML","String","padStart","data","isDark","dataset","theme","newScrollTop","oldScrollTop","scrollEventSet","Set","resizeEventSet","switchThemeEventSet","clickMaskEventSet","beforeprintEventSet","disableScrollEvent","objectFitImages","initThemeColor","_this2","$meta","_themeColorOnSwitchTheme","content","dark","light","initSVGIcon","querySelectorAll","$icon","fetch","svgSrc","then","response","text","svg","$temp","createElement","insertAdjacentHTML","$svg","firstChild","$titleElements","getElementsByTagName","removeChild","parentElement","replaceChild","catch","err","console","error","initTwemoji","twemoji","parse","initMenu","initMenuDesktop","initMenuMobile","$item","style","minWidth","offsetWidth","_this3","$menuToggleMobile","$menuMobile","event","toggle","contains","_menuMobileOnClickMask","$nestedItem","initSwitchTheme","_this4","getElementsByClassName","$themeSwitch","_window$localStorage","localStorage","setItem","_iterator","_createForOfIteratorHelper","_step","s","n","done","e","f","initSearch","_searchConfig$maxResu","_searchConfig$snippet","_searchConfig$highlig","_searchConfig$isCaseS","_searchConfig$minMatc","_searchConfig$findAll","_searchConfig$locatio","_searchConfig$thresho","_searchConfig$distanc","_searchConfig$ignoreL","_searchConfig$useExte","_searchConfig$ignoreF","_this5","searchConfig","search","_searchMobileOnce","_searchDesktopOnce","maxResultLength","snippetLength","highlightTag","isCaseSensitive","minMatchCharLength","findAllMatches","location","threshold","distance","ignoreLocation","useExtendedSearch","ignoreFieldNorm","suffix","$header","$searchInput","$searchToggle","$searchLoading","$searchClear","display","_searchMobile","autocomplete","setVal","_searchMobileOnClickMask","focus","_searchDesktop","_searchDesktopOnClickMask","initAutosearch","autosearch","hint","autoselect","dropdownMenuContainer","clearOnSelected","cssClasses","noPrefix","debug","name","source","query","finish","results","type","lunr","queryHandler","_index","_ref","ref","metadata","matchData","_indexData","uri","title","context","position","Object","values","_ref2","matchPosition","substr","lastIndexOf","keys","replace","RegExp","lunrIndexURL","json","indexData","_this6","lunrLanguageCode","use","field","boost","metadataWhitelist","record","objectID","_algoliaIndex","algoliasearch","algoliaAppID","algoliaSearchKey","initIndex","algoliaIndex","offset","attributesToHighlight","attributesToSnippet","highlightPreTag","highlightPostTag","_ref3","hits","_ref4","_highlightResult","_snippetResult","_ref5","item","refIndex","_ref6","indices","substring","tag","fuseIndexURL","options","includeScore","shouldSort","includeMatches","Fuse","templates","suggestion","_ref7","empty","_ref8","noResultsFound","footer","_ref9","_objectDestructuringEmpty","_ref10","searchType","icon","href","on","_event","_dataset","_context","assign","lunrSegmentitURL","script","id","src","async","readyState","onreadystatechange","onload","appendChild","initDetails","$details","$summary","initLightGallery","lightgallery","lightGallery","plugins","lgThumbnail","lgZoom","speed","hideBarsDelay","allowMediaOverlap","exThumbImage","toggleThumb","thumbWidth","thumbHeight","actualSize","showZoomInOutIcons","licenseKey","initHighlight","_this7","$preChroma","$chroma","className","$table","$tbody","$tr","$td","$codeElements","_hlAttrs$title","$code","toLowerCase","$title","hlAttrs","$ellipses","code","editable","$edit","editUnLockTitle","$iconKey","$iconLock","$preChromas","editLockTitle","setAttribute","blur","copyTitle","$copy","innerText","trim","maxShownLines","split","navigator","clipboard","writeText","insertBefore","initTable","$wrapper","initHeaderLink","num","initToc","_this8","$tocCore","APlayer","$newTocCore","cloneNode","kept","$tocContentStatic","_tocOnScroll","delete","$tocContentAuto","$toc","visibility","$postMeta","marginTop","offsetTop","clientHeight","$tocLinkElements","$tocLiElements","$headerLinkElements","headerIsFixed","headerDesktop","headerHeight","offsetHeight","marginBottom","$tocLink","$tocLi","INDEX_SPACING","activeTocIndex","thisTop","getBoundingClientRect","top","nextTop","$parent","initTocListener","_document$querySelect2","_this9","tocHidden","push","initMath","math","renderMathInElement","switchMermaidTheme","_this10","$mermaidElements","_this$config$mermaid$","themes","mermaid","initialize","startOnLoad","securityLevel","$mermaid","render","svgCode","initMermaid","_this11","initEcharts","_this12","echarts","registerTheme","lightTheme","darkTheme","_echartsOnSwitchTheme","_echartsArr","dispose","$echarts","chart","init","renderer","setOption","JSON","_echartsOnResize","resize","initMapbox","_this13","mapbox","mapboxgl","accessToken","setRTLTextPlugin","RTLTextPlugin","_mapboxArr","$mapbox","_this13$data$$mapbox$","lng","lat","zoom","lightStyle","darkStyle","marked","navigation","geolocate","scale","fullscreen","Map","container","center","minZoom","attributionControl","Marker","setLngLat","addTo","addControl","NavigationControl","GeolocateControl","positionOptions","enableHighAccuracy","showUserLocation","trackUserLocation","ScaleControl","FullscreenControl","MapboxLanguage","_mapboxOnSwitchTheme","getContainer","_this13$data$$mapbox$2","setStyle","initTypeit","_this14","typeit","_typeitConfig$loop","typeitConfig","cursorSpeed","cursorChar","loop","group","typeone","shortcodeLoop","instance","TypeIt","strings","lifeLike","waitUntilVisible","afterComplete","duration","setTimeout","destroy","go","initCommentLightGallery","comments","images","$content","$imgs","$img","$link","append","replaceWith","initComment","_this$config$comment","_this15","comment","enable","$viewCommentsBtn","expired","artalk","Artalk","LoadCountWidget","server","site","pvEl","countEl","setDarkMode","gitalk","decodeURI","Gitalk","valine","Valine","waline","pageview","Waline","pageviewCount","serverURL","path","pathname","utterances","utterancesConfig","repo","issueTerm","label","crossOrigin","_utterancesOnSwitchTheme","_document$querySelect3","message","contentWindow","postMessage","twikoo","twikooConfig","onCommentLoaded","commentCount","getCommentsCount","envId","region","urls","includeReply","twikooCommentCount","count","giscus","giscusConfig","_giscusOnSwitchTheme","_document$querySelect4","setConfig","giscus2parentMsg","$script","initCookieconsent","cookieconsent","initialise","initSiteTime","_this16","setInterval","getSiteTime","hidden","initServiceWorker","enablePWA","serviceWorker","register","scope","registration","ready","initWatermark","_this$config$watermar","_document$querySelect5","_document$querySelect6","watermark","Watermark","outerHTML","appendTo","appendto","opacity","width","height","rowSpacing","rowspacing","colSpacing","colspacing","rotate","fontSize","fontsize","fontFamily","fontfamily","initPangu","_this$config$pangu","pangu","spacingElementById","spacingElementByClassName","spacingElementByTagName","autoSpacingPage","initFixItDecryptor","_this17","_this$config$encrypti","_this$config$encrypti2","$tocNodes","decryptor","FixItDecryptor","decrypted","$element","reset","encryption","shortcode","initShortcodes","all","initMDevtools","_this$config","_this18","mDevtools","orientation","vConsole","VConsole","target","_vConsoleOnSwitchTheme","eruda","defaults","_erudaOnSwitchTheme","evalCss","setTheme","initAutoMark","_this19","_window$localStorage3","autoBookmark","_window$localStorage2","Number","getItem","hash","scrollTo","initReward","_this20","$rewards","$reward","removeAttribute","_closeRewardExclude","$rewardInput","checked","previousElementSibling","getAttribute","onScroll","_this21","$headers","ACCURACY","$fixedButtons","$backToTop","$readingProgressBar","scrollTimer","headerMobile","preventDefault","$mask","scroll","toggleAttribute","clearTimeout","click","contentHeight","scrollHeight","innerHeight","scrollPercent","max","min","setProperty","toFixed","round","_iterator2","_step2","onResize","_this22","resizeBefore","_resizeTimeout","_iterator3","_step3","onClickMask","_this23","_iterator4","_step4","beforeprint","_this24","$el","_iterator5","_step5","_this25","_this$config$encrypti3","_this25$config$encryp","themeInit","fixit"],"sources":["../../src/js/theme.js"],"sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) {\n handler(elements[i]);\n }\n }\n\n getScrollTop() {\n return (document.documentElement ?? document.body).scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n\n /**\n * add animate to element\n * @param {Element} element animate element\n * @param {String|Array} animation animation name\n * @param {Boolean} reserved reserved animation\n * @param {Function} callback remove callback\n */\n animateCSS(element, animation, reserved, callback) {\n !Array.isArray(animation) && (animation = [animation]);\n element.classList.add('animate__animated', ...animation);\n element.addEventListener('animationend', () => {\n !reserved && element.classList.remove('animate__animated', ...animation);\n typeof callback === 'function' && callback();\n }, { once: true });\n }\n\n /**\n * date validator\n * @param {*} date may be date or not\n * @returns {Boolean}\n */\n isValidDate(date) {\n return date instanceof Date && !isNaN(date.getTime());\n }\n \n /**\n * scroll some element into view\n * @param {String} selector element to scroll\n */\n scrollIntoView(selector) {\n const element = selector.startsWith('#')\n ? document.getElementById(selector.slice(1))\n : document.querySelector(selector);\n element?.scrollIntoView({\n behavior: 'smooth'\n });\n }\n}\n\nclass FixIt {\n constructor() {\n this.config = window.config;\n this.data = this.config.data || [];\n this.isDark = document.body.dataset.theme === 'dark';\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n this.beforeprintEventSet = new Set();\n this.disableScrollEvent = false;\n window.objectFitImages && objectFitImages();\n }\n\n initThemeColor() {\n const $meta = document.querySelector('[name=\"theme-color\"]');\n if (!$meta) {\n return;\n }\n this._themeColorOnSwitchTheme = this._themeColorOnSwitchTheme || (() => {\n $meta.content = this.isDark ? $meta.dataset.dark : $meta.dataset.light;\n });\n this.switchThemeEventSet.add(this._themeColorOnSwitchTheme);\n this._themeColorOnSwitchTheme();\n }\n\n initSVGIcon() {\n this.util.forEach(document.querySelectorAll('[data-svg-src]'), ($icon) => {\n fetch($icon.dataset.svgSrc)\n .then((response) => response.text())\n .then((svg) => {\n const $temp = document.createElement('div');\n $temp.insertAdjacentHTML('afterbegin', svg);\n const $svg = $temp.firstChild;\n $svg.dataset.svgSrc = $icon.dataset.svgSrc\n $svg.classList.add('icon');\n const $titleElements = $svg.getElementsByTagName('title');\n $titleElements.length && $svg.removeChild($titleElements[0]);\n $icon.parentElement.replaceChild($svg, $icon);\n })\n .catch((err) => {\n console.error(err);\n });\n });\n }\n\n initTwemoji() {\n this.config.twemoji && twemoji.parse(document.body);\n }\n\n initMenu() {\n this.initMenuDesktop();\n this.initMenuMobile();\n }\n\n initMenuDesktop() {\n this.util.forEach(document.querySelectorAll('.has-children'), ($item) => {\n $item.querySelector('.sub-menu').style.minWidth = `${$item.offsetWidth - 8}px`;\n });\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', (event) => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n this.disableScrollEvent = document.body.classList.contains('blur');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n // add nested menu toggler\n this.util.forEach(document.querySelectorAll('.menu-item>.nested-item'), ($nestedItem) => {\n $nestedItem.addEventListener('click', function () {\n this.parentNode.querySelector('.sub-menu').classList.toggle('open');\n this.querySelector('.dropdown-icon').classList.toggle('open');\n });\n });\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), ($themeSwitch) => {\n $themeSwitch.addEventListener('click', () => {\n document.body.dataset.theme = document.body.dataset.theme === 'dark' ? 'light' : 'dark';\n this.isDark = !this.isDark;\n window.localStorage?.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) {\n event();\n }\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || (isMobile && this._searchMobileOnce) || (!isMobile && this._searchDesktopOnce)) {\n return;\n }\n // Initialize default search config\n const maxResultLength = searchConfig.maxResultLength ?? 10;\n const snippetLength = searchConfig.snippetLength ?? 50;\n const highlightTag = searchConfig.highlightTag ?? 'em';\n const isCaseSensitive = searchConfig.isCaseSensitive ?? false;\n const minMatchCharLength = searchConfig.minMatchCharLength ?? 1;\n const findAllMatches = searchConfig.findAllMatches ?? false;\n const location = searchConfig.location ?? 0;\n const threshold = searchConfig.threshold ?? 0.3;\n const distance = searchConfig.distance ?? 100;\n const ignoreLocation = searchConfig.ignoreLocation ?? false;\n const useExtendedSearch = searchConfig.useExtendedSearch ?? false;\n const ignoreFieldNorm = searchConfig.ignoreFieldNorm ?? false;\n const suffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${suffix}`);\n const $searchInput = document.getElementById(`search-input-${suffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${suffix}`);\n const $searchLoading = document.getElementById(`search-loading-${suffix}`);\n const $searchClear = document.getElementById(`search-clear-${suffix}`);\n\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n this.disableScrollEvent = true;\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n this.disableScrollEvent = false;\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask ||(() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${suffix}`,\n {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${suffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n debug: true\n },\n {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) {\n query = lunr.queryHandler(query);\n }\n const results = {};\n this._index.search(query).forEach(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { uri, title, content: context } = matchData;\n if (results[uri]) {\n return;\n }\n let position = 0;\n Object.values(metadata).forEach(({ content }) => {\n if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) {\n position = matchPosition;\n }\n }\n });\n position -= snippetLength / 5;\n if (position > 0) {\n position += context.substr(position, 20).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, snippetLength);\n } else {\n context = context.substr(0, snippetLength);\n }\n Object.keys(metadata).forEach((key) => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\n context = context.replace(new RegExp(`(${key})`, 'gi'), `<${highlightTag}>$1`);\n });\n results[uri] = {\n uri: uri,\n title: title,\n date: matchData.date,\n context: context\n };\n });\n return Object.values(results).slice(0, maxResultLength);\n };\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then((response) => response.json())\n .then((data) => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('objectID');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('categories', { boost: 20 });\n this.field('content', { boost: 10 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.objectID] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n })\n .catch((err) => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n this._algoliaIndex =\n this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, {\n offset: 0,\n length: maxResultLength * 8,\n attributesToHighlight: ['title'],\n attributesToSnippet: [`content:${snippetLength}`],\n highlightPreTag: `<${highlightTag}>`,\n highlightPostTag: ``\n })\n .then(({ hits }) => {\n const results = {};\n hits.forEach(({ uri, date, _highlightResult: { title }, _snippetResult: { content } }) => {\n if (results[uri] && results[uri].context.length > content.value) {\n return;\n }\n results[uri] = {\n uri: uri,\n title: title.value,\n date: date,\n context: content.value\n };\n });\n finish(Object.values(results).slice(0, maxResultLength));\n })\n .catch((err) => {\n console.error(err);\n finish([]);\n });\n } else if (searchConfig.type === 'fuse') {\n const search = () => {\n const results = {};\n window._index.search(query).forEach(({ item, refIndex, matches }) => {\n let title = item.title;\n let content = item.content;\n matches.forEach(({ indices, value, key }) => {\n if (key === 'content') {\n let offset = 0;\n for (let i = 0; i < indices.length; i++) {\n const substr = content.substring(indices[i][0] + offset, indices[i][1] + 1 + offset);\n const tag = `<${highlightTag}>` + substr + ``;\n content = content.substring(0, indices[i][0] + offset) + tag + content.substring(indices[i][1] + 1 + offset, content.length);\n offset += highlightTag.length * 2 + 5;\n }\n } else if (key === 'title') {\n let offset = 0;\n for (let i = 0; i < indices.length; i++) {\n const substr = title.substring(indices[i][0] + offset, indices[i][1] + 1 + offset);\n const tag = `<${highlightTag}>` + substr + ``;\n title = title.substring(0, indices[i][0] + offset) + tag + title.substring(indices[i][1] + 1 + offset, content.length);\n offset += highlightTag.length * 2 + 5;\n }\n }\n });\n results[item.uri] = {\n uri: item.uri,\n title: title,\n date: item.date,\n context: content\n };\n });\n return Object.values(results).slice(0, maxResultLength);\n };\n if (!window._index) {\n fetch(searchConfig.fuseIndexURL)\n .then((response) => response.json())\n .then((data) => {\n const options = {\n isCaseSensitive: isCaseSensitive,\n findAllMatches: findAllMatches,\n minMatchCharLength: minMatchCharLength,\n location: location,\n threshold: threshold,\n distance: distance,\n ignoreLocation: ignoreLocation,\n useExtendedSearch: useExtendedSearch,\n ignoreFieldNorm: ignoreFieldNorm,\n includeScore: false,\n shouldSort: true,\n includeMatches: true,\n keys: ['content', 'title']\n };\n window._index = new Fuse(data, options);\n finish(search());\n })\n .catch((err) => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } \n },\n templates: {\n suggestion: ({ title, date, context }) =>\n `
${title}${date}
${context}
`,\n empty: ({ query }) => `
${searchConfig.noResultsFound}: \"${query}\"
`,\n footer: ({}) => {\n const { searchType, icon, href } =\n searchConfig.type === 'algolia'\n ? {\n searchType: 'algolia',\n icon: '',\n href: 'https://www.algolia.com/'\n }\n : (searchConfig.type === 'lunr'\n ? {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/'\n }\n : {\n searchType: 'Fuse.js',\n icon: '',\n href: 'https://fusejs.io/'\n })\n return ``;\n }\n }\n }\n );\n autosearch.on('autocomplete:selected', (_event, suggestion, _dataset, _context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) {\n this._searchMobile = autosearch;\n } else {\n this._searchDesktop = autosearch;\n }\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete') {\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else {\n initAutosearch();\n }\n }\n\n initDetails() {\n this.util.forEach(document.getElementsByClassName('details'), ($details) => {\n const $summary = $details.querySelector('.details-summary');\n $summary.addEventListener('click', () => {\n $details.classList.toggle('open');\n }, false);\n });\n }\n\n initLightGallery() {\n if (this.config.lightgallery) {\n lightGallery(document.getElementById('content'), {\n plugins: [lgThumbnail, lgZoom],\n selector: '.lightgallery',\n speed: 400,\n hideBarsDelay: 2000,\n allowMediaOverlap: true,\n exThumbImage: 'data-thumbnail',\n toggleThumb: true,\n thumbWidth: 80,\n thumbHeight: '60px',\n actualSize: false,\n showZoomInOutIcons: true,\n licenseKey: 'none'\n });\n }\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), ($preChroma) => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), ($chroma) => {\n const $codeElements = $chroma.querySelectorAll('pre.chroma > code');\n if ($codeElements.length) {\n const $code = $codeElements[$codeElements.length - 1];\n const $header = document.createElement('div');\n $header.className = 'code-header ' + $code.className.toLowerCase();\n // code title\n const $title = document.createElement('span');\n $title.classList.add('code-title');\n const hlAttrs = this.data[$chroma.parentNode.id];\n $title.insertAdjacentHTML('afterbegin', `${hlAttrs?.title ?? ''}`);\n $title.addEventListener('click', () => {\n $chroma.classList.toggle('open');\n }, false);\n $header.appendChild($title);\n // ellipses icon\n const $ellipses = document.createElement('span');\n $ellipses.insertAdjacentHTML('afterbegin', '');\n $ellipses.classList.add('ellipses');\n $ellipses.addEventListener('click', () => {\n $chroma.classList.add('open');\n }, false);\n $header.appendChild($ellipses);\n // edit button\n if (this.config.code.editable) {\n const $edit = document.createElement('span');\n $edit.classList.add('edit');\n $edit.insertAdjacentHTML('afterbegin', ``);\n $edit.addEventListener('click', () => {\n const $iconKey = $edit.querySelector('.fa-key');\n const $iconLock = $edit.querySelector('.fa-lock');\n const $preChromas = $edit.parentElement.parentElement.querySelectorAll('pre.chroma');\n const $preChroma = $preChromas.length === 2 ? $preChromas[1] : $preChromas[0];\n if ($iconKey) {\n $iconKey.classList.add('fa-lock');\n $iconKey.classList.remove('fa-key');\n $iconKey.title = this.config.code.editLockTitle;\n $preChroma.setAttribute('contenteditable', true);\n $preChroma.focus();\n } else {\n $iconLock.classList.add('fa-key');\n $iconLock.classList.remove('fa-lock');\n $iconLock.title = this.config.code.editUnLockTitle;\n $preChroma.setAttribute('contenteditable', false);\n $preChroma.blur();\n }\n }, false);\n $header.appendChild($edit);\n }\n // copy button\n if (this.config.code.copyTitle) {\n const $copy = document.createElement('span');\n $copy.insertAdjacentHTML('afterbegin', '');\n $copy.classList.add('copy');\n // remove the leading and trailing whitespace of the code string\n const code = $code.innerText.trim();\n if (this.config.code.maxShownLines < 0 || code.split('\\n').length < this.config.code.maxShownLines + 2) {\n $chroma.classList.add('open');\n }\n $copy.title = this.config.code.copyTitle;\n $copy.addEventListener('click', () => {\n navigator.clipboard.writeText(code).then(() => {\n this.util.animateCSS($code, 'animate__flash');\n }, () => {\n console.error('Clipboard write failed!', 'Your browser does not support clipboard API!');\n });\n }, false);\n $header.appendChild($copy);\n }\n $chroma.insertBefore($header, $chroma.firstChild);\n }\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), ($table) => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.single .content > h' + num), ($header) => {\n $header.classList.add('header-link');\n $header.insertAdjacentHTML('afterbegin', ``);\n });\n }\n }\n /**\n * init table of contents\n */\n initToc() {\n let $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null) {\n return;\n }\n // It's a dirty hack to fix the bug of APlayer, see https://github.com/hugo-fixit/FixIt/issues/292\n if (typeof APlayer === 'function') {\n const $newTocCore = $tocCore.cloneNode(true);\n $tocCore.parentElement.replaceChild($newTocCore, $tocCore);\n $tocCore = $newTocCore;\n }\n if (document.getElementById('toc-static').dataset.kept === true || this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n this._tocOnScroll && this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n $toc.style.visibility = 'visible';\n this.util.animateCSS($toc, ['animate__fadeIn', 'animate__faster'], true);\n const $postMeta = document.querySelector('.post-meta');\n $toc.style.marginTop = `${$postMeta.offsetTop + $postMeta.clientHeight}px`;\n const $tocLinkElements = $tocCore.querySelectorAll('a:first-child');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('header-link');\n const headerIsFixed = document.body.dataset.headerDesktop !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n document.querySelector('.container').addEventListener('resize', () => {\n $toc.style.marginBottom = `${document.querySelector('.container').clientHeight - document.querySelector('.post-footer').offsetTop}px`;\n });\n this._tocOnScroll = this._tocOnScroll || (() => {\n $toc.style.marginBottom = `${document.querySelector('.container').clientHeight - document.querySelector('.post-footer').offsetTop}px`;\n this.util.forEach($tocLinkElements, ($tocLink) => {\n $tocLink.classList.remove('active');\n });\n this.util.forEach($tocLiElements, ($tocLi) => {\n $tocLi.classList.remove('has-active');\n });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING) || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initTocListener() {\n const $toc = document.getElementById('toc-auto');\n const $tocContentAuto = document.getElementById('toc-content-auto');\n document.querySelector('#toc-auto>.toc-title')?.addEventListener('click', () => {\n const animation = ['animate__faster'];\n const tocHidden = $toc.classList.contains('toc-hidden');\n animation.push(tocHidden ? 'animate__fadeIn' : 'animate__fadeOut');\n $tocContentAuto.classList.remove(tocHidden ? 'animate__fadeOut' : 'animate__fadeIn');\n this.util.animateCSS($tocContentAuto, animation, true);\n $toc.classList.toggle('toc-hidden');\n }, false);\n }\n\n initMath() {\n if (this.config.math) {\n renderMathInElement(document.body, this.config.math);\n }\n }\n\n switchMermaidTheme(theme) {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n // TODO perf\n const themes = this.config.mermaid.themes ?? ['default', 'dark', 'neutral'];\n mermaid.initialize({ startOnLoad: false, theme: theme ?? (this.isDark ? themes[1] : themes[0]), securityLevel: 'loose' });\n this.util.forEach($mermaidElements, $mermaid => {\n mermaid.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\n $mermaid.innerHTML = svgCode;\n }, $mermaid);\n });\n }\n };\n\n initMermaid() {\n this.switchMermaidTheme();\n this.switchThemeEventSet.add(() => { this.switchMermaidTheme(); });\n this.beforeprintEventSet.add(() => { this.switchMermaidTheme('neutral'); });\n }\n\n initEcharts() {\n if (!this.config.echarts) {\n return;\n }\n echarts.registerTheme('light', this.config.echarts.lightTheme);\n echarts.registerTheme('dark', this.config.echarts.darkTheme);\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), ($echarts) => {\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'light', { renderer: 'svg' });\n chart.setOption(JSON.parse(this.data[$echarts.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), ($mapbox) => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\n const mapbox = new mapboxgl.Map({\n container: $mapbox,\n center: [lng, lat],\n zoom: zoom,\n minZoom: 0.2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(\n new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true\n },\n showUserLocation: true,\n trackUserLocation: true\n }),\n 'bottom-right'\n );\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, (mapbox) => {\n const $mapbox = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n const typeitConfig = this.config.typeit;\n const speed = typeitConfig.speed || 100;\n const cursorSpeed = typeitConfig.cursorSpeed || 1000;\n const cursorChar = typeitConfig.cursorChar || '|';\n const loop = typeitConfig.loop ?? false;\n Object.values(typeitConfig.data).forEach((group) => {\n const typeone = (i) => {\n const id = group[i];\n const shortcodeLoop = document.querySelector(`#${id}`).parentElement.dataset.loop;\n const instance = new TypeIt(`#${id}`, {\n strings: this.data[id],\n speed: speed,\n lifeLike: true,\n cursorSpeed: cursorSpeed,\n cursorChar: cursorChar,\n waitUntilVisible: true,\n loop: shortcodeLoop ? JSON.parse(shortcodeLoop) : loop,\n afterComplete: () => {\n if (i === group.length - 1) {\n if (typeitConfig.duration >= 0) {\n window.setTimeout(() => {\n instance.destroy();\n }, typeitConfig.duration);\n }\n return;\n }\n instance.destroy();\n typeone(i + 1);\n }\n }).go();\n };\n typeone(0);\n });\n }\n }\n\n initCommentLightGallery(comments, images) {\n document.querySelectorAll(comments).forEach(($content) => {\n const $imgs = $content.querySelectorAll(images + ':not([lightgallery-loaded])');\n $imgs.forEach(($img) => {\n $img.setAttribute('lightgallery-loaded', '');\n const $link = document.createElement('a');\n $link.setAttribute('class', 'comment-lightgallery');\n $link.setAttribute('href', $img.src);\n $link.append($img.cloneNode());\n $img.replaceWith($link);\n });\n if ($imgs.length) {\n lightGallery($content, {\n selector: '.comment-lightgallery',\n actualSize: false,\n hideBarsDelay: 2000,\n speed: 400\n });\n }\n });\n }\n\n initComment() {\n if (!this.config.comment?.enable) {\n return;\n }\n // whether to show the view comments button\n if (document.querySelector('#comments')) {\n const $viewCommentsBtn = document.querySelector('.view-comments');\n $viewCommentsBtn.classList.remove('d-none');\n // view comments button click event\n $viewCommentsBtn.addEventListener('click', () => {\n this.util.scrollIntoView('#comments');\n }, false);\n }\n this.config.comment.expired && document.querySelector('#comments').remove();\n if (this.config.comment.artalk) {\n if (this.config.comment.expired) {\n return Artalk.LoadCountWidget({\n server: this.config.comment.artalk.server,\n site: this.config.comment.artalk.site,\n pvEl: this.config.comment.artalk.pvEl,\n countEl: this.config.comment.artalk.countEl\n })\n }\n const artalk = Artalk.init(this.config.comment.artalk);\n artalk.setDarkMode(this.isDark);\n this.switchThemeEventSet.add(() => {\n artalk.setDarkMode(this.isDark);\n });\n artalk.on('comments-loaded', () => {\n this.config.comment.artalk.lightgallery && this.initCommentLightGallery('.atk-comment .atk-content', 'img:not([atk-emoticon])');\n });\n return artalk;\n }\n if (this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk);\n gitalk.render('gitalk');\n return gitalk;\n }\n if (this.config.comment.valine) {\n return new Valine(this.config.comment.valine);\n }\n if (this.config.comment.waline) {\n if (this.config.comment.expired) {\n this.config.comment.waline.pageview && Waline.pageviewCount({\n serverURL: this.config.comment.waline.serverURL,\n path: window.location.pathname\n });\n return;\n }\n return Waline.init(this.config.comment.waline);\n }\n if (this.config.comment.utterances) {\n const utterancesConfig = this.config.comment.utterances;\n const script = document.createElement('script');\n script.src = 'https://utteranc.es/client.js';\n script.setAttribute('repo', utterancesConfig.repo);\n script.setAttribute('issue-term', utterancesConfig.issueTerm);\n if (utterancesConfig.label) script.setAttribute('label', utterancesConfig.label);\n script.setAttribute('theme', this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme);\n script.crossOrigin = 'anonymous';\n script.async = true;\n document.getElementById('utterances').appendChild(script);\n this._utterancesOnSwitchTheme = this._utterancesOnSwitchTheme || (() => {\n const message = {\n type: 'set-theme',\n theme: this.isDark ? utterancesConfig.darkTheme : utterancesConfig.lightTheme\n };\n document.querySelector('.utterances-frame')?.contentWindow.postMessage(message, 'https://utteranc.es');\n });\n this.switchThemeEventSet.add(this._utterancesOnSwitchTheme);\n return;\n }\n if (this.config.comment.twikoo) {\n const twikooConfig = this.config.comment.twikoo;\n if (twikooConfig.lightgallery) {\n twikooConfig.onCommentLoaded = () => {\n this.initCommentLightGallery('.tk-comments .tk-content', 'img:not(.tk-owo-emotion)');\n };\n }\n twikoo.init(twikooConfig);\n if (twikooConfig.commentCount) {\n // https://twikoo.js.org/api.html#get-comments-count\n twikoo\n .getCommentsCount({\n envId: twikooConfig.envId,\n region: twikooConfig.region,\n urls: [window.location.pathname],\n includeReply: false\n })\n .then(function (response) {\n const twikooCommentCount = document.getElementById('twikoo-comment-count');\n if (twikooCommentCount) twikooCommentCount.innerHTML = response[0].count;\n });\n }\n return;\n }\n if (this.config.comment.giscus) {\n const giscusConfig = this.config.comment.giscus;\n this._giscusOnSwitchTheme = this._giscusOnSwitchTheme || (() => {\n const message = { setConfig: { theme: this.isDark ? giscusConfig.darkTheme : giscusConfig.lightTheme }};\n document.querySelector('.giscus-frame')?.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');\n });\n this.switchThemeEventSet.add(this._giscusOnSwitchTheme);\n this.giscus2parentMsg = window.addEventListener('message', (event) => {\n const $script = document.querySelector('#giscus>script');\n if ($script){\n this._giscusOnSwitchTheme();\n $script.parentElement.removeChild($script);\n }\n }, { once: true });\n return;\n }\n }\n\n initCookieconsent() {\n this.config.cookieconsent && cookieconsent.initialise(this.config.cookieconsent);\n }\n\n getSiteTime = () => {\n let now = new Date();\n let run = new Date(this.config.siteTime);\n let $runTimes = document.querySelector('.run-times');\n if (!this.util.isValidDate(run) || !$runTimes) {\n clearInterval(this.siteTime);\n $runTimes && $runTimes.parentNode.remove();\n return;\n }\n let runTime = (now - run) / 1000,\n days = Math.floor(runTime / 60 / 60 / 24),\n hours = Math.floor(runTime / 60 / 60 - 24 * days),\n minutes = Math.floor(runTime / 60 - 24 * 60 * days - 60 * hours),\n seconds = Math.floor((now - run) / 1000 - 24 * 60 * 60 * days - 60 * 60 * hours - 60 * minutes);\n $runTimes.innerHTML = `${days}, ${String(hours).padStart(2, 0)}:${String(minutes).padStart(2, 0)}:${String(seconds).padStart(2, 0)}`;\n document.querySelector('.site-time .d-none')?.classList.remove('d-none');\n };\n\n initSiteTime() {\n if (this.config.siteTime) {\n this.siteTime = setInterval(this.getSiteTime, 500);\n document.addEventListener('visibilitychange', () => {\n if (document.hidden) {\n return clearInterval(this.siteTime);\n }\n this.siteTime = setInterval(this.getSiteTime, 500);\n }, false);\n }\n }\n\n initServiceWorker() {\n if (this.config.enablePWA && 'serviceWorker' in navigator) {\n navigator.serviceWorker\n .register('/service-worker.min.js', { scope: '/' })\n .then(function (registration) {\n // console.log('Service Worker Registered');\n })\n .catch(function (error) {\n console.error('error: ', error);\n });\n navigator.serviceWorker\n .ready\n .then(function (registration) {\n // console.log('Service Worker Ready');\n });\n }\n }\n\n initWatermark() {\n this.config.watermark?.enable &&\n new Watermark({\n content: this.config.watermark.content || `${document.querySelector('footer .fixit-icon')?.outerHTML ?? ''} FixIt Theme`,\n appendTo: this.config.watermark.appendto || '.wrapper>main',\n opacity: this.config.watermark.opacity,\n width: this.config.watermark.width,\n height: this.config.watermark.height,\n rowSpacing: this.config.watermark.rowspacing,\n colSpacing: this.config.watermark.colspacing,\n rotate: this.config.watermark.rotate,\n fontSize: this.config.watermark.fontsize,\n fontFamily: this.config.watermark.fontfamily\n });\n }\n\n initPangu() {\n if (!this.config.pangu?.enable) {\n return;\n }\n const selector = this.config.pangu.selector;\n if (selector) {\n if (selector.startsWith('#')) {\n pangu.spacingElementById(selector.slice(1));\n } else if (selector.startsWith('.')) {\n pangu.spacingElementByClassName(selector.slice(1));\n } else {\n pangu.spacingElementByTagName(selector)\n }\n return;\n }\n pangu.autoSpacingPage();\n }\n\n initFixItDecryptor() {\n const $tocNodes = document.querySelectorAll('#toc-auto>.d-none, #toc-static.d-none');\n this.decryptor = new FixItDecryptor({\n decrypted: () => {\n this.initTwemoji();\n this.initDetails();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initMapbox();\n this.util.forEach($tocNodes, ($element) => {\n $element.classList.remove('d-none');\n });\n this.initToc();\n this.initTocListener();\n this.initPangu();\n },\n reset: () => {\n this.util.forEach($tocNodes, ($element) => {\n $element.classList.add('d-none');\n });\n }\n });\n if (this.config.encryption?.shortcode) {\n this.decryptor.addEventListener('decrypted', () => {\n this.decryptor.initShortcodes();\n })\n this.decryptor.initShortcodes();\n }\n this.config.encryption?.all && this.decryptor.init();\n }\n\n initMDevtools() {\n const type = this.config?.mDevtools;\n if (typeof window.orientation === 'undefined') {\n return;\n }\n if (type === 'vConsole') {\n const vConsole = new VConsole({\n target: '.widgets',\n theme: this.isDark ? 'dark' : 'light'\n });\n this._vConsoleOnSwitchTheme = this._vConsoleOnSwitchTheme || (() => {\n vConsole.setOption('theme', this.isDark ? 'dark' : 'light');\n });\n this.switchThemeEventSet.add(this._vConsoleOnSwitchTheme);\n }\n if(type === 'eruda') {\n eruda.init({\n defaults: { theme: this.isDark ? 'Dark' : 'Light' }\n });\n this._erudaOnSwitchTheme = this._erudaOnSwitchTheme || (() => {\n eruda.util.evalCss.setTheme(this.isDark ? 'Dark' : 'Light');\n });\n this.switchThemeEventSet.add(this._erudaOnSwitchTheme);\n }\n }\n\n initAutoMark() {\n if (!this.config.autoBookmark) {\n return;\n }\n window.addEventListener('beforeunload', () => {\n window.localStorage?.setItem(`fixit-bookmark/#${location.pathname}`, this.util.getScrollTop());\n });\n const scrollTop = Number(window.localStorage?.getItem(`fixit-bookmark/#${location.pathname}`));\n // If the page opens with a specific hash, just jump out\n if (scrollTop && location.hash === '') {\n window.scrollTo({ \n top: scrollTop,\n behavior: 'smooth'\n });\n }\n }\n\n initReward() {\n const $rewards = document.querySelectorAll('.post-reward [data-mode=\"fixed\"]');\n if (!$rewards.length) {\n return;\n }\n // `fixed` mode only supports desktop\n if (this.util.isMobile()) {\n this.util.forEach($rewards, ($reward) => {\n $reward.removeAttribute('data-mode');\n });\n return;\n }\n // Close post reward images exclude special id\n const _closeRewardExclude = (id) => {\n this.util.forEach($rewards, ($reward) => {\n const $rewardInput = $reward.parentElement.querySelector('.reward-input');\n if ($rewardInput.id !== id) {\n $rewardInput.checked = false;\n }\n });\n };\n // Add additional click event to reward buttons\n this.util.forEach($rewards, ($reward) => {\n $reward.previousElementSibling.addEventListener('click', function () {\n _closeRewardExclude(this.getAttribute('for'));\n }, false)\n });\n this.scrollEventSet.add(_closeRewardExclude);\n }\n\n onScroll() {\n const $headers = [];\n const ACCURACY = 20;\n const $fixedButtons = document.querySelector('.fixed-buttons');\n const $backToTop = document.querySelector('.back-to-top');\n const $readingProgressBar = document.querySelector('.reading-progress-bar');\n let scrollTimer = void 0;\n if (document.body.dataset.headerDesktop === 'auto') {\n $headers.push(document.getElementById('header-desktop'));\n }\n if (document.body.dataset.headerMobile === 'auto') {\n $headers.push(document.getElementById('header-mobile'));\n }\n // b2t button click event\n $backToTop?.addEventListener('click', () => {\n this.util.scrollIntoView('body');\n });\n window.addEventListener('scroll', (event) => {\n if (this.disableScrollEvent) {\n event.preventDefault();\n return;\n }\n const $mask = document.getElementById('mask');\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n // body scrollbar style\n document.body.toggleAttribute('data-scroll', true);\n scrollTimer && window.clearTimeout(scrollTimer);\n scrollTimer = window.setTimeout(() => {\n document.body.toggleAttribute('data-scroll');\n }, 500);\n // header animation\n this.util.forEach($headers, ($header) => {\n if (scroll > ACCURACY) {\n $header.classList.remove('animate__fadeInDown');\n this.util.animateCSS($header, ['animate__fadeOutUp'], true);\n $mask.click();\n } else if (scroll < -ACCURACY) {\n $header.classList.remove('animate__fadeOutUp');\n this.util.animateCSS($header, ['animate__fadeInDown'], true);\n $mask.click();\n }\n });\n const contentHeight = document.body.scrollHeight - window.innerHeight;\n const scrollPercent = Math.max(Math.min(100 * Math.max(this.newScrollTop, 0) / contentHeight, 100), 0);\n if ($readingProgressBar) {\n $readingProgressBar.style.setProperty('--progress', `${scrollPercent.toFixed(2)}%`);\n }\n // whether to show fixed buttons\n if ($fixedButtons) {\n if (scrollPercent > 1) {\n $fixedButtons.classList.remove('d-none', 'animate__fadeOut');\n this.util.animateCSS($fixedButtons, ['animate__fadeIn'], true);\n } else {\n $fixedButtons.classList.remove('animate__fadeIn');\n this.util.animateCSS($fixedButtons, ['animate__fadeOut'], true, () => {\n $fixedButtons.classList.contains('animate__fadeOut') && $fixedButtons.classList.add('d-none');\n });\n }\n if ($backToTop) {\n $backToTop.querySelector('span').innerText = `${Math.round(scrollPercent)}%`;\n }\n }\n for (let event of this.scrollEventSet) {\n event();\n }\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n let resizeBefore = this.util.isMobile();\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) {\n event();\n }\n this.initToc();\n this.switchMermaidTheme();\n this.initSearch();\n\n const isMobile = this.util.isMobile()\n if (isMobile !== resizeBefore) {\n document.getElementById('mask').click();\n resizeBefore = isMobile;\n }\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n if (!document.body.classList.contains('blur')) {\n return;\n }\n for (let event of this.clickMaskEventSet) {\n event();\n }\n this.disableScrollEvent = false;\n document.body.classList.remove('blur');\n }, false);\n }\n\n beforeprint() {\n window.addEventListener('beforeprint', () => {\n this.util.forEach(document.querySelectorAll('.chroma'), ($el) => {\n $el.classList.toggle('open', true)\n });\n for (let event of this.beforeprintEventSet) {\n event();\n }\n }, false);\n }\n\n init() {\n try {\n if (this.config.encryption) {\n this.initFixItDecryptor();\n } else if (!this.config.encryption?.all) {\n this.initTwemoji();\n this.initDetails();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initMapbox();\n this.initPangu();\n }\n this.initThemeColor();\n this.initSVGIcon();\n this.initMenu();\n this.initSwitchTheme();\n this.initSearch();\n this.initCookieconsent();\n this.initSiteTime();\n this.initServiceWorker();\n this.initWatermark();\n this.initMDevtools();\n this.initAutoMark();\n this.initReward();\n\n window.setTimeout(() => {\n this.initComment();\n if (!this.config.encryption?.all) {\n this.initToc();\n this.initTocListener();\n }\n this.onScroll();\n this.onResize();\n this.onClickMask();\n this.beforeprint();\n }, 100);\n } catch (err) {\n console.error(err);\n }\n }\n}\n\nconst themeInit = () => {\n window.fixit = new FixIt();\n window.fixit.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"],"mappings":"mnHAAM,CAAAA,IAAI,qBAAAA,KAAA,EAAAC,eAAA,MAAAD,IAAA,EAAAE,YAAA,CAAAF,IAAA,GAAAG,GAAA,WAAAC,KAAA,CACR,SAAAC,QAAQC,QAAQ,CAAEC,OAAO,CAAE,CACzBD,QAAQ,CAAGA,QAAQ,EAAI,EAAE,CACzB,IAAK,GAAI,CAAAE,CAAC,CAAG,CAAC,CAAEA,CAAC,CAAGF,QAAQ,CAACG,MAAM,CAAED,CAAC,EAAE,CAAE,CACxCD,OAAO,CAACD,QAAQ,CAACE,CAAC,CAAC,CACrB,CACF,CAAC,GAAAL,GAAA,gBAAAC,KAAA,CAED,SAAAM,aAAA,CAAe,KAAAC,qBAAA,CACb,MAAO,EAAAA,qBAAA,CAACC,QAAQ,CAACC,eAAe,UAAAF,qBAAA,UAAAA,qBAAA,CAAIC,QAAQ,CAACE,IAAI,EAAEC,SACrD,CAAC,GAAAZ,GAAA,YAAAC,KAAA,CAED,SAAAY,SAAA,CAAW,CACT,MAAO,CAAAC,MAAM,CAACC,UAAU,CAAC,oCAAoC,CAAC,CAACC,OACjE,CAAC,GAAAhB,GAAA,eAAAC,KAAA,CAED,SAAAgB,YAAA,CAAc,CACZ,MAAO,CAAAH,MAAM,CAACC,UAAU,CAAC,oCAAoC,CAAC,CAACC,OACjE,CAAC,GAAAhB,GAAA,cAAAC,KAAA,CASD,SAAAiB,WAAWC,OAAO,CAAEC,SAAS,CAAEC,QAAQ,CAAEC,QAAQ,CAAE,KAAAC,kBAAA,CACjD,CAACC,KAAK,CAACC,OAAO,CAACL,SAAS,CAAC,GAAKA,SAAS,CAAG,CAACA,SAAS,CAAC,CAAC,CACtD,CAAAG,kBAAA,CAAAJ,OAAO,CAACO,SAAS,EAACC,GAAG,CAAAC,KAAA,CAAAL,kBAAA,EAAC,mBAAmB,EAAAM,MAAA,CAAAC,kBAAA,CAAKV,SAAS,GAAC,CACxDD,OAAO,CAACY,gBAAgB,CAAC,cAAc,CAAE,UAAM,KAAAC,mBAAA,CAC7C,CAACX,QAAQ,EAAI,CAAAW,mBAAA,CAAAb,OAAO,CAACO,SAAS,EAACO,MAAM,CAAAL,KAAA,CAAAI,mBAAA,EAAC,mBAAmB,EAAAH,MAAA,CAAAC,kBAAA,CAAKV,SAAS,GAAC,CACxE,MAAO,CAAAE,QAAQ,GAAK,UAAU,EAAIA,QAAQ,EAC5C,CAAC,CAAE,CAAEY,IAAI,CAAE,IAAK,CAAC,CACnB,CAAC,GAAAlC,GAAA,eAAAC,KAAA,CAOD,SAAAkC,YAAYC,IAAI,CAAE,CAChB,MAAO,CAAAA,IAAI,WAAY,CAAAC,IAAI,EAAI,CAACC,KAAK,CAACF,IAAI,CAACG,OAAO,EAAE,CACtD,CAAC,GAAAvC,GAAA,kBAAAC,KAAA,CAMD,SAAAuC,eAAeC,QAAQ,CAAE,CACvB,GAAM,CAAAtB,OAAO,CAAGsB,QAAQ,CAACC,UAAU,CAAC,GAAG,CAAC,CACpCjC,QAAQ,CAACkC,cAAc,CAACF,QAAQ,CAACG,KAAK,CAAC,CAAC,CAAC,CAAC,CAC1CnC,QAAQ,CAACoC,aAAa,CAACJ,QAAQ,CAAC,CACpCtB,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEqB,cAAc,CAAC,CACtBM,QAAQ,CAAE,QACZ,CAAC,CACH,CAAC,WAAAjD,IAAA,OAGG,CAAAkD,KAAK,YACT,SAAAA,MAAA,CAAc,KAAAC,KAAA,MAAAlD,eAAA,MAAAiD,KAAA,EAAAE,eAAA,oBA45BA,UAAM,KAAAC,qBAAA,CAClB,GAAI,CAAAC,GAAG,CAAG,GAAI,CAAAd,IAAM,CACpB,GAAI,CAAAe,GAAG,CAAG,GAAI,CAAAf,IAAI,CAACW,KAAI,CAACK,MAAM,CAACC,QAAQ,CAAC,CACxC,GAAI,CAAAC,SAAS,CAAG9C,QAAQ,CAACoC,aAAa,CAAC,YAAY,CAAC,CACpD,GAAI,CAACG,KAAI,CAACQ,IAAI,CAACrB,WAAW,CAACiB,GAAG,CAAC,EAAI,CAACG,SAAS,CAAE,CAC7CE,aAAa,CAACT,KAAI,CAACM,QAAQ,CAAC,CAC5BC,SAAS,EAAIA,SAAS,CAACG,UAAU,CAACzB,MAAM,EAAE,CAC1C,MACF,CACA,GAAI,CAAA0B,OAAO,CAAG,CAACR,GAAG,CAAGC,GAAG,EAAI,IAAI,CAC9BQ,IAAI,CAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAG,EAAE,CAAG,EAAE,CAAG,EAAE,CAAC,CACzCI,KAAK,CAAGF,IAAI,CAACC,KAAK,CAACH,OAAO,CAAG,EAAE,CAAG,EAAE,CAAG,EAAE,CAAGC,IAAI,CAAC,CACjDI,OAAO,CAAGH,IAAI,CAACC,KAAK,CAACH,OAAO,CAAG,EAAE,CAAG,EAAE,CAAG,EAAE,CAAGC,IAAI,CAAG,EAAE,CAAGG,KAAK,CAAC,CAChEE,OAAO,CAAGJ,IAAI,CAACC,KAAK,CAAC,CAACX,GAAG,CAAGC,GAAG,EAAI,IAAI,CAAG,EAAE,CAAG,EAAE,CAAG,EAAE,CAAGQ,IAAI,CAAG,EAAE,CAAG,EAAE,CAAGG,KAAK,CAAG,EAAE,CAAGC,OAAO,CAAC,CACjGT,SAAS,CAACW,SAAS,IAAArC,MAAA,CAAM+B,IAAI,OAAA/B,MAAA,CAAKsC,MAAM,CAACJ,KAAK,CAAC,CAACK,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAC,MAAAvC,MAAA,CAAIsC,MAAM,CAACH,OAAO,CAAC,CAACI,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAC,MAAAvC,MAAA,CAAIsC,MAAM,CAACF,OAAO,CAAC,CAACG,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CACpI,CAAAlB,qBAAA,CAAAzC,QAAQ,CAACoC,aAAa,CAAC,oBAAoB,CAAC,UAAAK,qBAAA,iBAA5CA,qBAAA,CAA8CxB,SAAS,CAACO,MAAM,CAAC,QAAQ,CACzE,CAAC,EA36BC,IAAI,CAACoB,MAAM,CAAGvC,MAAM,CAACuC,MAAM,CAC3B,IAAI,CAACgB,IAAI,CAAG,IAAI,CAAChB,MAAM,CAACgB,IAAI,EAAI,EAAE,CAClC,IAAI,CAACC,MAAM,CAAG7D,QAAQ,CAACE,IAAI,CAAC4D,OAAO,CAACC,KAAK,GAAK,MAAM,CACpD,IAAI,CAAChB,IAAI,CAAG,GAAI,CAAA3D,IAAM,CACtB,IAAI,CAAC4E,YAAY,CAAG,IAAI,CAACjB,IAAI,CAACjD,YAAY,EAAE,CAC5C,IAAI,CAACmE,YAAY,CAAG,IAAI,CAACD,YAAY,CACrC,IAAI,CAACE,cAAc,CAAG,GAAI,CAAAC,GAAK,CAC/B,IAAI,CAACC,cAAc,CAAG,GAAI,CAAAD,GAAK,CAC/B,IAAI,CAACE,mBAAmB,CAAG,GAAI,CAAAF,GAAK,CACpC,IAAI,CAACG,iBAAiB,CAAG,GAAI,CAAAH,GAAK,CAClC,IAAI,CAACI,mBAAmB,CAAG,GAAI,CAAAJ,GAAK,CACpC,IAAI,CAACK,kBAAkB,CAAG,KAAK,CAC/BnE,MAAM,CAACoE,eAAe,EAAIA,eAAe,EAC3C,CAACnF,YAAA,CAAAgD,KAAA,GAAA/C,GAAA,kBAAAC,KAAA,CAED,SAAAkF,eAAA,CAAiB,KAAAC,MAAA,MACf,GAAM,CAAAC,KAAK,CAAG5E,QAAQ,CAACoC,aAAa,CAAC,wBAAsB,CAAC,CAC5D,GAAI,CAACwC,KAAK,CAAE,CACV,MACF,CACA,IAAI,CAACC,wBAAwB,CAAG,IAAI,CAACA,wBAAwB,EAAK,UAAM,CACtED,KAAK,CAACE,OAAO,CAAGH,MAAI,CAACd,MAAM,CAAGe,KAAK,CAACd,OAAO,CAACiB,IAAI,CAAGH,KAAK,CAACd,OAAO,CAACkB,KACnE,CAAE,CACF,IAAI,CAACX,mBAAmB,CAACnD,GAAG,CAAC,IAAI,CAAC2D,wBAAwB,CAAC,CAC3D,IAAI,CAACA,wBAAwB,EAC/B,CAAC,GAAAtF,GAAA,eAAAC,KAAA,CAED,SAAAyF,YAAA,CAAc,CACZ,IAAI,CAAClC,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,gBAAgB,CAAC,CAAE,SAACC,KAAK,CAAK,CACxEC,KAAK,CAACD,KAAK,CAACrB,OAAO,CAACuB,MAAM,CAAC,CACxBC,IAAI,CAAC,SAACC,QAAQ,QAAK,CAAAA,QAAQ,CAACC,IAAI,EAAE,EAAC,CACnCF,IAAI,CAAC,SAACG,GAAG,CAAK,CACb,GAAM,CAAAC,KAAK,CAAG1F,QAAQ,CAAC2F,aAAa,CAAC,KAAK,CAAC,CAC3CD,KAAK,CAACE,kBAAkB,CAAC,YAAY,CAAEH,GAAG,CAAC,CAC3C,GAAM,CAAAI,IAAI,CAAGH,KAAK,CAACI,UAAU,CAC7BD,IAAI,CAAC/B,OAAO,CAACuB,MAAM,CAAGF,KAAK,CAACrB,OAAO,CAACuB,MAAM,CAC1CQ,IAAI,CAAC5E,SAAS,CAACC,GAAG,CAAC,MAAM,CAAC,CAC1B,GAAM,CAAA6E,cAAc,CAAGF,IAAI,CAACG,oBAAoB,CAAC,OAAO,CAAC,CACzDD,cAAc,CAAClG,MAAM,EAAIgG,IAAI,CAACI,WAAW,CAACF,cAAc,CAAC,CAAC,CAAC,CAAC,CAC5DZ,KAAK,CAACe,aAAa,CAACC,YAAY,CAACN,IAAI,CAAEV,KAAK,CAC9C,CAAC,CAAC,CACDiB,KAAK,CAAC,SAACC,GAAG,CAAK,CACdC,OAAO,CAACC,KAAK,CAACF,GAAG,CACnB,CAAC,CACL,CAAC,CACH,CAAC,GAAA9G,GAAA,eAAAC,KAAA,CAED,SAAAgH,YAAA,CAAc,CACZ,IAAI,CAAC5D,MAAM,CAAC6D,OAAO,EAAIA,OAAO,CAACC,KAAK,CAAC1G,QAAQ,CAACE,IAAI,CACpD,CAAC,GAAAX,GAAA,YAAAC,KAAA,CAED,SAAAmH,SAAA,CAAW,CACT,IAAI,CAACC,eAAe,EAAE,CACtB,IAAI,CAACC,cAAc,EACrB,CAAC,GAAAtH,GAAA,mBAAAC,KAAA,CAED,SAAAoH,gBAAA,CAAkB,CAChB,IAAI,CAAC7D,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,eAAe,CAAC,CAAE,SAAC4B,KAAK,CAAK,CACvEA,KAAK,CAAC1E,aAAa,CAAC,WAAW,CAAC,CAAC2E,KAAK,CAACC,QAAQ,IAAA5F,MAAA,CAAM0F,KAAK,CAACG,WAAW,CAAG,CAAC,MAC5E,CAAC,CACH,CAAC,GAAA1H,GAAA,kBAAAC,KAAA,CAED,SAAAqH,eAAA,CAAiB,KAAAK,MAAA,MACf,GAAM,CAAAC,iBAAiB,CAAGnH,QAAQ,CAACkC,cAAc,CAAC,oBAAoB,CAAC,CACvE,GAAM,CAAAkF,WAAW,CAAGpH,QAAQ,CAACkC,cAAc,CAAC,aAAa,CAAC,CAC1DiF,iBAAiB,CAAC7F,gBAAgB,CAAC,OAAO,CAAE,SAAC+F,KAAK,CAAK,CACrDrH,QAAQ,CAACE,IAAI,CAACe,SAAS,CAACqG,MAAM,CAAC,MAAM,CAAC,CACtCH,iBAAiB,CAAClG,SAAS,CAACqG,MAAM,CAAC,QAAQ,CAAC,CAC5CF,WAAW,CAACnG,SAAS,CAACqG,MAAM,CAAC,QAAQ,CAAC,CACtCJ,MAAI,CAAC1C,kBAAkB,CAAGxE,QAAQ,CAACE,IAAI,CAACe,SAAS,CAACsG,QAAQ,CAAC,MAAM,CACnE,CAAC,CAAE,KAAK,CAAC,CACT,IAAI,CAACC,sBAAsB,CAAG,IAAI,CAACA,sBAAsB,EAAK,UAAM,CAClEL,iBAAiB,CAAClG,SAAS,CAACO,MAAM,CAAC,QAAQ,CAAC,CAC5C4F,WAAW,CAACnG,SAAS,CAACO,MAAM,CAAC,QAAQ,CACvC,CAAE,CACF,IAAI,CAAC8C,iBAAiB,CAACpD,GAAG,CAAC,IAAI,CAACsG,sBAAsB,CAAC,CAEvD,IAAI,CAACzE,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,yBAAyB,CAAC,CAAE,SAACuC,WAAW,CAAK,CACvFA,WAAW,CAACnG,gBAAgB,CAAC,OAAO,CAAE,UAAY,CAChD,IAAI,CAAC2B,UAAU,CAACb,aAAa,CAAC,WAAW,CAAC,CAACnB,SAAS,CAACqG,MAAM,CAAC,MAAM,CAAC,CACnE,IAAI,CAAClF,aAAa,CAAC,gBAAgB,CAAC,CAACnB,SAAS,CAACqG,MAAM,CAAC,MAAM,CAC9D,CAAC,CACH,CAAC,CACH,CAAC,GAAA/H,GAAA,mBAAAC,KAAA,CAED,SAAAkI,gBAAA,CAAkB,KAAAC,MAAA,MAChB,IAAI,CAAC5E,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAAC4H,sBAAsB,CAAC,cAAc,CAAC,CAAE,SAACC,YAAY,CAAK,CACnFA,YAAY,CAACvG,gBAAgB,CAAC,OAAO,CAAE,UAAM,KAAAwG,oBAAA,CAC3C9H,QAAQ,CAACE,IAAI,CAAC4D,OAAO,CAACC,KAAK,CAAG/D,QAAQ,CAACE,IAAI,CAAC4D,OAAO,CAACC,KAAK,GAAK,MAAM,CAAG,OAAO,CAAG,MAAM,CACvF4D,MAAI,CAAC9D,MAAM,CAAG,CAAC8D,MAAI,CAAC9D,MAAM,CAC1B,CAAAiE,oBAAA,CAAAzH,MAAM,CAAC0H,YAAY,UAAAD,oBAAA,iBAAnBA,oBAAA,CAAqBE,OAAO,CAAC,OAAO,CAAEL,MAAI,CAAC9D,MAAM,CAAG,MAAM,CAAG,OAAO,CAAC,CAAC,IAAAoE,SAAA,CAAAC,0BAAA,CACpDP,MAAI,CAACtD,mBAAmB,EAAA8D,KAAA,KAA1C,IAAAF,SAAA,CAAAG,CAAA,KAAAD,KAAA,CAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,EAA4C,IAAnC,CAAAjB,KAAK,CAAAc,KAAA,CAAA3I,KAAA,CACZ6H,KAAK,EACP,CAAC,OAAAhB,GAAA,EAAA4B,SAAA,CAAAM,CAAA,CAAAlC,GAAA,UAAA4B,SAAA,CAAAO,CAAA,GACH,CAAC,CAAE,KAAK,CACV,CAAC,CACH,CAAC,GAAAjJ,GAAA,cAAAC,KAAA,CAED,SAAAiJ,WAAA,CAAa,KAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,qBAAA,CAAAC,MAAA,MACX,GAAM,CAAAC,YAAY,CAAG,IAAI,CAAC3G,MAAM,CAAC4G,MAAM,CACvC,GAAM,CAAApJ,QAAQ,CAAG,IAAI,CAAC2C,IAAI,CAAC3C,QAAQ,EAAE,CACrC,GAAI,CAACmJ,YAAY,EAAKnJ,QAAQ,EAAI,IAAI,CAACqJ,iBAAkB,EAAK,CAACrJ,QAAQ,EAAI,IAAI,CAACsJ,kBAAmB,CAAE,CACnG,MACF,CAEA,GAAM,CAAAC,eAAe,EAAAjB,qBAAA,CAAGa,YAAY,CAACI,eAAe,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,EAAE,CAC1D,GAAM,CAAAkB,aAAa,EAAAjB,qBAAA,CAAGY,YAAY,CAACK,aAAa,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,EAAE,CACtD,GAAM,CAAAkB,YAAY,EAAAjB,qBAAA,CAAGW,YAAY,CAACM,YAAY,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,IAAI,CACtD,GAAM,CAAAkB,eAAe,EAAAjB,qBAAA,CAAGU,YAAY,CAACO,eAAe,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,KAAK,CAC7D,GAAM,CAAAkB,kBAAkB,EAAAjB,qBAAA,CAAGS,YAAY,CAACQ,kBAAkB,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,CAAC,CAC/D,GAAM,CAAAkB,cAAc,EAAAjB,qBAAA,CAAGQ,YAAY,CAACS,cAAc,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,KAAK,CAC3D,GAAM,CAAAkB,QAAQ,EAAAjB,qBAAA,CAAGO,YAAY,CAACU,QAAQ,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,CAAC,CAC3C,GAAM,CAAAkB,SAAS,EAAAjB,qBAAA,CAAGM,YAAY,CAACW,SAAS,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,GAAG,CAC/C,GAAM,CAAAkB,QAAQ,EAAAjB,qBAAA,CAAGK,YAAY,CAACY,QAAQ,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,GAAG,CAC7C,GAAM,CAAAkB,cAAc,EAAAjB,qBAAA,CAAGI,YAAY,CAACa,cAAc,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,KAAK,CAC3D,GAAM,CAAAkB,iBAAiB,EAAAjB,qBAAA,CAAGG,YAAY,CAACc,iBAAiB,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,KAAK,CACjE,GAAM,CAAAkB,eAAe,EAAAjB,qBAAA,CAAGE,YAAY,CAACe,eAAe,UAAAjB,qBAAA,UAAAA,qBAAA,CAAI,KAAK,CAC7D,GAAM,CAAAkB,MAAM,CAAGnK,QAAQ,CAAG,QAAQ,CAAG,SAAS,CAC9C,GAAM,CAAAoK,OAAO,CAAGxK,QAAQ,CAACkC,cAAc,WAAAd,MAAA,CAAWmJ,MAAM,EAAG,CAC3D,GAAM,CAAAE,YAAY,CAAGzK,QAAQ,CAACkC,cAAc,iBAAAd,MAAA,CAAiBmJ,MAAM,EAAG,CACtE,GAAM,CAAAG,aAAa,CAAG1K,QAAQ,CAACkC,cAAc,kBAAAd,MAAA,CAAkBmJ,MAAM,EAAG,CACxE,GAAM,CAAAI,cAAc,CAAG3K,QAAQ,CAACkC,cAAc,mBAAAd,MAAA,CAAmBmJ,MAAM,EAAG,CAC1E,GAAM,CAAAK,YAAY,CAAG5K,QAAQ,CAACkC,cAAc,iBAAAd,MAAA,CAAiBmJ,MAAM,EAAG,CAEtE,GAAInK,QAAQ,CAAE,CACZ,IAAI,CAACqJ,iBAAiB,CAAG,IAAI,CAC7BgB,YAAY,CAACnJ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC3CgI,MAAI,CAAC9E,kBAAkB,CAAG,IAAI,CAC9BxE,QAAQ,CAACE,IAAI,CAACe,SAAS,CAACC,GAAG,CAAC,MAAM,CAAC,CACnCsJ,OAAO,CAACvJ,SAAS,CAACC,GAAG,CAAC,MAAM,CAC9B,CAAC,CAAE,KAAK,CAAC,CACTlB,QAAQ,CAACkC,cAAc,CAAC,sBAAsB,CAAC,CAACZ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC9EgI,MAAI,CAAC9E,kBAAkB,CAAG,KAAK,CAC/BgG,OAAO,CAACvJ,SAAS,CAACO,MAAM,CAAC,MAAM,CAAC,CAChCxB,QAAQ,CAACE,IAAI,CAACe,SAAS,CAACO,MAAM,CAAC,MAAM,CAAC,CACtCxB,QAAQ,CAACkC,cAAc,CAAC,oBAAoB,CAAC,CAACjB,SAAS,CAACO,MAAM,CAAC,QAAQ,CAAC,CACxExB,QAAQ,CAACkC,cAAc,CAAC,aAAa,CAAC,CAACjB,SAAS,CAACO,MAAM,CAAC,QAAQ,CAAC,CACjEmJ,cAAc,CAAC5D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACrCD,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACnCvB,MAAI,CAACwB,aAAa,EAAIxB,MAAI,CAACwB,aAAa,CAACC,YAAY,CAACC,MAAM,CAAC,EAAE,CACjE,CAAC,CAAE,KAAK,CAAC,CACTJ,YAAY,CAACtJ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC3CsJ,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACnCvB,MAAI,CAACwB,aAAa,EAAIxB,MAAI,CAACwB,aAAa,CAACC,YAAY,CAACC,MAAM,CAAC,EAAE,CACjE,CAAC,CAAE,KAAK,CAAC,CACT,IAAI,CAACC,wBAAwB,CAAG,IAAI,CAACA,wBAAwB,EAAK,UAAM,CACtET,OAAO,CAACvJ,SAAS,CAACO,MAAM,CAAC,MAAM,CAAC,CAChCmJ,cAAc,CAAC5D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACrCD,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACnCvB,MAAI,CAACwB,aAAa,EAAIxB,MAAI,CAACwB,aAAa,CAACC,YAAY,CAACC,MAAM,CAAC,EAAE,CACjE,CAAE,CACF,IAAI,CAAC1G,iBAAiB,CAACpD,GAAG,CAAC,IAAI,CAAC+J,wBAAwB,CAC1D,CAAC,IAAM,CACL,IAAI,CAACvB,kBAAkB,CAAG,IAAI,CAC9BgB,aAAa,CAACpJ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC5CtB,QAAQ,CAACE,IAAI,CAACe,SAAS,CAACC,GAAG,CAAC,MAAM,CAAC,CACnCsJ,OAAO,CAACvJ,SAAS,CAACC,GAAG,CAAC,MAAM,CAAC,CAC7BuJ,YAAY,CAACS,KAAK,EACpB,CAAC,CAAE,KAAK,CAAC,CACTN,YAAY,CAACtJ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC3CsJ,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACnCvB,MAAI,CAAC6B,cAAc,EAAI7B,MAAI,CAAC6B,cAAc,CAACJ,YAAY,CAACC,MAAM,CAAC,EAAE,CACnE,CAAC,CAAE,KAAK,CAAC,CACT,IAAI,CAACI,yBAAyB,CAAG,IAAI,CAACA,yBAAyB,EAAI,UAAM,CACrEZ,OAAO,CAACvJ,SAAS,CAACO,MAAM,CAAC,MAAM,CAAC,CAChCmJ,cAAc,CAAC5D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACrCD,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACnCvB,MAAI,CAAC6B,cAAc,EAAI7B,MAAI,CAAC6B,cAAc,CAACJ,YAAY,CAACC,MAAM,CAAC,EAAE,CACnE,CAAE,CACJ,IAAI,CAAC1G,iBAAiB,CAACpD,GAAG,CAAC,IAAI,CAACkK,yBAAyB,CAC3D,CACAX,YAAY,CAACnJ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC3C,GAAImJ,YAAY,CAACjL,KAAK,GAAK,EAAE,CAAEoL,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CAAC,IAC9D,CAAAD,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,QACpC,CAAC,CAAE,KAAK,CAAC,CAET,GAAM,CAAAQ,cAAc,CAAG,QAAjB,CAAAA,cAAcA,CAAA,CAAS,CAC3B,GAAM,CAAAC,UAAU,CAAGP,YAAY,kBAAA3J,MAAA,CAAkBmJ,MAAM,EACrD,CACEgB,IAAI,CAAE,KAAK,CACXC,UAAU,CAAE,IAAI,CAChBC,qBAAqB,qBAAArK,MAAA,CAAsBmJ,MAAM,CAAE,CACnDmB,eAAe,CAAE,IAAI,CACrBC,UAAU,CAAE,CAAEC,QAAQ,CAAE,IAAK,CAAC,CAC9BC,KAAK,CAAE,IACT,CAAC,CACD,CACEC,IAAI,CAAE,QAAQ,CACdC,MAAM,CAAE,SAAAA,OAACC,KAAK,CAAEnL,QAAQ,CAAK,CAC3B8J,cAAc,CAAC5D,KAAK,CAAC8D,OAAO,CAAG,QAAQ,CACvCD,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACnC,GAAM,CAAAoB,MAAM,CAAG,QAAT,CAAAA,MAAMA,CAAIC,OAAO,CAAK,CAC1BvB,cAAc,CAAC5D,KAAK,CAAC8D,OAAO,CAAG,MAAM,CACrCD,YAAY,CAAC7D,KAAK,CAAC8D,OAAO,CAAG,QAAQ,CACrChK,QAAQ,CAACqL,OAAO,CAClB,CAAC,CACD,GAAI3C,YAAY,CAAC4C,IAAI,GAAK,MAAM,CAAE,CAChC,GAAM,CAAA3C,MAAM,CAAG,QAAT,CAAAA,MAAMA,CAAA,CAAS,CACnB,GAAI4C,IAAI,CAACC,YAAY,CAAE,CACrBL,KAAK,CAAGI,IAAI,CAACC,YAAY,CAACL,KAAK,CACjC,CACA,GAAM,CAAAE,OAAO,CAAG,CAAC,CAAC,CAClB5C,MAAI,CAACgD,MAAM,CAAC9C,MAAM,CAACwC,KAAK,CAAC,CAACvM,OAAO,CAAC,SAAA8M,IAAA,CAAsC,IAAnC,CAAAC,GAAG,CAAAD,IAAA,CAAHC,GAAG,CAAeC,QAAQ,CAAAF,IAAA,CAArBG,SAAS,CAAID,QAAQ,CAC7D,GAAM,CAAAC,SAAS,CAAGpD,MAAI,CAACqD,UAAU,CAACH,GAAG,CAAC,CACtC,GAAM,CAAAI,GAAG,CAA8BF,SAAS,CAA1CE,GAAG,CAAEC,KAAK,CAAuBH,SAAS,CAArCG,KAAK,CAAWC,OAAO,CAAKJ,SAAS,CAA9B5H,OAAO,CACzB,GAAIoH,OAAO,CAACU,GAAG,CAAC,CAAE,CAChB,MACF,CACA,GAAI,CAAAG,QAAQ,CAAG,CAAC,CAChBC,MAAM,CAACC,MAAM,CAACR,QAAQ,CAAC,CAAChN,OAAO,CAAC,SAAAyN,KAAA,CAAiB,IAAd,CAAApI,OAAO,CAAAoI,KAAA,CAAPpI,OAAO,CACxC,GAAIA,OAAO,CAAE,CACX,GAAM,CAAAqI,aAAa,CAAGrI,OAAO,CAACiI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC5C,GAAII,aAAa,CAAGJ,QAAQ,EAAIA,QAAQ,GAAK,CAAC,CAAE,CAC9CA,QAAQ,CAAGI,aACb,CACF,CACF,CAAC,CAAC,CACFJ,QAAQ,EAAInD,aAAa,CAAG,CAAC,CAC7B,GAAImD,QAAQ,CAAG,CAAC,CAAE,CAChBA,QAAQ,EAAID,OAAO,CAACM,MAAM,CAACL,QAAQ,CAAE,EAAE,CAAC,CAACM,WAAW,CAAC,GAAG,CAAC,CAAG,CAAC,CAC7DP,OAAO,CAAG,KAAK,CAAGA,OAAO,CAACM,MAAM,CAACL,QAAQ,CAAEnD,aAAa,CAC1D,CAAC,IAAM,CACLkD,OAAO,CAAGA,OAAO,CAACM,MAAM,CAAC,CAAC,CAAExD,aAAa,CAC3C,CACAoD,MAAM,CAACM,IAAI,CAACb,QAAQ,CAAC,CAAChN,OAAO,CAAC,SAACF,GAAG,CAAK,CACrCsN,KAAK,CAAGA,KAAK,CAACU,OAAO,CAAC,GAAI,CAAAC,MAAM,KAAApM,MAAA,CAAK7B,GAAG,MAAK,IAAI,CAAC,KAAA6B,MAAA,CAAMyI,YAAY,UAAAzI,MAAA,CAAQyI,YAAY,MAAI,CAC5FiD,OAAO,CAAGA,OAAO,CAACS,OAAO,CAAC,GAAI,CAAAC,MAAM,KAAApM,MAAA,CAAK7B,GAAG,MAAK,IAAI,CAAC,KAAA6B,MAAA,CAAMyI,YAAY,UAAAzI,MAAA,CAAQyI,YAAY,MAC9F,CAAC,CAAC,CACFqC,OAAO,CAACU,GAAG,CAAC,CAAG,CACbA,GAAG,CAAEA,GAAG,CACRC,KAAK,CAAEA,KAAK,CACZlL,IAAI,CAAE+K,SAAS,CAAC/K,IAAI,CACpBmL,OAAO,CAAEA,OACX,CACF,CAAC,CAAC,CACF,MAAO,CAAAE,MAAM,CAACC,MAAM,CAACf,OAAO,CAAC,CAAC/J,KAAK,CAAC,CAAC,CAAEwH,eAAe,CACxD,CAAC,CACD,GAAI,CAACL,MAAI,CAACgD,MAAM,CAAE,CAChBlH,KAAK,CAACmE,YAAY,CAACkE,YAAY,CAAC,CAC7BnI,IAAI,CAAC,SAACC,QAAQ,QAAK,CAAAA,QAAQ,CAACmI,IAAI,EAAE,EAAC,CACnCpI,IAAI,CAAC,SAAC1B,IAAI,CAAK,CACd,GAAM,CAAA+J,SAAS,CAAG,CAAC,CAAC,CACpBrE,MAAI,CAACgD,MAAM,CAAGF,IAAI,CAAC,UAAY,KAAAwB,MAAA,MAC7B,GAAIrE,YAAY,CAACsE,gBAAgB,CAAE,IAAI,CAACC,GAAG,CAAC1B,IAAI,CAAC7C,YAAY,CAACsE,gBAAgB,CAAC,CAAC,CAChF,IAAI,CAACrB,GAAG,CAAC,UAAU,CAAC,CACpB,IAAI,CAACuB,KAAK,CAAC,OAAO,CAAE,CAAEC,KAAK,CAAE,EAAG,CAAC,CAAC,CAClC,IAAI,CAACD,KAAK,CAAC,MAAM,CAAE,CAAEC,KAAK,CAAE,EAAG,CAAC,CAAC,CACjC,IAAI,CAACD,KAAK,CAAC,YAAY,CAAE,CAAEC,KAAK,CAAE,EAAG,CAAC,CAAC,CACvC,IAAI,CAACD,KAAK,CAAC,SAAS,CAAE,CAAEC,KAAK,CAAE,EAAG,CAAC,CAAC,CACpC,IAAI,CAACC,iBAAiB,CAAG,CAAC,UAAU,CAAC,CACrCrK,IAAI,CAACnE,OAAO,CAAC,SAACyO,MAAM,CAAK,CACvBP,SAAS,CAACO,MAAM,CAACC,QAAQ,CAAC,CAAGD,MAAM,CACnCN,MAAI,CAAC1M,GAAG,CAACgN,MAAM,CACjB,CAAC,CACH,CAAC,CAAC,CACF5E,MAAI,CAACqD,UAAU,CAAGgB,SAAS,CAC3B1B,MAAM,CAACzC,MAAM,EAAE,CACjB,CAAC,CAAC,CACDpD,KAAK,CAAC,SAACC,GAAG,CAAK,CACdC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC,CAClB4F,MAAM,CAAC,EAAE,CACX,CAAC,CACL,CAAC,IAAM,CAAAA,MAAM,CAACzC,MAAM,EAAE,CACxB,CAAC,IAAM,IAAID,YAAY,CAAC4C,IAAI,GAAK,SAAS,CAAE,CAC1C7C,MAAI,CAAC8E,aAAa,CAChB9E,MAAI,CAAC8E,aAAa,EAAIC,aAAa,CAAC9E,YAAY,CAAC+E,YAAY,CAAE/E,YAAY,CAACgF,gBAAgB,CAAC,CAACC,SAAS,CAACjF,YAAY,CAACkF,YAAY,CAAC,CACpInF,MAAI,CAAC8E,aAAa,CACf5E,MAAM,CAACwC,KAAK,CAAE,CACb0C,MAAM,CAAE,CAAC,CACT7O,MAAM,CAAE8J,eAAe,CAAG,CAAC,CAC3BgF,qBAAqB,CAAE,CAAC,OAAO,CAAC,CAChCC,mBAAmB,CAAE,YAAAxN,MAAA,CAAYwI,aAAa,EAAG,CACjDiF,eAAe,KAAAzN,MAAA,CAAMyI,YAAY,KAAG,CACpCiF,gBAAgB,MAAA1N,MAAA,CAAOyI,YAAY,KACrC,CAAC,CAAC,CACDvE,IAAI,CAAC,SAAAyJ,KAAA,CAAc,IAAX,CAAAC,IAAI,CAAAD,KAAA,CAAJC,IAAI,CACX,GAAM,CAAA9C,OAAO,CAAG,CAAC,CAAC,CAClB8C,IAAI,CAACvP,OAAO,CAAC,SAAAwP,KAAA,CAA6E,IAA1E,CAAArC,GAAG,CAAAqC,KAAA,CAAHrC,GAAG,CAAEjL,IAAI,CAAAsN,KAAA,CAAJtN,IAAI,CAAsBkL,KAAK,CAAAoC,KAAA,CAAzBC,gBAAgB,CAAIrC,KAAK,CAAsB/H,OAAO,CAAAmK,KAAA,CAAzBE,cAAc,CAAIrK,OAAO,CAC/E,GAAIoH,OAAO,CAACU,GAAG,CAAC,EAAIV,OAAO,CAACU,GAAG,CAAC,CAACE,OAAO,CAACjN,MAAM,CAAGiF,OAAO,CAACtF,KAAK,CAAE,CAC/D,MACF,CACA0M,OAAO,CAACU,GAAG,CAAC,CAAG,CACbA,GAAG,CAAEA,GAAG,CACRC,KAAK,CAAEA,KAAK,CAACrN,KAAK,CAClBmC,IAAI,CAAEA,IAAI,CACVmL,OAAO,CAAEhI,OAAO,CAACtF,KACnB,CACF,CAAC,CAAC,CACFyM,MAAM,CAACe,MAAM,CAACC,MAAM,CAACf,OAAO,CAAC,CAAC/J,KAAK,CAAC,CAAC,CAAEwH,eAAe,CAAC,CACzD,CAAC,CAAC,CACDvD,KAAK,CAAC,SAACC,GAAG,CAAK,CACdC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC,CAClB4F,MAAM,CAAC,EAAE,CACX,CAAC,CACL,CAAC,IAAM,IAAI1C,YAAY,CAAC4C,IAAI,GAAK,MAAM,CAAE,CACvC,GAAM,CAAA3C,OAAM,CAAG,QAAT,CAAAA,OAAMA,CAAA,CAAS,CACnB,GAAM,CAAA0C,OAAO,CAAG,CAAC,CAAC,CAClB7L,MAAM,CAACiM,MAAM,CAAC9C,MAAM,CAACwC,KAAK,CAAC,CAACvM,OAAO,CAAC,SAAA2P,KAAA,CAAiC,IAA9B,CAAAC,IAAI,CAAAD,KAAA,CAAJC,IAAI,CAAEC,QAAQ,CAAAF,KAAA,CAARE,QAAQ,CAAE/O,OAAO,CAAA6O,KAAA,CAAP7O,OAAO,CAC5D,GAAI,CAAAsM,KAAK,CAAGwC,IAAI,CAACxC,KAAK,CACtB,GAAI,CAAA/H,OAAO,CAAGuK,IAAI,CAACvK,OAAO,CAC1BvE,OAAO,CAACd,OAAO,CAAC,SAAA8P,KAAA,CAA6B,IAA1B,CAAAC,OAAO,CAAAD,KAAA,CAAPC,OAAO,CAAEhQ,KAAK,CAAA+P,KAAA,CAAL/P,KAAK,CAAED,GAAG,CAAAgQ,KAAA,CAAHhQ,GAAG,CACpC,GAAIA,GAAG,GAAK,SAAS,CAAE,CACrB,GAAI,CAAAmP,MAAM,CAAG,CAAC,CACd,IAAK,GAAI,CAAA9O,CAAC,CAAG,CAAC,CAAEA,CAAC,CAAG4P,OAAO,CAAC3P,MAAM,CAAED,CAAC,EAAE,CAAE,CACvC,GAAM,CAAAwN,MAAM,CAAGtI,OAAO,CAAC2K,SAAS,CAACD,OAAO,CAAC5P,CAAC,CAAC,CAAC,CAAC,CAAC,CAAG8O,MAAM,CAAEc,OAAO,CAAC5P,CAAC,CAAC,CAAC,CAAC,CAAC,CAAG,CAAC,CAAG8O,MAAM,CAAC,CACpF,GAAM,CAAAgB,GAAG,CAAG,IAAAtO,MAAA,CAAIyI,YAAY,MAAMuD,MAAM,MAAAhM,MAAA,CAAQyI,YAAY,KAAG,CAC/D/E,OAAO,CAAGA,OAAO,CAAC2K,SAAS,CAAC,CAAC,CAAED,OAAO,CAAC5P,CAAC,CAAC,CAAC,CAAC,CAAC,CAAG8O,MAAM,CAAC,CAAGgB,GAAG,CAAG5K,OAAO,CAAC2K,SAAS,CAACD,OAAO,CAAC5P,CAAC,CAAC,CAAC,CAAC,CAAC,CAAG,CAAC,CAAG8O,MAAM,CAAE5J,OAAO,CAACjF,MAAM,CAAC,CAC5H6O,MAAM,EAAI7E,YAAY,CAAChK,MAAM,CAAG,CAAC,CAAG,CACtC,CACF,CAAC,IAAM,IAAIN,GAAG,GAAK,OAAO,CAAE,CAC1B,GAAI,CAAAmP,OAAM,CAAG,CAAC,CACd,IAAK,GAAI,CAAA9O,EAAC,CAAG,CAAC,CAAEA,EAAC,CAAG4P,OAAO,CAAC3P,MAAM,CAAED,EAAC,EAAE,CAAE,CACvC,GAAM,CAAAwN,OAAM,CAAGP,KAAK,CAAC4C,SAAS,CAACD,OAAO,CAAC5P,EAAC,CAAC,CAAC,CAAC,CAAC,CAAG8O,OAAM,CAAEc,OAAO,CAAC5P,EAAC,CAAC,CAAC,CAAC,CAAC,CAAG,CAAC,CAAG8O,OAAM,CAAC,CAClF,GAAM,CAAAgB,IAAG,CAAG,IAAAtO,MAAA,CAAIyI,YAAY,MAAMuD,OAAM,MAAAhM,MAAA,CAAQyI,YAAY,KAAG,CAC/DgD,KAAK,CAAGA,KAAK,CAAC4C,SAAS,CAAC,CAAC,CAAED,OAAO,CAAC5P,EAAC,CAAC,CAAC,CAAC,CAAC,CAAG8O,OAAM,CAAC,CAAGgB,IAAG,CAAG7C,KAAK,CAAC4C,SAAS,CAACD,OAAO,CAAC5P,EAAC,CAAC,CAAC,CAAC,CAAC,CAAG,CAAC,CAAG8O,OAAM,CAAE5J,OAAO,CAACjF,MAAM,CAAC,CACtH6O,OAAM,EAAI7E,YAAY,CAAChK,MAAM,CAAG,CAAC,CAAG,CACtC,CACF,CACF,CAAC,CAAC,CACFqM,OAAO,CAACmD,IAAI,CAACzC,GAAG,CAAC,CAAG,CAClBA,GAAG,CAAEyC,IAAI,CAACzC,GAAG,CACbC,KAAK,CAAEA,KAAK,CACZlL,IAAI,CAAE0N,IAAI,CAAC1N,IAAI,CACfmL,OAAO,CAAEhI,OACX,CACF,CAAC,CAAC,CACF,MAAO,CAAAkI,MAAM,CAACC,MAAM,CAACf,OAAO,CAAC,CAAC/J,KAAK,CAAC,CAAC,CAAEwH,eAAe,CACxD,CAAC,CACD,GAAI,CAACtJ,MAAM,CAACiM,MAAM,CAAE,CAClBlH,KAAK,CAACmE,YAAY,CAACoG,YAAY,CAAC,CAC7BrK,IAAI,CAAC,SAACC,QAAQ,QAAK,CAAAA,QAAQ,CAACmI,IAAI,EAAE,EAAC,CACnCpI,IAAI,CAAC,SAAC1B,IAAI,CAAK,CACd,GAAM,CAAAgM,OAAO,CAAG,CACd9F,eAAe,CAAEA,eAAe,CAChCE,cAAc,CAAEA,cAAc,CAC9BD,kBAAkB,CAAEA,kBAAkB,CACtCE,QAAQ,CAAEA,QAAQ,CAClBC,SAAS,CAAEA,SAAS,CACpBC,QAAQ,CAAEA,QAAQ,CAClBC,cAAc,CAAEA,cAAc,CAC9BC,iBAAiB,CAAEA,iBAAiB,CACpCC,eAAe,CAAEA,eAAe,CAChCuF,YAAY,CAAE,KAAK,CACnBC,UAAU,CAAE,IAAI,CAChBC,cAAc,CAAE,IAAI,CACpBzC,IAAI,CAAE,CAAC,SAAS,CAAE,OAAO,CAC3B,CAAC,CACDjN,MAAM,CAACiM,MAAM,CAAG,GAAI,CAAA0D,IAAI,CAACpM,IAAI,CAAEgM,OAAO,CAAC,CACvC3D,MAAM,CAACzC,OAAM,EAAE,CACjB,CAAC,CAAC,CACDpD,KAAK,CAAC,SAACC,GAAG,CAAK,CACdC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC,CAClB4F,MAAM,CAAC,EAAE,CACX,CAAC,CACL,CAAC,IAAM,CAAAA,MAAM,CAACzC,OAAM,EAAE,CACxB,CACF,CAAC,CACDyG,SAAS,CAAE,CACTC,UAAU,CAAE,SAAAA,WAAAC,KAAA,KAAG,CAAAtD,KAAK,CAAAsD,KAAA,CAALtD,KAAK,CAAElL,IAAI,CAAAwO,KAAA,CAAJxO,IAAI,CAAEmL,OAAO,CAAAqD,KAAA,CAAPrD,OAAO,gDAAA1L,MAAA,CACMyL,KAAK,4CAAAzL,MAAA,CAAwCO,IAAI,oDAAAP,MAAA,CAAgD0L,OAAO,WAAQ,CACzJsD,KAAK,CAAE,SAAAA,MAAAC,KAAA,KAAG,CAAArE,KAAK,CAAAqE,KAAA,CAALrE,KAAK,sCAAA5K,MAAA,CAAoCmI,YAAY,CAAC+G,cAAc,sCAAAlP,MAAA,CAAiC4K,KAAK,oBAAgB,CACpIuE,MAAM,CAAE,SAAAA,OAAAC,KAAA,CAAQ,CAAAC,yBAAA,CAAAD,KAAA,EACd,IAAAE,MAAA,CACEnH,YAAY,CAAC4C,IAAI,GAAK,SAAS,CAC3B,CACEwE,UAAU,CAAE,SAAS,CACrBC,IAAI,CAAE,mEAA+D,CACrEC,IAAI,CAAE,0BACR,CAAC,CACAtH,YAAY,CAAC4C,IAAI,GAAK,MAAM,CACzB,CACEwE,UAAU,CAAE,SAAS,CACrBC,IAAI,CAAE,EAAE,CACRC,IAAI,CAAE,qBACR,CAAC,CACD,CACEF,UAAU,CAAE,SAAS,CACrBC,IAAI,CAAE,EAAE,CACRC,IAAI,CAAE,oBACR,CAAE,CAjBJF,UAAU,CAAAD,MAAA,CAAVC,UAAU,CAAEC,IAAI,CAAAF,MAAA,CAAJE,IAAI,CAAEC,IAAI,CAAAH,MAAA,CAAJG,IAAI,CAkB9B,0DAAAzP,MAAA,CAAwDyP,IAAI,sDAAAzP,MAAA,CAA+CwP,IAAI,MAAAxP,MAAA,CAAIuP,UAAU,cAC/H,CACF,CACF,CAAC,CACF,CACDrF,UAAU,CAACwF,EAAE,CAAC,uBAAuB,CAAE,SAACC,MAAM,CAAEb,UAAU,CAAEc,QAAQ,CAAEC,QAAQ,CAAK,CACjF5Q,MAAM,CAAC4J,QAAQ,CAACiH,MAAM,CAAChB,UAAU,CAACtD,GAAG,CACvC,CAAC,CAAC,CACF,GAAIxM,QAAQ,CAAE,CACZkJ,MAAI,CAACwB,aAAa,CAAGQ,UACvB,CAAC,IAAM,CACLhC,MAAI,CAAC6B,cAAc,CAAGG,UACxB,CACF,CAAC,CACD,GAAI/B,YAAY,CAAC4H,gBAAgB,EAAI,CAACnR,QAAQ,CAACkC,cAAc,CAAC,gBAAgB,CAAC,CAAE,CAC/E,GAAM,CAAAkP,MAAM,CAAGpR,QAAQ,CAAC2F,aAAa,CAAC,QAAQ,CAAC,CAC/CyL,MAAM,CAACC,EAAE,CAAG,gBAAgB,CAC5BD,MAAM,CAACE,GAAG,CAAG/H,YAAY,CAAC4H,gBAAgB,CAC1CC,MAAM,CAACG,KAAK,CAAG,IAAI,CACnB,GAAIH,MAAM,CAACI,UAAU,CAAE,CACrBJ,MAAM,CAACK,kBAAkB,CAAG,UAAM,CAChC,GAAIL,MAAM,CAACI,UAAU,EAAI,QAAQ,EAAIJ,MAAM,CAACI,UAAU,EAAI,UAAU,CAAE,CACpEJ,MAAM,CAACK,kBAAkB,CAAG,IAAI,CAChCpG,cAAc,EAChB,CACF,CACF,CAAC,IAAM,CACL+F,MAAM,CAACM,MAAM,CAAG,UAAM,CACpBrG,cAAc,EAChB,CACF,CACArL,QAAQ,CAACE,IAAI,CAACyR,WAAW,CAACP,MAAM,CAClC,CAAC,IAAM,CACL/F,cAAc,EAChB,CACF,CAAC,GAAA9L,GAAA,eAAAC,KAAA,CAED,SAAAoS,YAAA,CAAc,CACZ,IAAI,CAAC7O,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAAC4H,sBAAsB,CAAC,SAAS,CAAC,CAAE,SAACiK,QAAQ,CAAK,CAC1E,GAAM,CAAAC,QAAQ,CAAGD,QAAQ,CAACzP,aAAa,CAAC,kBAAkB,CAAC,CAC3D0P,QAAQ,CAACxQ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CACvCuQ,QAAQ,CAAC5Q,SAAS,CAACqG,MAAM,CAAC,MAAM,CAClC,CAAC,CAAE,KAAK,CACV,CAAC,CACH,CAAC,GAAA/H,GAAA,oBAAAC,KAAA,CAED,SAAAuS,iBAAA,CAAmB,CACjB,GAAI,IAAI,CAACnP,MAAM,CAACoP,YAAY,CAAE,CAC5BC,YAAY,CAACjS,QAAQ,CAACkC,cAAc,CAAC,SAAS,CAAC,CAAE,CAC/CgQ,OAAO,CAAE,CAACC,WAAW,CAAEC,MAAM,CAAC,CAC9BpQ,QAAQ,CAAE,eAAe,CACzBqQ,KAAK,CAAE,GAAG,CACVC,aAAa,CAAE,IAAI,CACnBC,iBAAiB,CAAE,IAAI,CACvBC,YAAY,CAAE,gBAAgB,CAC9BC,WAAW,CAAE,IAAI,CACjBC,UAAU,CAAE,EAAE,CACdC,WAAW,CAAE,MAAM,CACnBC,UAAU,CAAE,KAAK,CACjBC,kBAAkB,CAAE,IAAI,CACxBC,UAAU,CAAE,MACd,CAAC,CACH,CACF,CAAC,GAAAvT,GAAA,iBAAAC,KAAA,CAED,SAAAuT,cAAA,CAAgB,KAAAC,MAAA,MACd,IAAI,CAACjQ,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,yBAAyB,CAAC,CAAE,SAAC+N,UAAU,CAAK,CACtF,GAAM,CAAAC,OAAO,CAAGlT,QAAQ,CAAC2F,aAAa,CAAC,KAAK,CAAC,CAC7CuN,OAAO,CAACC,SAAS,CAAGF,UAAU,CAACE,SAAS,CACxC,GAAM,CAAAC,MAAM,CAAGpT,QAAQ,CAAC2F,aAAa,CAAC,OAAO,CAAC,CAC9CuN,OAAO,CAACvB,WAAW,CAACyB,MAAM,CAAC,CAC3B,GAAM,CAAAC,MAAM,CAAGrT,QAAQ,CAAC2F,aAAa,CAAC,OAAO,CAAC,CAC9CyN,MAAM,CAACzB,WAAW,CAAC0B,MAAM,CAAC,CAC1B,GAAM,CAAAC,GAAG,CAAGtT,QAAQ,CAAC2F,aAAa,CAAC,IAAI,CAAC,CACxC0N,MAAM,CAAC1B,WAAW,CAAC2B,GAAG,CAAC,CACvB,GAAM,CAAAC,GAAG,CAAGvT,QAAQ,CAAC2F,aAAa,CAAC,IAAI,CAAC,CACxC2N,GAAG,CAAC3B,WAAW,CAAC4B,GAAG,CAAC,CACpBN,UAAU,CAAC/M,aAAa,CAACC,YAAY,CAAC+M,OAAO,CAAED,UAAU,CAAC,CAC1DM,GAAG,CAAC5B,WAAW,CAACsB,UAAU,CAC5B,CAAC,CAAC,CACF,IAAI,CAAClQ,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,sBAAsB,CAAC,CAAE,SAACgO,OAAO,CAAK,CAChF,GAAM,CAAAM,aAAa,CAAGN,OAAO,CAAChO,gBAAgB,CAAC,mBAAmB,CAAC,CACnE,GAAIsO,aAAa,CAAC3T,MAAM,CAAE,KAAA4T,cAAA,CACxB,GAAM,CAAAC,KAAK,CAAGF,aAAa,CAACA,aAAa,CAAC3T,MAAM,CAAG,CAAC,CAAC,CACrD,GAAM,CAAA2K,OAAO,CAAGxK,QAAQ,CAAC2F,aAAa,CAAC,KAAK,CAAC,CAC7C6E,OAAO,CAAC2I,SAAS,CAAG,cAAc,CAAGO,KAAK,CAACP,SAAS,CAACQ,WAAW,EAAE,CAElE,GAAM,CAAAC,MAAM,CAAG5T,QAAQ,CAAC2F,aAAa,CAAC,MAAM,CAAC,CAC7CiO,MAAM,CAAC3S,SAAS,CAACC,GAAG,CAAC,YAAY,CAAC,CAClC,GAAM,CAAA2S,OAAO,CAAGb,MAAI,CAACpP,IAAI,CAACsP,OAAO,CAACjQ,UAAU,CAACoO,EAAE,CAAC,CAChDuC,MAAM,CAAChO,kBAAkB,CAAC,YAAY,4GAAAxE,MAAA,EAAAqS,cAAA,CAAuGI,OAAO,SAAPA,OAAO,iBAAPA,OAAO,CAAEhH,KAAK,UAAA4G,cAAA,UAAAA,cAAA,CAAI,EAAE,YAAU,CAC3KG,MAAM,CAACtS,gBAAgB,CAAC,OAAO,CAAE,UAAM,CACrC4R,OAAO,CAACjS,SAAS,CAACqG,MAAM,CAAC,MAAM,CACjC,CAAC,CAAE,KAAK,CAAC,CACTkD,OAAO,CAACmH,WAAW,CAACiC,MAAM,CAAC,CAE3B,GAAM,CAAAE,SAAS,CAAG9T,QAAQ,CAAC2F,aAAa,CAAC,MAAM,CAAC,CAChDmO,SAAS,CAAClO,kBAAkB,CAAC,YAAY,CAAE,qEAAiE,CAAC,CAC7GkO,SAAS,CAAC7S,SAAS,CAACC,GAAG,CAAC,UAAU,CAAC,CACnC4S,SAAS,CAACxS,gBAAgB,CAAC,OAAO,CAAE,UAAM,CACxC4R,OAAO,CAACjS,SAAS,CAACC,GAAG,CAAC,MAAM,CAC9B,CAAC,CAAE,KAAK,CAAC,CACTsJ,OAAO,CAACmH,WAAW,CAACmC,SAAS,CAAC,CAE9B,GAAId,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACC,QAAQ,CAAE,CAC7B,GAAM,CAAAC,KAAK,CAAGjU,QAAQ,CAAC2F,aAAa,CAAC,MAAM,CAAC,CAC5CsO,KAAK,CAAChT,SAAS,CAACC,GAAG,CAAC,MAAM,CAAC,CAC3B+S,KAAK,CAACrO,kBAAkB,CAAC,YAAY,+CAAAxE,MAAA,CAA6C4R,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACG,eAAe,iCAA4B,CAC9ID,KAAK,CAAC3S,gBAAgB,CAAC,OAAO,CAAE,UAAM,CACpC,GAAM,CAAA6S,QAAQ,CAAGF,KAAK,CAAC7R,aAAa,CAAC,SAAS,CAAC,CAC/C,GAAM,CAAAgS,SAAS,CAAGH,KAAK,CAAC7R,aAAa,CAAC,UAAU,CAAC,CACjD,GAAM,CAAAiS,WAAW,CAAGJ,KAAK,CAAC/N,aAAa,CAACA,aAAa,CAAChB,gBAAgB,CAAC,YAAY,CAAC,CACpF,GAAM,CAAA+N,UAAU,CAAGoB,WAAW,CAACxU,MAAM,GAAK,CAAC,CAAGwU,WAAW,CAAC,CAAC,CAAC,CAAGA,WAAW,CAAC,CAAC,CAAC,CAC7E,GAAIF,QAAQ,CAAE,CACZA,QAAQ,CAAClT,SAAS,CAACC,GAAG,CAAC,SAAS,CAAC,CACjCiT,QAAQ,CAAClT,SAAS,CAACO,MAAM,CAAC,QAAQ,CAAC,CACnC2S,QAAQ,CAACtH,KAAK,CAAGmG,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACO,aAAa,CAC/CrB,UAAU,CAACsB,YAAY,CAAC,iBAAiB,CAAE,IAAI,CAAC,CAChDtB,UAAU,CAAC/H,KAAK,EAClB,CAAC,IAAM,CACLkJ,SAAS,CAACnT,SAAS,CAACC,GAAG,CAAC,QAAQ,CAAC,CACjCkT,SAAS,CAACnT,SAAS,CAACO,MAAM,CAAC,SAAS,CAAC,CACrC4S,SAAS,CAACvH,KAAK,CAAGmG,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACG,eAAe,CAClDjB,UAAU,CAACsB,YAAY,CAAC,iBAAiB,CAAE,KAAK,CAAC,CACjDtB,UAAU,CAACuB,IAAI,EACjB,CACF,CAAC,CAAE,KAAK,CAAC,CACThK,OAAO,CAACmH,WAAW,CAACsC,KAAK,CAC3B,CAEA,GAAIjB,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACU,SAAS,CAAE,CAC9B,GAAM,CAAAC,KAAK,CAAG1U,QAAQ,CAAC2F,aAAa,CAAC,MAAM,CAAC,CAC5C+O,KAAK,CAAC9O,kBAAkB,CAAC,YAAY,CAAE,iEAA6D,CAAC,CACrG8O,KAAK,CAACzT,SAAS,CAACC,GAAG,CAAC,MAAM,CAAC,CAE3B,GAAM,CAAA6S,IAAI,CAAGL,KAAK,CAACiB,SAAS,CAACC,IAAI,EAAE,CACnC,GAAI5B,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACc,aAAa,CAAG,CAAC,EAAId,IAAI,CAACe,KAAK,CAAC,IAAI,CAAC,CAACjV,MAAM,CAAGmT,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACc,aAAa,CAAG,CAAC,CAAE,CACtG3B,OAAO,CAACjS,SAAS,CAACC,GAAG,CAAC,MAAM,CAC9B,CACAwT,KAAK,CAAC7H,KAAK,CAAGmG,MAAI,CAACpQ,MAAM,CAACmR,IAAI,CAACU,SAAS,CACxCC,KAAK,CAACpT,gBAAgB,CAAC,OAAO,CAAE,UAAM,CACpCyT,SAAS,CAACC,SAAS,CAACC,SAAS,CAAClB,IAAI,CAAC,CAACzO,IAAI,CAAC,UAAM,CAC7C0N,MAAI,CAACjQ,IAAI,CAACtC,UAAU,CAACiT,KAAK,CAAE,gBAAgB,CAC9C,CAAC,CAAE,UAAM,CACPpN,OAAO,CAACC,KAAK,CAAC,yBAAyB,CAAE,8CAA8C,CACzF,CAAC,CACH,CAAC,CAAE,KAAK,CAAC,CACTiE,OAAO,CAACmH,WAAW,CAAC+C,KAAK,CAC3B,CACAxB,OAAO,CAACgC,YAAY,CAAC1K,OAAO,CAAE0I,OAAO,CAACpN,UAAU,CAClD,CACF,CAAC,CACH,CAAC,GAAAvG,GAAA,aAAAC,KAAA,CAED,SAAA2V,UAAA,CAAY,CACV,IAAI,CAACpS,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,gBAAgB,CAAC,CAAE,SAACkO,MAAM,CAAK,CACzE,GAAM,CAAAgC,QAAQ,CAAGpV,QAAQ,CAAC2F,aAAa,CAAC,KAAK,CAAC,CAC9CyP,QAAQ,CAACjC,SAAS,CAAG,eAAe,CACpCC,MAAM,CAAClN,aAAa,CAACC,YAAY,CAACiP,QAAQ,CAAEhC,MAAM,CAAC,CACnDgC,QAAQ,CAACzD,WAAW,CAACyB,MAAM,CAC7B,CAAC,CACH,CAAC,GAAA7T,GAAA,kBAAAC,KAAA,CAED,SAAA6V,eAAA,CAAiB,CACf,IAAK,GAAI,CAAAC,GAAG,CAAG,CAAC,CAAEA,GAAG,EAAI,CAAC,CAAEA,GAAG,EAAE,CAAE,CACjC,IAAI,CAACvS,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,sBAAsB,CAAGoQ,GAAG,CAAC,CAAE,SAAC9K,OAAO,CAAK,CACtFA,OAAO,CAACvJ,SAAS,CAACC,GAAG,CAAC,aAAa,CAAC,CACpCsJ,OAAO,CAAC5E,kBAAkB,CAAC,YAAY,eAAAxE,MAAA,CAAeoJ,OAAO,CAAC6G,EAAE,kCAClE,CAAC,CACH,CACF,CAAC,GAAA9R,GAAA,WAAAC,KAAA,CAID,SAAA+V,QAAA,CAAU,KAAAC,MAAA,MACR,GAAI,CAAAC,QAAQ,CAAGzV,QAAQ,CAACkC,cAAc,CAAC,iBAAiB,CAAC,CACzD,GAAIuT,QAAQ,GAAK,IAAI,CAAE,CACrB,MACF,CAEA,GAAI,MAAO,CAAAC,OAAO,GAAK,UAAU,CAAE,CACjC,GAAM,CAAAC,WAAW,CAAGF,QAAQ,CAACG,SAAS,CAAC,IAAI,CAAC,CAC5CH,QAAQ,CAACvP,aAAa,CAACC,YAAY,CAACwP,WAAW,CAAEF,QAAQ,CAAC,CAC1DA,QAAQ,CAAGE,WACb,CACA,GAAI3V,QAAQ,CAACkC,cAAc,CAAC,YAAY,CAAC,CAAC4B,OAAO,CAAC+R,IAAI,GAAK,IAAI,EAAI,IAAI,CAAC9S,IAAI,CAACvC,WAAW,EAAE,CAAE,CAC1F,GAAM,CAAAsV,iBAAiB,CAAG9V,QAAQ,CAACkC,cAAc,CAAC,oBAAoB,CAAC,CACvE,GAAIuT,QAAQ,CAACvP,aAAa,GAAK4P,iBAAiB,CAAE,CAChDL,QAAQ,CAACvP,aAAa,CAACD,WAAW,CAACwP,QAAQ,CAAC,CAC5CK,iBAAiB,CAACnE,WAAW,CAAC8D,QAAQ,CACxC,CACA,IAAI,CAACM,YAAY,EAAI,IAAI,CAAC7R,cAAc,CAAC8R,MAAM,CAAC,IAAI,CAACD,YAAY,CACnE,CAAC,IAAM,CACL,GAAM,CAAAE,eAAe,CAAGjW,QAAQ,CAACkC,cAAc,CAAC,kBAAkB,CAAC,CACnE,GAAIuT,QAAQ,CAACvP,aAAa,GAAK+P,eAAe,CAAE,CAC9CR,QAAQ,CAACvP,aAAa,CAACD,WAAW,CAACwP,QAAQ,CAAC,CAC5CQ,eAAe,CAACtE,WAAW,CAAC8D,QAAQ,CACtC,CACA,GAAM,CAAAS,IAAI,CAAGlW,QAAQ,CAACkC,cAAc,CAAC,UAAU,CAAC,CAChDgU,IAAI,CAACnP,KAAK,CAACoP,UAAU,CAAG,SAAS,CACjC,IAAI,CAACpT,IAAI,CAACtC,UAAU,CAACyV,IAAI,CAAE,CAAC,iBAAiB,CAAE,iBAAiB,CAAC,CAAE,IAAI,CAAC,CACxE,GAAM,CAAAE,SAAS,CAAGpW,QAAQ,CAACoC,aAAa,CAAC,YAAY,CAAC,CACtD8T,IAAI,CAACnP,KAAK,CAACsP,SAAS,IAAAjV,MAAA,CAAMgV,SAAS,CAACE,SAAS,CAAGF,SAAS,CAACG,YAAY,MAAI,CAC1E,GAAM,CAAAC,gBAAgB,CAAGf,QAAQ,CAACvQ,gBAAgB,CAAC,eAAe,CAAC,CACnE,GAAM,CAAAuR,cAAc,CAAGhB,QAAQ,CAACzP,oBAAoB,CAAC,IAAI,CAAC,CAC1D,GAAM,CAAA0Q,mBAAmB,CAAG1W,QAAQ,CAAC4H,sBAAsB,CAAC,aAAa,CAAC,CAC1E,GAAM,CAAA+O,aAAa,CAAG3W,QAAQ,CAACE,IAAI,CAAC4D,OAAO,CAAC8S,aAAa,GAAK,QAAQ,CACtE,GAAM,CAAAC,YAAY,CAAG7W,QAAQ,CAACkC,cAAc,CAAC,gBAAgB,CAAC,CAAC4U,YAAY,CAC3E9W,QAAQ,CAACoC,aAAa,CAAC,YAAY,CAAC,CAACd,gBAAgB,CAAC,QAAQ,CAAE,UAAM,CACpE4U,IAAI,CAACnP,KAAK,CAACgQ,YAAY,IAAA3V,MAAA,CAAMpB,QAAQ,CAACoC,aAAa,CAAC,YAAY,CAAC,CAACmU,YAAY,CAAGvW,QAAQ,CAACoC,aAAa,CAAC,cAAc,CAAC,CAACkU,SAAS,MACnI,CAAC,CAAC,CACF,IAAI,CAACP,YAAY,CAAG,IAAI,CAACA,YAAY,EAAK,UAAM,CAC9CG,IAAI,CAACnP,KAAK,CAACgQ,YAAY,IAAA3V,MAAA,CAAMpB,QAAQ,CAACoC,aAAa,CAAC,YAAY,CAAC,CAACmU,YAAY,CAAGvW,QAAQ,CAACoC,aAAa,CAAC,cAAc,CAAC,CAACkU,SAAS,MAAI,CACrId,MAAI,CAACzS,IAAI,CAACtD,OAAO,CAAC+W,gBAAgB,CAAE,SAACQ,QAAQ,CAAK,CAChDA,QAAQ,CAAC/V,SAAS,CAACO,MAAM,CAAC,QAAQ,CACpC,CAAC,CAAC,CACFgU,MAAI,CAACzS,IAAI,CAACtD,OAAO,CAACgX,cAAc,CAAE,SAACQ,MAAM,CAAK,CAC5CA,MAAM,CAAChW,SAAS,CAACO,MAAM,CAAC,YAAY,CACtC,CAAC,CAAC,CACF,GAAM,CAAA0V,aAAa,CAAG,EAAE,EAAIP,aAAa,CAAGE,YAAY,CAAG,CAAC,CAAC,CAC7D,GAAI,CAAAM,cAAc,CAAGT,mBAAmB,CAAC7W,MAAM,CAAG,CAAC,CACnD,IAAK,GAAI,CAAAD,CAAC,CAAG,CAAC,CAAEA,CAAC,CAAG8W,mBAAmB,CAAC7W,MAAM,CAAG,CAAC,CAAED,CAAC,EAAE,CAAE,CACvD,GAAM,CAAAwX,OAAO,CAAGV,mBAAmB,CAAC9W,CAAC,CAAC,CAACyX,qBAAqB,EAAE,CAACC,GAAG,CAClE,GAAM,CAAAC,OAAO,CAAGb,mBAAmB,CAAC9W,CAAC,CAAG,CAAC,CAAC,CAACyX,qBAAqB,EAAE,CAACC,GAAG,CACtE,GAAK1X,CAAC,EAAI,CAAC,EAAIwX,OAAO,CAAGF,aAAa,EAAME,OAAO,EAAIF,aAAa,EAAIK,OAAO,CAAGL,aAAc,CAAE,CAChGC,cAAc,CAAGvX,CAAC,CAClB,KACF,CACF,CACA,GAAIuX,cAAc,GAAK,CAAC,CAAC,CAAE,CACzBX,gBAAgB,CAACW,cAAc,CAAC,CAAClW,SAAS,CAACC,GAAG,CAAC,QAAQ,CAAC,CACxD,GAAI,CAAAsW,OAAO,CAAGhB,gBAAgB,CAACW,cAAc,CAAC,CAACjR,aAAa,CAC5D,MAAOsR,OAAO,GAAK/B,QAAQ,CAAE,CAC3B+B,OAAO,CAACvW,SAAS,CAACC,GAAG,CAAC,YAAY,CAAC,CACnCsW,OAAO,CAAGA,OAAO,CAACtR,aAAa,CAACA,aAClC,CACF,CACF,CAAE,CACF,IAAI,CAAC6P,YAAY,EAAE,CACnB,IAAI,CAAC7R,cAAc,CAAChD,GAAG,CAAC,IAAI,CAAC6U,YAAY,CAC3C,CACF,CAAC,GAAAxW,GAAA,mBAAAC,KAAA,CAED,SAAAiY,gBAAA,CAAkB,KAAAC,sBAAA,CAAAC,MAAA,MAChB,GAAM,CAAAzB,IAAI,CAAGlW,QAAQ,CAACkC,cAAc,CAAC,UAAU,CAAC,CAChD,GAAM,CAAA+T,eAAe,CAAGjW,QAAQ,CAACkC,cAAc,CAAC,kBAAkB,CAAC,CACnE,CAAAwV,sBAAA,CAAA1X,QAAQ,CAACoC,aAAa,CAAC,sBAAsB,CAAC,UAAAsV,sBAAA,iBAA9CA,sBAAA,CAAgDpW,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC9E,GAAM,CAAAX,SAAS,CAAG,CAAC,iBAAiB,CAAC,CACrC,GAAM,CAAAiX,SAAS,CAAG1B,IAAI,CAACjV,SAAS,CAACsG,QAAQ,CAAC,YAAY,CAAC,CACvD5G,SAAS,CAACkX,IAAI,CAACD,SAAS,CAAG,iBAAiB,CAAG,kBAAkB,CAAC,CAClE3B,eAAe,CAAChV,SAAS,CAACO,MAAM,CAACoW,SAAS,CAAG,kBAAkB,CAAG,iBAAiB,CAAC,CACpFD,MAAI,CAAC5U,IAAI,CAACtC,UAAU,CAACwV,eAAe,CAAEtV,SAAS,CAAE,IAAI,CAAC,CACtDuV,IAAI,CAACjV,SAAS,CAACqG,MAAM,CAAC,YAAY,CACpC,CAAC,CAAE,KAAK,CACV,CAAC,GAAA/H,GAAA,YAAAC,KAAA,CAED,SAAAsY,SAAA,CAAW,CACT,GAAI,IAAI,CAAClV,MAAM,CAACmV,IAAI,CAAE,CACpBC,mBAAmB,CAAChY,QAAQ,CAACE,IAAI,CAAE,IAAI,CAAC0C,MAAM,CAACmV,IAAI,CACrD,CACF,CAAC,GAAAxY,GAAA,sBAAAC,KAAA,CAED,SAAAyY,mBAAmBlU,KAAK,CAAE,KAAAmU,OAAA,MACxB,GAAM,CAAAC,gBAAgB,CAAGnY,QAAQ,CAAC4H,sBAAsB,CAAC,SAAS,CAAC,CACnE,GAAIuQ,gBAAgB,CAACtY,MAAM,CAAE,KAAAuY,qBAAA,CAE3B,GAAM,CAAAC,MAAM,EAAAD,qBAAA,CAAG,IAAI,CAACxV,MAAM,CAAC0V,OAAO,CAACD,MAAM,UAAAD,qBAAA,UAAAA,qBAAA,CAAI,CAAC,SAAS,CAAE,MAAM,CAAE,SAAS,CAAC,CAC3EE,OAAO,CAACC,UAAU,CAAC,CAAEC,WAAW,CAAE,KAAK,CAAEzU,KAAK,CAAEA,KAAK,SAALA,KAAK,UAALA,KAAK,CAAK,IAAI,CAACF,MAAM,CAAGwU,MAAM,CAAC,CAAC,CAAC,CAAGA,MAAM,CAAC,CAAC,CAAE,CAAEI,aAAa,CAAE,OAAQ,CAAC,CAAC,CACzH,IAAI,CAAC1V,IAAI,CAACtD,OAAO,CAAC0Y,gBAAgB,CAAE,SAAAO,QAAQ,CAAI,CAC9CJ,OAAO,CAACK,MAAM,CAAC,MAAM,CAAGD,QAAQ,CAACrH,EAAE,CAAE6G,OAAI,CAACtU,IAAI,CAAC8U,QAAQ,CAACrH,EAAE,CAAC,CAAE,SAAAuH,OAAO,CAAI,CACtEF,QAAQ,CAACjV,SAAS,CAAGmV,OACvB,CAAC,CAAEF,QAAQ,CACb,CAAC,CACH,CACF,CAAC,GAAAnZ,GAAA,eAAAC,KAAA,CAED,SAAAqZ,YAAA,CAAc,KAAAC,OAAA,MACZ,IAAI,CAACb,kBAAkB,EAAE,CACzB,IAAI,CAAC5T,mBAAmB,CAACnD,GAAG,CAAC,UAAM,CAAE4X,OAAI,CAACb,kBAAkB,EAAI,CAAC,CAAC,CAClE,IAAI,CAAC1T,mBAAmB,CAACrD,GAAG,CAAC,UAAM,CAAE4X,OAAI,CAACb,kBAAkB,CAAC,SAAS,CAAG,CAAC,CAC5E,CAAC,GAAA1Y,GAAA,eAAAC,KAAA,CAED,SAAAuZ,YAAA,CAAc,KAAAC,OAAA,MACZ,GAAI,CAAC,IAAI,CAACpW,MAAM,CAACqW,OAAO,CAAE,CACxB,MACF,CACAA,OAAO,CAACC,aAAa,CAAC,OAAO,CAAE,IAAI,CAACtW,MAAM,CAACqW,OAAO,CAACE,UAAU,CAAC,CAC9DF,OAAO,CAACC,aAAa,CAAC,MAAM,CAAE,IAAI,CAACtW,MAAM,CAACqW,OAAO,CAACG,SAAS,CAAC,CAC5D,IAAI,CAACC,qBAAqB,CAAG,IAAI,CAACA,qBAAqB,EAAK,UAAM,CAChEL,OAAI,CAACM,WAAW,CAAGN,OAAI,CAACM,WAAW,EAAI,EAAE,CACzC,IAAK,GAAI,CAAA1Z,CAAC,CAAG,CAAC,CAAEA,CAAC,CAAGoZ,OAAI,CAACM,WAAW,CAACzZ,MAAM,CAAED,CAAC,EAAE,CAAE,CAChDoZ,OAAI,CAACM,WAAW,CAAC1Z,CAAC,CAAC,CAAC2Z,OAAO,EAC7B,CACAP,OAAI,CAACM,WAAW,CAAG,EAAE,CACrBN,OAAI,CAACjW,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAAC4H,sBAAsB,CAAC,SAAS,CAAC,CAAE,SAAC4R,QAAQ,CAAK,CAC1E,GAAM,CAAAC,KAAK,CAAGR,OAAO,CAACS,IAAI,CAACF,QAAQ,CAAER,OAAI,CAACnV,MAAM,CAAG,MAAM,CAAG,OAAO,CAAE,CAAE8V,QAAQ,CAAE,KAAM,CAAC,CAAC,CACzFF,KAAK,CAACG,SAAS,CAACC,IAAI,CAACnT,KAAK,CAACsS,OAAI,CAACpV,IAAI,CAAC4V,QAAQ,CAACnI,EAAE,CAAC,CAAC,CAAC,CACnD2H,OAAI,CAACM,WAAW,CAACzB,IAAI,CAAC4B,KAAK,CAC7B,CAAC,CACH,CAAE,CACF,IAAI,CAACpV,mBAAmB,CAACnD,GAAG,CAAC,IAAI,CAACmY,qBAAqB,CAAC,CACxD,IAAI,CAACA,qBAAqB,EAAE,CAC5B,IAAI,CAACS,gBAAgB,CAAG,IAAI,CAACA,gBAAgB,EAAK,UAAM,CACtD,IAAK,GAAI,CAAAla,CAAC,CAAG,CAAC,CAAEA,CAAC,CAAGoZ,OAAI,CAACM,WAAW,CAACzZ,MAAM,CAAED,CAAC,EAAE,CAAE,CAChDoZ,OAAI,CAACM,WAAW,CAAC1Z,CAAC,CAAC,CAACma,MAAM,EAC5B,CACF,CAAE,CACF,IAAI,CAAC3V,cAAc,CAAClD,GAAG,CAAC,IAAI,CAAC4Y,gBAAgB,CAC/C,CAAC,GAAAva,GAAA,cAAAC,KAAA,CAED,SAAAwa,WAAA,CAAa,KAAAC,OAAA,MACX,GAAI,IAAI,CAACrX,MAAM,CAACsX,MAAM,CAAE,CACtBC,QAAQ,CAACC,WAAW,CAAG,IAAI,CAACxX,MAAM,CAACsX,MAAM,CAACE,WAAW,CACrDD,QAAQ,CAACE,gBAAgB,CAAC,IAAI,CAACzX,MAAM,CAACsX,MAAM,CAACI,aAAa,CAAC,CAC3D,IAAI,CAACC,UAAU,CAAG,IAAI,CAACA,UAAU,EAAI,EAAE,CACvC,IAAI,CAACxX,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAAC4H,sBAAsB,CAAC,QAAQ,CAAC,CAAE,SAAC4S,OAAO,CAAK,CACxE,IAAAC,qBAAA,CAAoGR,OAAI,CAACrW,IAAI,CAAC4W,OAAO,CAACnJ,EAAE,CAAC,CAAjHqJ,GAAG,CAAAD,qBAAA,CAAHC,GAAG,CAAEC,GAAG,CAAAF,qBAAA,CAAHE,GAAG,CAAEC,IAAI,CAAAH,qBAAA,CAAJG,IAAI,CAAEC,UAAU,CAAAJ,qBAAA,CAAVI,UAAU,CAAEC,SAAS,CAAAL,qBAAA,CAATK,SAAS,CAAEC,MAAM,CAAAN,qBAAA,CAANM,MAAM,CAAEC,UAAU,CAAAP,qBAAA,CAAVO,UAAU,CAAEC,SAAS,CAAAR,qBAAA,CAATQ,SAAS,CAAEC,KAAK,CAAAT,qBAAA,CAALS,KAAK,CAAEC,UAAU,CAAAV,qBAAA,CAAVU,UAAU,CAC/F,GAAM,CAAAjB,MAAM,CAAG,GAAI,CAAAC,QAAQ,CAACiB,GAAG,CAAC,CAC9BC,SAAS,CAAEb,OAAO,CAClBc,MAAM,CAAE,CAACZ,GAAG,CAAEC,GAAG,CAAC,CAClBC,IAAI,CAAEA,IAAI,CACVW,OAAO,CAAE,GAAG,CACZxU,KAAK,CAAEkT,OAAI,CAACpW,MAAM,CAAGiX,SAAS,CAAGD,UAAU,CAC3CW,kBAAkB,CAAE,KACtB,CAAC,CAAC,CACF,GAAIT,MAAM,CAAE,CACV,GAAI,CAAAZ,QAAQ,CAACsB,MAAM,EAAE,CAACC,SAAS,CAAC,CAAChB,GAAG,CAAEC,GAAG,CAAC,CAAC,CAACgB,KAAK,CAACzB,MAAM,CAC1D,CACA,GAAIc,UAAU,CAAE,CACdd,MAAM,CAAC0B,UAAU,CAAC,GAAI,CAAAzB,QAAQ,CAAC0B,iBAAmB,CAAE,cAAc,CACpE,CACA,GAAIZ,SAAS,CAAE,CACbf,MAAM,CAAC0B,UAAU,CACf,GAAI,CAAAzB,QAAQ,CAAC2B,gBAAgB,CAAC,CAC5BC,eAAe,CAAE,CACfC,kBAAkB,CAAE,IACtB,CAAC,CACDC,gBAAgB,CAAE,IAAI,CACtBC,iBAAiB,CAAE,IACrB,CAAC,CAAC,CACF,cAAc,CAElB,CACA,GAAIhB,KAAK,CAAE,CACThB,MAAM,CAAC0B,UAAU,CAAC,GAAI,CAAAzB,QAAQ,CAACgC,YAAc,CAC/C,CACA,GAAIhB,UAAU,CAAE,CACdjB,MAAM,CAAC0B,UAAU,CAAC,GAAI,CAAAzB,QAAQ,CAACiC,iBAAmB,CACpD,CACAlC,MAAM,CAAC0B,UAAU,CAAC,GAAI,CAAAS,cAAgB,CAAC,CACvCpC,OAAI,CAACM,UAAU,CAAC1C,IAAI,CAACqC,MAAM,CAC7B,CAAC,CAAC,CACF,IAAI,CAACoC,oBAAoB,CAAG,IAAI,CAACA,oBAAoB,EAAK,UAAM,CAC9DrC,OAAI,CAAClX,IAAI,CAACtD,OAAO,CAACwa,OAAI,CAACM,UAAU,CAAE,SAACL,MAAM,CAAK,CAC7C,GAAM,CAAAM,OAAO,CAAGN,MAAM,CAACqC,YAAY,EAAE,CACrC,IAAAC,sBAAA,CAAkCvC,OAAI,CAACrW,IAAI,CAAC4W,OAAO,CAACnJ,EAAE,CAAC,CAA/CwJ,UAAU,CAAA2B,sBAAA,CAAV3B,UAAU,CAAEC,SAAS,CAAA0B,sBAAA,CAAT1B,SAAS,CAC7BZ,MAAM,CAACuC,QAAQ,CAACxC,OAAI,CAACpW,MAAM,CAAGiX,SAAS,CAAGD,UAAU,CAAC,CACrDX,MAAM,CAAC0B,UAAU,CAAC,GAAI,CAAAS,cAAgB,CACxC,CAAC,CACH,CAAE,CACF,IAAI,CAAChY,mBAAmB,CAACnD,GAAG,CAAC,IAAI,CAACob,oBAAoB,CACxD,CACF,CAAC,GAAA/c,GAAA,cAAAC,KAAA,CAED,SAAAkd,WAAA,CAAa,KAAAC,OAAA,MACX,GAAI,IAAI,CAAC/Z,MAAM,CAACga,MAAM,CAAE,KAAAC,kBAAA,CACtB,GAAM,CAAAC,YAAY,CAAG,IAAI,CAACla,MAAM,CAACga,MAAM,CACvC,GAAM,CAAAvK,KAAK,CAAGyK,YAAY,CAACzK,KAAK,EAAI,GAAG,CACvC,GAAM,CAAA0K,WAAW,CAAGD,YAAY,CAACC,WAAW,EAAI,IAAI,CACpD,GAAM,CAAAC,UAAU,CAAGF,YAAY,CAACE,UAAU,EAAI,GAAG,CACjD,GAAM,CAAAC,IAAI,EAAAJ,kBAAA,CAAGC,YAAY,CAACG,IAAI,UAAAJ,kBAAA,UAAAA,kBAAA,CAAI,KAAK,CACvC7P,MAAM,CAACC,MAAM,CAAC6P,YAAY,CAAClZ,IAAI,CAAC,CAACnE,OAAO,CAAC,SAACyd,KAAK,CAAK,CAClD,GAAM,CAAAC,OAAO,CAAG,QAAV,CAAAA,OAAOA,CAAIvd,CAAC,CAAK,CACrB,GAAM,CAAAyR,EAAE,CAAG6L,KAAK,CAACtd,CAAC,CAAC,CACnB,GAAM,CAAAwd,aAAa,CAAGpd,QAAQ,CAACoC,aAAa,KAAAhB,MAAA,CAAKiQ,EAAE,EAAG,CAACnL,aAAa,CAACpC,OAAO,CAACmZ,IAAI,CACjF,GAAM,CAAAI,QAAQ,CAAG,GAAI,CAAAC,MAAM,KAAAlc,MAAA,CAAKiQ,EAAE,EAAI,CACpCkM,OAAO,CAAEZ,OAAI,CAAC/Y,IAAI,CAACyN,EAAE,CAAC,CACtBgB,KAAK,CAAEA,KAAK,CACZmL,QAAQ,CAAE,IAAI,CACdT,WAAW,CAAEA,WAAW,CACxBC,UAAU,CAAEA,UAAU,CACtBS,gBAAgB,CAAE,IAAI,CACtBR,IAAI,CAAEG,aAAa,CAAGvD,IAAI,CAACnT,KAAK,CAAC0W,aAAa,CAAC,CAAGH,IAAI,CACtDS,aAAa,CAAE,SAAAA,cAAA,CAAM,CACnB,GAAI9d,CAAC,GAAKsd,KAAK,CAACrd,MAAM,CAAG,CAAC,CAAE,CAC1B,GAAIid,YAAY,CAACa,QAAQ,EAAI,CAAC,CAAE,CAC9Btd,MAAM,CAACud,UAAU,CAAC,UAAM,CACtBP,QAAQ,CAACQ,OAAO,EAClB,CAAC,CAAEf,YAAY,CAACa,QAAQ,CAC1B,CACA,MACF,CACAN,QAAQ,CAACQ,OAAO,EAAE,CAClBV,OAAO,CAACvd,CAAC,CAAG,CAAC,CACf,CACF,CAAC,CAAC,CAACke,EAAE,EACP,CAAC,CACDX,OAAO,CAAC,CAAC,CACX,CAAC,CACH,CACF,CAAC,GAAA5d,GAAA,2BAAAC,KAAA,CAED,SAAAue,wBAAwBC,QAAQ,CAAEC,MAAM,CAAE,CACxCje,QAAQ,CAACkF,gBAAgB,CAAC8Y,QAAQ,CAAC,CAACve,OAAO,CAAC,SAACye,QAAQ,CAAK,CACxD,GAAM,CAAAC,KAAK,CAAGD,QAAQ,CAAChZ,gBAAgB,CAAC+Y,MAAM,CAAG,6BAA6B,CAAC,CAC/EE,KAAK,CAAC1e,OAAO,CAAC,SAAC2e,IAAI,CAAK,CACtBA,IAAI,CAAC7J,YAAY,CAAC,qBAAqB,CAAE,EAAE,CAAC,CAC5C,GAAM,CAAA8J,KAAK,CAAGre,QAAQ,CAAC2F,aAAa,CAAC,GAAG,CAAC,CACzC0Y,KAAK,CAAC9J,YAAY,CAAC,OAAO,CAAE,sBAAsB,CAAC,CACnD8J,KAAK,CAAC9J,YAAY,CAAC,MAAM,CAAE6J,IAAI,CAAC9M,GAAG,CAAC,CACpC+M,KAAK,CAACC,MAAM,CAACF,IAAI,CAACxI,SAAS,EAAE,CAAC,CAC9BwI,IAAI,CAACG,WAAW,CAACF,KAAK,CACxB,CAAC,CAAC,CACF,GAAIF,KAAK,CAACte,MAAM,CAAE,CAChBoS,YAAY,CAACiM,QAAQ,CAAE,CACrBlc,QAAQ,CAAE,uBAAuB,CACjC4Q,UAAU,CAAE,KAAK,CACjBN,aAAa,CAAE,IAAI,CACnBD,KAAK,CAAE,GACT,CAAC,CACH,CACF,CAAC,CACH,CAAC,GAAA9S,GAAA,eAAAC,KAAA,CAED,SAAAgf,YAAA,CAAc,KAAAC,oBAAA,CAAAC,OAAA,MACZ,GAAI,GAAAD,oBAAA,CAAC,IAAI,CAAC7b,MAAM,CAAC+b,OAAO,UAAAF,oBAAA,WAAnBA,oBAAA,CAAqBG,MAAM,EAAE,CAChC,MACF,CAEA,GAAI5e,QAAQ,CAACoC,aAAa,CAAC,WAAW,CAAC,CAAE,CACvC,GAAM,CAAAyc,gBAAgB,CAAG7e,QAAQ,CAACoC,aAAa,CAAC,gBAAgB,CAAC,CACjEyc,gBAAgB,CAAC5d,SAAS,CAACO,MAAM,CAAC,QAAQ,CAAC,CAE3Cqd,gBAAgB,CAACvd,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC/Cod,OAAI,CAAC3b,IAAI,CAAChB,cAAc,CAAC,WAAW,CACtC,CAAC,CAAE,KAAK,CACV,CACA,IAAI,CAACa,MAAM,CAAC+b,OAAO,CAACG,OAAO,EAAI9e,QAAQ,CAACoC,aAAa,CAAC,WAAW,CAAC,CAACZ,MAAM,EAAE,CAC3E,GAAI,IAAI,CAACoB,MAAM,CAAC+b,OAAO,CAACI,MAAM,CAAE,CAC9B,GAAI,IAAI,CAACnc,MAAM,CAAC+b,OAAO,CAACG,OAAO,CAAE,CAC/B,MAAO,CAAAE,MAAM,CAACC,eAAe,CAAC,CAC5BC,MAAM,CAAE,IAAI,CAACtc,MAAM,CAAC+b,OAAO,CAACI,MAAM,CAACG,MAAM,CACzCC,IAAI,CAAE,IAAI,CAACvc,MAAM,CAAC+b,OAAO,CAACI,MAAM,CAACI,IAAI,CACrCC,IAAI,CAAE,IAAI,CAACxc,MAAM,CAAC+b,OAAO,CAACI,MAAM,CAACK,IAAI,CACrCC,OAAO,CAAE,IAAI,CAACzc,MAAM,CAAC+b,OAAO,CAACI,MAAM,CAACM,OACtC,CAAC,CACH,CACA,GAAM,CAAAN,MAAM,CAAGC,MAAM,CAACtF,IAAI,CAAC,IAAI,CAAC9W,MAAM,CAAC+b,OAAO,CAACI,MAAM,CAAC,CACtDA,MAAM,CAACO,WAAW,CAAC,IAAI,CAACzb,MAAM,CAAC,CAC/B,IAAI,CAACQ,mBAAmB,CAACnD,GAAG,CAAC,UAAM,CACjC6d,MAAM,CAACO,WAAW,CAACZ,OAAI,CAAC7a,MAAM,CAChC,CAAC,CAAC,CACFkb,MAAM,CAACjO,EAAE,CAAC,iBAAiB,CAAE,UAAM,CACjC4N,OAAI,CAAC9b,MAAM,CAAC+b,OAAO,CAACI,MAAM,CAAC/M,YAAY,EAAI0M,OAAI,CAACX,uBAAuB,CAAC,2BAA2B,CAAE,yBAAyB,CAChI,CAAC,CAAC,CACF,MAAO,CAAAgB,MACT,CACA,GAAI,IAAI,CAACnc,MAAM,CAAC+b,OAAO,CAACY,MAAM,CAAE,CAC9B,IAAI,CAAC3c,MAAM,CAAC+b,OAAO,CAACY,MAAM,CAACrf,IAAI,CAAGsf,SAAS,CAACnf,MAAM,CAAC4J,QAAQ,CAAC4G,IAAI,CAAC,CACjE,GAAM,CAAA0O,MAAM,CAAG,GAAI,CAAAE,MAAM,CAAC,IAAI,CAAC7c,MAAM,CAAC+b,OAAO,CAACY,MAAM,CAAC,CACrDA,MAAM,CAAC5G,MAAM,CAAC,QAAQ,CAAC,CACvB,MAAO,CAAA4G,MACT,CACA,GAAI,IAAI,CAAC3c,MAAM,CAAC+b,OAAO,CAACe,MAAM,CAAE,CAC9B,MAAO,IAAI,CAAAC,MAAM,CAAC,IAAI,CAAC/c,MAAM,CAAC+b,OAAO,CAACe,MAAM,CAC9C,CACA,GAAI,IAAI,CAAC9c,MAAM,CAAC+b,OAAO,CAACiB,MAAM,CAAE,CAC9B,GAAI,IAAI,CAAChd,MAAM,CAAC+b,OAAO,CAACG,OAAO,CAAE,CAC/B,IAAI,CAAClc,MAAM,CAAC+b,OAAO,CAACiB,MAAM,CAACC,QAAQ,EAAIC,MAAM,CAACC,aAAa,CAAC,CAC1DC,SAAS,CAAE,IAAI,CAACpd,MAAM,CAAC+b,OAAO,CAACiB,MAAM,CAACI,SAAS,CAC/CC,IAAI,CAAE5f,MAAM,CAAC4J,QAAQ,CAACiW,QACxB,CAAC,CAAC,CACF,MACF,CACA,MAAO,CAAAJ,MAAM,CAACpG,IAAI,CAAC,IAAI,CAAC9W,MAAM,CAAC+b,OAAO,CAACiB,MAAM,CAC/C,CACA,GAAI,IAAI,CAAChd,MAAM,CAAC+b,OAAO,CAACwB,UAAU,CAAE,CAClC,GAAM,CAAAC,gBAAgB,CAAG,IAAI,CAACxd,MAAM,CAAC+b,OAAO,CAACwB,UAAU,CACvD,GAAM,CAAA/O,MAAM,CAAGpR,QAAQ,CAAC2F,aAAa,CAAC,QAAQ,CAAC,CAC/CyL,MAAM,CAACE,GAAG,CAAG,+BAA+B,CAC5CF,MAAM,CAACmD,YAAY,CAAC,MAAM,CAAE6L,gBAAgB,CAACC,IAAI,CAAC,CAClDjP,MAAM,CAACmD,YAAY,CAAC,YAAY,CAAE6L,gBAAgB,CAACE,SAAS,CAAC,CAC7D,GAAIF,gBAAgB,CAACG,KAAK,CAAEnP,MAAM,CAACmD,YAAY,CAAC,OAAO,CAAE6L,gBAAgB,CAACG,KAAK,CAAC,CAChFnP,MAAM,CAACmD,YAAY,CAAC,OAAO,CAAE,IAAI,CAAC1Q,MAAM,CAAGuc,gBAAgB,CAAChH,SAAS,CAAGgH,gBAAgB,CAACjH,UAAU,CAAC,CACpG/H,MAAM,CAACoP,WAAW,CAAG,WAAW,CAChCpP,MAAM,CAACG,KAAK,CAAG,IAAI,CACnBvR,QAAQ,CAACkC,cAAc,CAAC,YAAY,CAAC,CAACyP,WAAW,CAACP,MAAM,CAAC,CACzD,IAAI,CAACqP,wBAAwB,CAAG,IAAI,CAACA,wBAAwB,EAAK,UAAM,KAAAC,sBAAA,CACtE,GAAM,CAAAC,OAAO,CAAG,CACdxU,IAAI,CAAE,WAAW,CACjBpI,KAAK,CAAE2a,OAAI,CAAC7a,MAAM,CAAGuc,gBAAgB,CAAChH,SAAS,CAAGgH,gBAAgB,CAACjH,UACrE,CAAC,CACD,CAAAuH,sBAAA,CAAA1gB,QAAQ,CAACoC,aAAa,CAAC,mBAAmB,CAAC,UAAAse,sBAAA,iBAA3CA,sBAAA,CAA6CE,aAAa,CAACC,WAAW,CAACF,OAAO,CAAE,qBAAqB,CACvG,CAAE,CACF,IAAI,CAACtc,mBAAmB,CAACnD,GAAG,CAAC,IAAI,CAACuf,wBAAwB,CAAC,CAC3D,MACF,CACA,GAAI,IAAI,CAAC7d,MAAM,CAAC+b,OAAO,CAACmC,MAAM,CAAE,CAC9B,GAAM,CAAAC,YAAY,CAAG,IAAI,CAACne,MAAM,CAAC+b,OAAO,CAACmC,MAAM,CAC/C,GAAIC,YAAY,CAAC/O,YAAY,CAAE,CAC7B+O,YAAY,CAACC,eAAe,CAAG,UAAM,CACnCtC,OAAI,CAACX,uBAAuB,CAAC,0BAA0B,CAAE,0BAA0B,CACrF,CACF,CACA+C,MAAM,CAACpH,IAAI,CAACqH,YAAY,CAAC,CACzB,GAAIA,YAAY,CAACE,YAAY,CAAE,CAE7BH,MAAM,CACHI,gBAAgB,CAAC,CAChBC,KAAK,CAAEJ,YAAY,CAACI,KAAK,CACzBC,MAAM,CAAEL,YAAY,CAACK,MAAM,CAC3BC,IAAI,CAAE,CAAChhB,MAAM,CAAC4J,QAAQ,CAACiW,QAAQ,CAAC,CAChCoB,YAAY,CAAE,KAChB,CAAC,CAAC,CACDhc,IAAI,CAAC,SAAUC,QAAQ,CAAE,CACxB,GAAM,CAAAgc,kBAAkB,CAAGvhB,QAAQ,CAACkC,cAAc,CAAC,sBAAsB,CAAC,CAC1E,GAAIqf,kBAAkB,CAAEA,kBAAkB,CAAC9d,SAAS,CAAG8B,QAAQ,CAAC,CAAC,CAAC,CAACic,KACrE,CAAC,CACL,CACA,MACF,CACA,GAAI,IAAI,CAAC5e,MAAM,CAAC+b,OAAO,CAAC8C,MAAM,CAAE,CAC9B,GAAM,CAAAC,YAAY,CAAG,IAAI,CAAC9e,MAAM,CAAC+b,OAAO,CAAC8C,MAAM,CAC/C,IAAI,CAACE,oBAAoB,CAAG,IAAI,CAACA,oBAAoB,EAAK,UAAM,KAAAC,sBAAA,CAC9D,GAAM,CAAAjB,OAAO,CAAG,CAAEkB,SAAS,CAAE,CAAE9d,KAAK,CAAE2a,OAAI,CAAC7a,MAAM,CAAG6d,YAAY,CAACtI,SAAS,CAAGsI,YAAY,CAACvI,UAAW,CAAC,CAAC,CACvG,CAAAyI,sBAAA,CAAA5hB,QAAQ,CAACoC,aAAa,CAAC,eAAe,CAAC,UAAAwf,sBAAA,iBAAvCA,sBAAA,CAAyChB,aAAa,CAACC,WAAW,CAAC,CAAEY,MAAM,CAAEd,OAAQ,CAAC,CAAE,oBAAoB,CAC9G,CAAE,CACF,IAAI,CAACtc,mBAAmB,CAACnD,GAAG,CAAC,IAAI,CAACygB,oBAAoB,CAAC,CACvD,IAAI,CAACG,gBAAgB,CAAGzhB,MAAM,CAACiB,gBAAgB,CAAC,SAAS,CAAE,SAAC+F,KAAK,CAAK,CACpE,GAAM,CAAA0a,OAAO,CAAG/hB,QAAQ,CAACoC,aAAa,CAAC,gBAAgB,CAAC,CACxD,GAAI2f,OAAO,CAAC,CACVrD,OAAI,CAACiD,oBAAoB,EAAE,CAC3BI,OAAO,CAAC7b,aAAa,CAACD,WAAW,CAAC8b,OAAO,CAC3C,CACF,CAAC,CAAE,CAAEtgB,IAAI,CAAE,IAAK,CAAC,CAAC,CAClB,MACF,CACF,CAAC,GAAAlC,GAAA,qBAAAC,KAAA,CAED,SAAAwiB,kBAAA,CAAoB,CAClB,IAAI,CAACpf,MAAM,CAACqf,aAAa,EAAIA,aAAa,CAACC,UAAU,CAAC,IAAI,CAACtf,MAAM,CAACqf,aAAa,CACjF,CAAC,GAAA1iB,GAAA,gBAAAC,KAAA,CAoBD,SAAA2iB,aAAA,CAAe,KAAAC,OAAA,MACb,GAAI,IAAI,CAACxf,MAAM,CAACC,QAAQ,CAAE,CACxB,IAAI,CAACA,QAAQ,CAAGwf,WAAW,CAAC,IAAI,CAACC,WAAW,CAAE,GAAG,CAAC,CAClDtiB,QAAQ,CAACsB,gBAAgB,CAAC,kBAAkB,CAAE,UAAM,CAClD,GAAItB,QAAQ,CAACuiB,MAAM,CAAE,CACnB,MAAO,CAAAvf,aAAa,CAACof,OAAI,CAACvf,QAAQ,CACpC,CACAuf,OAAI,CAACvf,QAAQ,CAAGwf,WAAW,CAACD,OAAI,CAACE,WAAW,CAAE,GAAG,CACnD,CAAC,CAAE,KAAK,CACV,CACF,CAAC,GAAA/iB,GAAA,qBAAAC,KAAA,CAED,SAAAgjB,kBAAA,CAAoB,CAClB,GAAI,IAAI,CAAC5f,MAAM,CAAC6f,SAAS,EAAI,eAAe,EAAI,CAAA1N,SAAS,CAAE,CACzDA,SAAS,CAAC2N,aAAa,CACpBC,QAAQ,CAAC,wBAAwB,CAAE,CAAEC,KAAK,CAAE,GAAI,CAAC,CAAC,CAClDtd,IAAI,CAAC,SAAUud,YAAY,CAAE,CAE9B,CAAC,CAAC,CACDzc,KAAK,CAAC,SAAUG,KAAK,CAAE,CACtBD,OAAO,CAACC,KAAK,CAAC,SAAS,CAAEA,KAAK,CAChC,CAAC,CAAC,CACJwO,SAAS,CAAC2N,aAAa,CACpBI,KAAK,CACLxd,IAAI,CAAC,SAAUud,YAAY,CAAE,CAEhC,CAAC,CACH,CACF,CAAC,GAAAtjB,GAAA,iBAAAC,KAAA,CAED,SAAAujB,cAAA,CAAgB,KAAAC,qBAAA,CAAAC,sBAAA,CAAAC,sBAAA,CACd,EAAAF,qBAAA,KAAI,CAACpgB,MAAM,CAACugB,SAAS,UAAAH,qBAAA,iBAArBA,qBAAA,CAAuBpE,MAAM,GAC3B,GAAI,CAAAwE,SAAS,CAAC,CACZte,OAAO,CAAE,IAAI,CAAClC,MAAM,CAACugB,SAAS,CAACre,OAAO,KAAA1D,MAAA,EAAA6hB,sBAAA,EAAAC,sBAAA,CAAOljB,QAAQ,CAACoC,aAAa,CAAC,oBAAoB,CAAC,UAAA8gB,sBAAA,iBAA5CA,sBAAA,CAA8CG,SAAS,UAAAJ,sBAAA,UAAAA,sBAAA,CAAI,EAAE,gBAAc,CACxHK,QAAQ,CAAE,IAAI,CAAC1gB,MAAM,CAACugB,SAAS,CAACI,QAAQ,EAAI,eAAe,CAC3DC,OAAO,CAAE,IAAI,CAAC5gB,MAAM,CAACugB,SAAS,CAACK,OAAO,CACtCC,KAAK,CAAE,IAAI,CAAC7gB,MAAM,CAACugB,SAAS,CAACM,KAAK,CAClCC,MAAM,CAAE,IAAI,CAAC9gB,MAAM,CAACugB,SAAS,CAACO,MAAM,CACpCC,UAAU,CAAE,IAAI,CAAC/gB,MAAM,CAACugB,SAAS,CAACS,UAAU,CAC5CC,UAAU,CAAE,IAAI,CAACjhB,MAAM,CAACugB,SAAS,CAACW,UAAU,CAC5CC,MAAM,CAAE,IAAI,CAACnhB,MAAM,CAACugB,SAAS,CAACY,MAAM,CACpCC,QAAQ,CAAE,IAAI,CAACphB,MAAM,CAACugB,SAAS,CAACc,QAAQ,CACxCC,UAAU,CAAE,IAAI,CAACthB,MAAM,CAACugB,SAAS,CAACgB,UACpC,CAAC,CACL,CAAC,GAAA5kB,GAAA,aAAAC,KAAA,CAED,SAAA4kB,UAAA,CAAY,KAAAC,kBAAA,CACV,GAAI,GAAAA,kBAAA,CAAC,IAAI,CAACzhB,MAAM,CAAC0hB,KAAK,UAAAD,kBAAA,WAAjBA,kBAAA,CAAmBzF,MAAM,EAAE,CAC9B,MACF,CACA,GAAM,CAAA5c,QAAQ,CAAG,IAAI,CAACY,MAAM,CAAC0hB,KAAK,CAACtiB,QAAQ,CAC3C,GAAIA,QAAQ,CAAE,CACZ,GAAIA,QAAQ,CAACC,UAAU,CAAC,GAAG,CAAC,CAAE,CAC5BqiB,KAAK,CAACC,kBAAkB,CAACviB,QAAQ,CAACG,KAAK,CAAC,CAAC,CAAC,CAC5C,CAAC,IAAM,IAAIH,QAAQ,CAACC,UAAU,CAAC,GAAG,CAAC,CAAE,CACnCqiB,KAAK,CAACE,yBAAyB,CAACxiB,QAAQ,CAACG,KAAK,CAAC,CAAC,CAAC,CACnD,CAAC,IAAM,CACLmiB,KAAK,CAACG,uBAAuB,CAACziB,QAAQ,CACxC,CACA,MACF,CACAsiB,KAAK,CAACI,eAAe,EACvB,CAAC,GAAAnlB,GAAA,sBAAAC,KAAA,CAED,SAAAmlB,mBAAA,CAAqB,KAAAC,OAAA,MAAAC,qBAAA,CAAAC,sBAAA,CACnB,GAAM,CAAAC,SAAS,CAAG/kB,QAAQ,CAACkF,gBAAgB,CAAC,uCAAuC,CAAC,CACpF,IAAI,CAAC8f,SAAS,CAAG,GAAI,CAAAC,cAAc,CAAC,CAClCC,SAAS,CAAE,SAAAA,UAAA,CAAM,CACfN,OAAI,CAACpe,WAAW,EAAE,CAClBoe,OAAI,CAAChT,WAAW,EAAE,CAClBgT,OAAI,CAAC7S,gBAAgB,EAAE,CACvB6S,OAAI,CAAC7R,aAAa,EAAE,CACpB6R,OAAI,CAACzP,SAAS,EAAE,CAChByP,OAAI,CAACvP,cAAc,EAAE,CACrBuP,OAAI,CAAC9M,QAAQ,EAAE,CACf8M,OAAI,CAAC/L,WAAW,EAAE,CAClB+L,OAAI,CAAC7L,WAAW,EAAE,CAClB6L,OAAI,CAAClI,UAAU,EAAE,CACjBkI,OAAI,CAAC5K,UAAU,EAAE,CACjB4K,OAAI,CAAC7hB,IAAI,CAACtD,OAAO,CAACslB,SAAS,CAAE,SAACI,QAAQ,CAAK,CACzCA,QAAQ,CAAClkB,SAAS,CAACO,MAAM,CAAC,QAAQ,CACpC,CAAC,CAAC,CACFojB,OAAI,CAACrP,OAAO,EAAE,CACdqP,OAAI,CAACnN,eAAe,EAAE,CACtBmN,OAAI,CAACR,SAAS,EAChB,CAAC,CACDgB,KAAK,CAAE,SAAAA,MAAA,CAAM,CACXR,OAAI,CAAC7hB,IAAI,CAACtD,OAAO,CAACslB,SAAS,CAAE,SAACI,QAAQ,CAAK,CACzCA,QAAQ,CAAClkB,SAAS,CAACC,GAAG,CAAC,QAAQ,CACjC,CAAC,CACH,CACF,CAAC,CAAC,CACF,IAAA2jB,qBAAA,CAAI,IAAI,CAACjiB,MAAM,CAACyiB,UAAU,UAAAR,qBAAA,WAAtBA,qBAAA,CAAwBS,SAAS,CAAE,CACrC,IAAI,CAACN,SAAS,CAAC1jB,gBAAgB,CAAC,WAAW,CAAE,UAAM,CACjDsjB,OAAI,CAACI,SAAS,CAACO,cAAc,EAC/B,CAAC,CAAC,CACF,IAAI,CAACP,SAAS,CAACO,cAAc,EAC/B,CACA,EAAAT,sBAAA,KAAI,CAACliB,MAAM,CAACyiB,UAAU,UAAAP,sBAAA,iBAAtBA,sBAAA,CAAwBU,GAAG,GAAI,IAAI,CAACR,SAAS,CAACtL,IAAI,EACpD,CAAC,GAAAna,GAAA,iBAAAC,KAAA,CAED,SAAAimB,cAAA,CAAgB,KAAAC,YAAA,CAAAC,OAAA,MACd,GAAM,CAAAxZ,IAAI,EAAAuZ,YAAA,CAAG,IAAI,CAAC9iB,MAAM,UAAA8iB,YAAA,iBAAXA,YAAA,CAAaE,SAAS,CACnC,GAAI,MAAO,CAAAvlB,MAAM,CAACwlB,WAAW,GAAK,WAAW,CAAE,CAC7C,MACF,CACA,GAAI1Z,IAAI,GAAK,UAAU,CAAE,CACvB,GAAM,CAAA2Z,QAAQ,CAAG,GAAI,CAAAC,QAAQ,CAAC,CAC5BC,MAAM,CAAE,UAAU,CAClBjiB,KAAK,CAAE,IAAI,CAACF,MAAM,CAAG,MAAM,CAAG,OAChC,CAAC,CAAC,CACF,IAAI,CAACoiB,sBAAsB,CAAG,IAAI,CAACA,sBAAsB,EAAK,UAAM,CAClEH,QAAQ,CAAClM,SAAS,CAAC,OAAO,CAAE+L,OAAI,CAAC9hB,MAAM,CAAG,MAAM,CAAG,OAAO,CAC5D,CAAE,CACF,IAAI,CAACQ,mBAAmB,CAACnD,GAAG,CAAC,IAAI,CAAC+kB,sBAAsB,CAC1D,CACA,GAAG9Z,IAAI,GAAK,OAAO,CAAE,CACnB+Z,KAAK,CAACxM,IAAI,CAAC,CACTyM,QAAQ,CAAE,CAAEpiB,KAAK,CAAE,IAAI,CAACF,MAAM,CAAG,MAAM,CAAG,OAAQ,CACpD,CAAC,CAAC,CACF,IAAI,CAACuiB,mBAAmB,CAAG,IAAI,CAACA,mBAAmB,EAAK,UAAM,CAC5DF,KAAK,CAACnjB,IAAI,CAACsjB,OAAO,CAACC,QAAQ,CAACX,OAAI,CAAC9hB,MAAM,CAAG,MAAM,CAAG,OAAO,CAC5D,CAAE,CACF,IAAI,CAACQ,mBAAmB,CAACnD,GAAG,CAAC,IAAI,CAACklB,mBAAmB,CACvD,CACF,CAAC,GAAA7mB,GAAA,gBAAAC,KAAA,CAED,SAAA+mB,aAAA,CAAe,KAAAC,OAAA,MAAAC,qBAAA,CACb,GAAI,CAAC,IAAI,CAAC7jB,MAAM,CAAC8jB,YAAY,CAAE,CAC7B,MACF,CACArmB,MAAM,CAACiB,gBAAgB,CAAC,cAAc,CAAE,UAAM,KAAAqlB,qBAAA,CAC5C,CAAAA,qBAAA,CAAAtmB,MAAM,CAAC0H,YAAY,UAAA4e,qBAAA,iBAAnBA,qBAAA,CAAqB3e,OAAO,oBAAA5G,MAAA,CAAoB6I,QAAQ,CAACiW,QAAQ,EAAIsG,OAAI,CAACzjB,IAAI,CAACjD,YAAY,EAAE,CAC/F,CAAC,CAAC,CACF,GAAM,CAAAK,SAAS,CAAGymB,MAAM,EAAAH,qBAAA,CAACpmB,MAAM,CAAC0H,YAAY,UAAA0e,qBAAA,iBAAnBA,qBAAA,CAAqBI,OAAO,oBAAAzlB,MAAA,CAAoB6I,QAAQ,CAACiW,QAAQ,EAAG,CAAC,CAE9F,GAAI/f,SAAS,EAAI8J,QAAQ,CAAC6c,IAAI,GAAK,EAAE,CAAE,CACrCzmB,MAAM,CAAC0mB,QAAQ,CAAC,CACdzP,GAAG,CAAEnX,SAAS,CACdkC,QAAQ,CAAE,QACZ,CAAC,CACH,CACF,CAAC,GAAA9C,GAAA,cAAAC,KAAA,CAED,SAAAwnB,WAAA,CAAa,KAAAC,OAAA,MACX,GAAM,CAAAC,QAAQ,CAAGlnB,QAAQ,CAACkF,gBAAgB,CAAC,oCAAkC,CAAC,CAC9E,GAAI,CAACgiB,QAAQ,CAACrnB,MAAM,CAAE,CACpB,MACF,CAEA,GAAI,IAAI,CAACkD,IAAI,CAAC3C,QAAQ,EAAE,CAAE,CACxB,IAAI,CAAC2C,IAAI,CAACtD,OAAO,CAACynB,QAAQ,CAAE,SAACC,OAAO,CAAK,CACvCA,OAAO,CAACC,eAAe,CAAC,WAAW,CACrC,CAAC,CAAC,CACF,MACF,CAEA,GAAM,CAAAC,mBAAmB,CAAG,QAAtB,CAAAA,mBAAmBA,CAAIhW,EAAE,CAAK,CAClC4V,OAAI,CAAClkB,IAAI,CAACtD,OAAO,CAACynB,QAAQ,CAAE,SAACC,OAAO,CAAK,CACvC,GAAM,CAAAG,YAAY,CAAGH,OAAO,CAACjhB,aAAa,CAAC9D,aAAa,CAAC,eAAe,CAAC,CACzE,GAAIklB,YAAY,CAACjW,EAAE,GAAKA,EAAE,CAAE,CAC1BiW,YAAY,CAACC,OAAO,CAAG,KACzB,CACF,CAAC,CACH,CAAC,CAED,IAAI,CAACxkB,IAAI,CAACtD,OAAO,CAACynB,QAAQ,CAAE,SAACC,OAAO,CAAK,CACvCA,OAAO,CAACK,sBAAsB,CAAClmB,gBAAgB,CAAC,OAAO,CAAE,UAAY,CACnE+lB,mBAAmB,CAAC,IAAI,CAACI,YAAY,CAAC,KAAK,CAAC,CAC9C,CAAC,CAAE,KAAK,CACV,CAAC,CAAC,CACF,IAAI,CAACvjB,cAAc,CAAChD,GAAG,CAACmmB,mBAAmB,CAC7C,CAAC,GAAA9nB,GAAA,YAAAC,KAAA,CAED,SAAAkoB,SAAA,CAAW,KAAAC,OAAA,MACT,GAAM,CAAAC,QAAQ,CAAG,EAAE,CACnB,GAAM,CAAAC,QAAQ,CAAG,EAAE,CACnB,GAAM,CAAAC,aAAa,CAAG9nB,QAAQ,CAACoC,aAAa,CAAC,gBAAgB,CAAC,CAC9D,GAAM,CAAA2lB,UAAU,CAAG/nB,QAAQ,CAACoC,aAAa,CAAC,cAAc,CAAC,CACzD,GAAM,CAAA4lB,mBAAmB,CAAGhoB,QAAQ,CAACoC,aAAa,CAAC,uBAAuB,CAAC,CAC3E,GAAI,CAAA6lB,WAAW,CAAG,IAAK,EAAC,CACxB,GAAIjoB,QAAQ,CAACE,IAAI,CAAC4D,OAAO,CAAC8S,aAAa,GAAK,MAAM,CAAE,CAClDgR,QAAQ,CAAC/P,IAAI,CAAC7X,QAAQ,CAACkC,cAAc,CAAC,gBAAgB,CAAC,CACzD,CACA,GAAIlC,QAAQ,CAACE,IAAI,CAAC4D,OAAO,CAACokB,YAAY,GAAK,MAAM,CAAE,CACjDN,QAAQ,CAAC/P,IAAI,CAAC7X,QAAQ,CAACkC,cAAc,CAAC,eAAe,CAAC,CACxD,CAEA6lB,UAAU,SAAVA,UAAU,iBAAVA,UAAU,CAAEzmB,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC1CqmB,OAAI,CAAC5kB,IAAI,CAAChB,cAAc,CAAC,MAAM,CACjC,CAAC,CAAC,CACF1B,MAAM,CAACiB,gBAAgB,CAAC,QAAQ,CAAE,SAAC+F,KAAK,CAAK,CAC3C,GAAIsgB,OAAI,CAACnjB,kBAAkB,CAAE,CAC3B6C,KAAK,CAAC8gB,cAAc,EAAE,CACtB,MACF,CACA,GAAM,CAAAC,KAAK,CAAGpoB,QAAQ,CAACkC,cAAc,CAAC,MAAM,CAAC,CAC7CylB,OAAI,CAAC3jB,YAAY,CAAG2jB,OAAI,CAAC5kB,IAAI,CAACjD,YAAY,EAAE,CAC5C,GAAM,CAAAuoB,MAAM,CAAGV,OAAI,CAAC3jB,YAAY,CAAG2jB,OAAI,CAAC1jB,YAAY,CAEpDjE,QAAQ,CAACE,IAAI,CAACooB,eAAe,CAAC,aAAa,CAAE,IAAI,CAAC,CAClDL,WAAW,EAAI5nB,MAAM,CAACkoB,YAAY,CAACN,WAAW,CAAC,CAC/CA,WAAW,CAAG5nB,MAAM,CAACud,UAAU,CAAC,UAAM,CACpC5d,QAAQ,CAACE,IAAI,CAACooB,eAAe,CAAC,aAAa,CAC7C,CAAC,CAAE,GAAG,CAAC,CAEPX,OAAI,CAAC5kB,IAAI,CAACtD,OAAO,CAACmoB,QAAQ,CAAE,SAACpd,OAAO,CAAK,CACvC,GAAI6d,MAAM,CAAGR,QAAQ,CAAE,CACrBrd,OAAO,CAACvJ,SAAS,CAACO,MAAM,CAAC,qBAAqB,CAAC,CAC/CmmB,OAAI,CAAC5kB,IAAI,CAACtC,UAAU,CAAC+J,OAAO,CAAE,CAAC,oBAAoB,CAAC,CAAE,IAAI,CAAC,CAC3D4d,KAAK,CAACI,KAAK,EACb,CAAC,IAAM,IAAIH,MAAM,CAAG,CAACR,QAAQ,CAAE,CAC7Brd,OAAO,CAACvJ,SAAS,CAACO,MAAM,CAAC,oBAAoB,CAAC,CAC9CmmB,OAAI,CAAC5kB,IAAI,CAACtC,UAAU,CAAC+J,OAAO,CAAE,CAAC,qBAAqB,CAAC,CAAE,IAAI,CAAC,CAC5D4d,KAAK,CAACI,KAAK,EACb,CACF,CAAC,CAAC,CACF,GAAM,CAAAC,aAAa,CAAGzoB,QAAQ,CAACE,IAAI,CAACwoB,YAAY,CAAGroB,MAAM,CAACsoB,WAAW,CACrE,GAAM,CAAAC,aAAa,CAAGxlB,IAAI,CAACylB,GAAG,CAACzlB,IAAI,CAAC0lB,GAAG,CAAC,GAAG,CAAG1lB,IAAI,CAACylB,GAAG,CAAClB,OAAI,CAAC3jB,YAAY,CAAE,CAAC,CAAC,CAAGykB,aAAa,CAAE,GAAG,CAAC,CAAE,CAAC,CAAC,CACtG,GAAIT,mBAAmB,CAAE,CACvBA,mBAAmB,CAACjhB,KAAK,CAACgiB,WAAW,CAAC,YAAY,IAAA3nB,MAAA,CAAKwnB,aAAa,CAACI,OAAO,CAAC,CAAC,CAAC,MACjF,CAEA,GAAIlB,aAAa,CAAE,CACjB,GAAIc,aAAa,CAAG,CAAC,CAAE,CACrBd,aAAa,CAAC7mB,SAAS,CAACO,MAAM,CAAC,QAAQ,CAAE,kBAAkB,CAAC,CAC5DmmB,OAAI,CAAC5kB,IAAI,CAACtC,UAAU,CAACqnB,aAAa,CAAE,CAAC,iBAAiB,CAAC,CAAE,IAAI,CAC/D,CAAC,IAAM,CACLA,aAAa,CAAC7mB,SAAS,CAACO,MAAM,CAAC,iBAAiB,CAAC,CACjDmmB,OAAI,CAAC5kB,IAAI,CAACtC,UAAU,CAACqnB,aAAa,CAAE,CAAC,kBAAkB,CAAC,CAAE,IAAI,CAAE,UAAM,CACpEA,aAAa,CAAC7mB,SAAS,CAACsG,QAAQ,CAAC,kBAAkB,CAAC,EAAIugB,aAAa,CAAC7mB,SAAS,CAACC,GAAG,CAAC,QAAQ,CAC9F,CAAC,CACH,CACA,GAAI6mB,UAAU,CAAE,CACdA,UAAU,CAAC3lB,aAAa,CAAC,MAAM,CAAC,CAACuS,SAAS,IAAAvT,MAAA,CAAMgC,IAAI,CAAC6lB,KAAK,CAACL,aAAa,CAAC,KAC3E,CACF,CAAC,IAAAM,UAAA,CAAAhhB,0BAAA,CACiByf,OAAI,CAACzjB,cAAc,EAAAilB,MAAA,KAArC,IAAAD,UAAA,CAAA9gB,CAAA,KAAA+gB,MAAA,CAAAD,UAAA,CAAA7gB,CAAA,IAAAC,IAAA,EAAuC,IAA9B,CAAAjB,OAAK,CAAA8hB,MAAA,CAAA3pB,KAAA,CACZ6H,OAAK,EACP,CAAC,OAAAhB,GAAA,EAAA6iB,UAAA,CAAA3gB,CAAA,CAAAlC,GAAA,UAAA6iB,UAAA,CAAA1gB,CAAA,GACDmf,OAAI,CAAC1jB,YAAY,CAAG0jB,OAAI,CAAC3jB,YAC3B,CAAC,CAAE,KAAK,CACV,CAAC,GAAAzE,GAAA,YAAAC,KAAA,CAED,SAAA4pB,SAAA,CAAW,KAAAC,OAAA,MACT,GAAI,CAAAC,YAAY,CAAG,IAAI,CAACvmB,IAAI,CAAC3C,QAAQ,EAAE,CACvCC,MAAM,CAACiB,gBAAgB,CAAC,QAAQ,CAAE,UAAM,CACtC,GAAI,CAAC+nB,OAAI,CAACE,cAAc,CAAE,CACxBF,OAAI,CAACE,cAAc,CAAGlpB,MAAM,CAACud,UAAU,CAAC,UAAM,CAC5CyL,OAAI,CAACE,cAAc,CAAG,IAAI,CAAC,IAAAC,UAAA,CAAAthB,0BAAA,CACTmhB,OAAI,CAACjlB,cAAc,EAAAqlB,MAAA,KAArC,IAAAD,UAAA,CAAAphB,CAAA,KAAAqhB,MAAA,CAAAD,UAAA,CAAAnhB,CAAA,IAAAC,IAAA,EAAuC,IAA9B,CAAAjB,KAAK,CAAAoiB,MAAA,CAAAjqB,KAAA,CACZ6H,KAAK,EACP,CAAC,OAAAhB,GAAA,EAAAmjB,UAAA,CAAAjhB,CAAA,CAAAlC,GAAA,UAAAmjB,UAAA,CAAAhhB,CAAA,GACD6gB,OAAI,CAAC9T,OAAO,EAAE,CACd8T,OAAI,CAACpR,kBAAkB,EAAE,CACzBoR,OAAI,CAAC5gB,UAAU,EAAE,CAEjB,GAAM,CAAArI,QAAQ,CAAGipB,OAAI,CAACtmB,IAAI,CAAC3C,QAAQ,EAAE,CACrC,GAAIA,QAAQ,GAAKkpB,YAAY,CAAE,CAC7BtpB,QAAQ,CAACkC,cAAc,CAAC,MAAM,CAAC,CAACsmB,KAAK,EAAE,CACvCc,YAAY,CAAGlpB,QACjB,CACF,CAAC,CAAE,GAAG,CACR,CACF,CAAC,CAAE,KAAK,CACV,CAAC,GAAAb,GAAA,eAAAC,KAAA,CAED,SAAAkqB,YAAA,CAAc,KAAAC,OAAA,MACZ3pB,QAAQ,CAACkC,cAAc,CAAC,MAAM,CAAC,CAACZ,gBAAgB,CAAC,OAAO,CAAE,UAAM,CAC9D,GAAI,CAACtB,QAAQ,CAACE,IAAI,CAACe,SAAS,CAACsG,QAAQ,CAAC,MAAM,CAAC,CAAE,CAC7C,MACF,CAAC,IAAAqiB,UAAA,CAAA1hB,0BAAA,CACiByhB,OAAI,CAACrlB,iBAAiB,EAAAulB,MAAA,KAAxC,IAAAD,UAAA,CAAAxhB,CAAA,KAAAyhB,MAAA,CAAAD,UAAA,CAAAvhB,CAAA,IAAAC,IAAA,EAA0C,IAAjC,CAAAjB,KAAK,CAAAwiB,MAAA,CAAArqB,KAAA,CACZ6H,KAAK,EACP,CAAC,OAAAhB,GAAA,EAAAujB,UAAA,CAAArhB,CAAA,CAAAlC,GAAA,UAAAujB,UAAA,CAAAphB,CAAA,GACDmhB,OAAI,CAACnlB,kBAAkB,CAAG,KAAK,CAC/BxE,QAAQ,CAACE,IAAI,CAACe,SAAS,CAACO,MAAM,CAAC,MAAM,CACvC,CAAC,CAAE,KAAK,CACV,CAAC,GAAAjC,GAAA,eAAAC,KAAA,CAED,SAAAsqB,YAAA,CAAc,KAAAC,OAAA,MACZ1pB,MAAM,CAACiB,gBAAgB,CAAC,aAAa,CAAE,UAAM,CAC3CyoB,OAAI,CAAChnB,IAAI,CAACtD,OAAO,CAACO,QAAQ,CAACkF,gBAAgB,CAAC,SAAS,CAAC,CAAE,SAAC8kB,GAAG,CAAK,CAC/DA,GAAG,CAAC/oB,SAAS,CAACqG,MAAM,CAAC,MAAM,CAAE,IAAI,CACnC,CAAC,CAAC,CAAC,IAAA2iB,UAAA,CAAA/hB,0BAAA,CACe6hB,OAAI,CAACxlB,mBAAmB,EAAA2lB,MAAA,KAA1C,IAAAD,UAAA,CAAA7hB,CAAA,KAAA8hB,MAAA,CAAAD,UAAA,CAAA5hB,CAAA,IAAAC,IAAA,EAA4C,IAAnC,CAAAjB,KAAK,CAAA6iB,MAAA,CAAA1qB,KAAA,CACZ6H,KAAK,EACP,CAAC,OAAAhB,GAAA,EAAA4jB,UAAA,CAAA1hB,CAAA,CAAAlC,GAAA,UAAA4jB,UAAA,CAAAzhB,CAAA,GACH,CAAC,CAAE,KAAK,CACV,CAAC,GAAAjJ,GAAA,QAAAC,KAAA,CAED,SAAAka,KAAA,CAAO,KAAAyQ,OAAA,MACL,GAAI,KAAAC,sBAAA,CACF,GAAI,IAAI,CAACxnB,MAAM,CAACyiB,UAAU,CAAE,CAC1B,IAAI,CAACV,kBAAkB,EACzB,CAAC,IAAM,IAAI,GAAAyF,sBAAA,CAAC,IAAI,CAACxnB,MAAM,CAACyiB,UAAU,UAAA+E,sBAAA,WAAtBA,sBAAA,CAAwB5E,GAAG,EAAE,CACvC,IAAI,CAAChf,WAAW,EAAE,CAClB,IAAI,CAACoL,WAAW,EAAE,CAClB,IAAI,CAACG,gBAAgB,EAAE,CACvB,IAAI,CAACgB,aAAa,EAAE,CACpB,IAAI,CAACoC,SAAS,EAAE,CAChB,IAAI,CAACE,cAAc,EAAE,CACrB,IAAI,CAACyC,QAAQ,EAAE,CACf,IAAI,CAACe,WAAW,EAAE,CAClB,IAAI,CAACE,WAAW,EAAE,CAClB,IAAI,CAAC2D,UAAU,EAAE,CACjB,IAAI,CAAC1C,UAAU,EAAE,CACjB,IAAI,CAACoK,SAAS,EAChB,CACA,IAAI,CAAC1f,cAAc,EAAE,CACrB,IAAI,CAACO,WAAW,EAAE,CAClB,IAAI,CAAC0B,QAAQ,EAAE,CACf,IAAI,CAACe,eAAe,EAAE,CACtB,IAAI,CAACe,UAAU,EAAE,CACjB,IAAI,CAACuZ,iBAAiB,EAAE,CACxB,IAAI,CAACG,YAAY,EAAE,CACnB,IAAI,CAACK,iBAAiB,EAAE,CACxB,IAAI,CAACO,aAAa,EAAE,CACpB,IAAI,CAAC0C,aAAa,EAAE,CACpB,IAAI,CAACc,YAAY,EAAE,CACnB,IAAI,CAACS,UAAU,EAAE,CAEjB3mB,MAAM,CAACud,UAAU,CAAC,UAAM,KAAAyM,qBAAA,CACtBF,OAAI,CAAC3L,WAAW,EAAE,CAClB,GAAI,GAAA6L,qBAAA,CAACF,OAAI,CAACvnB,MAAM,CAACyiB,UAAU,UAAAgF,qBAAA,WAAtBA,qBAAA,CAAwB7E,GAAG,EAAE,CAChC2E,OAAI,CAAC5U,OAAO,EAAE,CACd4U,OAAI,CAAC1S,eAAe,EACtB,CACA0S,OAAI,CAACzC,QAAQ,EAAE,CACfyC,OAAI,CAACf,QAAQ,EAAE,CACfe,OAAI,CAACT,WAAW,EAAE,CAClBS,OAAI,CAACL,WAAW,EAClB,CAAC,CAAE,GAAG,CACR,CAAE,MAAOzjB,GAAG,CAAE,CACZC,OAAO,CAACC,KAAK,CAACF,GAAG,CACnB,CACF,CAAC,WAAA/D,KAAA,IAGH,GAAM,CAAAgoB,SAAS,CAAG,QAAZ,CAAAA,SAASA,CAAA,CAAS,CACtBjqB,MAAM,CAACkqB,KAAK,CAAG,GAAI,CAAAjoB,KAAO,CAC1BjC,MAAM,CAACkqB,KAAK,CAAC7Q,IAAI,EACnB,CAAC,CAED,GAAI1Z,QAAQ,CAACwR,UAAU,GAAK,SAAS,CAAE,CACrC8Y,SAAS,EACX,CAAC,IAAM,CACLtqB,QAAQ,CAACsB,gBAAgB,CAAC,kBAAkB,CAAEgpB,SAAS,CAAE,KAAK,CAChE"} \ No newline at end of file diff --git a/themes/FixIt/assets/lib/VERSION b/themes/FixIt/assets/lib/VERSION new file mode 100644 index 0000000..1738592 --- /dev/null +++ b/themes/FixIt/assets/lib/VERSION @@ -0,0 +1,32 @@ +algoliasearch@4.14.2 https://github.com/algolia/algoliasearch-client-javascript +animate.css@4.1.1 https://github.com/daneden/animate.css +aplayer@1.10.1 https://github.com/MoePlayer/APlayer +artalk@2.5.2 https://github.com/ArtalkJS/Artalk +autocomplete-js@0.38.1 https://github.com/algolia/autocomplete +cell-watermark@1.0.3 https://github.com/Lruihao/watermark +cookieconsent@3.1.1 https://github.com/osano/cookieconsent +crypto-js@4.1.1 https://github.com/brix/crypto-js +echarts@5.3.3 https://github.com/apache/echarts +emoji-data@14.0.0 https://github.com/iamcal/emoji-data +eruda@2.5.0 https://github.com/liriliri/eruda +fontawesome-free@6.2.0 https://github.com/FortAwesome/Font-Awesome +fusejs@6.6.2 https://github.com/krisk/fuse +gitalk@1.7.2 https://github.com/gitalk/gitalk +instant.page@5.1.1 https://github.com/instantpage/instant.page +katex@0.16.2 https://github.com/KaTeX/KaTeX +lightgallery@2.6.1 https://github.com/sachinchoolur/lightgallery +lunr.js@2.3.9 https://github.com/olivernn/lunr.js +mapbox-gl@2.10.0 https://github.com/mapbox/mapbox-gl-js +mermaid@9.4.3 https://github.com/mermaid-js/mermaid +meting@2.0.1 https://github.com/metowolf/MetingJS +normalize.css@8.0.1 https://github.com/necolas/normalize.css +object-fit-images@3.2.4 https://github.com/fregante/object-fit-images [archived] +pangu.js@4.0.7 https://github.com/vinta/pangu.js +sharer.js@0.5.1 https://github.com/ellisonleao/sharer.js +simple-icons@7.12.0 https://github.com/simple-icons/simple-icons +twemoji@14.0.2 https://github.com/twitter/twemoji +twikoo@1.6.8 https://github.com/imaegoo/twikoo +typeit@8.7.1 https://github.com/alexmacarthur/typeit +valine@1.5.1 https://github.com/xCss/Valine +vconsole@3.14.6 https://github.com/Tencent/vConsole +waline@2.14.7 https://github.com/walinejs/waline diff --git a/themes/FixIt/assets/lib/algoliasearch/algoliasearch-lite.umd.min.js b/themes/FixIt/assets/lib/algoliasearch/algoliasearch-lite.umd.min.js new file mode 100644 index 0000000..2f0178f --- /dev/null +++ b/themes/FixIt/assets/lib/algoliasearch/algoliasearch-lite.umd.min.js @@ -0,0 +1,8 @@ +/** + * Skipped minification because the original files appears to be already minified. + * Original file: /npm/algoliasearch@4.14.2/dist/algoliasearch-lite.umd.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +/*! algoliasearch-lite.umd.js | 4.14.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).algoliasearch=t()}(this,(function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var u,i=e[Symbol.iterator]();!(n=(u=i.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=o(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return o(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var o=a();return o[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(o)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function i(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},n=t();return n.then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return o(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,o).catch((function(){return i({caches:t}).get(e,n,o)}))},set:function(e,n){return r.set(e,n).catch((function(){return i({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return i({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return i({caches:t}).clear()}))}}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var u=n(),i=o&&o.miss||function(){return Promise.resolve()};return u.then((function(e){return i(e)})).then((function(){return u}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function c(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function l(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var m={Read:1,Write:2,Any:3},p=1,v=2,y=3;function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function b(e){return"string"==typeof e?{protocol:"https",url:e,accept:m.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||m.Any}}var O="GET",P="POST";function q(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(g(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===y&&Date.now()-e.lastUpdate<=12e4}(e)})),o=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:o.length>0?o.map((function(e){return b(e)})):t}}))}function w(e,t,n,o){var u=[],i=function(e,t){if(e.method===O||void 0===e.data&&void 0===t.data)return;var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}(n,o),s=function(e,t){var n=r(r({},e.headers),t.headers),o={};return Object.keys(n).forEach((function(e){var t=n[e];o[e.toLowerCase()]=t})),o}(e,o),c=n.method,l=n.method!==O?{}:r(r({},n.data),o.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),l),o.queryParameters),h=0,d=function t(r,a){var l=r.pop();if(void 0===l)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:A(u)};var d={data:i,headers:s,method:c,url:S(l,n.path,f),connectTimeout:a(h,e.timeouts.connect),responseTimeout:a(h,o.timeout)},m=function(e){var t={request:d,response:e,host:l,triesLeft:r.length};return u.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var o=m(n);return n.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",x(o)),e.hostsCache.set(l,g(l,n.isTimedOut?y:v))]).then((function(){return t(r,a)}))},onFail:function(e){throw m(e),function(e,t){var r=e.content,n=e.status,o=r;try{o=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(o,n,t)}(e,A(u))}};return e.requester.send(d).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return q(e.hostsCache,t).then((function(e){return d(a(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function S(e,t,r){var n=T(r),o="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(o+="?".concat(n)),o}function T(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function A(e){return e.map((function(e){return x(e)}))}function x(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===h.WithinHeaders?n:{}},queryParameters:function(){return e===h.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:h.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,u=e.responsesCache,i=e.timeouts,s=e.userAgent,c=e.hosts,l=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:u,timeouts:i,userAgent:s,headers:e.headers,queryParameters:l,hosts:c.map((function(e){return b(e)})),read:function(e,t){var r=d(t,f.timeouts.read),n=function(){return w(f,f.hosts.filter((function(e){return 0!=(e.accept&m.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=o(e,2);t[0];return t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return w(f,f.hosts.filter((function(e){return 0!=(e.accept&m.Write)})),e,d(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:m.Read},{url:"".concat(t,".algolia.net"),accept:m.Write}].concat(c([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return l({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},C=function(e){return function(t,r){return t.method===O?e.transporter.read(t,r):e.transporter.write(t,r)}},k=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={transporter:e.transporter,appId:e.appId,indexName:t};return l(n,r.methods)}},J=function(e){return function(t,n){var o=t.map((function(e){return r(r({},e),{},{params:T(e.params||{})})}));return e.transporter.read({method:P,path:"1/indexes/*/queries",data:{requests:o},cacheable:!0},n)}},E=function(e){return function(t,o){return Promise.all(t.map((function(t){var a=t.params,u=a.facetName,i=a.facetQuery,s=n(a,["facetName","facetQuery"]);return k(e)(t.indexName,{methods:{searchForFacetValues:R}}).searchForFacetValues(u,i,r(r({},o),s))})))}},I=function(e){return function(t,r,n){return e.transporter.read({method:P,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},F=function(e){return function(t,r){return e.transporter.read({method:P,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},R=function(e){return function(t,r,n){return e.transporter.read({method:P,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,W=2,H=3;function Q(e,t,n){var o,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,o=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=o(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=o(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(o=H,{debug:function(e,t){return D>=o&&console.debug(e,t),Promise.resolve()},info:function(e,t){return W>=o&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:i({caches:[u({key:"".concat("4.14.2","-").concat(e)}),s()]}),userAgent:j("4.14.2").add({segment:"Browser",version:"lite"}),authMode:h.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:J,searchForFacetValues:E,multipleQueries:J,multipleSearchForFacetValues:E,customRequest:C,initIndex:function(e){return function(t){return k(e)(t,{methods:{search:F,searchForFacetValues:R,findAnswers:I}})}}}}))}return Q.version="4.14.2",Q})); diff --git a/themes/FixIt/assets/lib/animate/animate.min.css b/themes/FixIt/assets/lib/animate/animate.min.css new file mode 100644 index 0000000..76d2fe1 --- /dev/null +++ b/themes/FixIt/assets/lib/animate/animate.min.css @@ -0,0 +1,7 @@ +@charset "UTF-8";/*! + * animate.css - https://animate.style/ + * Version - 4.1.1 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2020 Animate.css + */:root{--animate-duration:1s;--animate-delay:1s;--animate-repeat:1}.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}.animate__animated.animate__infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animate__animated.animate__repeat-1{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-iteration-count:var(--animate-repeat);animation-iteration-count:var(--animate-repeat)}.animate__animated.animate__repeat-2{-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-iteration-count:calc(var(--animate-repeat)*2);animation-iteration-count:calc(var(--animate-repeat)*2)}.animate__animated.animate__repeat-3{-webkit-animation-iteration-count:3;animation-iteration-count:3;-webkit-animation-iteration-count:calc(var(--animate-repeat)*3);animation-iteration-count:calc(var(--animate-repeat)*3)}.animate__animated.animate__delay-1s{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-delay:var(--animate-delay);animation-delay:var(--animate-delay)}.animate__animated.animate__delay-2s{-webkit-animation-delay:2s;animation-delay:2s;-webkit-animation-delay:calc(var(--animate-delay)*2);animation-delay:calc(var(--animate-delay)*2)}.animate__animated.animate__delay-3s{-webkit-animation-delay:3s;animation-delay:3s;-webkit-animation-delay:calc(var(--animate-delay)*3);animation-delay:calc(var(--animate-delay)*3)}.animate__animated.animate__delay-4s{-webkit-animation-delay:4s;animation-delay:4s;-webkit-animation-delay:calc(var(--animate-delay)*4);animation-delay:calc(var(--animate-delay)*4)}.animate__animated.animate__delay-5s{-webkit-animation-delay:5s;animation-delay:5s;-webkit-animation-delay:calc(var(--animate-delay)*5);animation-delay:calc(var(--animate-delay)*5)}.animate__animated.animate__faster{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-duration:calc(var(--animate-duration)/2);animation-duration:calc(var(--animate-duration)/2)}.animate__animated.animate__fast{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-duration:calc(var(--animate-duration)*0.8);animation-duration:calc(var(--animate-duration)*0.8)}.animate__animated.animate__slow{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration)*2);animation-duration:calc(var(--animate-duration)*2)}.animate__animated.animate__slower{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-duration:calc(var(--animate-duration)*3);animation-duration:calc(var(--animate-duration)*3)}@media (prefers-reduced-motion:reduce),print{.animate__animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-transition-duration:1ms!important;transition-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}.animate__animated[class*=Out]{opacity:0}}@-webkit-keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}@keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}.animate__bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.animate__flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.animate__pulse{-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.animate__rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shakeX{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shakeX{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.animate__shakeX{-webkit-animation-name:shakeX;animation-name:shakeX}@-webkit-keyframes shakeY{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}@keyframes shakeY{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}.animate__shakeY{-webkit-animation-name:shakeY;animation-name:shakeY}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.animate__headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.animate__swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.animate__tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.animate__jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.animate__heartBeat{-webkit-animation-name:heartBeat;animation-name:heartBeat;-webkit-animation-duration:1.3s;animation-duration:1.3s;-webkit-animation-duration:calc(var(--animate-duration)*1.3);animation-duration:calc(var(--animate-duration)*1.3);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInDown{-webkit-animation-name:backInDown;animation-name:backInDown}@-webkit-keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translateX(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translateX(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInLeft{-webkit-animation-name:backInLeft;animation-name:backInLeft}@-webkit-keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translateX(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translateX(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInRight{-webkit-animation-name:backInRight;animation-name:backInRight}@-webkit-keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInUp{-webkit-animation-name:backInUp;animation-name:backInUp}@-webkit-keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}@keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}.animate__backOutDown{-webkit-animation-name:backOutDown;animation-name:backOutDown}@-webkit-keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translateX(-2000px) scale(.7);opacity:.7}}@keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translateX(-2000px) scale(.7);opacity:.7}}.animate__backOutLeft{-webkit-animation-name:backOutLeft;animation-name:backOutLeft}@-webkit-keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translateX(2000px) scale(.7);opacity:.7}}@keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0) scale(.7);transform:translateX(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translateX(2000px) scale(.7);opacity:.7}}.animate__backOutRight{-webkit-animation-name:backOutRight;animation-name:backOutRight}@-webkit-keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}@keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}.animate__backOutUp{-webkit-animation-name:backOutUp;animation-name:backOutUp}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}.animate__bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*0.75);animation-duration:calc(var(--animate-duration)*0.75);-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.animate__bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*0.75);animation-duration:calc(var(--animate-duration)*0.75);-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}.animate__bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}.animate__bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}.animate__bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}.animate__bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate__fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInTopLeft{-webkit-animation-name:fadeInTopLeft;animation-name:fadeInTopLeft}@-webkit-keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInTopRight{-webkit-animation-name:fadeInTopRight;animation-name:fadeInTopRight}@-webkit-keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInBottomLeft{-webkit-animation-name:fadeInBottomLeft;animation-name:fadeInBottomLeft}@-webkit-keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__fadeInBottomRight{-webkit-animation-name:fadeInBottomRight;animation-name:fadeInBottomRight}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate__fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.animate__fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.animate__fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.animate__fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.animate__fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}@keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}.animate__fadeOutTopLeft{-webkit-animation-name:fadeOutTopLeft;animation-name:fadeOutTopLeft}@-webkit-keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}@keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}.animate__fadeOutTopRight{-webkit-animation-name:fadeOutTopRight;animation-name:fadeOutTopRight}@-webkit-keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}@keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}.animate__fadeOutBottomRight{-webkit-animation-name:fadeOutBottomRight;animation-name:fadeOutBottomRight}@-webkit-keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}@keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}.animate__fadeOutBottomLeft{-webkit-animation-name:fadeOutBottomLeft;animation-name:fadeOutBottomLeft}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animate__animated.animate__flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.animate__flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*0.75);animation-duration:calc(var(--animate-duration)*0.75);-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.animate__flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration)*0.75);animation-duration:calc(var(--animate-duration)*0.75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__lightSpeedInRight{-webkit-animation-name:lightSpeedInRight;animation-name:lightSpeedInRight;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skewX(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skewX(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skewX(5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skewX(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skewX(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skewX(5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__lightSpeedInLeft{-webkit-animation-name:lightSpeedInLeft;animation-name:lightSpeedInLeft;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.animate__lightSpeedOutRight{-webkit-animation-name:lightSpeedOutRight;animation-name:lightSpeedOutRight;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skewX(-30deg);opacity:0}}@keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skewX(-30deg);opacity:0}}.animate__lightSpeedOutLeft{-webkit-animation-name:lightSpeedOutLeft;animation-name:lightSpeedOutLeft;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.animate__rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.animate__rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.animate__rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.animate__rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}to{-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}}.animate__rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}.animate__rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}.animate__rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.animate__rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.animate__rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.animate__rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.animate__hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration)*2);animation-duration:calc(var(--animate-duration)*2);-webkit-animation-name:hinge;animation-name:hinge;-webkit-transform-origin:top left;transform-origin:top left}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.animate__jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}.animate__rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.animate__zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}.animate__zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft;-webkit-transform-origin:left center;transform-origin:left center}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}.animate__zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight;-webkit-transform-origin:right center;transform-origin:right center}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.animate__slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp} \ No newline at end of file diff --git a/themes/FixIt/assets/lib/aplayer/APlayer.min.css b/themes/FixIt/assets/lib/aplayer/APlayer.min.css new file mode 100644 index 0000000..344c414 --- /dev/null +++ b/themes/FixIt/assets/lib/aplayer/APlayer.min.css @@ -0,0 +1 @@ +.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;position:relative}.aplayer *{box-sizing:content-box}.aplayer svg{width:100%;height:100%}.aplayer svg circle,.aplayer svg path{fill:#fff}.aplayer.aplayer-withlist .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer.aplayer-withlist .aplayer-list{display:block}.aplayer.aplayer-withlist .aplayer-icon-order,.aplayer.aplayer-withlist .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu{display:inline}.aplayer.aplayer-withlrc .aplayer-pic{height:90px;width:90px}.aplayer.aplayer-withlrc .aplayer-info{margin-left:90px;height:90px;padding:10px 7px 0}.aplayer.aplayer-withlrc .aplayer-lrc{display:block}.aplayer.aplayer-narrow{width:66px}.aplayer.aplayer-narrow .aplayer-info,.aplayer.aplayer-narrow .aplayer-list{display:none}.aplayer.aplayer-narrow .aplayer-body,.aplayer.aplayer-narrow .aplayer-pic{height:66px;width:66px}.aplayer.aplayer-fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;overflow:visible;max-width:400px;box-shadow:none}.aplayer.aplayer-fixed .aplayer-list{margin-bottom:65px;border:1px solid #eee;border-bottom:none}.aplayer.aplayer-fixed .aplayer-body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;background:#fff;padding-right:18px;transition:all .3s ease;max-width:400px}.aplayer.aplayer-fixed .aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.aplayer.aplayer-fixed .aplayer-lrc:after,.aplayer.aplayer-fixed .aplayer-lrc:before{display:none}.aplayer.aplayer-fixed .aplayer-info{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid #e9e9e9}.aplayer.aplayer-fixed .aplayer-info .aplayer-music{width:calc(100% - 105px)}.aplayer.aplayer-fixed .aplayer-miniswitcher{display:block}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-info{display:block;-webkit-transform:scaleX(0);transform:scaleX(0)}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body{width:66px!important}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-miniswitcher .aplayer-icon{-webkit-transform:rotateY(0);transform:rotateY(0)}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-lrc,.aplayer.aplayer-fixed .aplayer-icon-play{display:inline-block}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-menu,.aplayer.aplayer-fixed .aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.aplayer.aplayer-fixed .aplayer-icon-back{right:75px}.aplayer.aplayer-fixed .aplayer-icon-play{right:50px}.aplayer.aplayer-fixed .aplayer-icon-forward{right:25px}.aplayer.aplayer-fixed .aplayer-icon-menu{right:0}.aplayer.aplayer-arrow .aplayer-icon-loop,.aplayer.aplayer-arrow .aplayer-icon-order,.aplayer.aplayer-mobile .aplayer-icon-volume-down{display:none}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-loading-icon{display:block}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-body{position:relative}.aplayer .aplayer-icon{width:15px;height:15px;border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:12px;margin:0;display:inline-block}.aplayer .aplayer-icon path{transition:all .2s ease-in-out}.aplayer .aplayer-icon-back,.aplayer .aplayer-icon-forward,.aplayer .aplayer-icon-lrc,.aplayer .aplayer-icon-order,.aplayer .aplayer-icon-play{display:none}.aplayer .aplayer-icon-lrc-inactivity svg{opacity:.4}.aplayer .aplayer-icon-forward{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-size:cover;background-position:50%;transition:all .3s ease;cursor:pointer}.aplayer .aplayer-pic:hover .aplayer-button{opacity:1}.aplayer .aplayer-pic .aplayer-button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);background:rgba(0,0,0,.2);transition:all .1s ease}.aplayer .aplayer-pic .aplayer-button path{fill:#fff}.aplayer .aplayer-pic .aplayer-hide{display:none}.aplayer .aplayer-pic .aplayer-play{width:26px;height:26px;border:2px solid #fff;bottom:50%;right:50%;margin:0 -15px -15px 0}.aplayer .aplayer-pic .aplayer-play svg{position:absolute;top:3px;left:4px;height:20px;width:20px}.aplayer .aplayer-pic .aplayer-pause{width:16px;height:16px;border:2px solid #fff;bottom:4px;right:4px}.aplayer .aplayer-pic .aplayer-pause svg{position:absolute;top:2px;left:2px;height:12px;width:12px}.aplayer .aplayer-info{margin-left:66px;padding:14px 7px 0 10px;height:66px;box-sizing:border-box}.aplayer .aplayer-info .aplayer-music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.aplayer .aplayer-info .aplayer-music .aplayer-title{font-size:14px}.aplayer .aplayer-info .aplayer-music .aplayer-author{font-size:12px;color:#666}.aplayer .aplayer-info .aplayer-controller{position:relative;display:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar{position:relative;height:2px;width:100%;background:#cdcdcd}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded{position:absolute;left:0;top:0;bottom:0;background:#aaa;height:2px;transition:all .5s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played{position:absolute;left:0;top:0;bottom:0;height:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:10px;width:10px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.aplayer .aplayer-info .aplayer-controller .aplayer-time{position:relative;right:0;bottom:4px;height:17px;color:#999;font-size:11px;padding-left:7px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner{vertical-align:middle}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon{cursor:pointer;transition:all .2s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#666}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop{margin-right:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path{fill:#000}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all .2s ease-in-out}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap.aplayer-volume-bar-wrap-active{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar{position:absolute;bottom:0;right:10px;width:5px;height:35px;background:#aaa;border-radius:2.5px;overflow:hidden}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume{position:absolute;bottom:0;right:0;width:5px;transition:all .1s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon svg{position:absolute;-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.aplayer .aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.aplayer .aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,#fff 0,hsla(0,0%,100%,0));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.aplayer .aplayer-lrc:after,.aplayer .aplayer-lrc:before{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" "}.aplayer .aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.8));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.aplayer .aplayer-lrc p{font-size:12px;color:#666;line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.aplayer .aplayer-lrc.aplayer-lrc-hide{display:none}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default}.aplayer .aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.aplayer .aplayer-list.aplayer-list-hide{max-height:0!important}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.aplayer .aplayer-list ol::-webkit-scrollbar{width:5px}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:#ccc}.aplayer .aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid #e9e9e9;cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0}.aplayer .aplayer-list ol li:first-child{border-top:none}.aplayer .aplayer-list ol li:hover{background:#efefef}.aplayer .aplayer-list ol li.aplayer-list-light{background:#e9e9e9}.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur{display:inline-block}.aplayer .aplayer-list ol li .aplayer-list-cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-index{color:#666;margin-right:12px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-author{color:#666;float:right;cursor:pointer}.aplayer .aplayer-notice{opacity:0;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none;background-color:#f4f4f5;color:#909399}.aplayer .aplayer-miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:#e6e6e6;width:18px;border-radius:0 2px 2px 0}.aplayer .aplayer-miniswitcher .aplayer-icon{height:100%;width:100%;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);transition:all .3s ease}.aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#666}.aplayer .aplayer-miniswitcher .aplayer-icon:hover path{fill:#000}@-webkit-keyframes aplayer-roll{0%{left:0}to{left:-100%}}@keyframes aplayer-roll{0%{left:0}to{left:-100%}}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} diff --git a/themes/FixIt/assets/lib/aplayer/APlayer.min.js b/themes/FixIt/assets/lib/aplayer/APlayer.min.js new file mode 100644 index 0000000..4b060d5 --- /dev/null +++ b/themes/FixIt/assets/lib/aplayer/APlayer.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("APlayer",[],t):"object"==typeof exports?exports.APlayer=t():e.APlayer=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=41)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=/mobile/i.test(window.navigator.userAgent),a={secondToTime:function(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),i=Math.floor(e-3600*t-60*n);return(t>0?[t,n,i]:[n,i]).map(function(e){return e<10?"0"+e:""+e}).join(":")},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,i=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==e;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return t-i},getElementViewTop:function(e,t){for(var n,i=e.offsetTop,a=e.offsetParent;null!==a;)i+=a.offsetTop,a=a.offsetParent;return n=document.body.scrollTop+document.documentElement.scrollTop,t?i:i-n},isMobile:i,storage:{set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}},nameMap:{dragStart:i?"touchstart":"mousedown",dragMove:i?"touchmove":"mousemove",dragEnd:i?"touchend":"mouseup"},randomOrder:function(e){return function(e){for(var t=e.length-1;t>=0;t--){var n=Math.floor(Math.random()*(t+1)),i=e[n];e[n]=e[t],e[t]=i}return e}([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t\n ',t+=r(n+s),t+='\n ',t+=r(e.name),t+='\n ',t+=r(e.artist),t+="\n\n"}),t}},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=g(n(33)),a=g(n(32)),r=g(n(31)),o=g(n(30)),s=g(n(29)),l=g(n(28)),u=g(n(27)),c=g(n(26)),p=g(n(25)),d=g(n(24)),h=g(n(23)),y=g(n(22)),f=g(n(21)),v=g(n(20)),m=g(n(19));function g(e){return e&&e.__esModule?e:{default:e}}var w={play:i.default,pause:a.default,volumeUp:r.default,volumeDown:o.default,volumeOff:s.default,orderRandom:l.default,orderList:u.default,menu:c.default,loopAll:p.default,loopOne:d.default,loopNone:h.default,loading:y.default,right:f.default,skip:v.default,lrc:m.default};t.default=w},function(e,t,n){"use strict";var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":a(window))&&(i=window)}e.exports=i},function(e,t,n){"use strict";var i,a,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};void 0===(a="function"==typeof(i=function(){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==document.querySelectorAll&&void 0!==window.pageYOffset&&void 0!==history.pushState){var e=function(e,t,n,i){return n>i?t:e+(t-e)*((a=n/i)<.5?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1);var a},t=function(t,n,i,a){n=n||500;var r=(a=a||window).scrollTop||window.pageYOffset;if("number"==typeof t)var o=parseInt(t);else var o=function(e,t){return"HTML"===e.nodeName?-t:e.getBoundingClientRect().top+t}(t,r);var s=Date.now(),l=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,15)};!function u(){var c=Date.now()-s;a!==window?a.scrollTop=e(r,o,c,n):window.scroll(0,e(r,o,c,n)),c>n?"function"==typeof i&&i(t):l(u)}()},n=function(e){if(!e.defaultPrevented){e.preventDefault(),location.hash!==this.hash&&window.history.pushState(null,null,this.hash);var n=document.getElementById(this.hash.substring(1));if(!n)return;t(n,500,function(e){location.replace("#"+e.id)})}};return document.addEventListener("DOMContentLoaded",function(){for(var e,t=document.querySelectorAll('a[href^="#"]:not([href="#"])'),i=t.length;e=t[--i];)e.addEventListener("click",n,!1)}),t}})?i.call(t,n,t,e):i)||(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1),n=0===this.audios.length;this.player.template.listOl.innerHTML+=(0,a.default)({theme:this.player.options.theme,audio:e,index:this.audios.length+1}),this.audios=this.audios.concat(e),t&&this.audios.length>1&&this.player.container.classList.add("aplayer-withlist"),this.player.randomOrder=r.default.randomOrder(this.audios.length),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur"),this.player.template.listCurs[this.audios.length-1].style.backgroundColor=e.theme||this.player.options.theme,n&&("random"===this.player.options.order?this.switch(this.player.randomOrder[0]):this.switch(0))}},{key:"remove",value:function(e){if(this.player.events.trigger("listremove",{index:e}),this.audios[e])if(this.audios.length>1){var t=this.player.container.querySelectorAll(".aplayer-list li");t[e].remove(),this.audios.splice(e,1),this.player.lrc&&this.player.lrc.remove(e),e===this.index&&(this.audios[e]?this.switch(e):this.switch(e-1)),this.index>e&&this.index--;for(var n=e;nt&&!e.player.audio.paused&&(e.player.container.classList.remove("aplayer-loading"),i=!1),t=n)},100)}},{key:"enable",value:function(e){this["enable"+e+"Checker"]=!0,"fps"===e&&this.initfpsChecker()}},{key:"disable",value:function(e){this["enable"+e+"Checker"]=!1}},{key:"destroy",value:function(){var e=this;this.types.forEach(function(t){e["enable"+t+"Checker"]=!1,e[t+"Checker"]&&clearInterval(e[t+"Checker"])})}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1?"one"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop?(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll):"all"===e.player.options.loop&&(e.player.options.loop="one",e.player.template.loop.innerHTML=r.default.loopOne):"one"===e.player.options.loop||"all"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop&&(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll)})}},{key:"initMenuButton",value:function(){var e=this;this.player.template.menu.addEventListener("click",function(){e.player.list.toggle()})}},{key:"initMiniSwitcher",value:function(){var e=this;this.player.template.miniSwitcher.addEventListener("click",function(){e.player.setMode("mini"===e.player.mode?"normal":"mini")})}},{key:"initSkipButton",value:function(){var e=this;this.player.template.skipBackButton.addEventListener("click",function(){e.player.skipBack()}),this.player.template.skipForwardButton.addEventListener("click",function(){e.player.skipForward()}),this.player.template.skipPlayButton.addEventListener("click",function(){e.player.toggle()})}},{key:"initLrcButton",value:function(){var e=this;this.player.template.lrcButton.addEventListener("click",function(){e.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity")?(e.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.show()):(e.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.hide())})}}]),e}();t.default=s},function(e,t,n){var i=n(2);e.exports=function(e){"use strict";e=e||{};var t="",n=i.$each,a=e.lyrics,r=(e.$value,e.$index,i.$escape);return n(a,function(e,n){t+="\n \n"}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.player.audio.currentTime;if(this.index>this.current.length-1||e=this.current[this.index+1][0])for(var t=0;t=this.current[t][0]&&(!this.current[t+1]||e=200&&n.status<300||304===n.status?t.parsed[e]=t.parse(n.responseText):(t.player.notice("LRC file request fails: status "+n.status),t.parsed[e]=[["00:00","Not available"]]),t.container.innerHTML=(0,o.default)({lyrics:t.parsed[e]}),t.update(0),t.current=t.parsed[e])};var i=this.player.list.audios[e].lrc;n.open("get",i,!0),n.send(null)}else this.player.list.audios[e].lrc?this.parsed[e]=this.parse(this.player.list.audios[e].lrc):this.parsed[e]=[["00:00","Not available"]];this.container.innerHTML=(0,o.default)({lyrics:this.parsed[e]}),this.update(0),this.current=this.parsed[e]}},{key:"parse",value:function(e){if(e){for(var t=(e=e.replace(/([^\]^\n])\[/g,function(e,t){return t+"\n["})).split("\n"),n=[],i=t.length,a=0;a/g,"").replace(/^\s+|\s+$/g,"");if(r)for(var s=r.length,l=0;l]/;a.$escape=function(e){return function(e){var t=""+e,n=r.exec(t);if(!n)return e;var i="",a=void 0,o=void 0,s=void 0;for(a=n.index,o=0;a\n \n
',t+=s.play,t+='
\n \n \n
\n
\n\n
\n
\n
\n'):(t+='\n
\n
\n
',t+=s.play,t+='
\n
\n
\n
\n No audio\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n ',t+=s.loading,t+='\n \n
\n
\n
\n
\n \n 00:00 / 00:00\n \n \n ',t+=s.skip,t+='\n \n \n ',t+=s.play,t+='\n \n \n ',t+=s.skip,t+='\n \n
\n \n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n '},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t,n){"use strict";var i,a,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var u,c=[],p=!1,d=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):d=-1,c.length&&y())}function y(){if(!p){var e=l(h);p=!0;for(var t=c.length;t;){for(u=c,c=[];++d1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(35),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=setTimeout;function a(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void l(t.promise,e)}s(t.promise,i)}else(1===e._state?s:l)(t.promise,e._value)})):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":n(t))||"function"==typeof t)){var i=t.then;if(t instanceof r)return e._state=3,e._value=t,void u(e);if("function"==typeof i)return void c((a=i,o=t,function(){a.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){l(e,t)}var a,o}function l(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t1&&this.container.classList.add("aplayer-withlist"),r.default.isMobile&&this.container.classList.add("aplayer-mobile"),this.arrow=this.container.offsetWidth<=300,this.arrow&&this.container.classList.add("aplayer-arrow"),this.container=this.options.container,2===this.options.lrcType||!0===this.options.lrcType)for(var n=this.container.getElementsByClassName("aplayer-lrc-content"),i=0;i1?(e.notice("An audio error has occurred, player will skip forward in 2 seconds."),t=setTimeout(function(){e.skipForward(),e.paused||e.play()},2e3)):1===e.list.audios.length&&e.notice("An audio error has occurred.")}),this.events.on("listswitch",function(){t&&clearTimeout(t)}),this.on("ended",function(){"none"===e.options.loop?"list"===e.options.order?e.list.index0&&void 0!==arguments[0]?arguments[0]:this.list.audios[this.list.index].theme||this.options.theme,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.list.index;(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&this.list.audios[t]&&(this.list.audios[t].theme=e),this.template.listCurs[t]&&(this.template.listCurs[t].style.backgroundColor=e),t===this.list.index&&(this.template.pic.style.backgroundColor=e,this.template.played.style.background=e,this.template.thumb.style.background=e,this.template.volume.style.background=e)}},{key:"seek",value:function(e){e=Math.max(e,0),e=Math.min(e,this.duration),this.audio.currentTime=e,this.bar.set("played",e/this.duration,"width"),this.template.ptime.innerHTML=r.default.secondToTime(e)}},{key:"setUIPlaying",value:function(){var e=this;if(this.paused&&(this.paused=!1,this.template.button.classList.remove("aplayer-play"),this.template.button.classList.add("aplayer-pause"),this.template.button.innerHTML="",setTimeout(function(){e.template.button.innerHTML=o.default.pause},100),this.template.skipPlayButton.innerHTML=o.default.pause),this.timer.enable("loading"),this.options.mutex)for(var t=0;t=.95?this.template.volumeButton.innerHTML=o.default.volumeUp:this.volume()>0?this.template.volumeButton.innerHTML=o.default.volumeDown:this.template.volumeButton.innerHTML=o.default.volumeOff}},{key:"volume",value:function(e,t){return e=parseFloat(e),isNaN(e)||(e=Math.max(e,0),e=Math.min(e,1),this.bar.set("volume",e,"height"),t||this.storage.set("volume",e),this.audio.volume=e,this.audio.muted&&(this.audio.muted=!1),this.switchVolumeIcon()),this.audio.muted?0:this.audio.volume}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"toggle",value:function(){this.template.button.classList.contains("aplayer-play")?this.play():this.template.button.classList.contains("aplayer-pause")&&this.pause()}},{key:"switchAudio",value:function(e){this.list.switch(e)}},{key:"addAudio",value:function(e){this.list.add(e)}},{key:"removeAudio",value:function(e){this.list.remove(e)}},{key:"destroy",value:function(){m.splice(m.indexOf(this),1),this.pause(),this.container.innerHTML="",this.audio.src="",this.timer.destroy(),this.events.trigger("destroy")}},{key:"setMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"normal";this.mode=e,"mini"===e?this.container.classList.add("aplayer-narrow"):"normal"===e&&this.container.classList.remove("aplayer-narrow")}},{key:"notice",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=i,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("noticeshow",{text:e}),n&&(this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("noticehide")},n))}},{key:"prevIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return this.list.index-1<0?this.list.audios.length-1:this.list.index-1;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return 0===e?this.randomOrder[this.randomOrder.length-1]:this.randomOrder[e-1]}}},{key:"nextIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return(this.list.index+1)%this.list.audios.length;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return e===this.randomOrder.length-1?this.randomOrder[0]:this.randomOrder[e+1]}}},{key:"skipBack",value:function(){this.list.switch(this.prevIndex())}},{key:"skipForward",value:function(){this.list.switch(this.nextIndex())}},{key:"duration",get:function(){return isNaN(this.audio.duration)?0:this.audio.duration}}],[{key:"version",get:function(){return"1.10.1"}}]),e}();t.default=g},,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(40);var i,a=n(38),r=(i=a)&&i.__esModule?i:{default:i};console.log("\n %c APlayer v1.10.1 af84efb %c http://aplayer.js.org \n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),t.default=r.default}]).default}); diff --git a/themes/FixIt/assets/lib/aplayer/dark.scss b/themes/FixIt/assets/lib/aplayer/dark.scss new file mode 100644 index 0000000..ca56d15 --- /dev/null +++ b/themes/FixIt/assets/lib/aplayer/dark.scss @@ -0,0 +1,112 @@ +[data-theme='dark'] .aplayer { + background: #212121; + + &.aplayer-withlist { + .aplayer-info { + border-bottom-color: #5c5c5c; + } + } + + &.aplayer-fixed { + .aplayer-list { + border-color: #5c5c5c; + } + } + + .aplayer-body { + background-color: #212121; + } + + .aplayer-info { + border-top-color: #212121; + } + + .aplayer-info { + .aplayer-music { + .aplayer-title { + color: #fff; + } + + .aplayer-author { + color: #fff; + } + } + + .aplayer-controller { + .aplayer-time { + color: #eee; + + .aplayer-icon { + path { + fill: #eee; + } + } + } + } + } + + .aplayer-list { + background-color: #212121; + + &::-webkit-scrollbar-thumb { + background-color: #999; + } + + &::-webkit-scrollbar-thumb:hover { + background-color: #bbb; + } + + li { + color: #fff; + border-top-color: #666; + + &:hover { + background: #4e4e4e; + } + + &.aplayer-list-light { + background: #6c6c6c; + } + + .aplayer-list-index { + color: #ddd; + } + + .aplayer-list-author { + color: #ddd; + } + } + } + + .aplayer-lrc { + text-shadow: -1px -1px 0 #666; + + &:before { + background: -moz-linear-gradient(top, rgba(33,33,33,1) 0%, rgba(33,33,33,0) 100%); + background: -webkit-linear-gradient(top, rgba(33,33,33,1) 0%,rgba(33,33,33,0) 100%); + background: linear-gradient(to bottom, rgba(33,33,33,1) 0%,rgba(33,33,33,0) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#212121', endColorstr='#00212121',GradientType=0 ); + } + + &:after { + background: -moz-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%); + background: -webkit-linear-gradient(top, rgba(33,33,33,0) 0%,rgba(33,33,33,0.8) 100%); + background: linear-gradient(to bottom, rgba(33,33,33,0) 0%,rgba(33,33,33,0.8) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00212121', endColorstr='#cc212121',GradientType=0 ); + } + + p { + color: #fff; + } + } + + .aplayer-miniswitcher { + background: #484848; + + .aplayer-icon { + path { + fill: #eee; + } + } + } +} diff --git a/themes/FixIt/assets/lib/artalk/Artalk.css b/themes/FixIt/assets/lib/artalk/Artalk.css new file mode 100644 index 0000000..d11bf44 --- /dev/null +++ b/themes/FixIt/assets/lib/artalk/Artalk.css @@ -0,0 +1 @@ +@charset "UTF-8";.artalk,.atk-layer-wrap{--at-color-font: #2a2e2e;--at-color-deep: #2a2e2e;--at-color-sub: #757575;--at-color-grey: #747474;--at-color-meta: #697182;--at-color-border: #eceff2;--at-color-light: #4285f4;--at-color-bg: #FFF;--at-color-bg-transl: rgba(255, 255, 255, .94);--at-color-bg-grey: #f3f4f5;--at-color-bg-grey-transl: rgba(244, 244, 244, .75);--at-color-bg-light: rgba(29, 161, 242, .1);--at-color-main: #0083ff;--at-color-red: #ff5652;--at-color-pink: #fa5a57;--at-color-yellow: #ff7c37;--at-color-green: #4caf50;--at-color-gradient: linear-gradient(180deg, transparent, rgba(255, 255, 255))}.artalk.atk-dark-mode,.atk-layer-wrap.atk-dark-mode{--at-color-font: #fff;--at-color-deep: #e7e7e7;--at-color-sub: #e7e7e7;--at-color-grey: #fff;--at-color-meta: #fff;--at-color-border: #2d3235;--at-color-light: #687a86;--at-color-bg: #1e2224;--at-color-bg-transl: rgba(30, 34, 36, .95);--at-color-bg-grey: #46494e;--at-color-bg-grey-transl: rgba(8, 8, 8, .95);--at-color-bg-light: rgba(29, 161, 242, .1);--at-color-main: #0083ff;--at-color-red: #ff5652;--at-color-pink: #fa5a57;--at-color-yellow: #ff7c37;--at-color-green: #4caf50;--at-color-gradient: linear-gradient(180deg, transparent, rgba(30, 34, 36, 1))}.atk-comment-wrap{overflow:hidden;position:relative;border-bottom:1px solid transparent}.atk-comment-wrap.atk-flash-once{animation:atkFlashOnce 1s ease-in-out 0s}@keyframes atkFlashOnce{0%{background:rgba(0,131,255,.2)}to{background:transparent}}.atk-comment-wrap.atk-unread:before{content:" ";position:absolute;left:0;top:10%;width:3px;height:80%;background:var(--at-color-main)}.atk-comment-wrap.atk-openable{cursor:pointer}.atk-comment-wrap.atk-openable:hover{background:var(--at-color-bg-grey)}.atk-comment-wrap.atk-openable .atk-height-limit:after{background:transparent!important}.atk-comment-wrap:last-child{border-bottom:none}.atk-comment{display:block;padding:12px 10px}.atk-comment>.atk-avatar{display:block;padding:2px 0;float:left}.atk-comment>.atk-avatar img{width:50px;height:50px;border-radius:3px}.atk-comment>.atk-main{display:block;margin-left:63px}.atk-comment>.atk-main>.atk-header{line-height:1.5;font-size:13px;margin-bottom:.5em;overflow:hidden;position:relative;display:flex;flex-wrap:wrap;align-items:center}.atk-comment>.atk-main>.atk-header .atk-item{display:flex;align-items:center;margin-top:2px;margin-bottom:2px;color:var(--at-color-meta)}.atk-comment>.atk-main>.atk-header .atk-item:not(:last-child){margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-item.atk-nick,.atk-comment>.atk-main>.atk-header .atk-item.atk-nick a{font-size:14px;color:var(--at-color-main);text-decoration:none}.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at{margin-left:2px}.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at>.atk-arrow:before{content:"";vertical-align:middle;transform:rotate(90deg);border-bottom:4px solid var(--at-color-grey);border-left:3px solid transparent;border-right:3px solid transparent;display:inline-block;margin-top:-1px}.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at>.atk-nick{color:var(--at-color-main);cursor:pointer;margin-left:6px}.atk-comment>.atk-main>.atk-header .badge,.atk-comment>.atk-main>.atk-header .atk-ua,.atk-comment>.atk-main>.atk-header .atk-pinned-badge,.atk-comment>.atk-main>.atk-header .atk-region-badge,.atk-comment>.atk-main>.atk-header .atk-badge{display:inline-block;color:var(--at-color-meta);background:var(--at-color-bg-grey);padding:0 6px;line-height:17px;border-radius:3px}.atk-comment>.atk-main>.atk-header .badge:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-ua:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-pinned-badge:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-region-badge:not(:last-child),.atk-comment>.atk-main>.atk-header .atk-badge:not(:last-child){margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-badge-wrap>*:last-child{margin-right:6px}.atk-comment>.atk-main>.atk-header .atk-badge{color:#fff}.atk-comment>.atk-main>.atk-header .atk-pinned-badge{color:#fff;background:#f44336}@media only screen and (max-width: 768px){.atk-comment>.atk-main>.atk-header .atk-ua-wrap{display:block}}.atk-comment>.atk-main>.atk-body{display:block;overflow:hidden;position:relative}.atk-comment>.atk-main>.atk-body img{max-width:100%}.atk-comment>.atk-main>.atk-body>.atk-content{word-break:break-all}.atk-comment>.atk-main>.atk-body>.atk-content.atk-type-collapsed{border:3px solid var(--at-color-bg-grey);border-bottom:0;padding:5px 10px;border-radius:6px 6px 0 0;margin-bottom:-5px}.atk-comment>.atk-main>.atk-body>.atk-content>*:first-child{margin-top:0}.atk-comment>.atk-main>.atk-body>.atk-content>*:last-child{margin-bottom:0}.atk-comment>.atk-main>.atk-body>.atk-content .atk-height-limit-btn{bottom:5px}.atk-comment>.atk-main>.atk-body>.atk-pending{color:var(--at-color-meta);margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:var(--at-color-bg-grey);border-left:4px solid #f44336}.atk-comment>.atk-main>.atk-body>.atk-reply-to{padding:5px 15px;border-left:3px solid var(--at-color-border);margin-bottom:10px;position:relative;margin-top:10px}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta{font-size:15px}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta .atk-nick{color:var(--at-color-main)}.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-content{margin-top:5px}.atk-comment>.atk-main>.atk-body>.atk-collapsed{margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:var(--at-color-bg-grey);border-radius:6px}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-text{color:var(--at-color-meta)}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn{color:var(--at-color-main);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-left:3px}.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn:hover{color:var(--at-color-main)}.atk-comment>.atk-main>.atk-footer{margin-top:12px}.atk-comment>.atk-main>.atk-footer .atk-actions{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;margin-bottom:-15px}.atk-comment>.atk-main>.atk-footer .atk-actions>span{color:var(--at-color-meta);font-size:13px;line-height:15px;display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-bottom:15px}.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error,.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error:hover{color:var(--at-color-red)}.atk-comment>.atk-main>.atk-footer .atk-actions>span:not(:last-child):not(.atk-hide){margin-right:16px}.atk-comment>.atk-main>.atk-footer .atk-actions>span:hover{color:var(--at-color-deep)}.atk-comment .atk-height-limit:after{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" ";bottom:0;height:80px;background:var(--at-color-gradient)}.atk-comment .atk-height-limit-btn{z-index:10;position:absolute;left:50%;bottom:10px;transform:translate(-50%);cursor:pointer;border:1px solid var(--at-color-border);border-radius:6px;background:var(--at-color-bg);padding:1px 20px;font-size:15px;color:var(--at-color-meta);-webkit-user-select:none;-moz-user-select:none;user-select:none}.atk-comment .atk-height-limit-btn:hover{background:var(--at-color-bg-grey)}.atk-comment .atk-height-limit .atk-height-limit .atk-height-limit-btn{display:none}.atk-comment .atk-height-limit-scroll{margin-top:10px;overflow-y:auto;background:linear-gradient(var(--at-color-bg) 1px,transparent 1px calc(100% - 1px)) center top,linear-gradient(transparent calc(100% - 1px),var(--at-color-bg) calc(100% - 1px) 1px) center bottom,linear-gradient(var(--at-color-border) 1px,transparent 1px calc(100% - 1px)) center top,linear-gradient(transparent calc(100% - 1px),var(--at-color-border) calc(100% - 1px) 1px) center bottom;background-repeat:no-repeat;background-color:transparent;background-size:100% 1px,100% 1px,100% 1px,100% 1px;background-attachment:local,local,scroll,scroll}.atk-comment-children>.atk-comment-wrap{margin-top:10px;border-left:1px dashed transparent;border-bottom-color:transparent}.atk-comment-children>.atk-comment-wrap:not(:last-child){margin-bottom:5px}.atk-comment-children>.atk-comment-wrap>.atk-comment{padding:4px 0}.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-avatar img{width:36px;height:36px}.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-main{margin-left:47px}.artalk>.atk-list{position:relative}.artalk>.atk-list>.atk-list-header{display:flex;flex-direction:row;padding:10px 17px}.artalk>.atk-list>.atk-list-header .atk-text{display:inline-block}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap{position:relative;cursor:pointer}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-arrow-down-icon{cursor:pointer;vertical-align:middle;border-top:5px solid var(--at-color-grey);border-left:3px solid transparent;border-right:3px solid transparent;margin-top:-1px;margin-left:.8rem;display:inline-block}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap:hover .atk-dropdown{display:block}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown{z-index:888;display:none;height:auto!important;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;width:100%;background-color:var(--at-color-bg);padding:.6rem 0;border:1px solid var(--at-color-border);text-align:center;border-radius:6px;white-space:nowrap;margin:0;list-style:none}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item span,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a{display:block;line-height:2rem;position:relative;border-bottom:none;font-weight:400;padding:0 1.5rem}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item span:hover,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a:hover{color:var(--at-color-main)}.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item.active span,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a{color:var(--at-color-main)}.artalk>.atk-list>.atk-list-header .atk-comment-count{font-size:15px}.artalk>.atk-list>.atk-list-header .atk-comment-count .atk-comment-count-num{font-size:22px;margin-right:4px}.artalk>.atk-list>.atk-list-header .atk-right-action{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:flex-end}.artalk>.atk-list>.atk-list-header .atk-right-action>span{font-size:14px;color:var(--at-color-meta);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative}.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on,.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on *{color:var(--at-color-main)}.artalk>.atk-list>.atk-list-header .atk-right-action>span:not(:last-child):not(.atk-hide){margin-right:10px;padding-right:10px}.artalk>.atk-list>.atk-list-header .atk-right-action>span .atk-unread-badge{position:absolute;top:-5px;left:-6px;color:#fff;background:var(--at-color-pink);text-align:center;min-width:16px;height:16px;padding:0 3px;border-radius:8px;line-height:16px;font-size:12px}.artalk>.atk-list>.atk-list-body{min-height:150px}.artalk>.atk-list>.atk-list-footer{z-index:1;position:absolute;bottom:5px;right:0}@media only screen and (max-width: 768px){.artalk>.atk-list>.atk-list-footer{position:relative;margin-top:10px;text-align:center}}.artalk>.atk-list>.atk-list-footer .atk-copyright{display:block;font-size:12px;color:var(--at-color-meta);padding-right:15px;margin-top:5px}.artalk>.atk-list>.atk-list-footer .atk-copyright a{color:var(--at-color-main);text-decoration:none}.atk-list-no-comment{height:150px;display:flex;font-size:19px;justify-content:center;align-items:center;word-break:break-word;text-align:center}.atk-list-read-more{border-top:1px dashed var(--at-color-border);margin-top:28px;padding-bottom:25px}@media only screen and (max-width: 768px){.atk-list-read-more{padding-bottom:10px}}.atk-list-read-more.atk-err .atk-text{color:var(--at-color-red)!important}.atk-list-read-more .atk-list-read-more-inner{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:0 15px;font-size:14px;border-radius:6px;border:1px solid transparent;display:flex;height:30px;flex-direction:row;place-content:center;align-items:center;width:120px;margin:-15px auto 0;background:var(--at-color-bg);border-color:var(--at-color-border)}.atk-list-read-more .atk-list-read-more-inner>.atk-loading-icon{height:15px;width:15px}.atk-list-read-more .atk-list-read-more-inner>.atk-text{color:var(--at-color-meta)}.atk-list-read-more .atk-list-read-more-inner:hover{background:var(--at-color-bg-grey)}.atk-pagination{display:flex;flex-direction:row;justify-content:center;padding:10px 0;position:relative}.atk-pagination>.atk-btn,.atk-pagination>.atk-input{font-size:15px;height:30px;border:1px solid var(--at-color-border);border-radius:3px;padding:0 5px;text-align:center;background:var(--at-color-bg)}.atk-pagination>.atk-btn{-webkit-user-select:none;-moz-user-select:none;user-select:none;width:70px;cursor:pointer;display:flex;justify-content:center;align-items:center}.atk-pagination>.atk-btn:hover{background:var(--at-color-bg-grey)}.atk-pagination>.atk-btn.atk-disabled{color:var(--at-color-sub)}.atk-pagination>.atk-btn.atk-disabled:hover{cursor:default;background:initial}.atk-pagination>.atk-input{background:transparent;color:var(--at-color-font);font-size:18px;width:60px;outline:none}.atk-pagination>.atk-input:focus{border-color:var(--at-color-main)}.atk-pagination>*:not(:last-child){margin-right:10px}.atk-main-editor{z-index:5;position:relative;overflow:hidden;background:var(--at-color-bg);border:1px solid var(--at-color-border);border-radius:6px;margin-bottom:10px}@media only screen and (max-width: 768px){.atk-main-editor{margin-bottom:7px}}.atk-main-editor>.atk-header{display:flex;flex-direction:row;padding:10px 14px 0}.atk-main-editor>.atk-header input{flex:1;width:100%;font-size:14px;background:transparent;border:2px solid transparent;border-radius:3px;padding:6px 5px;resize:none;outline:none}.atk-main-editor>.atk-header input:not(:last-child){margin-right:2px}.atk-main-editor>.atk-textarea-wrap{position:relative}.atk-main-editor>.atk-textarea-wrap>.atk-textarea{display:block;overflow:hidden;color:var(--at-color-font);font-size:15px;background-color:var(--at-color-bg);border:2px solid transparent;border-radius:3px;width:100%;min-height:120px;margin-top:2px;padding:10px 20px;resize:none;word-wrap:break-word;outline:none}.atk-main-editor>.atk-textarea-wrap>.atk-comment-closed{pointer-events:none;color:var(--at-color-meta);font-size:12px;background-color:var(--at-color-bg);border-top:1px solid var(--at-color-border);padding:5px 15px;margin-top:10px}.atk-main-editor>.atk-textarea-wrap>.atk-send-reply{z-index:2;position:absolute;right:7px;bottom:2px;max-width:calc(100% - 20px);height:30px;line-height:30px;font-size:14px;background:var(--at-color-bg-grey-transl);padding:0 30px 0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-radius:3px}.atk-main-editor>.atk-textarea-wrap>.atk-send-reply .atk-cancel{position:absolute;right:0;bottom:0;height:30px;text-align:center;width:30px;line-height:30px;font-weight:700}.atk-main-editor>.atk-textarea-wrap>.atk-send-reply .atk-cancel:hover{color:var(--at-color-deep)}.atk-main-editor>.atk-plug-panel-wrap{position:relative;height:180px;width:100%;overflow:hidden;border-top:1px solid var(--at-color-border);animation:.3s both atkFadeIn;transition:.2s height ease-in-out}.atk-main-editor>.atk-bottom{display:flex;flex-direction:row;justify-content:space-between;padding:5px 5px 5px 10px}.atk-main-editor>.atk-bottom>.atk-item{display:flex;flex-direction:row;align-items:center}.atk-main-editor>.atk-bottom .atk-plug-btn{padding:0 8px;line-height:24px;cursor:pointer;color:var(--at-color-grey);font-size:14px;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:3px}.atk-main-editor>.atk-bottom .atk-plug-btn:not(:last-child){margin-right:2px}.atk-main-editor>.atk-bottom .atk-plug-btn:hover{background:var(--at-color-bg-grey)}.atk-main-editor>.atk-bottom .atk-plug-btn.active{color:var(--at-color-main)}.atk-main-editor>.atk-bottom .atk-plug-btn.active svg.markdown path{fill:var(--at-color-main)}.atk-main-editor>.atk-bottom .atk-plug-btn i{color:var(--at-color-grey);display:inline-flex;vertical-align:sub;margin-left:4px}.atk-main-editor>.atk-bottom .atk-plug-btn i svg.markdown path{fill:var(--at-color-grey)}.atk-main-editor>.atk-bottom .atk-send-btn{background:var(--at-color-main);color:#fff;font-size:14px;border:none;margin:0;height:30px;width:8em;cursor:pointer;transition:opacity .3s ease-in-out;outline:none;border-radius:3px}.atk-main-editor>.atk-bottom .atk-send-btn:active{opacity:.9}.atk-main-editor>.atk-notify-wrap{z-index:9;position:absolute;right:-2px;bottom:40px;width:225px;opacity:.83}.atk-sidebar-layer{position:fixed;z-index:99999;top:0;right:0;width:430px;height:100%;background:var(--at-color-bg);transition:transform .45s cubic-bezier(.23,1,.32,1) 0ms;transform:translate(430px)}@media only screen and (max-width: 430px){.atk-sidebar-layer{width:100%}}.atk-sidebar-layer .atk-sidebar-inner{position:relative;height:100%}.atk-sidebar-layer .atk-sidebar-header{position:absolute;top:0;right:0;display:flex;flex-direction:row;align-items:center;z-index:99999}.atk-sidebar-layer .atk-sidebar-header .atk-sidebar-close{display:flex;flex-direction:column;width:60px;height:60px;align-items:center;place-content:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-left:10px}.atk-sidebar-layer .atk-sidebar-header .atk-sidebar-close:hover .atk-icon-close{background-color:#e81123e6}.atk-sidebar-layer .atk-sidebar-iframe-wrap{height:100%;position:relative}.atk-sidebar-layer .atk-sidebar-iframe-wrap iframe{border:0;width:100%;height:100%}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert{z-index:9999;top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;background:var(--at-color-bg);padding:40px 30px;width:80%;text-align:center;border-radius:4px}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-title{font-size:1.4em;margin-bottom:20px;color:var(--at-color-font)}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-text{color:var(--at-color-font)}.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-text span{cursor:pointer;color:var(--at-color-main)}.artalk{position:relative;width:100%;min-height:200px}.artalk,.atk-layer-wrap{color:var(--at-color-font);word-wrap:break-word;word-break:break-word}.artalk *,.atk-layer-wrap *{box-sizing:border-box}.artalk input,.artalk textarea,.artalk button,.artalk optgroup,.artalk select,.atk-layer-wrap input,.atk-layer-wrap textarea,.atk-layer-wrap button,.atk-layer-wrap optgroup,.atk-layer-wrap select{font-family:inherit;color:inherit;font-size:inherit}.artalk code,.atk-layer-wrap code{font-family:source code pro,Consolas,Monaco,Menlo,sans-serif;margin:0 .05em;padding:0 .4em;display:inline-block;vertical-align:middle;font-size:.9em;background-color:var(--at-color-bg-grey);color:var(--at-color-font);border-radius:2px}.artalk pre,.atk-layer-wrap pre{margin:10px 0 0;padding:0;line-height:0}.artalk pre code,.atk-layer-wrap pre code{line-height:1.6em;display:block;padding:10px 15px;white-space:pre-wrap!important;background-color:var(--at-color-bg-grey);color:var(--at-color-font);margin:0}.artalk pre code *,.atk-layer-wrap pre code *{font-family:source code pro,Consolas,Monaco,Menlo,sans-serif}.artalk a,.atk-layer-wrap a{color:var(--at-color-main);text-decoration:none}.artalk blockquote,.atk-layer-wrap blockquote{position:static;margin:10px 0;padding:10px 20px;background:var(--at-color-bg-grey);border-left:4px solid #687a86;color:var(--at-color-font)}.artalk p:first-child,.atk-layer-wrap p:first-child{margin-top:0}.artalk p:last-child,.atk-layer-wrap p:last-child{margin-bottom:0}.artalk img,.atk-layer-wrap img{max-width:100%}.artalk table,.atk-layer-wrap table{width:100%;border-collapse:collapse;border-spacing:0;margin-bottom:1.5em;font-size:.96em}.artalk td,.artalk th,.atk-layer-wrap td,.atk-layer-wrap th{text-align:left;padding:4px 8px 4px 10px;border:1px solid var(--at-color-border)}.artalk td,.atk-layer-wrap td{vertical-align:top}.artalk tr:nth-child(even),.atk-layer-wrap tr:nth-child(even){background-color:var(--at-color-bg-grey)}.artalk ul,.atk-layer-wrap ul{list-style:disc}.artalk ol,.atk-layer-wrap ol{list-style:decimal}.artalk li+li,.atk-layer-wrap li+li{margin-top:8px}.artalk li>ol,.artalk li>ul,.atk-layer-wrap li>ol,.atk-layer-wrap li>ul{margin:8px 0 0}.atk-hide{display:none!important}.atk-full-layer,.atk-layer-dialog-wrap,.atk-error-layer,.atk-loading{width:100%;height:100%;position:absolute;top:0;left:0;background:var(--at-color-bg);z-index:10;align-items:center;justify-content:center;flex-flow:column;display:flex}.atk-loading{z-index:11}.atk-loading-spinner{position:relative;width:50px;height:50px}.atk-loading-spinner svg{animation:atkRotate 2s linear infinite;transform-origin:center center;width:100%;height:100%;position:absolute;top:0;left:0}.atk-loading-spinner svg circle{stroke-dasharray:1,200;stroke-dashoffset:0;animation:atkDash 1.5s ease-in-out infinite,atkColor 6s ease-in-out infinite;stroke-linecap:round}@keyframes atkRotate{to{transform:rotate(360deg)}}@keyframes atkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes atkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@keyframes atkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.atk-loading-icon{width:18px;height:18px;box-sizing:border-box;border:solid 1px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;animation:atkLoadingIconRotate .4s linear infinite}.atk-fade-in{animation:atkFadeIn both .3s}.atk-fade-out{animation:atkFadeOut both .2s}.atk-rotate{animation:atkRotate 2s linear infinite}@keyframes atkFadeIn{0%{opacity:0}to{opacity:1}}@keyframes atkFadeOut{to{opacity:0}}@keyframes atkRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}i.atk-icon{width:20px;height:20px;background-color:var(--at-color-deep);background-size:contain;background-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain}.atk-icon-sync{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E")}.atk-icon-del{background-color:var(--at-color-red)!important;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E")}.atk-icon-edit{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E")}.atk-icon-no,.atk-icon-close{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E")}.atk-icon-yes{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E")}.atk-icon-plus{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E")}.atk-error-layer{background-color:var(--at-color-bg-transl)}.atk-error-layer .atk-error-title{color:var(--at-color-red)}.atk-error-layer .atk-warn-title{color:var(--at-color-yellow)}.atk-error-layer .atk-error-title,.atk-error-layer .atk-warn-title{display:inline-block;padding:0 15px;margin-bottom:20px;font-size:20px;letter-spacing:-.5px}.atk-error-layer .atk-error-text{text-align:center;padding:0 20px}.atk-error-layer .atk-error-text *{color:var(--at-color-deep)}.atk-error-layer .atk-error-text a{color:var(--at-color-meta)}.atk-layer-dialog-wrap{background-color:var(--at-color-bg-transl)}.atk-layer-dialog-wrap>.atk-layer-dialog{width:25%}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content .atk-captcha-img{cursor:pointer;width:170px;height:auto;margin-right:10px;padding-right:10px;border-right:1px solid var(--at-color-border);vertical-align:bottom}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content input{width:100%;line-height:34px;background-color:var(--at-color-bg);border:1px solid var(--at-color-border);border-radius:3px;outline:none;padding:0 6px;display:block;margin-top:10px;margin-bottom:5px;text-align:center}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions{display:flex;flex-direction:row}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button{flex:1;display:block;cursor:pointer;border:1px solid var(--at-color-main);background:transparent;color:var(--at-color-main);border-radius:3px;padding:0 15px;line-height:30px;outline:none}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:active{color:#fff;background:var(--at-color-main)}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:not(:last-child){margin-right:5px}.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button.error{color:#fff;background:#ff5652;border-color:#ff5652}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap{position:fixed;z-index:999998;left:0;top:0;height:100vh;width:100vw}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap>iframe{width:100%;height:100%;border:0}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap .atk-close-btn{z-index:999999;position:fixed;top:20px;right:20px;display:flex;flex-direction:column;width:50px;height:50px;align-items:center;place-content:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-left:10px}.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap .atk-close-btn:hover .atk-icon-close{background-color:#e81123e6}@media only screen and (max-width: 768px){.atk-layer-dialog-wrap>.atk-layer-dialog{width:90%!important}}.atk-notify{display:block;overflow:hidden;background-color:#2c2c2c;color:#fff;border-radius:3px;cursor:pointer;font-size:14px;padding:5px 15px}.atk-notify:not(:last-child){margin-bottom:3px}.atk-notify .atk-notify-content{color:#fff}.atk-layer-wrap .atk-layer-mask{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998;background:rgba(0,0,0,.3)}.atk-layer-wrap .atk-layer-item{position:fixed;z-index:99999;top:0;right:0;width:100%;height:100%}.atk-common-action-btn.atk-btn-confirm,.atk-common-action-btn.atk-btn-warn{color:var(--at-color-yellow)!important}.atk-common-action-btn.atk-btn-error{color:var(--at-color-red)!important}.atk-common-action-btn.atk-btn-success{color:var(--at-color-green)!important}img[atk-emoticon]{max-height:60px;display:initial}.atk-slim-scrollbar::-webkit-scrollbar,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar{width:4px;height:4px;background:transparent}.atk-slim-scrollbar::-webkit-scrollbar-thumb,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb,.atk-slim-scrollbar::-webkit-scrollbar-thumb:window-inactive{background:rgba(86,86,86,.3)}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:hover,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:hover{background:rgba(65,74,82,.77)}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:active,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:active{background:rgba(41,47,53,.77)}.atk-editor-plug-emoticons{height:100%;width:100%}.atk-editor-plug-emoticons>.atk-grp-wrap{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp{display:flex;flex-wrap:wrap;flex-direction:row;padding:5px 10px 35px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp[data-type=image]>.atk-item{height:63px;width:63px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item{display:flex;align-items:center;justify-content:center;padding:5px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:3px;font-size:15px;min-width:35px;margin:2px}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item>img{max-height:100%;width:auto}.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item:hover{background:var(--at-color-bg-grey)}.atk-editor-plug-emoticons>.atk-grp-switcher{position:absolute;bottom:0;left:0;width:100%;background:var(--at-color-bg-transl);height:30px;border-top:1px solid var(--at-color-border);border-bottom:1px solid var(--at-color-border)}.atk-editor-plug-emoticons>.atk-grp-switcher>span{-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:0 10px;line-height:30px;float:left;display:block;cursor:pointer;font-size:14px}.atk-editor-plug-emoticons>.atk-grp-switcher>span:hover,.atk-editor-plug-emoticons>.atk-grp-switcher>span.active{background:var(--at-color-bg-grey)}.atk-slim-scrollbar::-webkit-scrollbar{width:4px;height:4px;background:transparent}.atk-slim-scrollbar::-webkit-scrollbar-thumb,.atk-slim-scrollbar::-webkit-scrollbar-thumb:window-inactive{background:rgba(86,86,86,.3)}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:hover{background:rgba(65,74,82,.77)}.atk-slim-scrollbar::-webkit-scrollbar-thumb:vertical:active{background:rgba(41,47,53,.77)}.atk-editor-plug-preview{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%;padding:10px 15px} diff --git a/themes/FixIt/assets/lib/artalk/Artalk.js b/themes/FixIt/assets/lib/artalk/Artalk.js new file mode 100644 index 0000000..c4d6ffb --- /dev/null +++ b/themes/FixIt/assets/lib/artalk/Artalk.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Artalk=t()}(this,(function(){"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,o=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&a(e,n,t[n]);if(i)for(var n of i(t))r.call(t,n)&&a(e,n,t[n]);return e},l=(e,i)=>t(e,n(i)),c=(e,t,n)=>(a(e,"symbol"!=typeof t?t+"":t,n),n),d=(e,t,n)=>new Promise(((i,s)=>{var r=e=>{try{o(n.next(e))}catch(t){s(t)}},a=e=>{try{o(n.throw(e))}catch(t){s(t)}},o=e=>e.done?i(e.value):Promise.resolve(e.value).then(r,a);o((n=n.apply(e,t)).next())}));function h(e=""){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstElementChild||t}function u(e){return parseFloat(getComputedStyle(e,null).height.replace("px",""))}function p(e){const t=RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g," "))}function g(e){const t=e.getBoundingClientRect();return{top:t.top+window.scrollY,left:t.left+window.scrollX}}function m(e,t){let n=e.toString();for(;n.length=13?e.replace(/Windows NT 10.0/,"Windows NT 11.0"):"macOS"===t.platform&&i>=11?e.replace(/(Mac OS X \d+_\d+_\d+|Mac OS X)/,`Mac OS X ${n.platformVersion.replace(/\./g,"_")}`):e}))}function y(e){let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol}function $(e,t){return function(e,t){return`${e.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}(e.conf.server,t)}function x(e,t){const n=e=>e&&"object"==typeof e;return n(e)&&n(t)?(Object.keys(t).forEach((i=>{const s=e[i],r=t[i];Array.isArray(s)&&Array.isArray(r)?e[i]=s.concat(r):n(s)&&n(r)?e[i]=x(o({},s),r):e[i]=r})),e):t}class v{constructor(e){c(this,"$el"),c(this,"ctx"),c(this,"conf"),this.ctx=e,this.conf=e.conf}$t(e,t={}){return this.ctx.$t(e,t)}}function b(e,t){let n=e.querySelector(":scope > .atk-loading");n||(n=h(''),(null==t?void 0:t.transparentBg)&&(n.style.background="transparent"),e.appendChild(n)),n.style.display="";const i=n.querySelector(".atk-loading-spinner");i&&(i.style.display="none",window.setTimeout((()=>{i.style.display=""}),500))}function w(e){const t=e.querySelector(":scope > .atk-loading");t&&(t.style.display="none")}function C(e,t=!0){const n=g(e).top+u(e)/2-document.documentElement.clientHeight/2;t?window.scroll({top:n>0?n:0,left:0}):window.scroll(0,n>0?n:0)}function S(e,t,n){const i=h(`
`);i.querySelector(".atk-notify-content").innerHTML=function(e){const t=document.createElement("div");return t.innerText=e,t.innerHTML}(t).replace("\n","
"),e.appendChild(i);const s=()=>{i.classList.add("atk-fade-out"),setTimeout((()=>{i.remove()}),200)};let r;r=window.setTimeout((()=>{s()}),3e3),i.addEventListener("click",(()=>{s(),window.clearTimeout(r)}))}function T(e,t){!function(e,t,n="in"){e.classList.add(`atk-fade-${n}`);const i=()=>{e.classList.remove(`atk-fade-${n}`),e.removeEventListener("animationend",i),t&&t()};e.addEventListener("animationend",i)}(e,t,"in")}function E(e,t,n='Artalk Error'){let i=e.querySelector(".atk-error-layer");if(null===t)return void(null!==i&&i.remove());i||(i=h(`
${n}
`),e.appendChild(i));const s=i.querySelector(".atk-error-text");s.innerHTML="",null!==t&&(t instanceof HTMLElement?s.appendChild(t):s.innerText=t)}const L=class extends v{constructor(e,t,n){super(e),c(this,"name"),c(this,"$wrap"),c(this,"$mask"),c(this,"maskClickHideEnable",!0),c(this,"afterHide"),this.name=t;const{$wrap:i,$mask:s}=A();this.$wrap=i,this.$mask=s,this.$el=this.$wrap.querySelector(`[data-layer-name="${t}"].atk-layer-item`),null===this.$el&&(n?this.$el=n:(this.$el=h(),this.$el.classList.add("atk-layer-item"))),this.$el.setAttribute("data-layer-name",t),this.$el.style.display="none",this.$wrap.append(this.$el)}getName(){return this.name}getWrapEl(){return this.$wrap}getEl(){return this.$el}show(){this.fireAllActionTimer(),this.$wrap.style.display="block",this.$mask.style.display="block",this.$mask.classList.add("atk-fade-in"),this.$el.style.display="",this.$mask.onclick=()=>{this.maskClickHideEnable&&this.hide()},this.pageBodyScrollBarHide()}hide(){this.afterHide&&this.afterHide(),this.$wrap.classList.add("atk-fade-out"),this.$el.style.display="none",this.pageBodyScrollBarShow(),this.newActionTimer((()=>{this.$wrap.style.display="none",this.checkCleanLayer()}),450),this.newActionTimer((()=>{this.$wrap.style.display="none",this.$wrap.classList.remove("atk-fade-out")}),200)}setMaskClickHide(e){this.maskClickHideEnable=e}pageBodyScrollBarHide(){document.body.style.overflow="hidden";const e=parseInt(window.getComputedStyle(document.body,null).getPropertyValue("padding-right"),10);document.body.style.paddingRight=`${function(){const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);const n=e.offsetWidth;t.style.overflow="scroll";let i=e.offsetWidth;return n===i&&(i=t.clientWidth),document.body.removeChild(t),n-i}()+e||0}px`}pageBodyScrollBarShow(){document.body.style.overflow=L.BodyOrgOverflow,document.body.style.paddingRight=L.BodyOrgPaddingRight}newActionTimer(e,t){const n=()=>{e(),L.actionTimers=L.actionTimers.filter((e=>e.act!==n))},i=window.setTimeout((()=>n()),t);L.actionTimers.push({act:n,tid:i})}fireAllActionTimer(){L.actionTimers.forEach((e=>{clearTimeout(e.tid),e.act()}))}disposeNow(){this.$el.remove(),this.pageBodyScrollBarShow(),this.checkCleanLayer()}dispose(){this.hide(),this.$el.remove(),this.checkCleanLayer()}checkCleanLayer(){0===this.getWrapEl().querySelectorAll(".atk-layer-item").length&&(this.$wrap.style.display="none")}};let _=L;function A(){let e=document.querySelector(".atk-layer-wrap");e||(e=h(''),document.body.appendChild(e));const t=e.querySelector(".atk-layer-mask");return{$wrap:e,$mask:t}}c(_,"BodyOrgOverflow"),c(_,"BodyOrgPaddingRight"),c(_,"actionTimers",[]);const O=window.matchMedia("(prefers-color-scheme: dark)");let M;function R(e){B(e,e.conf.darkMode,!1)}function B(e,t,n=!0){const i=t=>{!function(e,t){t?e.$root.classList.add(I):e.$root.classList.remove(I);const{$wrap:n}=A();n&&(t?n.classList.add(I):n.classList.remove(I))}(e,t),n&&function(e,t){e.conf.darkMode=t}(e,t)};"auto"===t?(M||(M=e=>i(e.matches),O.addEventListener("change",M)),i(O.matches)):(M&&O.removeEventListener("change",M),i(t))}const I="atk-dark-mode";function P(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let U={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const q=/[&<>"']/,D=new RegExp(q.source,"g"),z=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,W=new RegExp(z.source,"g"),F={"&":"&","<":"<",">":">",'"':""","'":"'"},j=e=>F[e];function N(e,t){if(t){if(q.test(e))return e.replace(D,j)}else if(z.test(e))return e.replace(W,j);return e}const H=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Q(e){return e.replace(H,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const V=/(^|[^\[])\^/g;function Z(e,t){e="string"==typeof e?e:e.source,t=t||"";const n={replace:(t,i)=>(i=(i=i.source||i).replace(V,"$1"),e=e.replace(t,i),n),getRegex:()=>new RegExp(e,t)};return n}const G=/[^\w:]/g,K=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Y(e,t,n){if(e){let e;try{e=decodeURIComponent(Q(n)).replace(G,"").toLowerCase()}catch(i){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!K.test(n)&&(n=function(e,t){X[" "+e]||(J.test(e)?X[" "+e]=e+"/":X[" "+e]=re(e,"/",!0));e=X[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(ee,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(te,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(i){return null}return n}const X={},J=/^[^:]+:\/*[^/]*$/,ee=/^([^:]+:)[\s\S]*$/,te=/^([^:]+:\/*[^/]*)[\s\S]*$/;const ne={exec:function(){}};function ie(e){let t,n,i=1;for(;i{let i=!1,s=t;for(;--s>=0&&"\\"===n[s];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function le(e,t,n,i){const s=t.href,r=t.title?N(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){i.state.inLink=!0;const e={type:"link",raw:n,href:s,title:r,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:r,text:N(a)}}class ce{constructor(e){this.options=e||U}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:re(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const i=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=i.length?e.slice(i.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=re(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:i,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,i,s,r,a,o,l,c,d,h,u,p,g=t[1].trim();const m=g.length>1,f={type:"list",raw:"",ordered:m,start:m?+g.slice(0,-1):"",loose:!1,items:[]};g=m?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=m?g:"[*+-]");const k=new RegExp(`^( {0,3}${g})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(p=!1,t=k.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),d=e.split("\n",1)[0],this.options.pedantic?(r=2,u=c.trimLeft()):(r=t[2].search(/[^ ]/),r=r>4?1:r,u=c.slice(r),r+=t[1].length),o=!1,!c&&/^ *$/.test(d)&&(n+=d+"\n",e=e.substring(d.length+1),p=!0),!p){const t=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),i=new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),a=new RegExp(`^ {0,${Math.min(3,r-1)}}#`);for(;e&&(h=e.split("\n",1)[0],d=h,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!s.test(d))&&!a.test(d)&&!t.test(d)&&!i.test(e);){if(d.search(/[^ ]/)>=r||!d.trim())u+="\n"+d.slice(r);else{if(o)break;if(c.search(/[^ ]/)>=4)break;if(s.test(c))break;if(a.test(c))break;if(i.test(c))break;u+="\n"+d}o||d.trim()||(o=!0),n+=h+"\n",e=e.substring(h.length+1),c=d.slice(r)}}f.loose||(l?f.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(u),i&&(s="[ ] "!==i[0],u=u.replace(/^\[[ xX]\] +/,""))),f.items.push({type:"list_item",raw:n,task:!!i,checked:s,loose:!1,text:u}),f.raw+=n}f.items[f.items.length-1].raw=n.trimRight(),f.items[f.items.length-1].text=u.trimRight(),f.raw=f.raw.trimRight();const y=f.items.length;for(a=0;a"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));f.loose=t}if(f.loose)for(a=0;a$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:se(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,i,s,r,a=e.align.length;for(n=0;n({text:e})));for(a=e.header.length,i=0;i/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=re(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let i=0,s=0;for(;s-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],i=e[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),le(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:i?i.replace(this.rules.inline._escapes,"$1"):i},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return le(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i)return;if(i[3]&&n.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(""===n||this.rules.inline.punctuation.exec(n))){const n=i[0].length-1;let s,r,a=n,o=0;const l="*"===i[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(i=l.exec(t));){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(r=s.length,i[3]||i[4]){a+=r;continue}if((i[5]||i[6])&&n%3&&!((n+r)%3)){o+=r;continue}if(a-=r,a>0)continue;r=Math.min(r,r+a+o);const t=e.slice(0,n+i.index+(i[0].length-s.length)+r);if(Math.min(n,r)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const l=t.slice(2,-2);return{type:"strong",raw:t,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),i=/^ /.test(e)&&/ $/.test(e);return n&&i&&(e=e.substring(1,e.length-1)),e=N(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,i;return"@"===n[2]?(e=N(this.options.mangle?t(n[1]):n[1]),i="mailto:"+e):(e=N(n[1]),i=e),{type:"link",raw:n[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,i;if("@"===n[2])e=N(this.options.mangle?t(n[0]):n[0]),i="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=N(n[0]),i="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):N(n[0]):n[0]:N(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const de={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ne,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};de.def=Z(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.listItemStart=Z(/^( *)(bull) */).replace("bull",de.bullet).getRegex(),de.list=Z(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",de._comment=/|$)/,de.html=Z(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=Z(de._paragraph).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",de._tag).getRegex(),de.blockquote=Z(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=ie({},de),de.gfm=ie({},de.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),de.gfm.table=Z(de.gfm.table).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",de._tag).getRegex(),de.gfm.paragraph=Z(de._paragraph).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",de.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",de._tag).getRegex(),de.pedantic=ie({},de.normal,{html:Z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",de._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ne,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(de.normal._paragraph).replace("hr",de.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const he={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ne,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}he._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",he.punctuation=Z(he.punctuation).replace(/punctuation/g,he._punctuation).getRegex(),he.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,he.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,he._comment=Z(de._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),he.emStrong.lDelim=Z(he.emStrong.lDelim).replace(/punct/g,he._punctuation).getRegex(),he.emStrong.rDelimAst=Z(he.emStrong.rDelimAst,"g").replace(/punct/g,he._punctuation).getRegex(),he.emStrong.rDelimUnd=Z(he.emStrong.rDelimUnd,"g").replace(/punct/g,he._punctuation).getRegex(),he._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,he._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,he._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,he.autolink=Z(he.autolink).replace("scheme",he._scheme).replace("email",he._email).getRegex(),he._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,he.tag=Z(he.tag).replace("comment",he._comment).replace("attribute",he._attribute).getRegex(),he._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,he._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,he._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,he.link=Z(he.link).replace("label",he._label).replace("href",he._href).replace("title",he._title).getRegex(),he.reflink=Z(he.reflink).replace("label",he._label).replace("ref",de._label).getRegex(),he.nolink=Z(he.nolink).replace("ref",de._label).getRegex(),he.reflinkSearch=Z(he.reflinkSearch,"g").replace("reflink",he.reflink).replace("nolink",he.nolink).getRegex(),he.normal=ie({},he),he.pedantic=ie({},he.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",he._label).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",he._label).getRegex()}),he.gfm=ie({},he.normal,{escape:Z(he.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?t.push(n):(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),i=t[t.length-1],!i||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(i.raw+="\n"+n.raw,i.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let i;this.options.extensions.startBlock.forEach((function(e){i=e.call({lexer:this},n),"number"==typeof i&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))i=t[t.length-1],r&&"paragraph"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n),r=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),i=t[t.length-1],i&&"text"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,i,s,r,a,o,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,r.index)+"["+oe("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,r.index)+"["+oe("a",r[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,r.index+r[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(a||(o=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),i=t[t.length-1],i&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),i=t[t.length-1],i&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,pe))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,pe))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let i;this.options.extensions.startInline.forEach((function(e){i=e.call({lexer:this},n),"number"==typeof i&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s,ue))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0,i=t[t.length-1],i&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class me{constructor(e){this.options=e||U}code(e,t,n){const i=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,i);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",i?'
'+(n?e:N(e,!0))+"
\n":"
"+(n?e:N(e,!0))+"
\n"}blockquote(e){return`
\n${e}
\n`}html(e){return e}heading(e,t,n,i){if(this.options.headerIds){return`${e}\n`}return`${e}\n`}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,n){const i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return`
  • ${e}
  • \n`}checkbox(e){return" "}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;let i='",i}image(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;let i=`${n}":">",i}text(e){return e}}class fe{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ke{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do{i++,n=e+"-"+i}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class ye{constructor(e){this.options=e||U,this.options.renderer=this.options.renderer||new me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new fe,this.slugger=new ke}static parse(e,t){return new ye(t).parse(e)}static parseInline(e,t){return new ye(t).parseInline(e)}parse(e,t=!0){let n,i,s,r,a,o,l,c,d,h,u,p,g,m,f,k,y,$,x,v="";const b=e.length;for(n=0;n0&&"paragraph"===f.tokens[0].type?(f.tokens[0].text=$+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&"text"===f.tokens[0].tokens[0].type&&(f.tokens[0].tokens[0].text=$+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:$}):m+=$),m+=this.parse(f.tokens,g),d+=this.renderer.listitem(m,y,k);v+=this.renderer.list(d,u,p);continue;case"html":v+=this.renderer.html(h.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(d=h.tokens?this.parseInline(h.tokens):h.text;n+1{i(e.text,e.lang,(function(t,n){if(t)return a(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),o--,0===o&&a()}))}),0))})),void(0===o&&a())}function i(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+N(e.message+"",!0)+"
    ";throw e}try{const n=ge.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all($e.walkTokens(n,t.walkTokens)).then((()=>ye.parse(n,t))).catch(i);$e.walkTokens(n,t.walkTokens)}return ye.parse(n,t)}catch(s){i(s)}}$e.options=$e.setOptions=function(e){var t;return ie($e.defaults,e),t=$e.defaults,U=t,$e},$e.getDefaults=P,$e.defaults=U,$e.use=function(...e){const t=$e.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n=ie({},e);if(n.async=$e.defaults.async||n.async,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let i=e.renderer.apply(this,t);return!1===i&&(i=n.apply(this,t)),i}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=$e.defaults.renderer||new me;for(const n in e.renderer){const i=t[n];t[n]=(...s)=>{let r=e.renderer[n].apply(t,s);return!1===r&&(r=i.apply(t,s)),r}}n.renderer=t}if(e.tokenizer){const t=$e.defaults.tokenizer||new ce;for(const n in e.tokenizer){const i=t[n];t[n]=(...s)=>{let r=e.tokenizer[n].apply(t,s);return!1===r&&(r=i.apply(t,s)),r}}n.tokenizer=t}if(e.walkTokens){const t=$e.defaults.walkTokens;n.walkTokens=function(n){let i=[];return i.push(e.walkTokens.call(this,n)),t&&(i=i.concat(t.call(this,n))),i}}$e.setOptions(n)}))},$e.walkTokens=function(e,t){let n=[];for(const i of e)switch(n=n.concat(t.call($e,i)),i.type){case"table":for(const e of i.header)n=n.concat($e.walkTokens(e.tokens,t));for(const e of i.rows)for(const i of e)n=n.concat($e.walkTokens(i.tokens,t));break;case"list":n=n.concat($e.walkTokens(i.items,t));break;default:$e.defaults.extensions&&$e.defaults.extensions.childTokens&&$e.defaults.extensions.childTokens[i.type]?$e.defaults.extensions.childTokens[i.type].forEach((function(e){n=n.concat($e.walkTokens(i[e],t))})):i.tokens&&(n=n.concat($e.walkTokens(i.tokens,t)))}return n},$e.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");ae(t=ie({},$e.defaults,t||{}));try{const n=ge.lexInline(e,t);return t.walkTokens&&$e.walkTokens(n,t.walkTokens),ye.parseInline(n,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+N(n.message+"",!0)+"
    ";throw n}},$e.Parser=ye,$e.parser=ye.parse,$e.Renderer=me,$e.TextRenderer=fe,$e.Lexer=ge,$e.lexer=ge.lex,$e.Tokenizer=ce,$e.Slugger=ke,$e.parse=$e,$e.options,$e.setOptions,$e.use,$e.walkTokens,$e.parseInline,ye.parse,ge.lex;var xe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ve={"&":"&","<":"<",">":">",'"':""","'":"'"},be={"&":"&","<":"<",">":">",""":'"',"'":"'"},we=/(&|<|>|"|')/g,Ce=/[&<>"']/g;function Se(e){return ve[e]}function Te(e){return be[e]}function Ee(e){return null==e?"":String(e).replace(Ce,Se)}function Le(e){return null==e?"":String(e).replace(we,Te)}Ee.options=Le.options={};var _e={encode:Ee,escape:Ee,decode:Le,unescape:Le,version:"1.0.0-browser"};var Ae=function e(t){for(var n,i,s=Array.prototype.slice.call(arguments,1);s.length;)for(i in n=s.shift())n.hasOwnProperty(i)&&("[object Object]"===Object.prototype.toString.call(t[i])?t[i]=e(t[i],n[i]):t[i]=n[i]);return t},Oe=function(e){return"string"==typeof e?e.toLowerCase():e};function Me(e,t){return e[t]=!0,e}var Re=function(e){return e.reduce(Me,{})},Be={uris:Re(["background","base","cite","href","longdesc","src","usemap"])},Ie={voids:Re(["area","br","col","hr","img","wbr","input","base","basefont","link","meta"])},Pe=_e,Ue=Oe,qe=Ie,De=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,ze=/^<\s*\/\s*([\w:-]+)[^>]*>/,We=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,Fe=/^=0&&(t.comment&&t.comment(e.substring(4,i)),e=e.substring(i+3),n=!1):je.test(e)?a(ze,l):Fe.test(e)&&a(De,o);var i;!function(){if(!n)return;var i,s=e.indexOf("<");s>=0?(i=e.substring(0,s),e=e.substring(s)):(i=e,e="");t.chars&&t.chars(i)}()}();var i=e===s;s=e,i&&(e="")}function a(t,i){var s=e.match(t);s&&(e=e.substring(s[0].length),s[0].replace(t,i),n=!1)}function o(e,n,s,r){var a={},o=Ue(n),l=qe.voids[o]||!!r;s.replace(We,(function(e,t,n,i,s){a[t]=void 0===n&&void 0===i&&void 0===s?void 0:Pe.decode(n||i||s||"")})),l||i.push(o),t.start&&t.start(o,a,l)}function l(e,n){var s,r=0,a=Ue(n);if(a)for(r=i.length-1;r>=0&&i[r]!==a;r--);if(r>=0){for(s=i.length-1;s>=r;s--)t.end&&t.end(i[s]);i.length=r}}l()},Ke=function(e,t){var n,i=t||{};return o(),{start:function(e,t,a){var o=He(e);if(n.ignoring)return void r(o);if(-1===(i.allowedTags||[]).indexOf(o))return void r(o);if(i.filter&&!i.filter({tag:o,attrs:t}))return void r(o);s("<"),s(o),Object.keys(t).forEach((function(e){var n=t[e],r=(i.allowedClasses||{})[o]||[],a=(i.allowedAttributes||{})[o]||[],l=He(e);("class"===l&&-1===a.indexOf(l)?(n=n.split(" ").filter((function(e){return r&&-1!==r.indexOf(e)})).join(" ").trim()).length:-1!==a.indexOf(l)&&(!0!==Qe.uris[l]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var s=e.indexOf("?");if(-1!==s&&n>s)return!0;var r=e.indexOf("#");return-1!==r&&n>r||i.allowedSchemes.some(a);function a(t){return 0===e.indexOf(t+":")}}(n)))&&(s(" "),s(e),"string"==typeof n&&(s('="'),s(Ne.encode(n)),s('"')))})),s(a?"/>":">")},end:function(e){var t=He(e);-1!==(i.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(s("")):a(t)},chars:function(e){!1===n.ignoring&&s(i.transformText?i.transformText(e):e)}};function s(t){e.push(t)}function r(e){Ve.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function a(e){n.ignoring===e&&--n.depth<=0&&o()}function o(){n={ignoring:!1,depth:0}}},Ye={allowedAttributes:{a:["href","name","target","title","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};function Xe(e,t,n){var i=[],s=!0===n?t:Ze({},Ye,t),r=Ke(i,s);return Ge(e,r),i.join("")}Xe.defaults=Ye;var Je=Xe,et={};({get exports(){return et},set exports(e){et=e}}).exports=function(){function e(e,t){return e(t={exports:{}},t.exports),t.exports}var t=e((function(e){var t=e.exports=function(){return new RegExp("(?:"+t.line().source+")|(?:"+t.block().source+")","gm")};t.line=function(){return/(?:^|\s)\/\/(.+?)$/gm},t.block=function(){return/\/\*([\S\s]*?)\*\//gm}})),n=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"];function i(e){return''+e+""}return function(e,s){void 0===s&&(s={});var r=s.colors;void 0===r&&(r=n);var a=0,o={},l=new RegExp("("+/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source+"|"+/'+t+"";return a=++a%r.length,l}))}}();const tt=et;let nt;function it(){return nt}function st(e,t){var n;let i=null==(n=it())?void 0:n.parse(t);i||(i=t.replace(/```\s*([^]+?.*?[^]+?[^]+?)```/g,((e,t)=>`
    ${tt(t)}
    `)).replace(/!\[(.*?)\]\((.*?)\)/g,((e,t,n)=>`${t}`)).replace(/\[(.*?)\]\((.*?)\)/g,((e,t,n)=>`
    ${t}`)).replace(/\n/g,"
    "));let s=Je(i,{allowedClasses:{},allowedSchemes:["http","https","mailto","data"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],allowedAttributes:{"*":["title","accesskey"],a:["href","name","target","aria-label","rel"],img:["src","alt","title","atk-emoticon","aria-label"],code:["class"],span:["class","style"]},filter:e=>([["code",/^hljs\W+language-(.*)$/],["span",/^(hljs-.*)$/]].forEach((([t,n])=>{e.tag===t&&e.attrs.class&&!n.test(e.attrs.class)&&delete e.attrs.class})),"span"===e.tag&&e.attrs.style&&!/^color:(\W+)?#[0-9a-f]{3,6};?$/i.test(e.attrs.style)&&delete e.attrs.style,!0)});return e.markedReplacers.forEach((e=>{"function"==typeof e&&(s=e(s))})),s}const rt={placeholder:"Leave a comment",noComment:"No Comment",send:"Send",save:"Save",nick:"Nickname",email:"Email",link:"Website",emoticon:"Emoji",preview:"Preview",image:"Image",uploadFail:"Upload Failed",commentFail:"Failed to comment",restoredMsg:"Content has been restored",onlyAdminCanReply:"Only admin can reply",uploadLoginMsg:"Please fill in your name and email to upload",counter:"{count} Comments",sortLatest:"Latest",sortOldest:"Oldest",sortBest:"Best",sortAuthor:"Author",openComment:"Open Comment",closeComment:"Close Comment",listLoadFailMsg:"Failed to load comments",listRetry:"Click to retry",loadMore:"Load More",admin:"Admin",reply:"Reply",voteUp:"Up",voteDown:"Down",voteFail:"Vote Failed",readMore:"Read More",actionConfirm:"Confirm",collapse:"Collapse",collapsed:"Collapsed",collapsedMsg:"This comment has been collapsed",expand:"Expand",approved:"Approved",pending:"Pending",pendingMsg:"Pending, visible only to commenter.",edit:"Edit",editCancel:"Cancel Edit",delete:"Delete",deleteConfirm:"Confirm",pin:"Pin",unpin:"Unpin",seconds:"seconds ago",minutes:"minutes ago",hours:"hours ago",days:"days ago",now:"just now",adminCheck:"Enter admin password:",captchaCheck:"Enter the CAPTCHA to continue:",confirm:"Confirm",cancel:"Cancel",msgCenter:"Messages",ctrlCenter:"Admin",frontend:"Frontend",backend:"Backend",loading:"Loading",loadFail:"Load Failed",editing:"Editing",editFail:"Edit Failed",deleting:"Deleting",deleteFail:"Delete Failed",reqGot:"Request got",reqAborted:"Request timed out or terminated unexpectedly"},at="ArtalkI18n",ot={en:rt,"en-US":rt,"zh-CN":{placeholder:"键入内容...",noComment:"「此时无声胜有声」",send:"发送评论",save:"保存评论",nick:"昵称",email:"邮箱",link:"网址",emoticon:"表情",preview:"预览",image:"图片",uploadFail:"上传失败",commentFail:"评论失败",restoredMsg:"内容已自动恢复",onlyAdminCanReply:"仅管理员可评论",uploadLoginMsg:"填入你的名字邮箱才能上传哦",counter:"{count} 条评论",sortLatest:"最新",sortOldest:"最早",sortBest:"最热",sortAuthor:"作者",openComment:"打开评论",closeComment:"关闭评论",listLoadFailMsg:"无法获取评论列表数据",listRetry:"点击重新获取",loadMore:"加载更多",admin:"管理员",reply:"回复",voteUp:"赞同",voteDown:"反对",voteFail:"投票失败",readMore:"阅读更多",actionConfirm:"确认操作",collapse:"折叠",collapsed:"已折叠",collapsedMsg:"该评论已被系统或管理员折叠",expand:"展开",approved:"已审",pending:"待审",pendingMsg:"审核中,仅本人可见。",edit:"编辑",editCancel:"取消编辑",delete:"删除",deleteConfirm:"确认删除",pin:"置顶",unpin:"取消置顶",seconds:"秒前",minutes:"分钟前",hours:"小时前",days:"天前",now:"刚刚",adminCheck:"键入密码来验证管理员身份:",captchaCheck:"键入验证码继续:",confirm:"确认",cancel:"取消",msgCenter:"通知中心",ctrlCenter:"控制中心",frontend:"前端",backend:"后端",loading:"加载中",loadFail:"加载失败",editing:"修改中",editFail:"修改失败",deleting:"删除中",deleteFail:"删除失败",reqGot:"请求响应",reqAborted:"请求超时或意外终止"}};function lt(e){return e=e.replace(/^([a-zA-Z]+)(-[a-zA-Z]+)?$/,((e,t,n)=>t.toLowerCase()+(n||"").toUpperCase())),ot[e]?ot[e]:window[at]&&window[at][e]?window[at][e]:ot.en}let ct="en",dt=lt(ct);function ht(e){e!==ct&&(ct=e,dt="string"==typeof e?lt(e):e)}function ut(e,t={}){let n=(null==dt?void 0:dt[e])||e;return n=n.replace(/\{\s*(\w+?)\s*\}/g,((e,n)=>t[n]||"")),n}const pt="2.5.2";const gt=new class{constructor(){c(this,"ctx"),c(this,"data");const e=JSON.parse(window.localStorage.getItem("ArtalkUser")||"{}");this.data={nick:e.nick||"",email:e.email||"",link:e.link||"",token:e.token||"",isAdmin:e.isAdmin||!1}}setContext(e){this.ctx=e}update(e={}){var t;Object.entries(e).forEach((([e,t])=>{this.data[e]=t})),window.localStorage.setItem("ArtalkUser",JSON.stringify(this.data)),null==(t=this.ctx)||t.trigger("user-changed",this.data)}logout(){this.update({token:"",isAdmin:!1})}checkHasBasicUserInfo(){return!!this.data.nick&&!!this.data.email}},mt=window||{},ft=navigator||{};class kt{constructor(e){c(this,"comment"),c(this,"$el"),c(this,"$main"),c(this,"$header"),c(this,"$headerNick"),c(this,"$headerBadgeWrap"),c(this,"$body"),c(this,"$content"),c(this,"$childrenWrap"),c(this,"$actions"),c(this,"voteBtnUp"),c(this,"voteBtnDown"),c(this,"$replyTo"),c(this,"$replyAt"),this.comment=e}get ctx(){return this.comment.ctx}get data(){return this.comment.getData()}get conf(){return this.comment.conf}get cConf(){return this.comment.getConf()}}function yt(e){if(e.$headerNick=e.$el.querySelector(".atk-nick"),e.data.link){const t=h('');t.innerText=e.data.nick,t.href=y(e.data.link)?e.data.link:`https://${e.data.link}`,e.$headerNick.append(t)}else e.$headerNick.innerText=e.data.nick}function $t(e){e.$headerBadgeWrap=e.$el.querySelector(".atk-badge-wrap"),e.$headerBadgeWrap.innerHTML="";const t=e.data.badge_name,n=e.data.badge_color;if(t){const i=h('');i.innerText=t.replace("管理员",e.ctx.$t("admin")),i.style.backgroundColor=n||"",e.$headerBadgeWrap.append(i)}if(e.data.is_pinned){const t=h(`${e.ctx.$t("pin")}`);e.$headerBadgeWrap.append(t)}}function xt(e){const t=e.$el.querySelector(".atk-date");t.innerText=e.comment.getDateFormatted(),t.setAttribute("data-atk-comment-date",String(+new Date(e.data.date)))}function vt(e){if(!e.ctx.conf.uaBadge&&!e.data.ip_region)return;let t=e.$header.querySelector("atk-ua-wrap");if(t||(t=h(''),e.$header.append(t)),t.innerHTML="",e.data.ip_region){const n=h('');n.innerText=e.data.ip_region,t.append(n)}if(e.ctx.conf.uaBadge){const{browser:n,os:i}=e.comment.getUserUA();if(String(n).trim()){const e=h('');e.innerText=n,t.append(e)}if(String(i).trim()){const e=h('');e.innerText=i,t.append(e)}}}class bt{constructor(e,t){c(this,"ctx"),c(this,"conf"),c(this,"$el"),c(this,"isLoading",!1),c(this,"msgRecTimer"),c(this,"msgRecTimerFunc"),c(this,"isConfirming",!1),c(this,"confirmRecTimer"),this.ctx=e,this.$el=h(''),this.conf="object"!=typeof t?{text:t}:t,this.$el.innerText=this.getText(),this.conf.adminOnly&&this.$el.setAttribute("atk-only-admin-show","")}get isMessaging(){return!!this.msgRecTimer}appendTo(e){return e.append(this.$el),this}getText(){return"string"==typeof this.conf.text?this.conf.text:this.conf.text()}setClick(e){this.$el.onclick=t=>{if(t.stopPropagation(),!this.isLoading){if(this.conf.confirm&&!this.isMessaging){const e=()=>{this.isConfirming=!1,this.$el.classList.remove("atk-btn-confirm"),this.$el.innerText=this.getText()};if(!this.isConfirming)return this.isConfirming=!0,this.$el.classList.add("atk-btn-confirm"),this.$el.innerText=this.conf.confirmText||this.ctx.$t("actionConfirm"),void(this.confirmRecTimer=window.setTimeout((()=>e()),5e3));this.confirmRecTimer&&window.clearTimeout(this.confirmRecTimer),e()}if(this.msgRecTimer)return this.fireMsgRecTimer(),void this.clearMsgRecTimer();e()}}}updateText(e){e&&(this.conf.text=e),this.setLoading(!1),this.$el.innerText=this.getText()}setLoading(e,t){this.isLoading!==e&&(this.isLoading=e,e?(this.$el.classList.add("atk-btn-loading"),this.$el.innerText=t||`${this.ctx.$t("loading")}...`):(this.$el.classList.remove("atk-btn-loading"),this.$el.innerText=this.getText()))}setError(e){this.setMsg(e,"atk-btn-error")}setWarn(e){this.setMsg(e,"atk-btn-warn")}setSuccess(e){this.setMsg(e,"atk-btn-success")}setMsg(e,t,n,i){this.setLoading(!1),t&&this.$el.classList.add(t),this.$el.innerText=e,this.setMsgRecTimer((()=>{this.$el.innerText=this.getText(),t&&this.$el.classList.remove(t),i&&i()}),n||2500)}setMsgRecTimer(e,t){this.fireMsgRecTimer(),this.clearMsgRecTimer(),this.msgRecTimerFunc=e,this.msgRecTimer=window.setTimeout((()=>{e(),this.clearMsgRecTimer()}),t)}fireMsgRecTimer(){this.msgRecTimerFunc&&this.msgRecTimerFunc()}clearMsgRecTimer(){this.msgRecTimer&&window.clearTimeout(this.msgRecTimer),this.msgRecTimer=void 0,this.msgRecTimerFunc=void 0}}function wt(e){e.ctx.conf.vote&&(e.voteBtnUp=new bt(e.ctx,(()=>`${e.ctx.$t("voteUp")} (${e.data.vote_up||0})`)).appendTo(e.$actions),e.voteBtnUp.setClick((()=>{e.comment.getActions().vote("up")})),e.ctx.conf.voteDown&&(e.voteBtnDown=new bt(e.ctx,(()=>`${e.ctx.$t("voteDown")} (${e.data.vote_down||0})`)).appendTo(e.$actions),e.voteBtnDown.setClick((()=>{e.comment.getActions().vote("down")}))))}function Ct(e){if(!e.data.is_allow_reply)return;const t=h(`${e.ctx.$t("reply")}`);e.$actions.append(t),t.addEventListener("click",(t=>{t.stopPropagation(),e.cConf.onReplyBtnClick?e.cConf.onReplyBtnClick():e.ctx.replyComment(e.data,e.$el)}))}function St(e){const t=new bt(e.ctx,{text:()=>e.data.is_collapsed?e.ctx.$t("expand"):e.ctx.$t("collapse"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminEdit("collapsed",t)}))}function Tt(e){const t=new bt(e.ctx,{text:()=>e.data.is_pending?e.ctx.$t("pending"):e.ctx.$t("approved"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminEdit("pending",t)}))}function Et(e){const t=new bt(e.ctx,{text:()=>e.data.is_pinned?e.ctx.$t("unpin"):e.ctx.$t("pin"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminEdit("pinned",t)}))}function Lt(e){const t=new bt(e.ctx,{text:e.ctx.$t("edit"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.ctx.editComment(e.data,e.$el)}))}function _t(e){const t=new bt(e.ctx,{text:e.ctx.$t("delete"),confirm:!0,confirmText:e.ctx.$t("deleteConfirm"),adminOnly:!0});t.appendTo(e.$actions),t.setClick((()=>{e.comment.getActions().adminDelete(t)}))}const At={Avatar:function(e){const t=e.$el.querySelector(".atk-avatar"),n=h(""),i=e.conf.avatarURLBuilder;if(n.src=i?i(e.data):e.comment.getGravatarURL(),e.data.link){const i=h('');i.href=y(e.data.link)?e.data.link:`https://${e.data.link}`,i.append(n),t.append(i)}else t.append(n)},Header:function(e){Object.entries({renderNick:yt,renderVerifyBadge:$t,renderDate:xt,renderUABadge:vt}).forEach((([t,n])=>{n(e)}))},Content:function(e){if(!e.data.is_collapsed)return e.$content.innerHTML=e.comment.getContentMarked(),void e.$content.classList.remove("atk-hide","atk-collapsed");e.$content.classList.add("atk-hide","atk-type-collapsed");const t=h(`\n
    \n ${e.ctx.$t("collapsedMsg")}\n ${e.ctx.$t("expand")}\n
    `);e.$body.insertAdjacentElement("beforeend",t);const n=t.querySelector(".atk-show-btn");n.addEventListener("click",(t=>{t.stopPropagation(),e.$content.classList.contains("atk-hide")?(e.$content.innerHTML=e.comment.getContentMarked(),e.$content.classList.remove("atk-hide"),T(e.$content),n.innerHTML=e.ctx.$t("collapse")):(e.$content.innerHTML="",e.$content.classList.add("atk-hide"),n.innerHTML=e.ctx.$t("expand"))}))},ReplyAt:function(e){e.cConf.isFlatMode||0===e.data.rid||e.cConf.replyTo&&(e.$replyAt=h(''),e.$replyAt.querySelector(".atk-nick").innerText=`${e.cConf.replyTo.nick}`,e.$replyAt.onclick=()=>{e.comment.getActions().goToReplyComment()},e.$headerBadgeWrap.insertAdjacentElement("afterend",e.$replyAt))},ReplyTo:function(e){if(!e.cConf.isFlatMode)return;if(!e.cConf.replyTo)return;e.$replyTo=h(`\n
    \n
    ${e.ctx.$t("reply")} :
    \n
    \n
    `);const t=e.$replyTo.querySelector(".atk-nick");t.innerText=`@${e.cConf.replyTo.nick}`,t.onclick=()=>{e.comment.getActions().goToReplyComment()};let n=st(e.ctx,e.cConf.replyTo.content);e.cConf.replyTo.is_collapsed&&(n=`[${e.ctx.$t("collapsed")}]`),e.$replyTo.querySelector(".atk-content").innerHTML=n,e.$body.prepend(e.$replyTo)},Pending:function(e){if(!e.data.is_pending)return;const t=h(`
    ${e.ctx.$t("pendingMsg")}
    `);e.$body.prepend(t)},Actions:function(e){Object.entries({renderVote:wt,renderReply:Ct,renderCollapse:St,renderModerator:Tt,renderPin:Et,renderEdit:Lt,renderDel:_t}).forEach((([t,n])=>{n(e)}))}};function Ot(e,t){t.forEach((({el:t,max:n,imgContains:i})=>{const s=()=>{t&&(e.scrollable?function(e){if(!e.el)return;if(e.el.classList.contains(Bt))return;e.el.classList.add(Bt),e.el.style.height=`${e.maxHeight}px`}({el:t,maxHeight:n}):function(e){if(!e.el)return;if(!e.maxHeight)return;if(e.el.classList.contains(Mt))return;e.el.classList.add(Mt),e.el.style.height=`${e.maxHeight}px`,e.el.style.overflow="hidden";const t=h(`
    ${ut("readMore")}`);t.onclick=t=>{t.stopPropagation(),Rt(e.el),e.postBtnClick&&e.postBtnClick(t)},e.el.append(t)}({el:t,maxHeight:n,postBtnClick:e.postExpandBtnClick}))},r=()=>{t&&u(t)>n&&s()};r(),i&&t&&function(e,t){if(!e)return;const n=e.getElementsByTagName("img");if(!n.length)return;let i=n.length;for(let s=0;s{i--,0===i&&t()})),0===i&&t()}(t,(()=>r()))}))}const Mt="atk-height-limit";function Rt(e){e&&e.classList.contains(Mt)&&(e.classList.remove(Mt),Array.from(e.children).forEach((e=>{e.classList.contains("atk-height-limit-btn")&&e.remove()})),e.style.height="",e.style.overflow="")}const Bt="atk-height-limit-scroll";class It extends kt{constructor(e){super(e)}render(){var e;return this.$el=h('
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n'),this.$main=this.$el.querySelector(".atk-main"),this.$header=this.$el.querySelector(".atk-header"),this.$body=this.$el.querySelector(".atk-body"),this.$content=this.$body.querySelector(".atk-content"),this.$actions=this.$el.querySelector(".atk-actions"),this.$el.setAttribute("id",`atk-comment-${this.data.id}`),e=this,Object.entries(At).forEach((([t,n])=>{n(e)})),this.recoveryChildrenWrap(),this.$el}checkHeightLimit(){const e=this.ctx.conf.heightLimit;if(!e||!e.content||!e.children)return;const t=e.content,n=e.children;Ot({postExpandBtnClick:()=>{const e=this.comment.getChildren();1===e.length&&Rt(e[0].getRender().$content)},scrollable:e.scrollable},[{el:this.$content,max:t,imgContains:!0},{el:this.$replyTo,max:t,imgContains:!0},{el:this.$childrenWrap,max:n,imgContains:!1}])}heightLimitRemoveForChildren(){this.$childrenWrap&&Rt(this.$childrenWrap)}playFadeAnim(){T(this.comment.getRender().$el)}playFadeAnimForBody(){T(this.comment.getRender().$body)}getChildrenWrap(){return this.$childrenWrap}renderChildrenWrap(){return this.$childrenWrap||(this.$childrenWrap=h('
    '),this.$main.append(this.$childrenWrap)),this.$childrenWrap}recoveryChildrenWrap(){this.$childrenWrap&&this.$main.append(this.$childrenWrap)}setUnread(e){e?this.$el.classList.add("atk-unread"):this.$el.classList.remove("atk-unread")}setOpenable(e){e?this.$el.classList.add("atk-openable"):this.$el.classList.remove("atk-openable")}setOpenURL(e){this.setOpenable(!0),this.$el.onclick=t=>{t.preventDefault(),window.open(e),this.cConf.openEvt&&this.cConf.openEvt()}}setOpenAction(e){this.setOpenable(!0),this.$el.onclick=t=>{t.preventDefault(),e()}}}class Pt{constructor(e){c(this,"comment"),this.comment=e}get ctx(){return this.comment.ctx}get data(){return this.comment.getData()}get cConf(){return this.comment.getConf()}vote(e){const t="up"===e?this.comment.getRender().voteBtnUp:this.comment.getRender().voteBtnDown;this.ctx.getApi().comment.vote(this.data.id,`comment_${e}`).then((e=>{var t,n;this.data.vote_up=e.up,this.data.vote_down=e.down,null==(t=this.comment.getRender().voteBtnUp)||t.updateText(),null==(n=this.comment.getRender().voteBtnDown)||n.updateText()})).catch((e=>{null==t||t.setError(this.ctx.$t("voteFail")),console.log(e)}))}adminEdit(e,t){if(t.isLoading)return;t.setLoading(!0,`${this.ctx.$t("editing")}...`);const n=o({},this.data);"collapsed"===e?n.is_collapsed=!n.is_collapsed:"pending"===e?n.is_pending=!n.is_pending:"pinned"===e&&(n.is_pinned=!n.is_pinned),this.ctx.getApi().comment.commentEdit(n).then((e=>{t.setLoading(!1),this.comment.setData(e),this.ctx.listRefreshUI()})).catch((e=>{console.error(e),t.setError(this.ctx.$t("editFail"))}))}adminDelete(e){e.isLoading||(e.setLoading(!0,`${this.ctx.$t("deleting")}...`),this.ctx.getApi().comment.commentDel(this.data.id,this.data.site_name).then((()=>{e.setLoading(!1),this.cConf.onDelete&&this.cConf.onDelete(this.comment)})).catch((t=>{console.error(t),e.setError(this.ctx.$t("deleteFail"))})))}goToReplyComment(){const e=window.location.hash,t=`#atk-comment-${this.data.rid}`;window.location.hash=t,t===e&&window.dispatchEvent(new Event("hashchange"))}}class Ut extends v{constructor(e,t,n){super(e),c(this,"renderInstance"),c(this,"actionInstance"),c(this,"data"),c(this,"cConf"),c(this,"parent"),c(this,"children",[]),c(this,"nestCurt"),c(this,"nestMax"),this.nestMax=e.conf.nestMax||3,this.cConf=n,this.data=o({},t),this.data.date=this.data.date.replace(/-/g,"/"),this.parent=null,this.nestCurt=1,this.actionInstance=new Pt(this),this.renderInstance=new It(this)}render(){const e=this.renderInstance.render();this.$el&&this.$el.replaceWith(e),this.$el=e,this.cConf.afterRender&&this.cConf.afterRender()}getActions(){return this.actionInstance}getRender(){return this.renderInstance}getData(){return this.data}setData(e){this.data=e,this.render(),this.getRender().playFadeAnimForBody()}getParent(){return this.parent}getChildren(){return this.children}getNestCurt(){return this.nestCurt}getIsRoot(){return 0===this.data.rid}getID(){return this.data.id}putChild(e,t="append"){e.parent=this,e.nestCurt=this.nestCurt+1,this.children.push(e);const n=this.getChildrenEl();"append"===t?n.append(e.getEl()):"prepend"===t&&n.prepend(e.getEl()),e.getRender().playFadeAnim(),e.getRender().checkHeightLimit()}getChildrenEl(){let e=this.getRender().getChildrenWrap();return e||(e=this.nestCurt{n.parent&&(e.push(n.parent),t(n.parent))};return t(this),e}getEl(){return this.$el}getGravatarURL(){return e=this.ctx,t=this.data.email_encrypted,`${e.conf.gravatar.mirror.replace(/\/$/,"")}/${t}?d=${encodeURIComponent(e.conf.gravatar.default)}&s=80`;var e,t}getContentMarked(){return st(this.ctx,this.data.content)}getDateFormatted(){return f(new Date(this.data.date),this.ctx)}getUserUA(){const e=function(e){const t=String(e||ft.userAgent),n={os:"",osVersion:"",engine:"",browser:"",device:"",language:"",version:""},i={Trident:t.includes("Trident")||t.includes("NET CLR"),Presto:t.includes("Presto"),WebKit:t.includes("AppleWebKit"),Gecko:t.includes("Gecko/")},s={Safari:t.includes("Safari"),Chrome:t.includes("Chrome")||t.includes("CriOS"),IE:t.includes("MSIE")||t.includes("Trident"),Edge:t.includes("Edge")||t.includes("Edg"),Firefox:t.includes("Firefox")||t.includes("FxiOS"),"Firefox Focus":t.includes("Focus"),Chromium:t.includes("Chromium"),Opera:t.includes("Opera")||t.includes("OPR"),Vivaldi:t.includes("Vivaldi"),Yandex:t.includes("YaBrowser"),Kindle:t.includes("Kindle")||t.includes("Silk/"),360:t.includes("360EE")||t.includes("360SE"),UC:t.includes("UC")||t.includes(" UBrowser"),QQBrowser:t.includes("QQBrowser"),QQ:t.includes("QQ/"),Baidu:t.includes("Baidu")||t.includes("BIDUBrowser"),Maxthon:t.includes("Maxthon"),Sogou:t.includes("MetaSr")||t.includes("Sogou"),LBBROWSER:t.includes("LBBROWSER"),"2345Explorer":t.includes("2345Explorer"),TheWorld:t.includes("TheWorld"),MIUI:t.includes("MiuiBrowser"),Quark:t.includes("Quark"),Qiyu:t.includes("Qiyu"),Wechat:t.includes("MicroMessenger"),Taobao:t.includes("AliApp(TB"),Alipay:t.includes("AliApp(AP"),Weibo:t.includes("Weibo"),Douban:t.includes("com.douban.frodo"),Suning:t.includes("SNEBUY-APP"),iQiYi:t.includes("IqiyiApp")},r={Windows:t.includes("Windows"),Linux:t.includes("Linux")||t.includes("X11"),macOS:t.includes("Macintosh"),Android:t.includes("Android")||t.includes("Adr"),Ubuntu:t.includes("Ubuntu"),FreeBSD:t.includes("FreeBSD"),Debian:t.includes("Debian"),"Windows Phone":t.includes("IEMobile")||t.includes("Windows Phone"),BlackBerry:t.includes("BlackBerry")||t.includes("RIM"),MeeGo:t.includes("MeeGo"),Symbian:t.includes("Symbian"),iOS:t.includes("like Mac OS X"),"Chrome OS":t.includes("CrOS"),WebOS:t.includes("hpwOS")},a={Mobile:t.includes("Mobi")||t.includes("iPh")||t.includes("480"),Tablet:t.includes("Tablet")||t.includes("Pad")||t.includes("Nexus 7")};a.Mobile?a.Mobile=!t.includes("iPad"):s.Chrome&&t.includes("Edg")?(s.Chrome=!1,s.Edge=!0):mt.showModalDialog&&mt.chrome&&(s.Chrome=!1,s[360]=!0),n.device="PC",n.language=(()=>{const e=(ft.browserLanguage||ft.language).split("-");return e[1]&&(e[1]=e[1].toUpperCase()),e.join("_")})();const o={engine:i,browser:s,os:r,device:a};Object.entries(o).forEach((([e,t])=>{Object.entries(t).forEach((([t,i])=>{!0===i&&(n[e]=t)}))}));const l={Windows:()=>{const e=t.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");return{6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000","10.0":"10","11.0":"11"}[e]||e},Android:()=>t.replace(/^.*Android ([\d.]+);.*$/,"$1"),iOS:()=>t.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,"."),Debian:()=>t.replace(/^.*Debian\/([\d.]+).*$/,"$1"),"Windows Phone":()=>t.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2"),macOS:()=>t.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,"."),WebOS:()=>t.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")};n.osVersion="",l[n.os]&&(n.osVersion=l[n.os](),n.osVersion===t&&(n.osVersion=""));const c={Safari:()=>t.replace(/^.*Version\/([\d.]+).*$/,"$1"),Chrome:()=>t.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1"),IE:()=>t.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1"),Edge:()=>t.replace(/^.*(Edge|Edg|Edg[A-Z]{1})\/([\d.]+).*$/,"$2"),Firefox:()=>t.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1"),"Firefox Focus":()=>t.replace(/^.*Focus\/([\d.]+).*$/,"$1"),Chromium:()=>t.replace(/^.*Chromium\/([\d.]+).*$/,"$1"),Opera:()=>t.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1"),Vivaldi:()=>t.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1"),Yandex:()=>t.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1"),Kindle:()=>t.replace(/^.*Version\/([\d.]+).*$/,"$1"),Maxthon:()=>t.replace(/^.*Maxthon\/([\d.]+).*$/,"$1"),QQBrowser:()=>t.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1"),QQ:()=>t.replace(/^.*QQ\/([\d.]+).*$/,"$1"),Baidu:()=>t.replace(/^.*BIDUBrowser[\s/]([\d.]+).*$/,"$1"),UC:()=>t.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1"),Sogou:()=>t.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1"),"2345Explorer":()=>t.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1"),TheWorld:()=>t.replace(/^.*TheWorld ([\d.]+).*$/,"$1"),MIUI:()=>t.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1"),Quark:()=>t.replace(/^.*Quark\/([\d.]+).*$/,"$1"),Qiyu:()=>t.replace(/^.*Qiyu\/([\d.]+).*$/,"$1"),Wechat:()=>t.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1"),Taobao:()=>t.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1"),Alipay:()=>t.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1"),Weibo:()=>t.replace(/^.*weibo__([\d.]+).*$/,"$1"),Douban:()=>t.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1"),Suning:()=>t.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1"),iQiYi:()=>t.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")};return n.version="",c[n.browser]&&(n.version=c[n.browser](),n.version===t&&(n.version="")),n.version.indexOf(".")&&(n.version=n.version.substring(0,n.version.indexOf("."))),"iOS"===n.os&&t.includes("iPad")?n.os="iPadOS":"Edge"!==n.browser||t.includes("Edg")?"MIUI"===n.browser?n.os="Android":"Chrome"===n.browser&&Number(n.version)>27||"Opera"===n.browser&&Number(n.version)>12||"Yandex"===n.browser?n.engine="Blink":void 0===n.browser&&(n.browser="Unknow App"):n.engine="EdgeHTML",n}(this.data.ua);return{browser:`${e.browser} ${e.version}`,os:`${e.os} ${e.osVersion}`}}getConf(){return this.cConf}}class qt{constructor(e,t){c(this,"conf"),c(this,"total"),c(this,"$el"),c(this,"$input"),c(this,"inputTimer"),c(this,"$prevBtn"),c(this,"$nextBtn"),c(this,"page",1),this.total=e,this.conf=t,this.$el=h('
    \n
    \n
    Prev
    \n \n
    Next
    \n
    \n
    '),this.$input=this.$el.querySelector(".atk-input"),this.$input.value=`${this.page}`,this.$input.oninput=()=>this.input(),this.$input.onkeydown=e=>this.keydown(e),this.$prevBtn=this.$el.querySelector(".atk-btn-prev"),this.$nextBtn=this.$el.querySelector(".atk-btn-next"),this.$prevBtn.onclick=()=>this.prev(),this.$nextBtn.onclick=()=>this.next(),this.checkDisabled()}get pageSize(){return this.conf.pageSize}get offset(){return this.pageSize*(this.page-1)}get maxPage(){return Math.ceil(this.total/this.pageSize)}update(e,t){this.page=Math.ceil(e/this.pageSize)+1,this.total=t,this.setInput(this.page),this.checkDisabled()}setInput(e){this.$input.value=`${e}`}input(e=!1){window.clearTimeout(this.inputTimer);const t=this.$input.value.trim(),n=()=>{if(""===t)return void this.setInput(this.page);let e=Number(t);Number.isNaN(e)||e<1?this.setInput(this.page):(e>this.maxPage&&(this.setInput(this.maxPage),e=this.maxPage),this.change(e))};e?n():this.inputTimer=window.setTimeout((()=>n()),800)}prev(){const e=this.page-1;e<1||this.change(e)}next(){const e=this.page+1;e>this.maxPage||this.change(e)}change(e){this.page=e,this.conf.onChange(this.offset),this.setInput(e),this.checkDisabled()}checkDisabled(){this.page+1>this.maxPage?this.$nextBtn.classList.add("atk-disabled"):this.$nextBtn.classList.remove("atk-disabled"),this.page-1<1?this.$prevBtn.classList.add("atk-disabled"):this.$prevBtn.classList.remove("atk-disabled")}keydown(e){const t=e.keyCode||e.which;if(38===t){const e=Number(this.$input.value)+1;if(e>this.maxPage)return;this.setInput(e),this.input()}else if(40===t){const e=Number(this.$input.value)-1;if(e<1)return;this.setInput(e),this.input()}else 13===t&&this.input(!0)}setLoading(e){e?b(this.$el):w(this.$el)}}const Dt={createInstance(e){const t=new qt(e.total,{pageSize:e.pageSize,onChange:t=>d(this,null,(function*(){if(!0===e.list.conf.editorTravel&&e.list.ctx.editorTravelBack(),yield e.list.fetchComments(t),e.list.repositionAt){(e.list.scrollListenerAt||window).scroll({top:e.list.repositionAt?g(e.list.repositionAt).top:0,left:0})}}))});return[t,t.$el]},setLoading(e){this.instance.setLoading(e)},update(e,t){this.instance.update(e,t)},next(){this.instance.next()}};class zt{constructor(e){c(this,"conf"),c(this,"$el"),c(this,"$loading"),c(this,"$text"),c(this,"offset",0),c(this,"total",0),c(this,"origText","Load More"),this.conf=e,this.origText=this.conf.text||this.origText,this.$el=h(``),this.$loading=this.$el.querySelector(".atk-loading-icon"),this.$text=this.$el.querySelector(".atk-text"),this.$el.onclick=()=>{this.click()}}get hasMore(){return this.total>this.offset+this.conf.pageSize}click(){this.hasMore&&this.conf.onClick(this.offset+this.conf.pageSize),this.checkDisabled()}show(){this.$el.style.display=""}hide(){this.$el.style.display="none"}setLoading(e){this.$loading.style.display=e?"":"none",this.$text.style.display=e?"none":""}showErr(e){this.setLoading(!1),this.$text.innerText=e,this.$el.classList.add("atk-err"),window.setTimeout((()=>{this.$text.innerText=this.origText,this.$el.classList.remove("atk-err")}),2e3)}update(e,t){this.offset=e,this.total=t,this.checkDisabled()}checkDisabled(){this.hasMore?this.show():this.hide()}}const Wt={pagination:Dt,"read-more":{createInstance(e){const t=new zt({pageSize:e.pageSize,onClick:t=>d(this,null,(function*(){yield e.list.fetchComments(t)})),text:ut("loadMore")});if(e.list.conf.pagination.autoLoad){const n=e.list.scrollListenerAt||document;this.autoLoadScrollEvent&&n.removeEventListener("scroll",this.autoLoadScrollEvent),this.autoLoadScrollEvent=()=>{if("read-more"!==e.mode||!(null==t?void 0:t.hasMore)||e.list.getLoading())return;const n=e.list.$el.querySelector(".atk-list-comments-wrap > .atk-comment-wrap:nth-last-child(3)");n&&function(e,t=document.documentElement){const n=t.clientHeight,i=t.scrollTop,s=i+n,r=e.getBoundingClientRect();return r.top+i+r.height<=s}(n,e.list.scrollListenerAt)&&t.click()},n.addEventListener("scroll",this.autoLoadScrollEvent)}return[t,t.$el]},setLoading(e){this.instance.setLoading(e)},update(e,t){this.instance.update(e,t)},showErr(e){this.instance.showErr(e)},next(){this.instance.click()}}};class Ft{constructor(e){c(this,"conf"),this.conf=e,this.init()}getAdaptor(){return Wt[this.conf.mode]}init(){const e=this.getAdaptor(),[t,n]=e.createInstance(this.conf);e.instance=t,e.el=n,this.conf.list.$el.append(e.el)}setLoading(e){this.getAdaptor().setLoading(e)}update(e,t){this.getAdaptor().update(e,t)}getEl(){return this.getAdaptor().el}showErr(e){const t=this.getAdaptor(),n=t.showErr;n&&n.bind(t)(e)}setMode(e){e!==this.conf.mode&&(this.getEl().remove(),this.conf.mode=e,this.init())}next(){this.getAdaptor().next()}}function jt(e,t,n){const i=function(e,t){const n=e.split("."),i=t.split(".");for(let s=0;s<3;s++){const e=Number(n[s]),t=Number(i[s]);if(e>t)return 1;if(t>e)return-1;if(!Number.isNaN(e)&&Number.isNaN(t))return 1;if(Number.isNaN(e)&&!Number.isNaN(t))return-1}return 0}(t,n);if(0!==i){const s=h(`
    请更新 Artalk ${ut(i<0?"frontend":"backend")}以获得完整体验 (帮助文档)

    当前版本:${ut("frontend")} ${t} / ${ut("backend")} ${n}

    `),r=h('忽略');return r.onclick=()=>{E(e.$el.parentElement,null),e.ctx.conf.versionCheck=!1,e.fetchComments(0)},s.append(r),E(e.$el.parentElement,s,'Artalk Warn'),!0}return!1}function Nt(e){const{$dropdownWrap:t,dropdownList:n}=e;if(t.querySelector(".atk-dropdown"))return;t.classList.add("atk-dropdown-wrap"),t.append(h(''));let i=0;const s=h('
      ');n.forEach(((e,t)=>{const n=e[0],r=e[1],a=h('
    • '),o=a.querySelector("span");o.innerText=n,o.onclick=()=>{((e,t,n,r)=>{r(),i=e,s.querySelectorAll(".active").forEach((e=>{e.classList.remove("active")})),t.classList.add("active"),s.style.display="none",setTimeout((()=>{s.style.display=""}),80)})(t,a,0,r)},s.append(a),t===i&&a.classList.add("active")})),t.append(s)}const Ht={el:"",pageKey:"",pageTitle:"",server:"",site:"",placeholder:"",noComment:"",sendBtn:"",darkMode:!1,editorTravel:!0,flatMode:"auto",nestMax:2,nestSort:"DATE_ASC",emoticons:"https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json",vote:!0,voteDown:!1,uaBadge:!0,listSort:!0,preview:!0,countEl:"#ArtalkCount",pvEl:"#ArtalkPV",gravatar:{default:"mp",mirror:"https://cravatar.cn/avatar/"},pagination:{pageSize:20,readMore:!0,autoLoad:!0},heightLimit:{content:300,children:400,scrollable:!1},imgUpload:!0,reqTimeout:15e3,versionCheck:!0,useBackendConf:!0,locale:"zh-CN"};function Qt(e){const t=x(Ht,e);if("string"==typeof t.el&&t.el)try{const e=document.querySelector(t.el);if(!e)throw Error(`Target element "${t.el}" was not found.`);t.el=e}catch(n){throw console.error(n),new Error("Please check your Artalk `el` config.")}return t.server=t.server.replace(/\/$/,"").replace(/\/api\/?$/,""),t.pageKey||(t.pageKey=`${window.location.pathname}`),t.pageTitle||(t.pageTitle=`${document.title}`),"auto"===t.locale&&(t.locale=navigator.language),t}function Vt(e){const t=["el","pageKey","pageTitle","server","site","darkMode"];return Object.keys(e).forEach((n=>{t.includes(n)&&delete e[n]})),e.emoticons&&"string"==typeof e.emoticons&&(e.emoticons=e.emoticons.trim(),e.emoticons.startsWith("[")||e.emoticons.startsWith("{")?e.emoticons=JSON.parse(e.emoticons):"false"===e.emoticons&&(e.emoticons=!1)),e}class Zt extends v{constructor(e){super(e),c(this,"$commentsWrap"),c(this,"data"),c(this,"isLoading",!1),c(this,"confLoaded",!1),c(this,"noCommentText"),c(this,"_nestSortBy"),c(this,"_flatMode"),c(this,"_pageMode"),c(this,"pgHolder"),c(this,"_pageSize"),c(this,"scrollListenerAt"),c(this,"repositionAt"),c(this,"renderComment"),c(this,"paramsEditor"),c(this,"onAfterLoad"),c(this,"unread",[]),c(this,"unreadHighlight"),this.$el=h('
      \n
      \n
      '),this.$commentsWrap=this.$el.querySelector(".atk-list-comments-wrap"),window.setInterval((()=>{this.$el.querySelectorAll("[data-atk-comment-date]").forEach((e=>{const t=e.getAttribute("data-atk-comment-date");e.innerText=f(new Date(Number(t)),this.ctx)}))}),3e4),this.ctx.on("conf-loaded",(()=>{}))}get nestSortBy(){return this._nestSortBy||this.ctx.conf.nestSort||"DATE_ASC"}set nestSortBy(e){this._nestSortBy=e}get flatMode(){return void 0!==this._flatMode?this._flatMode:!0===this.ctx.conf.flatMode||Number(this.ctx.conf.nestMax)<=1||!("auto"!==this.ctx.conf.flatMode||!window.matchMedia("(max-width: 768px)").matches)}set flatMode(e){this._flatMode=e}get pageMode(){return this._pageMode||(this.conf.pagination.readMore?"read-more":"pagination")}set pageMode(e){var t;this._pageMode=e,null==(t=this.pgHolder)||t.setMode(this._pageMode)}get pageSize(){return this._pageSize||this.conf.pagination.pageSize}set pageSize(e){this._pageSize=e}getData(){return this.data}clearData(){this.data=void 0}getLoading(){return this.isLoading}getCommentsWrapEl(){return this.$commentsWrap}setLoading(e,t=!1){var n;this.isLoading=e,t?function(e,t){e?b(t):w(t)}(e,this.$el):null==(n=this.pgHolder)||n.setLoading(e)}fetchComments(e){return d(this,null,(function*(){if(this.isLoading)return;const t=0===e,n=e=>this.setLoading(e,t);let i;n(!0),this.ctx.trigger("list-load"),("read-more"===this.pageMode&&t||"pagination"===this.pageMode)&&this.ctx.clearAllComments();try{i=yield this.ctx.getApi().comment.get(e,this.pageSize,this.flatMode,this.paramsEditor)}catch(s){throw this.onError(s.msg||String(s),e,s.data),s}finally{n(!1)}E(this.$el,null);try{this.onLoad(i,e)}catch(s){throw this.onError(String(s),e),s}finally{n(!1)}}))}onLoad(e,t){if(this.data=e,!this.confLoaded){const t=Vt(e.conf.frontend_conf);this.conf.useBackendConf?this.ctx.updateConf(t):this.ctx.updateConf({}),this.confLoaded=!0}this.ctx.conf.versionCheck&&jt(this,pt,e.api_version.version)||(this.importComments(e.comments),this.refreshPagination(t,this.flatMode?e.total:e.total_roots),this.refreshUI(),this.ctx.updateNotifies(e.unread||[]),this.ctx.trigger("list-loaded"),this.onAfterLoad&&this.onAfterLoad(e))}refreshPagination(e,t){var n;this.pgHolder||(this.pgHolder=new Ft({list:this,mode:this.pageMode,pageSize:this.pageSize,total:t})),null==(n=this.pgHolder)||n.update(e,t)}onError(e,t,n){var i;this.confLoaded||this.ctx.updateConf({}),e=String(e),console.error(e),0===t||"read-more"!==this.pageMode?E(this.$el,function(e,t,n){const i=h(`${t},${ut("listLoadFailMsg")}
      `),s=h(`${ut("listRetry")}`);s.onclick=()=>e.fetchComments(0),i.appendChild(s);const r=h(' | 打开控制台');i.appendChild(r),gt.data.isAdmin||r.classList.add("atk-hide");let a="";if(null==n?void 0:n.err_no_site){const t={create_name:e.ctx.conf.site,create_urls:`${window.location.protocol}//${window.location.host}`};a=`sites|${JSON.stringify(t)}`}return r.onclick=()=>e.ctx.showSidebar({view:a}),i}(this,e,n)):null==(i=this.pgHolder)||i.showErr(this.$t("loadFail"))}refreshUI(){!function(e){const t=e.ctx.getCommentList().length<=0;let n=e.getCommentsWrapEl().querySelector(".atk-list-no-comment");t?n||(n=h('
      '),n.innerHTML=e.noCommentText||e.ctx.conf.noComment||e.ctx.$t("noComment"),e.getCommentsWrapEl().appendChild(n)):null==n||n.remove(),e.ctx.checkAdminShowEl()}(this)}reload(){this.fetchComments(0)}createComment(e,t){t||(t=this.ctx.getCommentDataList());const n=new Ut(this.ctx,e,{isFlatMode:this.flatMode,afterRender:()=>{this.renderComment&&this.renderComment(n)},onDelete:e=>{this.ctx.deleteComment(e),this.refreshUI()},replyTo:e.rid?t.find((t=>t.id===e.rid)):void 0});return n.render(),this.ctx.getCommentList().push(n),n}importComments(e){this.flatMode?e.forEach((t=>{this.putCommentFlatMode(t,e,"append")})):this.importCommentsNest(e)}importCommentsNest(e){const t=function(e,t="DATE_DESC",n=2){const i=[];e.filter((e=>0===e.rid)).forEach((t=>{const s={id:t.id,comment:t,children:[],level:1};s.parent=s,i.push(s),function t(i){const s=e.filter((e=>e.rid===i.id));0!==s.length&&(i.level>=n&&(i=i.parent),s.forEach((e=>{const n={id:e.id,comment:e,children:[],parent:i,level:i.level+1};i.children.push(n),t(n)})))}(s)}));const s=(n,i)=>{let s=n.id-i.id;return"DATE_ASC"===t?s=+new Date(n.comment.date)-+new Date(i.comment.date):"DATE_DESC"===t?s=+new Date(i.comment.date)-+new Date(n.comment.date):"SRC_INDEX"===t?s=e.indexOf(n.comment)-e.indexOf(i.comment):"VOTE_UP_DESC"===t&&(s=i.comment.vote_up-n.comment.vote_up),s};return function e(t){t.forEach((t=>{t.children=t.children.sort(s),e(t.children)}))}(i),i}(e,this.nestSortBy,this.conf.nestMax);t.forEach((t=>{const n=this.createComment(t.comment,e);this.$commentsWrap.appendChild(n.getEl()),n.getRender().playFadeAnim();const i=this;!function t(n,s){s.children.forEach((s=>{const r=s.comment,a=i.createComment(r,e);n.putChild(a),t(a,s)}))}(n,t),n.getRender().checkHeightLimit()}))}putCommentFlatMode(e,t,n){e.is_collapsed&&(e.is_allow_reply=!1);const i=this.createComment(e,t);return e.visible&&("append"===n&&this.$commentsWrap.append(i.getEl()),"prepend"===n&&this.$commentsWrap.prepend(i.getEl()),i.getRender().playFadeAnim()),i.getRender().checkHeightLimit(),i}insertComment(e){if(this.flatMode){C(this.putCommentFlatMode(e,this.ctx.getCommentDataList(),"prepend").getEl())}else{const t=this.createComment(e);if(0===e.rid)this.$commentsWrap.prepend(t.getEl());else{const n=this.ctx.findComment(e.rid);n&&(n.putChild(t,"DATE_ASC"===this.nestSortBy?"append":"prepend"),t.getParents().forEach((e=>{e.getRender().heightLimitRemoveForChildren()})))}t.getRender().checkHeightLimit(),C(t.getEl()),t.getRender().playFadeAnim()}this.data&&(this.data.total+=1),this.refreshUI(),this.ctx.trigger("list-loaded"),this.ctx.trigger("list-inserted",e)}updateComment(e){const t=this.ctx.findComment(e.id);t&&t.setData(e)}updateUnread(e){this.unread=e,!0===this.unreadHighlight&&this.ctx.getCommentList().forEach((e=>{const t=this.unread.find((t=>t.comment_id===e.getID()));t?(e.getRender().setUnread(!0),e.getRender().setOpenAction((()=>{window.open(t.read_link),this.unread=this.unread.filter((t=>t.comment_id!==e.getID())),this.ctx.updateNotifies(this.unread)}))):e.getRender().setUnread(!1)}))}}class Gt extends Zt{constructor(e){const t=h('
      \n
      \n
      \n
      \n
      \n
      \n \n \n \n
      \n
      \n
      \n
      \n
      \n \n
      \n');super(e),c(this,"$closeCommentBtn"),c(this,"$openSidebarBtn"),c(this,"$unreadBadge"),c(this,"$commentCount"),c(this,"$commentCountNum"),c(this,"$dropdownWrap"),c(this,"goToCommentFounded",!1),c(this,"goToCommentDelay",!0),t.querySelector(".atk-list-body").append(this.$el),this.$el=t,this.repositionAt=this.$el,this.initListActionBtn();this.$commentCount=this.$el.querySelector(".atk-comment-count");const n=()=>{this.$commentCount.innerHTML=this.$t("counter",{count:'0'}),this.$commentCountNum=this.$commentCount.querySelector(".atk-comment-count-num")};n(),this.$el.querySelector(".atk-copyright").innerHTML=`Powered By Artalk`,this.ctx.on("conf-loaded",(()=>{n(),this.refreshUI()}))}initListActionBtn(){this.$openSidebarBtn=this.$el.querySelector('[data-action="open-sidebar"]'),this.$closeCommentBtn=this.$el.querySelector('[data-action="admin-close-comment"]'),this.$unreadBadge=this.$el.querySelector(".atk-unread-badge"),this.$openSidebarBtn.addEventListener("click",(()=>{this.ctx.showSidebar()})),this.$closeCommentBtn.addEventListener("click",(()=>{this.data&&(this.data.page.admin_only=!this.data.page.admin_only,this.adminPageEditSave())}))}refreshUI(){var e;super.refreshUI(),this.$commentCountNum.innerText=String(Number(null==(e=this.data)?void 0:e.total)||0),gt.data.nick&>.data.email?this.$openSidebarBtn.classList.remove("atk-hide"):this.$openSidebarBtn.classList.add("atk-hide"),this.$openSidebarBtn.querySelector(".atk-text").innerText=gt.data.isAdmin?this.$t("ctrlCenter"):this.$t("msgCenter"),this.data&&this.data.page&&!0===this.data.page.admin_only?(this.ctx.editorClose(),this.$closeCommentBtn.innerHTML=this.$t("openComment")):(this.ctx.editorOpen(),this.$closeCommentBtn.innerHTML=this.$t("closeComment")),this.ctx.conf.listSort?this.initDropdown():function(e){var t,n;const{$dropdownWrap:i}=e;i.classList.remove("atk-dropdown-wrap"),null==(t=i.querySelector(".atk-arrow-down-icon"))||t.remove(),null==(n=i.querySelector(".atk-dropdown"))||n.remove()}({$dropdownWrap:this.$commentCount})}onLoad(e,t){super.onLoad(e,t),this.goToCommentFounded||this.checkGoToCommentByUrlHash(),!0===this.ctx.conf.editorTravel&&this.ctx.editorTravelBack()}checkGoToCommentByUrlHash(){var e;let t=Number(p("atk_comment"));if(!t){const e=window.location.hash.match(/#atk-comment-([0-9]+)/);if(!e||!e[1]||Number.isNaN(Number(e[1])))return;t=Number(e[1])}if(!t)return;const n=this.ctx.findComment(t);if(!n)return void(null==(e=this.pgHolder)||e.next());const i=p("atk_notify_key");i&&this.ctx.getApi().user.markRead(t,i).then((()=>{this.unread=this.unread.filter((e=>e.comment_id!==t)),this.updateUnread(this.unread)})),n.getParents().forEach((e=>{e.getRender().heightLimitRemoveForChildren()}));const s=()=>{C(n.getEl(),!1),n.getEl().classList.remove("atk-flash-once"),window.setTimeout((()=>{n.getEl().classList.add("atk-flash-once")}),150)};this.goToCommentDelay?window.setTimeout((()=>s()),350):s(),this.goToCommentFounded=!0,this.goToCommentDelay=!0}adminPageEditSave(){this.data&&this.data.page&&(this.ctx.editorShowLoading(),this.ctx.getApi().page.pageEdit(this.data.page).then((e=>{this.data&&(this.data.page=o({},e)),this.refreshUI()})).catch((e=>{this.ctx.editorShowNotify(`${this.$t("editFail")}: ${e.msg||String(e)}`,"e")})).finally((()=>{this.ctx.editorHideLoading()})))}showUnreadBadge(e){e>0?(this.$unreadBadge.innerText=`${Number(e||0)}`,this.$unreadBadge.style.display="block"):this.$unreadBadge.style.display="none"}initDropdown(){const e=e=>{this.paramsEditor=e,this.fetchComments(0)};Nt({$dropdownWrap:this.$commentCount,dropdownList:[[this.$t("sortLatest"),()=>{e((e=>{e.sort_by="date_desc"}))}],[this.$t("sortBest"),()=>{e((e=>{e.sort_by="vote"}))}],[this.$t("sortOldest"),()=>{e((e=>{e.sort_by="date_asc"}))}],[this.$t("sortAuthor"),()=>{e((e=>{e.view_only_admin=!0}))}]]})}updateUnread(e){super.updateUnread(e),this.showUnreadBadge((null==e?void 0:e.length)||0)}}class Kt{constructor(e,t){c(this,"conf"),c(this,"$root"),c(this,"markedReplacers",[]),c(this,"commentList",[]),c(this,"eventList",[]),this.conf=e,this.$root=t||document.createElement("div"),this.$root.classList.add("artalk"),this.$root.innerHTML=""}inject(e,t){this[e]=t}get(e){return this[e]}getApi(){return this.api}getCommentList(){return this.commentList}getCommentDataList(){return this.commentList.map((e=>e.getData()))}findComment(e){return this.commentList.find((t=>t.getData().id===e))}deleteComment(e){let t;if("number"==typeof e){const n=this.findComment(e);if(!n)throw Error(`Comment ${e} cannot be found`);t=n}else t=e;if(t.getEl().remove(),this.commentList.splice(this.commentList.indexOf(t),1),this.list){const e=this.list.getData();e&&(e.total-=1),this.list.refreshUI()}}clearAllComments(){this.list&&(this.list.getCommentsWrapEl().innerHTML="",this.list.clearData()),this.commentList=[]}insertComment(e){var t;null==(t=this.list)||t.insertComment(e)}updateComment(e){var t;null==(t=this.list)||t.updateComment(e)}replyComment(e,t,n){this.editor.setReply(e,t,n)}cancelReplyComment(){this.editor.cancelReply()}editComment(e,t){this.editor.setEditComment(e,t)}cancelEditComment(){this.editor.cancelEditComment()}updateNotifies(e){var t;null==(t=this.list)||t.updateUnread(e)}listReload(){var e;null==(e=this.list)||e.reload()}reload(){this.listReload()}listRefreshUI(){var e;null==(e=this.list)||e.refreshUI()}listHashGotoCheck(){if(!(this.list&&this.list instanceof Gt))return;const e=this.list;e.goToCommentDelay=!1,e.checkGoToCommentByUrlHash()}editorOpen(){this.editor.open()}editorClose(){this.editor.close()}editorShowLoading(){this.editor.showLoading()}editorHideLoading(){this.editor.hideLoading()}editorShowNotify(e,t){this.editor.showNotify(e,t)}editorTravel(e){this.editor.travel(e)}editorTravelBack(){this.editor.travelBack()}showSidebar(e){this.sidebarLayer.show(e)}hideSidebar(){this.sidebarLayer.hide()}checkAdmin(e){this.checkerLauncher.checkAdmin(e)}checkCaptcha(e){this.checkerLauncher.checkCaptcha(e)}checkAdminShowEl(){const e=[];this.$root.querySelectorAll("[atk-only-admin-show]").forEach((t=>e.push(t)));const{$wrap:t}=A();t&&t.querySelectorAll("[atk-only-admin-show]").forEach((t=>e.push(t)));const n=document.querySelector(".atk-sidebar");n&&n.querySelectorAll("[atk-only-admin-show]").forEach((t=>e.push(t))),e.forEach((e=>{this.user.data.isAdmin?e.classList.remove("atk-hide"):e.classList.add("atk-hide")}))}on(e,t,n="internal"){this.eventList.push({name:e,handler:t,scope:n})}off(e,t,n="internal"){this.eventList=this.eventList.filter((i=>t?!(i.name===e&&i.handler===t&&i.scope===n):!(i.name===e&&i.scope===n)))}trigger(e,t,n){this.eventList.filter((t=>t.name===e&&(!n||t.scope===n))).map((e=>e.handler)).forEach((e=>e(t)))}$t(e,t={}){return ut(e,t)}setDarkMode(e){B(this,e)}updateConf(e){this.conf=x(this.conf,e),this.trigger("conf-loaded")}getMarkedInstance(){return it()}}class Yt{constructor(e,t){return c(this,"ctx"),c(this,"$el"),c(this,"$content"),c(this,"$actions"),this.ctx=e,this.$el=h('
      \n
      \n
      \n
      \n
      \n
      '),this.$actions=this.$el.querySelector(".atk-layer-dialog-actions"),this.$content=this.$el.querySelector(".atk-layer-dialog-content"),this.$content.appendChild(t),this}setYes(e){const t=h(``);return t.onclick=this.onBtnClick(e),this.$actions.appendChild(t),this}setNo(e){const t=h(``);return t.onclick=this.onBtnClick(e),this.$actions.appendChild(t),this}onBtnClick(e){return t=>{const n=e(t.currentTarget,this);void 0!==n&&!0!==n||this.$el.remove()}}}function Xt(e){const t=h('
      '),n=h('');n.style.display="none",b(t,{transparentBg:!0}),n.src=`${e.getCtx().conf.server}/api/captcha/get?t=${+new Date}`,n.onload=()=>{n.style.display="",w(t)},t.append(n);const i=h('
      ');t.append(i),e.hideInteractInput();let s=!1;return function t(){return d(this,null,(function*(){var n;if(yield(n=1e3,new Promise((e=>{window.setTimeout((()=>{e(null)}),n)}))),s)return;let i=!1;try{i=(yield e.getCtx().getApi().captcha.captchaStatus()).is_pass}catch(r){i=!1}i?e.triggerSuccess():t()}))}(),i.onclick=()=>{s=!0,e.cancel()},t}const Jt={request:(e,t)=>e.getApi().captcha.captchaCheck(t),body:e=>e.get("iframe")?Xt(e):function(e){const t=h(`${e.getCtx().$t("captchaCheck")}`);return t.querySelector(".atk-captcha-img").onclick=()=>{const n=t.querySelector(".atk-captcha-img");e.getApi().captcha.captchaGet().then((e=>{n.setAttribute("src",e)})).catch((e=>{console.error("Failed to get captcha image ",e)}))},t}(e),onSuccess(e,t,n,i){e.set("val",n)},onError(e,t,n,i){i.querySelector(".atk-captcha-img").click(),i.querySelector('input[type="text"]').value=""}},en={inputType:"password",request(e,t){const n={name:gt.data.nick,email:gt.data.email,password:t};return(()=>d(this,null,(function*(){return(yield e.getApi().user.login(n.name,n.email,n.password)).token})))()},body:e=>h(`${e.getCtx().$t("adminCheck")}`),onSuccess(e,t,n,i){gt.update({isAdmin:!0,token:t}),e.getCtx().trigger("user-changed",gt.data),e.getCtx().listReload()},onError(e,t,n,i){}};class tn{constructor(e){c(this,"ctx"),c(this,"launched",[]),this.ctx=e}checkCaptcha(e){this.fire(Jt,e,(t=>{t.set("img_data",e.imgData),t.set("iframe",e.iframe)}))}checkAdmin(e){this.fire(en,e)}fire(e,t,n){if(this.launched.includes(e))return;this.launched.push(e);const i=new _(this.ctx,`checker-${(new Date).getTime()}`);i.setMaskClickHide(!1),i.show();const s={};let r=!1;const a={set:(e,t)=>{s[e]=t},get:e=>s[e],getCtx:()=>this.ctx,getApi:()=>this.ctx.getApi(),getLayer:()=>i,hideInteractInput:()=>{r=!0},triggerSuccess:()=>{this.close(e,i),e.onSuccess&&e.onSuccess(a,"","",o),t.onSuccess&&t.onSuccess("",d.$el)},cancel:()=>{this.close(e,i),t.onCancel&&t.onCancel()}};n&&n(a);const o=h();o.appendChild(e.body(a));const l=h(``);let c;o.appendChild(l),setTimeout((()=>l.focus()),80),l.onkeyup=e=>{"Enter"!==e.key&&13!==e.keyCode||(e.preventDefault(),i.getEl().querySelector('button[data-action="confirm"]').click())};const d=new Yt(this.ctx,o);d.setYes((n=>{const s=l.value.trim();c||(c=n.innerText);const r=()=>{n.innerText=c||"",n.classList.remove("error")};return n.innerText=`${this.ctx.$t("loading")}...`,e.request(a,s).then((n=>{this.close(e,i),e.onSuccess&&e.onSuccess(a,n,s,o),t.onSuccess&&t.onSuccess(s,d.$el)})).catch((t=>{var i;i=String(t.msg||String(t)),n.innerText=i,n.classList.add("error"),e.onError&&e.onError(a,t,s,o);const c=setTimeout((()=>r()),3e3);l.onfocus=()=>{r(),clearTimeout(c)}})),!1})),d.setNo((()=>(this.close(e,i),t.onCancel&&t.onCancel(),!1))),r&&(l.style.display="none",d.$el.querySelector(".atk-layer-dialog-actions").style.display="none"),i.getEl().append(d.$el),t.onMount&&t.onMount(d.$el)}close(e,t){t.disposeNow(),this.launched=this.launched.filter((t=>t!==e))}}function nn(e,t,n,i){return d(this,null,(function*(){var s,r;if(gt.data.token){const e=new Headers(n.headers);e.set("Authorization",`Bearer ${gt.data.token}`),n.headers=e}const a=yield function(e,t,n,i){var s;const r=new AbortController;null==(s=i.signal)||s.addEventListener("abort",(()=>r.abort()));let a=fetch(t,l(o({},i),{signal:r.signal}));if(n>0){const e=setTimeout((()=>r.abort()),n);a.finally((()=>{clearTimeout(e)}))}return a=a.catch((e=>{throw"AbortError"===(e||{}).name?new Error(ut("reqAborted")):e})),a}(0,t,i||e.conf.reqTimeout||15e3,n),c=a.status,d=[401,400].includes(c);if(!a.ok&&!d)throw new Error(`${ut("reqGot")} ${c}`);let h=yield a.json();const u=(i,s)=>{nn(e,t,n).then((e=>{i(e)})).catch((e=>{s(e)}))};if((null==(s=h.data)?void 0:s.need_captcha)?h=yield new Promise(((t,n)=>{e.checkCaptcha({imgData:h.data.img_data,iframe:h.data.iframe,onSuccess:()=>{u(t,n)},onCancel:()=>{n(h)}})})):((null==(r=h.data)?void 0:r.need_login)||d)&&(h=yield new Promise(((t,n)=>{e.checkAdmin({onSuccess:()=>{u(t,n)},onCancel:()=>{n(h)}})}))),!h.success)throw h;return h}))}function sn(e){const t=new FormData;return Object.keys(e).forEach((n=>t.append(n,String(e[n])))),t}!function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n({user:e.data.user,is_login:e.data.is_login,unread:e.data.unread||[],unread_count:e.data.unread_count||0}))),abort:()=>{n.abort()}}}loginStatus(){return d(this,null,(function*(){return(yield this.POST("/login-status",{name:gt.data.nick,email:gt.data.email}))||{is_login:!1,is_admin:!1}}))}logout(){return d(this,null,(function*(){return this.POST("/logout")}))}markRead(e,t,n=!1){const i={comment_id:e,notify_key:t};return n&&(delete i.comment_id,delete i.notify_key,i.read_all=!0,i.name=gt.data.nick,i.email=gt.data.email),this.POST("/mark-read",i)}userList(e,t,n){return d(this,null,(function*(){const i={offset:e||0,limit:t||15};n&&(i.type=n);return yield this.POST("/admin/user-get",i)}))}userAdd(e,t){return d(this,null,(function*(){const n={name:e.name||"",email:e.email||"",password:t||"",link:e.link||"",is_admin:e.is_admin||!1,site_names:e.site_names_raw||"",receive_email:e.receive_email||!0,badge_name:e.badge_name||"",badge_color:e.badge_color||""};return(yield this.POST("/admin/user-add",n)).user}))}userEdit(e,t){return d(this,null,(function*(){const n={id:e.id,name:e.name||"",email:e.email||"",password:t||"",link:e.link||"",is_admin:e.is_admin||!1,site_names:e.site_names_raw||"",receive_email:e.receive_email||!0,badge_name:e.badge_name||"",badge_color:e.badge_color||""};return(yield this.POST("/admin/user-edit",n)).user}))}userDel(e){return this.POST("/admin/user-del",{id:String(e)})}},system:class extends rn{conf(){return d(this,null,(function*(){return Vt((yield this.POST("/conf")).frontend_conf||{})}))}getSettings(){return d(this,null,(function*(){return yield this.POST("/admin/setting-get")}))}saveSettings(e){return d(this,null,(function*(){return yield this.POST("/admin/setting-save",{data:e})}))}version(){return d(this,null,(function*(){const e=yield fetch(`${this.api.baseURL}/version`,{method:"POST"});return yield e.json()}))}},captcha:class extends rn{captchaGet(){return d(this,null,(function*(){return(yield this.POST("/captcha/refresh")).img_data||""}))}captchaCheck(e){return d(this,null,(function*(){return(yield this.POST("/captcha/check",{value:e})).img_data||""}))}captchaStatus(){return d(this,null,(function*(){return(yield this.POST("/captcha/status"))||{is_pass:!1}}))}},admin:class extends rn{cacheFlushAll(){return this.POST("/admin/cache-flush",{flush_all:!0})}cacheWarmUp(){return this.POST("/admin/cache-warm",{})}},upload:class extends rn{imgUpload(e){return d(this,null,(function*(){const t=sn({name:gt.data.nick,email:gt.data.email,page_key:this.ctx.conf.pageKey});t.set("file",e);const n={method:"POST",body:t};return(yield this.Fetch("/img-upload",n)).data||{}}))}}};class on{constructor(e){c(this,"ctx"),this.ctx=e,Object.entries(an).forEach((([e,t])=>{this[e]=new t(this,this.ctx)}))}get baseURL(){return`${this.ctx.conf.server}/api`}}function ln(e){const t={editor:e,isMoved:!1,move:e=>function(e,t){if(e.isMoved)return;e.isMoved=!0;const n=e.editor.getUI().$el;n.after(h('
      '));const i=h("
      ");t.after(i),i.replaceWith(n),n.classList.add("atk-fade-in")}(t,e),back:()=>function(e){var t;if(!e.isMoved)return;e.isMoved=!1,null==(t=e.editor.ctx.$root.querySelector(".atk-editor-travel-placeholder"))||t.replaceWith(e.editor.getUI().$el),e.editor.cancelReply()}(t)};return t}class cn{constructor(e){c(this,"editor"),c(this,"$panel"),c(this,"$btn"),c(this,"onHeaderInput"),c(this,"contentTransformer"),c(this,"onContentUpdated"),this.editor=e}get ctx(){return this.editor.ctx}registerPanel(e="
      "){return this.$panel=h(e),this.$panel}registerBtn(e){return this.$btn=h(`${e}`),this.$btn}registerHeaderInputEvt(e){this.onHeaderInput=e}registerContentTransformer(e){this.contentTransformer=e}registerContentUpdatedEvt(e){this.onContentUpdated=e}getPanel(){return this.$panel}getBtn(){return this.$btn}}c(cn,"Name");class dn extends cn{constructor(e){super(e),c(this,"emoticons",[]),c(this,"loadingTask",null),c(this,"$grpWrap"),c(this,"$grpSwitcher"),c(this,"isListLoaded",!1),c(this,"isImgLoaded",!1),this.editor=e,this.registerPanel('
      '),this.registerBtn(this.ctx.$t("emoticon")),this.registerContentTransformer((e=>this.transEmoticonImageText(e))),window.setTimeout((()=>{this.loadEmoticonsData()}),1e3)}onPanelShow(){(()=>{d(this,null,(function*(){yield this.loadEmoticonsData(),this.isImgLoaded||(this.initEmoticonsList(),this.isImgLoaded=!0),setTimeout((()=>{this.changeListHeight()}),30)}))})()}onPanelHide(){this.$panel.parentElement.style.height=""}loadEmoticonsData(){return d(this,null,(function*(){this.isListLoaded||(null===this.loadingTask?(this.loadingTask=(()=>d(this,null,(function*(){b(this.$panel),this.emoticons=yield this.handleData(this.ctx.conf.emoticons),w(this.$panel),this.loadingTask=null,this.isListLoaded=!0})))(),yield this.loadingTask):yield this.loadingTask)}))}handleData(e){return d(this,null,(function*(){if(!Array.isArray(e)&&["object","string"].includes(typeof e)&&(e=[e]),!Array.isArray(e))return E(this.$panel,"表情包数据必须为 Array/Object/String 类型"),w(this.$panel),[];const t=t=>{"object"==typeof t&&(t.name&&e.find((e=>e.name===t.name))||e.push(t))},n=e=>d(this,null,(function*(){yield Promise.all(e.map(((e,i)=>d(this,null,(function*(){if("object"!=typeof e||Array.isArray(e)){if(Array.isArray(e))yield n(e);else if("string"==typeof e){const i=yield this.remoteLoad(e);Array.isArray(i)?yield n(i):"object"==typeof i&&t(i)}}else t(e)})))))}));return yield n(e),e.forEach((e=>{if(this.isOwOFormat(e)){this.convertOwO(e).forEach((e=>{t(e)}))}else Array.isArray(e)&&e.forEach((e=>{t(e)}))})),e=e.filter((e=>"object"==typeof e&&!Array.isArray(e)&&!!e&&!!e.name)),this.solveNullKey(e),this.solveSameKey(e),e}))}remoteLoad(e){return d(this,null,(function*(){if(!e)return[];try{const t=yield fetch(e);return yield t.json()}catch(t){return w(this.$panel),E(this.$panel,`表情加载失败 ${String(t)}`),[]}}))}solveNullKey(e){e.forEach((e=>{e.items.forEach(((t,n)=>{t.key||(t.key=`${e.name} ${n+1}`)}))}))}solveSameKey(e){const t={};e.forEach((e=>{e.items.forEach((e=>{e.key&&""!==String(e.key).trim()&&(t[e.key]?t[e.key]++:t[e.key]=1,t[e.key]>1&&(e.key=`${e.key} ${t[e.key]}`))}))}))}isOwOFormat(e){try{return"object"==typeof e&&!!Object.values(e).length&&Array.isArray(Object.keys(Object.values(e)[0].container))&&Object.keys(Object.values(e)[0].container[0]).includes("icon")}catch(t){return!1}}convertOwO(e){const t=[];return Object.entries(e).forEach((([e,n])=>{const i={name:e,type:n.type,items:[]};n.container.forEach(((t,n)=>{const s=t.icon;if(/<(img|IMG)/.test(s)){const e=/src=["'](.*?)["']/.exec(s);e&&e.length>1&&(t.icon=e[1])}i.items.push({key:t.text||`${e} ${n+1}`,val:t.icon})})),t.push(i)})),t}initEmoticonsList(){this.$grpWrap=h('
      '),this.$panel.append(this.$grpWrap),this.emoticons.forEach(((e,t)=>{const n=h('');this.$grpWrap.append(n),n.setAttribute("data-index",String(t)),n.setAttribute("data-grp-name",e.name),n.setAttribute("data-type",e.type),e.items.forEach((t=>{const i=h('');if(n.append(i),t.key&&!new RegExp(`^(${e.name})?\\s?[0-9]+$`).test(t.key)&&i.setAttribute("title",t.key),"image"===e.type){const e=document.createElement("img");e.src=t.val,e.alt=t.key,i.append(e)}else i.innerText=t.val;i.onclick=()=>{"image"===e.type?this.editor.insertContent(`:[${t.key}]`):this.editor.insertContent(t.val||"")}}))})),this.emoticons.length>1&&(this.$grpSwitcher=h('
      '),this.$panel.append(this.$grpSwitcher),this.emoticons.forEach(((e,t)=>{const n=h("");n.innerText=e.name,n.setAttribute("data-index",String(t)),n.onclick=()=>this.openGrp(t),this.$grpSwitcher.append(n)}))),this.emoticons.length>0&&this.openGrp(0)}openGrp(e){var t,n,i;Array.from(this.$grpWrap.children).forEach((t=>{const n=t;n.getAttribute("data-index")!==String(e)?n.style.display="none":n.style.display=""})),null==(t=this.$grpSwitcher)||t.querySelectorAll("span.active").forEach((e=>e.classList.remove("active"))),null==(i=null==(n=this.$grpSwitcher)?void 0:n.querySelector(`span[data-index="${e}"]`))||i.classList.add("active"),this.changeListHeight()}changeListHeight(){}transEmoticonImageText(e){return this.emoticons&&Array.isArray(this.emoticons)?(this.emoticons.forEach((t=>{"image"===t.type&&Object.entries(t.items).forEach((([t,n])=>{e=e.split(`:[${n.key}]`).join(``)}))})),e):e}}c(dn,"Name","emoticons");class hn extends cn{constructor(e){super(e),c(this,"$imgUploadInput"),c(this,"allowImgExts",["png","jpg","jpeg","gif","bmp","svg","webp"]),this.$imgUploadInput=document.createElement("input"),this.$imgUploadInput.type="file",this.$imgUploadInput.style.display="none",this.$imgUploadInput.accept=this.allowImgExts.map((e=>`.${e}`)).join(",");const t=this.registerBtn(`${this.ctx.$t("image")}`);t.after(this.$imgUploadInput),t.onclick=()=>{const e=this.$imgUploadInput;e.onchange=()=>{(()=>{d(this,null,(function*(){if(!e.files||0===e.files.length)return;const t=e.files[0];this.uploadImg(t)}))})()},e.click()},this.ctx.conf.imgUpload||this.getBtn().setAttribute("atk-only-admin-show","");const n=e=>{if(e)for(let t=0;t{e.stopPropagation(),e.preventDefault()})),this.editor.getUI().$textarea.addEventListener("drop",(e=>{var t;const i=null==(t=e.dataTransfer)?void 0:t.files;(null==i?void 0:i.length)&&(e.preventDefault(),n(i))})),this.editor.getUI().$textarea.addEventListener("paste",(e=>{var t;const i=null==(t=e.clipboardData)?void 0:t.files;(null==i?void 0:i.length)&&(e.preventDefault(),n(i))}))}uploadImg(e){return d(this,null,(function*(){const t=/[^.]+$/.exec(e.name);if(!t||!this.allowImgExts.includes(t[0]))return;if(!gt.checkHasBasicUserInfo())return void this.editor.showNotify(this.ctx.$t("uploadLoginMsg"),"w");let n="\n";""===this.editor.getUI().$textarea.value.trim()&&(n="");const i=`${n}![](Uploading ${e.name}...)`;let s;this.editor.insertContent(i);try{s=this.ctx.conf.imgUploader?{img_url:yield this.ctx.conf.imgUploader(e)}:yield this.ctx.getApi().upload.imgUpload(e)}catch(r){console.error(r),this.editor.showNotify(`${this.ctx.$t("uploadFail")},${r.msg}`,"e")}if(s&&s.img_url){let e=s.img_url;y(e)||(e=$(this.ctx,e)),this.editor.setContent(this.editor.getUI().$textarea.value.replace(i,`${n}![](${e})`))}else this.editor.setContent(this.editor.getUI().$textarea.value.replace(i,""))}))}}c(hn,"Name","upload");class un extends cn{constructor(e){super(e),c(this,"isBind",!1),this.registerPanel('
      ');let t=this.editor.$t("preview");this.ctx.getMarkedInstance()&&(t+=' '),this.registerBtn(t),this.registerContentUpdatedEvt((e=>{this.updateContent()}))}onPanelShow(){if(this.updateContent(),!this.isBind){const e=()=>{this.updateContent()};this.editor.getUI().$textarea.addEventListener("input",e),this.editor.getUI().$textarea.addEventListener("change",e),this.isBind=!0}}updateContent(){"none"!==this.$panel.style.display&&(this.$panel.innerHTML=this.editor.getContentMarked())}}c(un,"Name","preview");class pn extends cn{constructor(e){super(e),c(this,"queryUserInfo",{timeout:null,abortFunc:null}),this.registerHeaderInputEvt(((e,t)=>{"nick"!==e&&"email"!==e||this.fetchUserInfo()})),this.editor.getUI().$link.addEventListener("change",(()=>{const e=this.editor.getUI().$link.value.trim();e&&!/^(http|https):\/\//.test(e)&&(this.editor.getUI().$link.value=`https://${e}`,gt.update({link:this.editor.getUI().$link.value}))}))}fetchUserInfo(){gt.logout(),this.queryUserInfo.timeout&&window.clearTimeout(this.queryUserInfo.timeout),this.queryUserInfo.abortFunc&&this.queryUserInfo.abortFunc(),this.queryUserInfo.timeout=window.setTimeout((()=>{this.queryUserInfo.timeout=null;const{req:e,abort:t}=this.ctx.getApi().user.userGet(gt.data.nick,gt.data.email);this.queryUserInfo.abortFunc=t,e.then((e=>{var t;e.is_login||gt.logout(),this.ctx.updateNotifies(e.unread),gt.checkHasBasicUserInfo()&&!e.is_login&&(null==(t=e.user)?void 0:t.is_admin)&&this.showLoginDialog(),e.user&&e.user.link&&(this.editor.getUI().$link.value=e.user.link,gt.update({link:e.user.link}))})).catch((()=>{})).finally((()=>{this.queryUserInfo.abortFunc=null}))}),400)}showLoginDialog(){this.ctx.checkAdmin({onSuccess:()=>{}})}}c(pn,"Name","headerInput");const gn=[dn,hn,un,pn];function mn(e){const t={editor:e,plugList:{},openedPlugName:null,openPlugPanel:e=>fn(t,e),closePlugPanel:()=>kn(t),triggerHeaderInputEvt:(e,n)=>function(e,t,n){Object.entries(e.plugList).forEach((([e,i])=>{i.onHeaderInput&&i.onHeaderInput(t,n)}))}(t,e,n),triggerContentUpdatedEvt:e=>function(e,t){Object.entries(e.plugList).forEach((([e,n])=>{n.onContentUpdated&&n.onContentUpdated(t)}))}(t,e),getTransformedContent:e=>function(e,t){let n=t;return Object.entries(e.plugList).forEach((([e,t])=>{t.contentTransformer&&(n=t.contentTransformer(n))})),n}(t,e)};e.getUI().$plugPanelWrap.innerHTML="",e.getUI().$plugPanelWrap.style.display="none",e.getUI().$plugBtnWrap.innerHTML="";const n=[{k:"upload",v:(i=e.conf).imgUpload},{k:"emoticons",v:i.emoticons},{k:"preview",v:i.preview}].filter((e=>!e.v)).flatMap((e=>e.k));var i;return gn.filter((e=>!n.includes(e.name))).forEach((e=>{!function(e,t){const n=t.Name,i=new t(e.editor);e.plugList[n]=i,function(e,t,n){const i=n.getBtn();if(!i)return;e.editor.getUI().$plugBtnWrap.appendChild(i),i.onclick=i.onclick||(()=>{e.editor.getUI().$plugBtnWrap.querySelectorAll(".active").forEach((e=>e.classList.remove("active"))),t!==e.openedPlugName?(fn(e,t),i.classList.add("active")):kn(e)});const s=n.getPanel();s&&(s.setAttribute("data-plug-name",t),s.style.display="none",e.editor.getUI().$plugPanelWrap.appendChild(s))}(e,n,i)}(t,e)})),t}function fn(e,t){Object.entries(e.plugList).forEach((([e,n])=>{const i=n.getPanel();i&&(e===t?(i.style.display="",n.onPanelShow&&n.onPanelShow()):(i.style.display="none",n.onPanelHide&&n.onPanelHide()))})),e.editor.getUI().$plugPanelWrap.style.display="",e.openedPlugName=t}function kn(e){if(!e.openedPlugName)return;const t=e.plugList[e.openedPlugName];t&&(t.onPanelHide&&t.onPanelHide(),e.editor.getUI().$plugPanelWrap.style.display="none",e.openedPlugName=null)}function yn(e){const t={editor:e,comment:void 0,setReply:(e,n,i)=>function(e,t,n,i=!0){e.editor.cancelEditComment(),$n(e);const s=e.editor.getUI();s.$sendReply||(s.$sendReply=h(`
      ${e.editor.$t("reply")} ×
      `),s.$sendReply.querySelector(".atk-text").innerText=`@${t.nick}`,s.$sendReply.addEventListener("click",(()=>{e.editor.cancelReply()})),s.$textareaWrap.append(s.$sendReply));e.comment=t,e.editor.travel(n),i&&C(s.$el);s.$textarea.focus()}(t,e,n,i),cancelReply:()=>$n(t)};return t}function $n(e){if(!e.comment)return;const t=e.editor.getUI();t.$sendReply&&(t.$sendReply.remove(),t.$sendReply=void 0),e.comment=void 0,e.editor.travelBack()}function xn(e){const t={editor:e,comment:void 0,setEdit:(e,n)=>function(e,t,n){vn(e),e.editor.cancelReply();const i=e.editor.getUI();if(!i.$editCancelBtn){const t=h(`
      ${e.editor.$t("editCancel")} ×
      `);t.onclick=()=>{vn(e)},i.$textareaWrap.append(t),i.$editCancelBtn=t}e.comment=t,i.$header.style.display="none",e.editor.travel(n),i.$nick.value=t.nick||"",i.$email.value=t.email||"",i.$link.value=t.link||"",e.editor.setContent(t.content),i.$textarea.focus(),e.editor.refreshSendBtnText()}(t,e,n),cancelEdit:()=>vn(t)};return function(e){e.editor.getSubmitManager().registerCustom({activeCond:()=>!!e.comment,req:()=>d(this,null,(function*(){const t={content:e.editor.getFinalContent(),nick:e.editor.getUI().$nick.value,email:e.editor.getUI().$email.value,link:e.editor.getUI().$link.value};return yield e.editor.ctx.getApi().comment.commentEdit(o(o({},e.comment),t))})),post:t=>{e.editor.ctx.updateComment(t)}})}(t),t}function vn(e){if(!e.comment)return;const t=e.editor.getUI();t.$editCancelBtn&&(t.$editCancelBtn.remove(),t.$editCancelBtn=void 0),e.comment=void 0,e.editor.travelBack();const{nick:n,email:i,link:s}=gt.data;t.$nick.value=n,t.$email.value=i,t.$link.value=s,e.editor.setContent(""),e.editor.refreshSendBtnText(),t.$header.style.display=""}function bn(e){const t={editor:e,do:()=>function(e){return d(this,null,(function*(){if(""===e.editor.getFinalContent().trim())return void e.editor.focus();const t=e.customs.find((e=>e.activeCond()));e.editor.ctx.trigger("editor-submit"),e.editor.showLoading();try{let n;(null==t?void 0:t.pre)&&t.pre(),n=(null==t?void 0:t.req)?yield t.req():yield function(e){return d(this,null,(function*(){const t=yield e.editor.ctx.getApi().comment.add(o({},function(e){var t;const{nick:n,email:i,link:s}=gt.data,r=e.editor.ctx.conf,a=null==(t=e.editor.getReplyManager())?void 0:t.comment;return{content:e.editor.getFinalContent(),nick:n,email:i,link:s,rid:a?a.id:0,page_key:a?a.page_key:r.pageKey,page_title:a?void 0:r.pageTitle,site_name:a?a.site_name:r.site}}(e)));return t}))}(e),(null==t?void 0:t.post)?t.post(n):function(e,t){const n=e.editor.getReplyManager(),i=e.editor.ctx.conf;(null==n?void 0:n.comment)&&n.comment.page_key!==i.pageKey&&window.open(`${n.comment.page_url}#atk-comment-${t.id}`);e.editor.ctx.insertComment(t)}(e,n)}catch(n){console.error(n),e.editor.showNotify(`${e.editor.$t("commentFail")},${n.msg||String(n)}`,"e")}e.editor.reset(),e.editor.ctx.trigger("editor-submitted"),e.editor.hideLoading()}))}(t),customs:[],registerCustom:e=>{t.customs.push(e)}};return t}const wn={localStorage:function(e){const t=window.localStorage.getItem("ArtalkContent")||"";""!==t.trim()&&(e.showNotify(e.$t("restoredMsg"),"i"),e.setContent(t));e.getUI().$textarea.addEventListener("input",(()=>e.saveToLocalStorage()))},header:function(e){const t=e.getHeaderInputEls();Object.entries(t).forEach((([t,n])=>{n.value=gt.data[t]||"",n.addEventListener("input",(()=>function(e,t,n){var i;if(e.isEditMode)return;gt.update({[t]:n.value.trim()}),null==(i=e.getPlugs())||i.triggerHeaderInputEvt(t,n)}(e,t,n))),n.placeholder=`${e.$t(t)}`}))},textarea:function(e){e.getUI().$textarea.placeholder=e.ctx.conf.placeholder||e.$t("placeholder"),e.getUI().$textarea.addEventListener("keydown",(t=>{9===(t.keyCode||t.which)&&(t.preventDefault(),e.insertContent("\t"))})),e.getUI().$textarea.addEventListener("input",(()=>{e.adjustTextareaHeight()}))},submitBtn:function(e){e.refreshSendBtnText(),e.getUI().$submitBtn.addEventListener("click",(()=>e.submit()))},submitManager:function(e){e.setSubmitManager(bn(e))},plugs:function(e){e.setPlugs(mn(e))},mover:function(e){if(!e.conf.editorTravel)return;e.setMover(ln(e))},replyManager:function(e){e.setReplyManager(yn(e))},editModeManager:function(e){e.setEditModeManager(xn(e))}};const Cn='
      \n
      \n \n \n \n
      \n
      \n \n
      \n \n
      \n
      \n
      \n \n
      \n
      \n
      \n
      \n',Sn={$header:".atk-header",$nick:'.atk-header [name="nick"]',$email:'.atk-header [name="email"]',$link:'.atk-header [name="link"]',$textareaWrap:".atk-textarea-wrap",$textarea:".atk-textarea",$bottom:".atk-bottom",$submitBtn:".atk-send-btn",$notifyWrap:".atk-notify-wrap",$plugBtnWrap:".atk-plug-btn-wrap",$plugPanelWrap:".atk-plug-panel-wrap"};class Tn extends v{constructor(e){super(e),c(this,"ui"),c(this,"plugs"),c(this,"mover"),c(this,"reply"),c(this,"editMode"),c(this,"submitManager"),this.ui=function(){const e=h(Cn),t={$el:e};return Object.entries(Sn).forEach((([n,i])=>{t[n]=e.querySelector(i)})),t}(),this.$el=this.ui.$el,this.ctx.on("conf-loaded",(()=>{var e;e=this,Object.entries(wn).forEach((([t,n])=>{n(e)}))}))}getUI(){return this.ui}getPlugs(){return this.plugs}setPlugs(e){this.plugs=e}setMover(e){this.mover=e}setReplyManager(e){this.reply=e}getReplyManager(){return this.reply}get isReplyMode(){var e;return!!(null==(e=this.reply)?void 0:e.comment)}setEditModeManager(e){this.editMode=e}get isEditMode(){var e;return!!(null==(e=this.editMode)?void 0:e.comment)}setSubmitManager(e){this.submitManager=e}getSubmitManager(){return this.submitManager}getHeaderInputEls(){return{nick:this.ui.$nick,email:this.ui.$email,link:this.ui.$link}}saveToLocalStorage(){window.localStorage.setItem("ArtalkContent",this.getContentOriginal().trim())}refreshSendBtnText(){this.isEditMode?this.ui.$submitBtn.innerText=this.$t("save"):this.ui.$submitBtn.innerText=this.ctx.conf.sendBtn||this.$t("send")}getFinalContent(){let e=this.getContentOriginal();return this.plugs&&(e=this.plugs.getTransformedContent(e)),e}getContentOriginal(){return this.ui.$textarea.value||""}getContentMarked(){return st(this.ctx,this.getFinalContent())}setContent(e){this.ui.$textarea.value=e,this.saveToLocalStorage(),this.plugs&&this.plugs.triggerContentUpdatedEvt(e),window.setTimeout((()=>{this.adjustTextareaHeight()}),80)}insertContent(e){if(document.selection)this.ui.$textarea.focus(),document.selection.createRange().text=e,this.ui.$textarea.focus();else if(this.ui.$textarea.selectionStart||0===this.ui.$textarea.selectionStart){const t=this.ui.$textarea.selectionStart,n=this.ui.$textarea.selectionEnd,i=this.ui.$textarea.scrollTop;this.setContent(this.ui.$textarea.value.substring(0,t)+e+this.ui.$textarea.value.substring(n,this.ui.$textarea.value.length)),this.ui.$textarea.focus(),this.ui.$textarea.selectionStart=t+e.length,this.ui.$textarea.selectionEnd=t+e.length,this.ui.$textarea.scrollTop=i}else this.ui.$textarea.focus(),this.ui.$textarea.value+=e}adjustTextareaHeight(){const e=this.ui.$textarea.offsetHeight-this.ui.$textarea.clientHeight;this.ui.$textarea.style.height="0px",this.ui.$textarea.style.height=`${this.ui.$textarea.scrollHeight+e}px`}focus(){this.ui.$textarea.focus()}reset(){this.setContent(""),this.cancelReply(),this.cancelEditComment()}setReply(e,t,n=!0){var i;null==(i=this.reply)||i.setReply(e,t,n)}cancelReply(){var e;null==(e=this.reply)||e.cancelReply()}setEditComment(e,t){var n;null==(n=this.editMode)||n.setEdit(e,t)}cancelEditComment(){var e;null==(e=this.editMode)||e.cancelEdit()}showNotify(e,t){S(this.ui.$notifyWrap,e,t)}showLoading(){b(this.ui.$el)}hideLoading(){w(this.ui.$el)}submit(){return d(this,null,(function*(){this.submitManager&&(yield this.submitManager.do())}))}close(){this.ui.$textareaWrap.querySelector(".atk-comment-closed")||this.ui.$textareaWrap.prepend(h(`
      ${this.$t("onlyAdminCanReply")}
      `)),gt.data.isAdmin?(this.ui.$textarea.style.display="",this.ui.$bottom.style.display=""):(this.ui.$textarea.style.display="none",this.closePlugPanel(),this.ui.$bottom.style.display="none")}open(){var e;null==(e=this.ui.$textareaWrap.querySelector(".atk-comment-closed"))||e.remove(),this.ui.$textarea.style.display="",this.ui.$bottom.style.display=""}travel(e){var t;null==(t=this.mover)||t.move(e)}travelBack(){var e;null==(e=this.mover)||e.back()}openPlugPanel(e){var t;null==(t=this.plugs)||t.openPlugPanel(e)}closePlugPanel(){var e;null==(e=this.plugs)||e.closePlugPanel()}}class En extends v{constructor(e){super(e),c(this,"layer"),c(this,"$header"),c(this,"$closeBtn"),c(this,"$iframeWrap"),c(this,"$iframe"),c(this,"firstShow",!0),this.$el=h('
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n'),this.$header=this.$el.querySelector(".atk-sidebar-header"),this.$closeBtn=this.$header.querySelector(".atk-sidebar-close"),this.$iframeWrap=this.$el.querySelector(".atk-sidebar-iframe-wrap"),this.$closeBtn.onclick=()=>{this.hide()},this.ctx.on("user-changed",(()=>{this.firstShow=!0}))}show(){return d(this,arguments,(function*(e={}){if(this.$el.style.transform="",null==this.layer&&(this.layer=new _(this.ctx,"sidebar",this.$el),this.layer.afterHide=()=>{!0===this.ctx.conf.editorTravel&&this.ctx.editorTravelBack()}),this.layer.show(),(()=>{d(this,null,(function*(){var t;const n=yield this.ctx.getApi().user.loginStatus();n.is_admin&&!n.is_login&&(null==(t=this.layer)||t.hide(),this.firstShow=!0,this.ctx.checkAdmin({onSuccess:()=>{setTimeout((()=>{this.show(e)}),500)},onCancel:()=>{}}))}))})(),this.firstShow){this.$iframeWrap.innerHTML="",this.$iframe=h("");const t=$(this.ctx,"/sidebar/"),n={pageKey:this.conf.pageKey,site:this.conf.site||"",user:JSON.stringify(gt.data),time:+new Date};e.view&&(n.view=e.view),this.conf.darkMode&&(n.darkMode="1"),"string"==typeof this.conf.locale&&(n.locale=this.conf.locale);const i=new URLSearchParams(n);this.iframeLoad(`${t}?${i.toString()}`),this.$iframeWrap.append(this.$iframe),this.firstShow=!1}else{const e=this.$iframe.src.includes("darkMode=1");this.conf.darkMode&&!e&&this.iframeLoad(`${this.$iframe.src}&darkMode=1`),!this.conf.darkMode&&e&&this.iframeLoad(this.$iframe.src.replace("&darkMode=1",""))}setTimeout((()=>{this.$el.style.transform="translate(0, 0)"}),100),setTimeout((()=>{this.ctx.updateNotifies([])}),0),this.ctx.trigger("sidebar-show")}))}hide(){var e;this.$el.style.transform="",null==(e=this.layer)||e.hide(),this.ctx.trigger("sidebar-hide")}iframeLoad(e){this.$iframe&&(this.$iframe.src=e,b(this.$iframeWrap),this.$iframe.onload=()=>{w(this.$iframeWrap)})}}const Ln={i18n(e){ht(e.conf.locale),e.on("conf-loaded",(()=>{ht(e.conf.locale)}))},markdown(){!function(){try{if(!$e.name)return}catch(i){return}const e=new $e.Renderer,t=e.link;e.link=(n,i,s)=>{const r=null==n?void 0:n.startsWith(`${window.location.protocol}//${window.location.hostname}`);return t.call(e,n,i,s).replace(/^{const n=t||"plaintext";let i=e;return window.hljs?n&&window.hljs.getLanguage(n)&&(i=window.hljs.highlight(n,e).value):i=tt(e),`
      \n${i.replace(/&/g,"&")}\n
      `};const n=$e;$e.setOptions({renderer:e,pedantic:!1,gfm:!0,breaks:!0,smartLists:!0,smartypants:!0,xhtml:!1,sanitize:!1,silent:!0}),nt=n}()},user:e=>(gt.setContext(e),gt),api:e=>new on(e),checkerLauncher:e=>new tn(e),editor(e){const t=new Tn(e);return e.$root.appendChild(t.$el),t},list(e){const t=new Gt(e);return e.$root.appendChild(t.$el),t.fetchComments(0),t},layer(e){_.BodyOrgOverflow=document.body.style.overflow,_.BodyOrgPaddingRight=document.body.style.paddingRight},sidebarLayer:e=>new En(e),eventsDefault(e){window.addEventListener("hashchange",(()=>{e.listHashGotoCheck()})),e.on("user-changed",(()=>{e.checkAdminShowEl(),e.listRefreshUI()}))},darkMode(e){R(e),e.on("conf-loaded",(()=>{R(e)}))}};function _n(e){return d(this,null,(function*(){const t=e.ctx.conf.countEl;t&&document.querySelector(t)&&An(e,{api:"page_comment",countEl:t});const n=e.pvAdd?yield e.ctx.getApi().page.pv():void 0,i=e.ctx.conf.pvEl;i&&document.querySelector(i)&&An(e,{api:"page_pv",countEl:i,curtPageCount:n})}))}function An(e,t){return d(this,null,(function*(){let n={};const i=e.ctx.conf.pageKey;t.curtPageCount&&(n[i]=t.curtPageCount);let s=Array.from(document.querySelectorAll(t.countEl)).map((e=>e.getAttribute("data-page-key")||i)).filter((e=>void 0===n[e]));if(s=[...new Set(s)],s.length>0){const i=yield e.ctx.getApi().page.stat(t.api,s);n=o(o({},n),i)}document.querySelectorAll(t.countEl).forEach((e=>{const t=e.getAttribute("data-page-key")||i;e.innerHTML=`${Number(n[t]||0)}`}))}))}const On=class{constructor(e){c(this,"conf"),c(this,"ctx"),c(this,"$root"),On.instance&&On.destroy(),this.conf=Qt(e),this.conf.el instanceof HTMLElement&&(this.$root=this.conf.el),this.ctx=new Kt(this.conf,this.$root),Object.entries(Ln).forEach((([e,t])=>{if(On.DisabledComponents.includes(e))return;const n=t(this.ctx);n&&this.ctx.inject(e,n)})),On.plugins.forEach((e=>{"function"==typeof e&&e(this.ctx)}))}static init(e){return this.instance&&On.destroy(),this.instance=new On(e),this.instance}use(e){On.plugins.push(e),"function"==typeof e&&e(this.ctx)}update(e){if(!On.instance)throw Error("cannot call `update` function before call `load`");return On.instance.ctx.updateConf(e),On.instance}reload(){this.ctx.listReload()}destroy(){if(!On.instance)throw Error("cannot call `destroy` function before call `load`");On.instance.$root.remove(),delete On.instance}on(e,t){this.ctx.on(e,t,"external")}off(e,t){this.ctx.off(e,t,"external")}trigger(e,t){this.ctx.trigger(e,t,"external")}setDarkMode(e){this.ctx.setDarkMode(e)}static use(e){this.plugins.push(e),this.instance&&"function"==typeof e&&e(this.instance.ctx)}static update(e){var t;return null==(t=this.instance)?void 0:t.update(e)}static reload(){var e;null==(e=this.instance)||e.reload()}static destroy(){var e;null==(e=this.instance)||e.destroy()}static on(e,t){var n;null==(n=this.instance)||n.on(e,t)}static off(e,t){var n;null==(n=this.instance)||n.off(e,t)}static trigger(e,t){var n;null==(n=this.instance)||n.trigger(e,t)}static setDarkMode(e){var t;null==(t=this.instance)||t.setDarkMode(e)}static loadCountWidget(e){const t=new Kt(Qt(e));t.inject("api",new on(t)),_n({ctx:t,pvAdd:!1})}static LoadCountWidget(e){console.warn("The method `LoadCountWidget` is deprecated, please use `loadCountWidget` instead."),this.loadCountWidget(e)}};let Mn=On;return c(Mn,"instance"),c(Mn,"ListLite",Zt),c(Mn,"defaults",Ht),c(Mn,"plugins",[e=>{e.conf.useBackendConf?e.on("list-loaded",(()=>{_n({ctx:e,pvAdd:!0})})):_n({ctx:e,pvAdd:!0})}]),c(Mn,"DisabledComponents",[]),Mn})); diff --git a/themes/FixIt/assets/lib/autocomplete/autocomplete.min.js b/themes/FixIt/assets/lib/autocomplete/autocomplete.min.js new file mode 100644 index 0000000..f086420 --- /dev/null +++ b/themes/FixIt/assets/lib/autocomplete/autocomplete.min.js @@ -0,0 +1,7 @@ +/*! + * autocomplete.js 0.38.1 + * https://github.com/algolia/autocomplete.js + * Copyright 2021 Algolia, Inc. and other contributors; Licensed MIT + */ +!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.autocomplete=b():a.autocomplete=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";a.exports=c(1)},function(a,b,c){"use strict";function d(a,b,c,d){c=f.isArray(c)?c:[].slice.call(arguments,2);var j=e(a).each(function(a,f){var j=e(f),k=new i({el:j}),l=d||new h({input:j,eventBus:k,dropdownMenuContainer:b.dropdownMenuContainer,hint:void 0===b.hint||!!b.hint,minLength:b.minLength,autoselect:b.autoselect,autoselectOnBlur:b.autoselectOnBlur,tabAutocomplete:b.tabAutocomplete,openOnFocus:b.openOnFocus,templates:b.templates,debug:b.debug,clearOnSelected:b.clearOnSelected,cssClasses:b.cssClasses,datasets:c,keyboardShortcuts:b.keyboardShortcuts,appendTo:b.appendTo,autoWidth:b.autoWidth,ariaLabel:b.ariaLabel||f.getAttribute("aria-label")});j.data(g,l)});return j.autocomplete={},f.each(["open","close","getVal","setVal","destroy","getWrapper"],function(a){j.autocomplete[a]=function(){var b,c=arguments;return j.each(function(d,f){var h=e(f).data(g);b=h[a].apply(h,c)}),b}}),j}var e=c(2);c(3).element=e;var f=c(4);f.isArray=e.isArray,f.isFunction=e.isFunction,f.isObject=e.isPlainObject,f.bind=e.proxy,f.each=function(a,b){function c(a,c){return b(c,a)}e.each(a,c)},f.map=e.map,f.mixin=e.extend,f.Event=e.Event;var g="aaAutocomplete",h=c(5),i=c(6);d.sources=h.sources,d.escapeHighlightedString=f.escapeHighlightedString;var j="autocomplete"in window,k=window.autocomplete;d.noConflict=function(){return j?window.autocomplete=k:delete window.autocomplete,d},a.exports=d},function(a,b){!function(b,c){a.exports=function(a){var b=function(){function b(a){return null==a?String(a):V[W.call(a)]||"object"}function c(a){return"function"==b(a)}function d(a){return null!=a&&a==a.window}function e(a){return null!=a&&a.nodeType==a.DOCUMENT_NODE}function f(a){return"object"==b(a)}function g(a){return f(a)&&!d(a)&&Object.getPrototypeOf(a)==Object.prototype}function h(a){var b=!!a&&"length"in a&&a.length,c=z.type(a);return"function"!=c&&!d(a)&&("array"==c||0===b||"number"==typeof b&&b>0&&b-1 in a)}function i(a){return F.call(a,function(a){return null!=a})}function j(a){return a.length>0?z.fn.concat.apply([],a):a}function k(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(a){return a in J?J[a]:J[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function m(a,b){return"number"!=typeof b||K[k(a)]?b:b+"px"}function n(a){var b,c;return I[a]||(b=H.createElement(a),H.body.appendChild(b),c=getComputedStyle(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),"none"==c&&(c="block"),I[a]=c),I[a]}function o(a){return"children"in a?G.call(a.children):z.map(a.childNodes,function(a){if(1==a.nodeType)return a})}function p(a,b){var c,d=a?a.length:0;for(c=0;c]*>/,M=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,N=/^(?:body|html)$/i,O=["val","css","html","text","data","width","height","offset"],P=["after","prepend","before","append"],Q=H.createElement("table"),R=H.createElement("tr"),S={tr:H.createElement("tbody"),tbody:Q,thead:Q,tfoot:Q,td:R,th:R,"*":H.createElement("div")},T=/complete|loaded|interactive/,U=/^[\w-]*$/,V={},W=V.toString,X={},Y=H.createElement("div"),Z={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(a){return a instanceof Array};return X.matches=function(a,b){if(!b||!a||1!==a.nodeType)return!1;var c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=Y).appendChild(a),d=~X.qsa(e,b).indexOf(a),f&&Y.removeChild(a),d},B=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},C=function(a){return F.call(a,function(b,c){return a.indexOf(b)==c})},X.fragment=function(a,b,c){var d,e,f;return M.test(a)&&(d=z(H.createElement(RegExp.$1))),d||(a.replace&&(a=a.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1>")),b===x&&(b=L.test(a)&&RegExp.$1),b in S||(b="*"),f=S[b],f.innerHTML=""+a,d=z.each(G.call(f.childNodes),function(){f.removeChild(this)})),g(c)&&(e=z(d),z.each(c,function(a,b){O.indexOf(a)>-1?e[a](b):e.attr(a,b)})),d},X.Z=function(a,b){return new p(a,b)},X.isZ=function(a){return a instanceof X.Z},X.init=function(a,b){var d;if(!a)return X.Z();if("string"==typeof a)if(a=a.trim(),"<"==a[0]&&L.test(a))d=X.fragment(a,RegExp.$1,b),a=null;else{if(b!==x)return z(b).find(a);d=X.qsa(H,a)}else{if(c(a))return z(H).ready(a);if(X.isZ(a))return a;if($(a))d=i(a);else if(f(a))d=[a],a=null;else if(L.test(a))d=X.fragment(a.trim(),RegExp.$1,b),a=null;else{if(b!==x)return z(b).find(a);d=X.qsa(H,a)}}return X.Z(d,a)},z=function(a,b){return X.init(a,b)},z.extend=function(a){var b,c=G.call(arguments,1);return"boolean"==typeof a&&(b=a,a=c.shift()),c.forEach(function(c){q(a,c,b)}),a},X.qsa=function(a,b){var c,d="#"==b[0],e=!d&&"."==b[0],f=d||e?b.slice(1):b,g=U.test(f);return a.getElementById&&g&&d?(c=a.getElementById(f))?[c]:[]:1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType?[]:G.call(g&&!d&&a.getElementsByClassName?e?a.getElementsByClassName(f):a.getElementsByTagName(b):a.querySelectorAll(b))},z.contains=H.documentElement.contains?function(a,b){return a!==b&&a.contains(b)}:function(a,b){for(;b&&(b=b.parentNode);)if(b===a)return!0;return!1},z.type=b,z.isFunction=c,z.isWindow=d,z.isArray=$,z.isPlainObject=g,z.isEmptyObject=function(a){var b;for(b in a)return!1;return!0},z.isNumeric=function(a){var b=Number(a),c=typeof a;return null!=a&&"boolean"!=c&&("string"!=c||a.length)&&!isNaN(b)&&isFinite(b)||!1},z.inArray=function(a,b,c){return D.indexOf.call(b,a,c)},z.camelCase=B,z.trim=function(a){return null==a?"":String.prototype.trim.call(a)},z.uuid=0,z.support={},z.expr={},z.noop=function(){},z.map=function(a,b){var c,d,e,f=[];if(h(a))for(d=0;d=0?a:a+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(a){return D.every.call(this,function(b,c){return a.call(b,c,b)!==!1}),this},filter:function(a){return c(a)?this.not(this.not(a)):z(F.call(this,function(b){return X.matches(b,a)}))},add:function(a,b){return z(C(this.concat(z(a,b))))},is:function(a){return this.length>0&&X.matches(this[0],a)},not:function(a){var b=[];if(c(a)&&a.call!==x)this.each(function(c){a.call(this,c)||b.push(this)});else{var d="string"==typeof a?this.filter(a):h(a)&&c(a.item)?G.call(a):z(a);this.forEach(function(a){d.indexOf(a)<0&&b.push(a)})}return z(b)},has:function(a){return this.filter(function(){return f(a)?z.contains(this,a):z(this).find(a).size()})},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!f(a)?a:z(a)},last:function(){var a=this[this.length-1];return a&&!f(a)?a:z(a)},find:function(a){var b=this;return a?"object"==typeof a?z(a).filter(function(){var a=this;return D.some.call(b,function(b){return z.contains(b,a)})}):1==this.length?z(X.qsa(this[0],a)):this.map(function(){return X.qsa(this,a)}):z()},closest:function(a,b){var c=[],d="object"==typeof a&&z(a);return this.each(function(f,g){for(;g&&!(d?d.indexOf(g)>=0:X.matches(g,a));)g=g!==b&&!e(g)&&g.parentNode;g&&c.indexOf(g)<0&&c.push(g)}),z(c)},parents:function(a){for(var b=[],c=this;c.length>0;)c=z.map(c,function(a){if((a=a.parentNode)&&!e(a)&&b.indexOf(a)<0)return b.push(a),a});return r(b,a)},parent:function(a){return r(C(this.pluck("parentNode")),a)},children:function(a){return r(this.map(function(){return o(this)}),a)},contents:function(){return this.map(function(){return this.contentDocument||G.call(this.childNodes)})},siblings:function(a){return r(this.map(function(a,b){return F.call(o(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return z.map(this,function(b){return b[a]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=n(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var b=c(a);if(this[0]&&!b)var d=z(a).get(0),e=d.parentNode||this.length>1;return this.each(function(c){z(this).wrapAll(b?a.call(this,c):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){z(this[0]).before(a=z(a));for(var b;(b=a.children()).length;)a=b.first();z(a).append(this)}return this},wrapInner:function(a){var b=c(a);return this.each(function(c){var d=z(this),e=d.contents(),f=b?a.call(this,c):a;e.length?e.wrapAll(f):d.append(f)})},unwrap:function(){return this.parent().each(function(){z(this).replaceWith(z(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(a){return this.each(function(){var b=z(this);(a===x?"none"==b.css("display"):a)?b.show():b.hide()})},prev:function(a){return z(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return z(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return 0 in arguments?this.each(function(b){var c=this.innerHTML;z(this).empty().append(s(this,a,b,c))}):0 in this?this[0].innerHTML:null},text:function(a){return 0 in arguments?this.each(function(b){var c=s(this,a,b,this.textContent);this.textContent=null==c?"":""+c}):0 in this?this.pluck("textContent").join(""):null},attr:function(a,b){var c;return"string"!=typeof a||1 in arguments?this.each(function(c){if(1===this.nodeType)if(f(a))for(y in a)t(this,y,a[y]);else t(this,a,s(this,b,c,this.getAttribute(a)))}):0 in this&&1==this[0].nodeType&&null!=(c=this[0].getAttribute(a))?c:x},removeAttr:function(a){return this.each(function(){1===this.nodeType&&a.split(" ").forEach(function(a){t(this,a)},this)})},prop:function(a,b){return a=Z[a]||a,1 in arguments?this.each(function(c){this[a]=s(this,b,c,this[a])}):this[0]&&this[0][a]},removeProp:function(a){return a=Z[a]||a,this.each(function(){delete this[a]})},data:function(a,b){var c="data-"+a.replace(/([A-Z])/g,"-$1").toLowerCase(),d=1 in arguments?this.attr(c,b):this.attr(c);return null!==d?v(d):x},val:function(a){return 0 in arguments?(null==a&&(a=""),this.each(function(b){this.value=s(this,a,b,this.value)})):this[0]&&(this[0].multiple?z(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(b){if(b)return this.each(function(a){var c=z(this),d=s(this,b,a,c.offset()),e=c.offsetParent().offset(),f={top:d.top-e.top,left:d.left-e.left};"static"==c.css("position")&&(f.position="relative"),c.css(f)});if(!this.length)return null;if(H.documentElement!==this[0]&&!z.contains(H.documentElement,this[0]))return{top:0,left:0};var c=this[0].getBoundingClientRect();return{left:c.left+a.pageXOffset,top:c.top+a.pageYOffset,width:Math.round(c.width),height:Math.round(c.height)}},css:function(a,c){if(arguments.length<2){var d=this[0];if("string"==typeof a){if(!d)return;return d.style[B(a)]||getComputedStyle(d,"").getPropertyValue(a)}if($(a)){if(!d)return;var e={},f=getComputedStyle(d,"");return z.each(a,function(a,b){e[b]=d.style[B(b)]||f.getPropertyValue(b)}),e}}var g="";if("string"==b(a))c||0===c?g=k(a)+":"+m(a,c):this.each(function(){this.style.removeProperty(k(a))});else for(y in a)a[y]||0===a[y]?g+=k(y)+":"+m(y,a[y])+";":this.each(function(){this.style.removeProperty(k(y))});return this.each(function(){this.style.cssText+=";"+g})},index:function(a){return a?this.indexOf(z(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return!!a&&D.some.call(this,function(a){return this.test(u(a))},l(a))},addClass:function(a){return a?this.each(function(b){if("className"in this){A=[];var c=u(this);s(this,a,b,c).split(/\s+/g).forEach(function(a){z(this).hasClass(a)||A.push(a)},this),A.length&&u(this,c+(c?" ":"")+A.join(" "))}}):this},removeClass:function(a){return this.each(function(b){if("className"in this){if(a===x)return u(this,"");A=u(this),s(this,a,b,A).split(/\s+/g).forEach(function(a){A=A.replace(l(a)," ")}),u(this,A.trim())}})},toggleClass:function(a,b){return a?this.each(function(c){var d=z(this);s(this,a,c,u(this)).split(/\s+/g).forEach(function(a){(b===x?!d.hasClass(a):b)?d.addClass(a):d.removeClass(a)})}):this},scrollTop:function(a){if(this.length){var b="scrollTop"in this[0];return a===x?b?this[0].scrollTop:this[0].pageYOffset:this.each(b?function(){this.scrollTop=a}:function(){this.scrollTo(this.scrollX,a)})}},scrollLeft:function(a){if(this.length){var b="scrollLeft"in this[0];return a===x?b?this[0].scrollLeft:this[0].pageXOffset:this.each(b?function(){this.scrollLeft=a}:function(){this.scrollTo(a,this.scrollY)})}},position:function(){if(this.length){var a=this[0],b=this.offsetParent(),c=this.offset(),d=N.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(z(a).css("margin-top"))||0,c.left-=parseFloat(z(a).css("margin-left"))||0,d.top+=parseFloat(z(b[0]).css("border-top-width"))||0,d.left+=parseFloat(z(b[0]).css("border-left-width"))||0,{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||H.body;a&&!N.test(a.nodeName)&&"static"==z(a).css("position");)a=a.offsetParent;return a})}},z.fn.detach=z.fn.remove,["width","height"].forEach(function(a){var b=a.replace(/./,function(a){return a[0].toUpperCase()});z.fn[a]=function(c){var f,g=this[0];return c===x?d(g)?g["inner"+b]:e(g)?g.documentElement["scroll"+b]:(f=this.offset())&&f[a]:this.each(function(b){g=z(this),g.css(a,s(this,c,b,g[a]()))})}}),P.forEach(function(c,d){var e=d%2;z.fn[c]=function(){var c,f,g=z.map(arguments,function(a){var d=[];return c=b(a),"array"==c?(a.forEach(function(a){return a.nodeType!==x?d.push(a):z.zepto.isZ(a)?d=d.concat(a.get()):void(d=d.concat(X.fragment(a)))}),d):"object"==c||null==a?a:X.fragment(a)}),h=this.length>1;return g.length<1?this:this.each(function(b,c){f=e?c:c.parentNode,c=0==d?c.nextSibling:1==d?c.firstChild:2==d?c:null;var i=z.contains(H.documentElement,f);g.forEach(function(b){if(h)b=b.cloneNode(!0);else if(!f)return z(b).remove();f.insertBefore(b,c),i&&w(b,function(b){if(!(null==b.nodeName||"SCRIPT"!==b.nodeName.toUpperCase()||b.type&&"text/javascript"!==b.type||b.src)){var c=b.ownerDocument?b.ownerDocument.defaultView:a;c.eval.call(c,b.innerHTML)}})})})},z.fn[e?c+"To":"insert"+(d?"Before":"After")]=function(a){return z(a)[c](this),this}}),X.Z.prototype=p.prototype=z.fn,X.uniq=C,X.deserializeValue=v,z.zepto=X,z}();return function(b){function c(a){return a._zid||(a._zid=n++)}function d(a,b,d,g){if(b=e(b),b.ns)var h=f(b.ns);return(r[c(a)]||[]).filter(function(a){return a&&(!b.e||a.e==b.e)&&(!b.ns||h.test(a.ns))&&(!d||c(a.fn)===c(d))&&(!g||a.sel==g)})}function e(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function f(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function g(a,b){return a.del&&!t&&a.e in u||!!b}function h(a){return v[a]||t&&u[a]||a}function i(a,d,f,i,j,l,n){var o=c(a),p=r[o]||(r[o]=[]);d.split(/\s/).forEach(function(c){if("ready"==c)return b(document).ready(f);var d=e(c);d.fn=f,d.sel=j,d.e in v&&(f=function(a){var c=a.relatedTarget;if(!c||c!==this&&!b.contains(this,c))return d.fn.apply(this,arguments)}),d.del=l;var o=l||f;d.proxy=function(b){if(b=k(b),!b.isImmediatePropagationStopped()){try{var c=Object.getOwnPropertyDescriptor(b,"data");c&&!c.writable||(b.data=i)}catch(b){}var d=o.apply(a,b._args==m?[b]:[b].concat(b._args));return d===!1&&(b.preventDefault(),b.stopPropagation()),d}},d.i=p.length,p.push(d),"addEventListener"in a&&a.addEventListener(h(d.e),d.proxy,g(d,n))})}function j(a,b,e,f,i){var j=c(a);(b||"").split(/\s/).forEach(function(b){d(a,b,e,f).forEach(function(b){delete r[j][b.i],"removeEventListener"in a&&a.removeEventListener(h(b.e),b.proxy,g(b,i))})})}function k(a,c){if(c||!a.isDefaultPrevented){c||(c=a),b.each(z,function(b,d){var e=c[b];a[b]=function(){return this[d]=w,e&&e.apply(c,arguments)},a[d]=x});try{a.timeStamp||(a.timeStamp=Date.now())}catch(a){}(c.defaultPrevented!==m?c.defaultPrevented:"returnValue"in c?c.returnValue===!1:c.getPreventDefault&&c.getPreventDefault())&&(a.isDefaultPrevented=w)}return a}function l(a){var b,c={originalEvent:a};for(b in a)y.test(b)||a[b]===m||(c[b]=a[b]);return k(c,a)}var m,n=1,o=Array.prototype.slice,p=b.isFunction,q=function(a){return"string"==typeof a},r={},s={},t="onfocusin"in a,u={focus:"focusin",blur:"focusout"},v={mouseenter:"mouseover",mouseleave:"mouseout"};s.click=s.mousedown=s.mouseup=s.mousemove="MouseEvents",b.event={add:i,remove:j},b.proxy=function(a,d){var e=2 in arguments&&o.call(arguments,2);if(p(a)){var f=function(){return a.apply(d,e?e.concat(o.call(arguments)):arguments)};return f._zid=c(a),f}if(q(d))return e?(e.unshift(a[d],a),b.proxy.apply(null,e)):b.proxy(a[d],a);throw new TypeError("expected function")},b.fn.bind=function(a,b,c){return this.on(a,b,c)},b.fn.unbind=function(a,b){return this.off(a,b)},b.fn.one=function(a,b,c,d){return this.on(a,b,c,d,1)};var w=function(){return!0},x=function(){return!1},y=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,z={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};b.fn.delegate=function(a,b,c){return this.on(b,a,c)},b.fn.undelegate=function(a,b,c){return this.off(b,a,c)},b.fn.live=function(a,c){return b(document.body).delegate(this.selector,a,c),this},b.fn.die=function(a,c){return b(document.body).undelegate(this.selector,a,c),this},b.fn.on=function(a,c,d,e,f){var g,h,k=this;return a&&!q(a)?(b.each(a,function(a,b){k.on(a,c,d,b,f)}),k):(q(c)||p(e)||e===!1||(e=d,d=c,c=m),e!==m&&d!==!1||(e=d,d=m),e===!1&&(e=x),k.each(function(k,m){f&&(g=function(a){return j(m,a.type,e),e.apply(this,arguments)}),c&&(h=function(a){var d,f=b(a.target).closest(c,m).get(0);if(f&&f!==m)return d=b.extend(l(a),{currentTarget:f,liveFired:m}),(g||e).apply(f,[d].concat(o.call(arguments,1)))}),i(m,a,e,d,c,h||g)}))},b.fn.off=function(a,c,d){var e=this;return a&&!q(a)?(b.each(a,function(a,b){e.off(a,c,b)}),e):(q(c)||p(d)||d===!1||(d=c,c=m),d===!1&&(d=x),e.each(function(){j(this,a,d,c)}))},b.fn.trigger=function(a,c){return a=q(a)||b.isPlainObject(a)?b.Event(a):k(a),a._args=c,this.each(function(){a.type in u&&"function"==typeof this[a.type]?this[a.type]():"dispatchEvent"in this?this.dispatchEvent(a):b(this).triggerHandler(a,c)})},b.fn.triggerHandler=function(a,c){var e,f;return this.each(function(g,h){e=l(q(a)?b.Event(a):a),e._args=c,e.target=h,b.each(d(h,a.type||a),function(a,b){if(f=b.proxy(e),e.isImmediatePropagationStopped())return!1})}),f},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(a){b.fn[a]=function(b){return 0 in arguments?this.bind(a,b):this.trigger(a)}}),b.Event=function(a,b){q(a)||(b=a,a=b.type);var c=document.createEvent(s[a]||"Events"),d=!0;if(b)for(var e in b)"bubbles"==e?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),k(c)}}(b),function(a){var b,c=[];a.fn.remove=function(){return this.each(function(){this.parentNode&&("IMG"===this.tagName&&(c.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",b&&clearTimeout(b),b=setTimeout(function(){c=[]},6e4)),this.parentNode.removeChild(this))})}}(b),function(a){function b(b,d){var i=b[h],j=i&&e[i];if(void 0===d)return j||c(b);if(j){if(d in j)return j[d];var k=g(d);if(k in j)return j[k]}return f.call(a(b),d)}function c(b,c,f){var i=b[h]||(b[h]=++a.uuid),j=e[i]||(e[i]=d(b));return void 0!==c&&(j[g(c)]=f),j}function d(b){var c={};return a.each(b.attributes||i,function(b,d){0==d.name.indexOf("data-")&&(c[g(d.name.replace("data-",""))]=a.zepto.deserializeValue(d.value))}),c}var e={},f=a.fn.data,g=a.camelCase,h=a.expando="Zepto"+ +new Date,i=[];a.fn.data=function(d,e){return void 0===e?a.isPlainObject(d)?this.each(function(b,e){a.each(d,function(a,b){c(e,a,b)})}):0 in this?b(this[0],d):void 0:this.each(function(){c(this,d,e)})},a.data=function(b,c,d){return a(b).data(c,d)},a.hasData=function(b){var c=b[h],d=c&&e[c];return!!d&&!a.isEmptyObject(d)},a.fn.removeData=function(b){return"string"==typeof b&&(b=b.split(/\s+/)),this.each(function(){var c=this[h],d=c&&e[c];d&&a.each(b||d,function(a){delete d[b?g(this):a]})})},["remove","empty"].forEach(function(b){var c=a.fn[b];a.fn[b]=function(){var a=this.find("*");return"remove"===b&&(a=a.add(this)),a.removeData(),c.call(this)}})}(b),b}(b)}(window)},function(a,b){"use strict";a.exports={element:null}},function(a,b,c){"use strict";function d(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var e=c(3);a.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(a){if(void 0===a&&(a=navigator.userAgent),/(msie|trident)/i.test(a)){var b=a.match(/(msie |rv:)(\d+(.\d+)?)/i);if(b)return b[2]}return!1},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(a){return"number"==typeof a},toStr:function(a){return void 0===a||null===a?"":a+""},cloneDeep:function(a){var b=this.mixin({},a),c=this;return this.each(b,function(a,d){a&&(c.isArray(a)?b[d]=[].concat(a):c.isObject(a)&&(b[d]=c.cloneDeep(a)))}),b},error:function(a){throw new Error(a)},every:function(a,b){var c=!0;return a?(this.each(a,function(d,e){c&&(c=b.call(null,d,e,a)&&c)}),!!c):c},any:function(a,b){var c=!1;return a?(this.each(a,function(d,e){if(b.call(null,d,e,a))return c=!0,!1}),c):c},getUniqueId:function(){var a=0;return function(){return a++}}(),templatify:function(a){if(this.isFunction(a))return a;var b=e.element(a);return"SCRIPT"===b.prop("tagName")?function(){return b.text()}:function(){return String(a)}},defer:function(a){setTimeout(a,0)},noop:function(){},formatPrefix:function(a,b){return b?"":a+"-"},className:function(a,b,c){return(c?"":".")+a+b},escapeHighlightedString:function(a,b,c){b=b||"";var e=document.createElement("div");e.appendChild(document.createTextNode(b)),c=c||"";var f=document.createElement("div");f.appendChild(document.createTextNode(c));var g=document.createElement("div");return g.appendChild(document.createTextNode(a)),g.innerHTML.replace(RegExp(d(e.innerHTML),"g"),b).replace(RegExp(d(f.innerHTML),"g"),c)}}},function(a,b,c){"use strict";function d(a){var b,c;if(a=a||{},a.input||i.error("missing input"),this.isActivated=!1,this.debug=!!a.debug,this.autoselect=!!a.autoselect,this.autoselectOnBlur=!!a.autoselectOnBlur,this.openOnFocus=!!a.openOnFocus,this.minLength=i.isNumber(a.minLength)?a.minLength:1,this.autoWidth=void 0===a.autoWidth||!!a.autoWidth,this.clearOnSelected=!!a.clearOnSelected,this.tabAutocomplete=void 0===a.tabAutocomplete||!!a.tabAutocomplete,a.hint=!!a.hint,a.hint&&a.appendTo)throw new Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=a.css=i.mixin({},o,a.appendTo?o.appendTo:{}),this.cssClasses=a.cssClasses=i.mixin({},o.defaultClasses,a.cssClasses||{}),this.cssClasses.prefix=a.cssClasses.formattedPrefix=i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),this.listboxId=a.listboxId=[this.cssClasses.root,"listbox",i.getUniqueId()].join("-");var f=e(a);this.$node=f.wrapper;var g=this.$input=f.input;b=f.menu,c=f.hint,a.dropdownMenuContainer&&j.element(a.dropdownMenuContainer).css("position","relative").append(b.css("top","0")),g.on("blur.aa",function(a){var c=document.activeElement;i.isMsie()&&(b[0]===c||b[0].contains(c))&&(a.preventDefault(),a.stopImmediatePropagation(),i.defer(function(){g.focus()}))}),b.on("mousedown.aa",function(a){a.preventDefault()}),this.eventBus=a.eventBus||new k({el:g}),this.dropdown=new d.Dropdown({appendTo:a.appendTo,wrapper:this.$node,menu:b,datasets:a.datasets,templates:a.templates,cssClasses:a.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new d.Input({input:g,hint:c}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(a),this._setLanguageDirection()}function e(a){var b,c,d,e;b=j.element(a.input),c=j.element(n.wrapper.replace("%ROOT%",a.cssClasses.root)).css(a.css.wrapper),a.appendTo||"block"!==b.css("display")||"table"!==b.parent().css("display")||c.css("display","table-cell");var g=n.dropdown.replace("%PREFIX%",a.cssClasses.prefix).replace("%DROPDOWN_MENU%",a.cssClasses.dropdownMenu);d=j.element(g).css(a.css.dropdown).attr({role:"listbox",id:a.listboxId}),a.templates&&a.templates.dropdownMenu&&d.html(i.templatify(a.templates.dropdownMenu)()),e=b.clone().css(a.css.hint).css(f(b)),e.val("").addClass(i.className(a.cssClasses.prefix,a.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),e.removeData&&e.removeData(),b.data(h,{"aria-autocomplete":b.attr("aria-autocomplete"),"aria-expanded":b.attr("aria-expanded"),"aria-owns":b.attr("aria-owns"),autocomplete:b.attr("autocomplete"),dir:b.attr("dir"),role:b.attr("role"),spellcheck:b.attr("spellcheck"),style:b.attr("style"),type:b.attr("type")}),b.addClass(i.className(a.cssClasses.prefix,a.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":a.datasets&&a.datasets[0]&&a.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-label":a.ariaLabel,"aria-owns":a.listboxId}).css(a.hint?a.css.input:a.css.inputWithNoHint);try{b.attr("dir")||b.attr("dir","auto")}catch(a){}return c=a.appendTo?c.appendTo(j.element(a.appendTo).eq(0)).eq(0):b.wrap(c).parent(),c.prepend(a.hint?e:null).append(d),{wrapper:c,input:b,hint:e,menu:d}}function f(a){return{backgroundAttachment:a.css("background-attachment"),backgroundClip:a.css("background-clip"),backgroundColor:a.css("background-color"),backgroundImage:a.css("background-image"),backgroundOrigin:a.css("background-origin"),backgroundPosition:a.css("background-position"),backgroundRepeat:a.css("background-repeat"),backgroundSize:a.css("background-size")}}function g(a,b){var c=a.find(i.className(b.prefix,b.input));i.each(c.data(h),function(a,b){void 0===a?c.removeAttr(b):c.attr(b,a)}),c.detach().removeClass(i.className(b.prefix,b.input,!0)).insertAfter(a),c.removeData&&c.removeData(h),a.remove()}var h="aaAttrs",i=c(4),j=c(3),k=c(6),l=c(7),m=c(16),n=c(18),o=c(19);i.mixin(d.prototype,{_bindKeyboardShortcuts:function(a){if(a.keyboardShortcuts){var b=this.$input,c=[];i.each(a.keyboardShortcuts,function(a){"string"==typeof a&&(a=a.toUpperCase().charCodeAt(0)),c.push(a)}),j.element(document).keydown(function(a){var d=a.target||a.srcElement,e=d.tagName;if(!d.isContentEditable&&"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e){var f=a.which||a.keyCode;c.indexOf(f)!==-1&&(b.focus(),a.stopPropagation(),a.preventDefault())}})}},_onSuggestionClicked:function(a,b){var c,d={selectionMethod:"click"};(c=this.dropdown.getDatumForSuggestion(b))&&this._select(c,d)},_onCursorMoved:function(a,b){var c=this.dropdown.getDatumForCursor(),d=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(d),c&&(b&&this.input.setInputValue(c.value,!0),this.eventBus.trigger("cursorchanged",c.raw,c.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){this.$node.css("top","0px"),this.$node.css("left","0px");var a=this.$input[0].getBoundingClientRect();this.autoWidth&&this.$node.css("width",a.width+"px");var b=this.$node[0].getBoundingClientRect(),c=a.bottom-b.top;this.$node.css("top",c+"px");var d=a.left-b.left;this.$node.css("left",d+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var a=this.input.getQuery();a.length>=this.minLength?this.dropdown.update(a):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){var a,b;a=this.dropdown.getDatumForCursor(),b=this.dropdown.getDatumForTopSuggestion();var c={selectionMethod:"blur"};this.debug||(this.autoselectOnBlur&&a?this._select(a,c):this.autoselectOnBlur&&b?this._select(b,c):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(a,b){var c,d +;c=this.dropdown.getDatumForCursor(),d=this.dropdown.getDatumForTopSuggestion();var e={selectionMethod:"enterKey"};c?(this._select(c,e),b.preventDefault()):this.autoselect&&d&&(this._select(d,e),b.preventDefault())},_onTabKeyed:function(a,b){if(!this.tabAutocomplete)return void this.dropdown.close();var c,d={selectionMethod:"tabKey"};(c=this.dropdown.getDatumForCursor())?(this._select(c,d),b.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var a=this.input.getQuery();this.dropdown.isEmpty&&a.length>=this.minLength?this.dropdown.update(a):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var a=this.input.getQuery();this.dropdown.isEmpty&&a.length>=this.minLength?this.dropdown.update(a):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(a,b){this.input.clearHintIfInvalid(),b.length>=this.minLength?this.dropdown.update(b):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var a=this.input.getLanguageDirection();this.dir!==a&&(this.dir=a,this.$node.css("direction",a),this.dropdown.setLanguageDirection(a))},_updateHint:function(){var a,b,c,d,e,f;a=this.dropdown.getDatumForTopSuggestion(),a&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(b=this.input.getInputValue(),c=l.normalizeQuery(b),d=i.escapeRegExChars(c),e=new RegExp("^(?:"+d+")(.+$)","i"),f=e.exec(a.value),f?this.input.setHint(b+f[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(a){var b,c,d,e;b=this.input.getHint(),c=this.input.getQuery(),d=a||this.input.isCursorAtEnd(),b&&c!==b&&d&&(e=this.dropdown.getDatumForTopSuggestion(),e&&this.input.setInputValue(e.value),this.eventBus.trigger("autocompleted",e.raw,e.datasetName))},_select:function(a,b){void 0!==a.value&&this.input.setQuery(a.value),this.clearOnSelected?this.setVal(""):this.input.setInputValue(a.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",a.raw,a.datasetName,b).isDefaultPrevented()===!1&&(this.dropdown.close(),i.defer(i.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var a=this.input.getInputValue();a.length>=this.minLength?this.dropdown.update(a):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(a){a=i.toStr(a),this.isActivated?this.input.setInputValue(a):(this.input.setQuery(a),this.input.setInputValue(a,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),g(this.$node,this.cssClasses),this.$node=null},getWrapper:function(){return this.dropdown.$container[0]}}),d.Dropdown=m,d.Input=l,d.sources=c(20),a.exports=d},function(a,b,c){"use strict";function d(a){a&&a.el||e.error("EventBus initialized without el"),this.$el=f.element(a.el)}var e=c(4),f=c(3);e.mixin(d.prototype,{trigger:function(a,b,c,d){var f=e.Event("autocomplete:"+a);return this.$el.trigger(f,[b,c,d]),f}}),a.exports=d},function(a,b,c){"use strict";function d(a){var b,c,d,f,g=this;a=a||{},a.input||i.error("input is missing"),b=i.bind(this._onBlur,this),c=i.bind(this._onFocus,this),d=i.bind(this._onKeydown,this),f=i.bind(this._onInput,this),this.$hint=j.element(a.hint),this.$input=j.element(a.input).on("blur.aa",b).on("focus.aa",c).on("keydown.aa",d),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=i.noop),i.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",function(a){h[a.which||a.keyCode]||i.defer(i.bind(g._onInput,g,a))}):this.$input.on("input.aa",f),this.query=this.$input.val(),this.$overflowHelper=e(this.$input)}function e(a){return j.element('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:a.css("font-family"),fontSize:a.css("font-size"),fontStyle:a.css("font-style"),fontVariant:a.css("font-variant"),fontWeight:a.css("font-weight"),wordSpacing:a.css("word-spacing"),letterSpacing:a.css("letter-spacing"),textIndent:a.css("text-indent"),textRendering:a.css("text-rendering"),textTransform:a.css("text-transform")}).insertAfter(a)}function f(a,b){return d.normalizeQuery(a)===d.normalizeQuery(b)}function g(a){return a.altKey||a.ctrlKey||a.metaKey||a.shiftKey}var h;h={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var i=c(4),j=c(3),k=c(8);d.normalizeQuery=function(a){return(a||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},i.mixin(d.prototype,k,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(a){var b=h[a.which||a.keyCode];this._managePreventDefault(b,a),b&&this._shouldTrigger(b,a)&&this.trigger(b+"Keyed",a)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(a,b){var c,d,e;switch(a){case"tab":d=this.getHint(),e=this.getInputValue(),c=d&&d!==e&&!g(b);break;case"up":case"down":c=!g(b);break;default:c=!1}c&&b.preventDefault()},_shouldTrigger:function(a,b){var c;switch(a){case"tab":c=!g(b);break;default:c=!0}return c},_checkInputValue:function(){var a,b,c;a=this.getInputValue(),b=f(a,this.query),c=!(!b||!this.query)&&this.query.length!==a.length,this.query=a,b?c&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(a){this.query=a},getInputValue:function(){return this.$input.val()},setInputValue:function(a,b){void 0===a&&(a=this.query),this.$input.val(a),b?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(a){this.$input.attr("aria-activedescendant",a)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(a){this.$hint.val(a)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var a,b,c,d;a=this.getInputValue(),b=this.getHint(),c=a!==b&&0===b.indexOf(a),(d=""!==a&&c&&!this.hasOverflow())||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var a=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=a},isCursorAtEnd:function(){var a,b,c;return a=this.$input.val().length,b=this.$input[0].selectionStart,i.isNumber(b)?b===a:!document.selection||(c=document.selection.createRange(),c.moveStart("character",-a),a===c.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),a.exports=d},function(a,b,c){"use strict";function d(a,b,c,d){var e;if(!c)return this;for(b=b.split(l),c=d?j(c,d):c,this._callbacks=this._callbacks||{};e=b.shift();)this._callbacks[e]=this._callbacks[e]||{sync:[],async:[]},this._callbacks[e][a].push(c);return this}function e(a,b,c){return d.call(this,"async",a,b,c)}function f(a,b,c){return d.call(this,"sync",a,b,c)}function g(a){var b;if(!this._callbacks)return this;for(a=a.split(l);b=a.shift();)delete this._callbacks[b];return this}function h(a){var b,c,d,e,f;if(!this._callbacks)return this;for(a=a.split(l),d=[].slice.call(arguments,1);(b=a.shift())&&(c=this._callbacks[b]);)e=i(c.sync,this,[b].concat(d)),f=i(c.async,this,[b].concat(d)),e()&&k(f);return this}function i(a,b,c){function d(){for(var d,e=0,f=a.length;!d&&e1)for(var c=1;c1)for(var c=1;c
      '),this.$menu.append(this.$empty),this.$empty.hide()),this.datasets=f.map(a.datasets,function(b){return e(h.$menu,b,a.cssClasses)}),f.each(this.datasets,function(a){var b=a.getRoot();b&&0===b.parent().length&&h.$menu.append(b),a.onSync("rendered",h._onRendered,h)}),a.templates&&a.templates.footer&&(this.templates.footer=f.templatify(a.templates.footer),this.$menu.append(this.templates.footer()));var k=this;g.element(window).resize(function(){k._redraw()})}function e(a,b,c){return new d.Dataset(f.mixin({$menu:a,cssClasses:c},b))}var f=c(4),g=c(3),h=c(8),i=c(17),j=c(19);f.mixin(d.prototype,h,{_onSuggestionClick:function(a){this.trigger("suggestionClicked",g.element(a.currentTarget))},_onSuggestionMouseEnter:function(a){var b=g.element(a.currentTarget);if(!b.hasClass(f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))){this._removeCursor();var c=this;setTimeout(function(){c._setCursor(b,!1)},0)}},_onSuggestionMouseLeave:function(a){if(a.relatedTarget){if(g.element(a.relatedTarget).closest("."+f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0)return}this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(a,b){function c(a){return a.isEmpty()}function d(a){return a.templates&&a.templates.empty}if(this.isEmpty=f.every(this.datasets,c),this.isEmpty)if(b.length>=this.minLength&&this.trigger("empty"),this.$empty)if(b.length=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(f.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(f.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(a,b){a.first().addClass(f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",b)},_removeCursor:function(){this._getCursor().removeClass(f.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(a){var b,c,d,e;if(this.isOpen){if(c=this._getCursor(),b=this._getSuggestions(),this._removeCursor(),d=b.index(c)+a,(d=(d+1)%(b.length+1)-1)===-1)return void this.trigger("cursorRemoved");d<-1&&(d=b.length-1),this._setCursor(e=b.eq(d),!0),this._ensureVisible(e)}},_ensureVisible:function(a){var b,c,d,e;b=a.position().top,c=b+a.height()+parseInt(a.css("margin-top"),10)+parseInt(a.css("margin-bottom"),10),d=this.$menu.scrollTop(),e=this.$menu.height()+parseInt(this.$menu.css("padding-top"),10)+parseInt(this.$menu.css("padding-bottom"),10),b<0?this.$menu.scrollTop(d+b):e0?l.element(a.$menu.find(b+"-"+this.name)[0]):l.element(m.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=a.$menu,this.clearCachedSuggestions()}function e(a){function b(b){return b[a]}return a=a||"value",k.isFunction(a)?a:b}function f(a,b){function c(a){return"

      "+b(a)+"

      "}return{empty:a.empty&&k.templatify(a.empty),header:a.header&&k.templatify(a.header),footer:a.footer&&k.templatify(a.footer),suggestion:a.suggestion||c}}function g(a){return/^[_a-zA-Z0-9-]+$/.test(a)}var h="aaDataset",i="aaValue",j="aaDatum",k=c(4),l=c(3),m=c(18),n=c(19),o=c(8);d.extractDatasetName=function(a){return l.element(a).data(h)},d.extractValue=function(a){return l.element(a).data(i)},d.extractDatum=function(a){var b=l.element(a).data(j);return"string"==typeof b&&(b=JSON.parse(b)),b},k.mixin(d.prototype,o,{_render:function(a,b){function c(){var b=[].slice.call(arguments,0);return b=[{query:a,isEmpty:!0}].concat(b),n.templates.empty.apply(this,b)}function d(){function a(a){var b,c=m.suggestion.replace("%PREFIX%",f.cssClasses.prefix).replace("%SUGGESTION%",f.cssClasses.suggestion);return b=l.element(c).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(n.templates.suggestion.apply(this,[a].concat(e))),b.data(h,n.name),b.data(i,n.displayFn(a)||void 0),b.data(j,JSON.stringify(a)),b.children().each(function(){l.element(this).css(f.css.suggestionChild)}),b}var c,d,e=[].slice.call(arguments,0),f=this,g=m.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return c=l.element(g).css(this.css.suggestions),d=k.map(b,a),c.append.apply(c,d),c}function e(){var b=[].slice.call(arguments,0);return b=[{query:a,isEmpty:!g}].concat(b),n.templates.header.apply(this,b)}function f(){var b=[].slice.call(arguments,0);return b=[{query:a,isEmpty:!g}].concat(b),n.templates.footer.apply(this,b)}if(this.$el){var g,n=this,o=[].slice.call(arguments,2);if(this.$el.empty(),g=b&&b.length,this._isEmpty=!g,!g&&this.templates.empty)this.$el.html(c.apply(this,o)).prepend(n.templates.header?e.apply(this,o):null).append(n.templates.footer?f.apply(this,o):null);else if(g)this.$el.html(d.apply(this,o)).prepend(n.templates.header?e.apply(this,o):null).append(n.templates.footer?f.apply(this,o):null);else if(b&&!Array.isArray(b))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(g?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(g?"without":"with")+"-"+this.name),this.trigger("rendered",a)}},getRoot:function(){return this.$el},update:function(a){function b(b){if(!this.canceled&&a===this.query){var c=[].slice.call(arguments,1);this.cacheSuggestions(a,b,c),this._render.apply(this,[a,b].concat(c))}}if(this.query=a,this.canceled=!1,this.shouldFetchFromCache(a))b.apply(this,[this.cachedSuggestions].concat(this.cachedRenderExtraArgs));else{var c=this,d=function(){c.canceled||c.source(a,b.bind(c))};if(this.debounce){var e=function(){c.debounceTimeout=null,d()};clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(e,this.debounce)}else d()}},cacheSuggestions:function(a,b,c){this.cachedQuery=a,this.cachedSuggestions=b,this.cachedRenderExtraArgs=c},shouldFetchFromCache:function(a){return this.cache&&this.cachedQuery===a&&this.cachedSuggestions&&this.cachedSuggestions.length},clearCachedSuggestions:function(){delete this.cachedQuery,delete this.cachedSuggestions,delete this.cachedRenderExtraArgs},cancel:function(){this.canceled=!0},clear:function(){this.$el&&(this.cancel(),this.$el.empty(),this.trigger("rendered",""))},isEmpty:function(){return this._isEmpty},destroy:function(){this.clearCachedSuggestions(),this.$el=null}}),a.exports=d},function(a,b){"use strict";a.exports={wrapper:'',dropdown:'',dataset:'
      ',suggestions:'',suggestion:'
      '}},function(a,b,c){"use strict";var d=c(4),e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",noPrefix:!1,dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};d.isMsie()&&d.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),d.isMsie()&&d.isMsie()<=7&&d.mixin(e.input,{marginTop:"-1px"}),a.exports=e},function(a,b,c){"use strict";a.exports={hits:c(21),popularIn:c(24)}},function(a,b,c){"use strict";var d=c(4),e=c(22),f=c(23),g=function(){function a(a,d){return window.Promise.resolve().then(function(){return b.length&&(e=a.search(b),b=[]),e}).then(function(a){if(a)return c=a.results,c[d]})}var b=[],c=[],e=window.Promise.resolve();return function(c,e){return function(f,g){a(c.as,b.push({indexName:c.indexName,query:f,params:e})-1).then(function(a){a&&g(a.hits,a)}).catch(function(a){d.error(a.message)})}}}();a.exports=function(a,b){var c=f(a.as._ua);if(c&&c[0]>=3&&c[1]>20){var d="autocomplete.js "+e;a.as._ua.indexOf(d)===-1&&(a.as._ua+="; "+d)}return g(a,b)}},function(a,b){a.exports="0.38.1"},function(a,b){"use strict";a.exports=function(a){var b=a.match(/Algolia for JavaScript \((\d+\.)(\d+\.)(\d+)\)/)||a.match(/Algolia for vanilla JavaScript (\d+\.)(\d+\.)(\d+)/);if(b)return[b[1],b[2],b[3]]}},function(a,b,c){"use strict";var d=c(4),e=c(22),f=c(23);a.exports=function(a,b,c,g){function h(h,i){a.search(h,b,function(a,h){if(a)return void d.error(a.message);if(h.hits.length>0){var l=h.hits[0],m=d.mixin({hitsPerPage:0},c);delete m.source,delete m.index;var n=f(k.as._ua);return n&&n[0]>=3&&n[1]>20&&(b.additionalUA="autocomplete.js "+e),void k.search(j(l),m,function(a,b){if(a)return void d.error(a.message);var c=[];if(g.includeAll){var e=g.allTitle||"All departments";c.push(d.mixin({facet:{value:e,count:b.nbHits}},d.cloneDeep(l)))}d.each(b.facets,function(a,b){d.each(a,function(a,e){c.push(d.mixin({facet:{facet:b,value:e,count:a}},d.cloneDeep(l)))})});for(var f=1;f=3&&i[1]>20&&(b=b||{},b.additionalUA="autocomplete.js "+e),!c.source)return d.error("Missing 'source' key");var j=d.isFunction(c.source)?c.source:function(a){return a[c.source]};if(!c.index)return d.error("Missing 'index' key");var k=c.index;return g=g||{},h}}])}); \ No newline at end of file diff --git a/themes/FixIt/assets/lib/cell-watermark/watermark.min.js b/themes/FixIt/assets/lib/cell-watermark/watermark.min.js new file mode 100644 index 0000000..848e4b3 --- /dev/null +++ b/themes/FixIt/assets/lib/cell-watermark/watermark.min.js @@ -0,0 +1 @@ +(function(e,t){"function"==typeof define&&define.amd?define([],t()):"object"==typeof module&&module.exports?module.exports=t():e.Watermark=t()})(this,function(){function e(t={}){var n=e.prototype;this.options=t,s(this),d(this,this.options),h(this),p(this),n.upload=function(e){if(e){o.disconnect(),i.disconnect(),this.options.content=e;for(const t of this._container.querySelectorAll(".cell-watermark"))t.innerHTML=e;o.observe(this._container.parentNode,{childList:!0,subtree:!0}),i.observe(this._container,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}},n.render=function(e={}){l(this,Object.assign(this.options,e))},n.destroy=function(){i.disconnect(),o.disconnect(),window.removeEventListener("resize",r),this._container.parentNode.removeChild(this._container)}}var t,n,i,o,r,c=window.outerWidth,a=window.outerHeight,s=function(e){e._container=document.createElement("div"),e._container.classList.add("cell-watermark-container"),e._container.style.cssText="display: block; pointer-events: none;",e._container.setAttribute("aria-hidden",!0),t=document.querySelector(e.options.appendTo)||document.body,t.appendChild(e._container)},d=function(e,t){t.rowSpacing=t.rowSpacing||60,t.colSpacing=t.colSpacing||30,t.width=t.width||150,t.height=t.height||20;let i=parseInt(a/(t.height+t.rowSpacing)),o=parseInt(c/(t.width+t.colSpacing)),r=(c-t.width*o-t.colSpacing*(o-1))/2,s=(a-t.height*i-t.rowSpacing*(i-1))/2,d=document.createElement("div");d.classList.add("cell-watermark"),d.style.cssText="transform: rotate(15deg); opacity: 0.1; font-size: 0.85rem; text-align: center;position: fixed; user-select: none; word-break: break-all; overflow: hidden; z-index: 999999;";for(let n=0;n0&&0===document.querySelectorAll(".cell-watermark-container").length&&t.appendChild(n)}),o.observe(e._container.parentNode,{childList:!0,subtree:!0})},p=function(e){r=function(){window.outerHeight===a&&window.outerWidth===c||(a=window.outerHeight,c=window.outerWidth,l(e,e.options))},window.addEventListener("resize",r)};return e}); \ No newline at end of file diff --git a/themes/FixIt/assets/lib/cookieconsent/cookieconsent.min.css b/themes/FixIt/assets/lib/cookieconsent/cookieconsent.min.css new file mode 100644 index 0000000..d4d4390 --- /dev/null +++ b/themes/FixIt/assets/lib/cookieconsent/cookieconsent.min.css @@ -0,0 +1,6 @@ +.cc-window{opacity:1;-webkit-transition:opacity 1s ease;transition:opacity 1s ease}.cc-window.cc-invisible{opacity:0}.cc-animate.cc-revoke{-webkit-transition:transform 1s ease;-webkit-transition:-webkit-transform 1s ease;transition:-webkit-transform 1s ease;transition:transform 1s ease;transition:transform 1s ease,-webkit-transform 1s ease}.cc-animate.cc-revoke.cc-top{-webkit-transform:translateY(-2em);transform:translateY(-2em)}.cc-animate.cc-revoke.cc-bottom{-webkit-transform:translateY(2em);transform:translateY(2em)}.cc-animate.cc-revoke.cc-active.cc-top{-webkit-transform:translateY(0);transform:translateY(0)}.cc-animate.cc-revoke.cc-active.cc-bottom{-webkit-transform:translateY(0);transform:translateY(0)}.cc-revoke:hover{-webkit-transform:translateY(0);transform:translateY(0)}.cc-grower{max-height:0;overflow:hidden;-webkit-transition:max-height 1s;transition:max-height 1s} +.cc-revoke,.cc-window{position:fixed;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Helvetica,Calibri,Arial,sans-serif;font-size:16px;line-height:1.5em;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;z-index:9999}.cc-window.cc-static{position:static}.cc-window.cc-floating{padding:2em;max-width:24em;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner{padding:1em 1.8em;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.cc-revoke{padding:.5em}.cc-revoke:hover{text-decoration:underline}.cc-header{font-size:18px;font-weight:700}.cc-btn,.cc-close,.cc-link,.cc-revoke{cursor:pointer}.cc-link{opacity:.8;display:inline-block;padding:.2em;text-decoration:underline}.cc-link:hover{opacity:1}.cc-link:active,.cc-link:visited{color:initial}.cc-btn{display:block;padding:.4em .8em;font-size:.9em;font-weight:700;border-width:2px;border-style:solid;text-align:center;white-space:nowrap}.cc-highlight .cc-btn:first-child{background-color:transparent;border-color:transparent}.cc-highlight .cc-btn:first-child:focus,.cc-highlight .cc-btn:first-child:hover{background-color:transparent;text-decoration:underline}.cc-close{display:block;position:absolute;top:.5em;right:.5em;font-size:1.6em;opacity:.9;line-height:.75}.cc-close:focus,.cc-close:hover{opacity:1} +.cc-revoke.cc-top{top:0;left:3em;border-bottom-left-radius:.5em;border-bottom-right-radius:.5em}.cc-revoke.cc-bottom{bottom:0;left:3em;border-top-left-radius:.5em;border-top-right-radius:.5em}.cc-revoke.cc-left{left:3em;right:unset}.cc-revoke.cc-right{right:3em;left:unset}.cc-top{top:1em}.cc-left{left:1em}.cc-right{right:1em}.cc-bottom{bottom:1em}.cc-floating>.cc-link{margin-bottom:1em}.cc-floating .cc-message{display:block;margin-bottom:1em}.cc-window.cc-floating .cc-compliance{-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto}.cc-window.cc-banner{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cc-banner.cc-top{left:0;right:0;top:0}.cc-banner.cc-bottom{left:0;right:0;bottom:0}.cc-banner .cc-message{display:block;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;max-width:100%;margin-right:1em}.cc-compliance{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:justify;align-content:space-between}.cc-floating .cc-compliance>.cc-btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.cc-btn+.cc-btn{margin-left:.5em} +@media print{.cc-revoke,.cc-window{display:none}}@media screen and (max-width:900px){.cc-btn{white-space:normal}}@media screen and (max-width:414px) and (orientation:portrait),screen and (max-width:736px) and (orientation:landscape){.cc-window.cc-top{top:0}.cc-window.cc-bottom{bottom:0}.cc-window.cc-banner,.cc-window.cc-floating,.cc-window.cc-left,.cc-window.cc-right{left:0;right:0}.cc-window.cc-banner{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.cc-window.cc-banner .cc-compliance{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.cc-window.cc-floating{max-width:none}.cc-window .cc-message{margin-bottom:1em}.cc-window.cc-banner{-webkit-box-align:unset;-ms-flex-align:unset;align-items:unset}.cc-window.cc-banner .cc-message{margin-right:0}} +.cc-floating.cc-theme-classic{padding:1.2em;border-radius:5px}.cc-floating.cc-type-info.cc-theme-classic .cc-compliance{text-align:center;display:inline;-webkit-box-flex:0;-ms-flex:none;flex:none}.cc-theme-classic .cc-btn{border-radius:5px}.cc-theme-classic .cc-btn:last-child{min-width:140px}.cc-floating.cc-type-info.cc-theme-classic .cc-btn{display:inline-block} +.cc-theme-edgeless.cc-window{padding:0}.cc-floating.cc-theme-edgeless .cc-message{margin:2em;margin-bottom:1.5em}.cc-banner.cc-theme-edgeless .cc-btn{margin:0;padding:.8em 1.8em;height:100%}.cc-banner.cc-theme-edgeless .cc-message{margin-left:1em}.cc-floating.cc-theme-edgeless .cc-btn+.cc-btn{margin-left:0} \ No newline at end of file diff --git a/themes/FixIt/assets/lib/cookieconsent/cookieconsent.min.js b/themes/FixIt/assets/lib/cookieconsent/cookieconsent.min.js new file mode 100644 index 0000000..1e3dccf --- /dev/null +++ b/themes/FixIt/assets/lib/cookieconsent/cookieconsent.min.js @@ -0,0 +1 @@ +!function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){return e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(e){return t(arguments[1])||""})},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return t.length<2?void 0:t.pop().split(";").shift()},setCookie:function(e,t,i,n,o,s){var r=new Date;r.setHours(r.getHours()+24*(i||365));var a=[e+"="+t,"expires="+r.toUTCString(),"path="+(o||"/")];n&&a.push("domain="+n),s&&a.push("secure"),document.cookie=a.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n=0;if(0===e.length)return n;for(t=0,i=e.length;t=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var n={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"https://www.cookiesandyou.com",close:"❌",target:"_blank",policy:"Cookie Policy"},elements:{header:'{{header}} ',message:'{{message}}',messagelink:'{{message}}
      {{link}}',dismiss:'{{dismiss}}',allow:'{{allow}}',deny:'{{deny}}',link:'{{link}}',close:'{{close}}'},window:'',revokeBtn:'
      {{policy}}
      ',compliance:{info:'
      {{dismiss}}
      ',"opt-in":'
      {{deny}}{{allow}}
      ',"opt-out":'
      {{deny}}{{allow}}
      '},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function r(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function c(n){var o=this.options,s=document.createElement("div"),r=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var a=s.children[0];return a.style.display="none",t.hasClass(a,"cc-window")&&e.hasTransition&&t.addClass(a,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0));t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),a.addEventListener("click",this.onButtonClick),o.autoAttach&&(r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a)),a}function l(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i=0;o&&t(n);return o}.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options,n="top"==i.position||"bottom"==i.position?"banner":"floating";t.isMobile()&&(n="floating");var o=["cc-"+n,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&o.push("cc-static");o.push.apply(o,a.call(this));(function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],a.padding&&s[o+" .cc-btn"].push("padding: "+a.padding),"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(a.hover||l(a.background))]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var h=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++h)}(n,i,"."+o);return s}).call(this,this.options.palette);this.customStyleSelector&&o.push(this.customStyleSelector);return o}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message);Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var n=i.compliance[i.type];n||(n=i.compliance.info);e.compliance=t.interpolateString(n,function(t){return e[t]});var o=i.layouts[i.layout];o||(o=i.layouts.basic);return t.interpolateString(o,function(t){return e[t]})}.call(this)),s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var r=c.call(this,'
      '+o+"
      ");r.style.display="",this.element=r.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=c.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout;"number"==typeof o&&o>=0&&(this.dismissTimeout=window.setTimeout(function(){i(e.status.dismiss),n(!0)},Math.floor(o)));var s=this.options.dismissOnScroll;if("number"==typeof s&&s>=0){var r=function(t){window.pageYOffset>Math.floor(s)&&(i(e.status.dismiss),n(!0),window.removeEventListener("scroll",r),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=r,window.addEventListener("scroll",r))}var a=this.options.dismissOnWindowClick,c=this.options.ignoreClicksFrom;if(a){var l=function(o){for(var s=!1,r=o.path.length,a=c.length,u=0;uo&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen()},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&r.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=r.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}},function(t){e(s(t))}):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r3&&t(s)}),s.send(n)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,n,o){var s=new e.Law(i.law);n||(n=function(){}),o||(o=function(){});var r=Object.keys(e.status),a=t.getCookie("cookieconsent_status");r.indexOf(a)>=0?n(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))},function(t){delete i.law,delete i.location,o(t,new e.Popup(i))})},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{}); \ No newline at end of file diff --git a/themes/FixIt/assets/lib/crypto-js/core.js b/themes/FixIt/assets/lib/crypto-js/core.js new file mode 100644 index 0000000..e3a498b --- /dev/null +++ b/themes/FixIt/assets/lib/crypto-js/core.js @@ -0,0 +1,807 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /*globals window, global, require*/ + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + + var crypto; + + // Native crypto from window (Browser) + if (typeof window !== 'undefined' && window.crypto) { + crypto = window.crypto; + } + + // Native crypto in web worker (Browser) + if (typeof self !== 'undefined' && self.crypto) { + crypto = self.crypto; + } + + // Native crypto from worker + if (typeof globalThis !== 'undefined' && globalThis.crypto) { + crypto = globalThis.crypto; + } + + // Native (experimental IE 11) crypto from window (Browser) + if (!crypto && typeof window !== 'undefined' && window.msCrypto) { + crypto = window.msCrypto; + } + + // Native crypto from global (NodeJS) + if (!crypto && typeof global !== 'undefined' && global.crypto) { + crypto = global.crypto; + } + + // Native crypto import via require (NodeJS) + if (!crypto && typeof require === 'function') { + try { + crypto = require('crypto'); + } catch (err) {} + } + + /* + * Cryptographically secure pseudorandom number generator + * + * As Math.random() is cryptographically not safe to use + */ + var cryptoSecureRandomInt = function () { + if (crypto) { + // Use getRandomValues method (Browser) + if (typeof crypto.getRandomValues === 'function') { + try { + return crypto.getRandomValues(new Uint32Array(1))[0]; + } catch (err) {} + } + + // Use randomBytes method (NodeJS) + if (typeof crypto.randomBytes === 'function') { + try { + return crypto.randomBytes(4).readInt32LE(); + } catch (err) {} + } + } + + throw new Error('Native crypto module could not be used to get secure random number.'); + }; + + /* + * Local polyfill of Object.create + + */ + var create = Object.create || (function () { + function F() {} + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()); + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var j = 0; j < thatSigBytes; j += 4) { + thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + for (var i = 0; i < nBytes; i += 4) { + words.push(cryptoSecureRandomInt()); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + var processedWords; + + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/themes/FixIt/assets/lib/crypto-js/enc-base64.js b/themes/FixIt/assets/lib/crypto-js/enc-base64.js new file mode 100644 index 0000000..0ffcd53 --- /dev/null +++ b/themes/FixIt/assets/lib/crypto-js/enc-base64.js @@ -0,0 +1,136 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64; + +})); \ No newline at end of file diff --git a/themes/FixIt/assets/lib/crypto-js/md5.js b/themes/FixIt/assets/lib/crypto-js/md5.js new file mode 100644 index 0000000..12b0fdd --- /dev/null +++ b/themes/FixIt/assets/lib/crypto-js/md5.js @@ -0,0 +1,268 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + return CryptoJS.MD5; + +})); \ No newline at end of file diff --git a/themes/FixIt/assets/lib/crypto-js/sha256.js b/themes/FixIt/assets/lib/crypto-js/sha256.js new file mode 100644 index 0000000..de2d7fc --- /dev/null +++ b/themes/FixIt/assets/lib/crypto-js/sha256.js @@ -0,0 +1,199 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); \ No newline at end of file diff --git a/themes/FixIt/assets/lib/echarts/echarts.min.js b/themes/FixIt/assets/lib/echarts/echarts.min.js new file mode 100644 index 0000000..0b1ab37 --- /dev/null +++ b/themes/FixIt/assets/lib/echarts/echarts.min.js @@ -0,0 +1,45 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,(function(t){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);var o="sans-serif",a="12px sans-serif";var s,l,u=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)o=r*t.length;else for(var c=0;c>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,a),a,o);if(s)return s(t,n,i),!0}return!1}function Jt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Qt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,te=[],ee=r.browser.firefox&&+r.browser.version.split(".")[0]<39;function ne(t,e,n,i){return n=n||{},i?ie(t,e,n):ee&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):ie(t,e,n),n}function ie(t,e,n){if(r.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if(Jt(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=o-a.top)}if($t(te,t,i,o))return n.zrX=te[0],void(n.zrY=te[1])}n.zrX=n.zrY=0}function re(t){return t||window.event}function oe(t,e,n){if(null!=(e=re(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&ne(t,r,e,n)}else{ne(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&Qt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ae(t,e,n,i){t.addEventListener(e,n,i)}var se=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function le(t){return 2===t.which||3===t.which}var ue=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=he(r)/he(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},pe="silent";function de(){se(this.event)}var fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Xt),ge=function(t,e){this.x=t,this.y=e},ye=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ve=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new ge(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new fe,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new Ut(o),o}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(E(ye,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=xe(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new ge(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new ge(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:de}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new ge(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=me(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==pe)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new ue);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new ge;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(Xt);function me(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||pe}return!1}function xe(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ve.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=xe(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Et(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));function _e(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function be(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function we(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function Se(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Me(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=Se(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=we(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-we(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=_e(t,n,i,e))s&&(l=s),be(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var Te=!1;function Ce(){Te||(Te=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function De(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Ae=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=De}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(Ce(),u.z=0),isNaN(u.z2)&&(Ce(),u.z2=0),isNaN(u.zlevel)&&(Ce(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),ke=r.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Le={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Le.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Le.bounceIn(2*t):.5*Le.bounceOut(2*t-1)+.5}},Pe=Math.pow,Oe=Math.sqrt,Re=1e-8,Ne=1e-4,Ee=Oe(3),ze=1/3,Ve=wt(),Be=wt(),Fe=wt();function Ge(t){return t>-1e-8&&tRe||t<-1e-8}function He(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Ye(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Ue(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(Ge(h)&&Ge(c)){if(Ge(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(Ge(f)){var g=c/h,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=Oe(f),m=h*s+1.5*a*(-c+v),x=h*s+1.5*a*(-c-v);(M=(-s-((m=m<0?-Pe(-m,ze):Pe(m,ze))+(x=x<0?-Pe(-x,ze):Pe(x,ze))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var _=(2*h*s-3*a*c)/(2*Oe(h*h*h)),b=Math.acos(_)/3,w=Oe(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(y=(-s+w*(S+Ee*Math.sin(b)))/(3*a),(-s+w*(S-Ee*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y),I>=0&&I<=1&&(o[d++]=I)}}return d}function Xe(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Ge(a)){if(We(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(Ge(u))r[0]=-o/(2*a);else if(u>0){var h,c=Oe(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function Ze(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function je(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;Ve[0]=l,Ve[1]=u;for(var m=0;m<1;m+=.05)Be[0]=He(t,n,r,a,m),Be[1]=He(e,i,o,s,m),(f=Vt(Ve,Be))=0&&f=0&&y=1?1:Ue(0,i,o,1,t,s)&&He(0,r,a,1,s[0])}}}var on=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||xt,this.ondestroy=t.ondestroy||xt,this.onrestart=t.onrestart||xt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=U(t)?t:Le[t]||rn(t)},t}(),an=function(t){this.value=t},sn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new an(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),ln=function(){function t(t){this._list=new sn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new an(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),un={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function hn(t){return(t=Math.round(t))<0?0:t>255?255:t}function cn(t){return t<0?0:t>1?1:t}function pn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?hn(parseFloat(e)/100*255):hn(parseInt(e,10))}function dn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?cn(parseFloat(e)/100):cn(parseFloat(e))}function fn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function gn(t,e,n){return t+(e-t)*n}function yn(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function vn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var mn=new ln(20),xn=null;function _n(t,e){xn&&vn(xn,e),xn=mn.put(t,xn||e.slice())}function bn(t,e){if(t){e=e||[];var n=mn.get(t);if(n)return vn(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in un)return vn(e,un[i]),_n(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(yn(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),_n(t,e),e):void yn(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(yn(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),_n(t,e),e):void yn(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?yn(e,+u[0],+u[1],+u[2],1):yn(e,0,0,0,1);h=dn(u.pop());case"rgb":return 3!==u.length?void yn(e,0,0,0,1):(yn(e,pn(u[0]),pn(u[1]),pn(u[2]),h),_n(t,e),e);case"hsla":return 4!==u.length?void yn(e,0,0,0,1):(u[3]=dn(u[3]),wn(u,e),_n(t,e),e);case"hsl":return 3!==u.length?void yn(e,0,0,0,1):(wn(u,e),_n(t,e),e);default:return}}yn(e,0,0,0,1)}}function wn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=dn(t[1]),r=dn(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return yn(e=e||[],hn(255*fn(a,o,n+1/3)),hn(255*fn(a,o,n)),hn(255*fn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Sn(t,e){var n=bn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return kn(n,4===n.length?"rgba":"rgb")}}function Mn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=hn(gn(a[0],s[0],l)),n[1]=hn(gn(a[1],s[1],l)),n[2]=hn(gn(a[2],s[2],l)),n[3]=cn(gn(a[3],s[3],l)),n}}var In=Mn;function Tn(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=bn(e[r]),s=bn(e[o]),l=i-r,u=kn([hn(gn(a[0],s[0],l)),hn(gn(a[1],s[1],l)),hn(gn(a[2],s[2],l)),cn(gn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var Cn=Tn;function Dn(t,e,n,i){var r=bn(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=dn(n)),null!=i&&(r[2]=dn(i)),kn(wn(r),"rgba")}function An(t,e){var n=bn(t);if(n&&null!=e)return n[3]=cn(e),kn(n,"rgba")}function kn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Ln(t,e){var n=bn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var Pn=Object.freeze({__proto__:null,parse:bn,lift:Sn,toHex:function(t){var e=bn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:Mn,fastMapToColor:In,lerp:Tn,mapToColor:Cn,modifyHSL:Dn,modifyAlpha:An,stringify:kn,lum:Ln,random:function(){return kn([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}}),On=Math.round;function Rn(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=bn(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var Nn=1e-4;function En(t){return t-1e-4}function zn(t){return On(1e3*t)/1e3}function Vn(t){return On(1e4*t)/1e4}var Bn={left:"start",right:"end",center:"middle",middle:"middle"};function Fn(t){return t&&!!t.image}function Gn(t){return"linear"===t.type}function Wn(t){return"radial"===t.type}function Hn(t){return"url(#"+t+")"}function Yn(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Un(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*_t,r=rt(t.scaleX,1),o=rt(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+On(a*_t)+"deg, "+On(s*_t)+"deg)"),l.join(" ")}var Xn=r.hasGlobalWindow&&U(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},Zn=Array.prototype.slice;function jn(t,e,n){return(e-t)*n+t}function qn(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(N(e)){var l=function(t){return N(t&&t[0])?2:1}(e);a=l,(1===l&&!j(e[0])||2===l&&!j(e[0][0]))&&(o=!0)}else if(j(e)&&!nt(e))a=0;else if(X(e))if(isNaN(+e)){var u=bn(e);u&&(s=u,a=3)}else a=0;else if(Q(e)){var h=A({},s);h.colorStops=z(e.colorStops,(function(t){return{offset:t.offset,color:bn(t.color)}})),Gn(e)?a=4:Wn(e)&&(a=5),s=h}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=U(n)?n:Le[n]||rn(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=ii(i),l=ni(i),u=0;u=0&&!(l[n].percent<=e);n--);n=d(n,u-2)}else{for(n=p;ne);n++);n=d(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:d((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var y=o?this._additiveValue:c?ri:t[h];if(!ii(s)&&!c||y||(y=this._additiveValue=[]),this.discrete)t[h]=g<1?i.rawValue:r.rawValue;else if(ii(s))1===s?qn(y,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,ti(l),i),this._trackKeys.push(a)}s.addKeyframe(t,ti(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function si(){return(new Date).getTime()}var li,ui,hi=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=si()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,ke((function e(){t._running&&(ke(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=si(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=si(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=si()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new ai(t,e.loop);return this.addAnimator(n),n},e}(Xt),ci=r.domSupported,pi=(ui={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:li=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:z(li,(function(t){var e=t.replace("mouse","pointer");return ui.hasOwnProperty(e)?e:t}))}),di=["mousemove","mouseup"],fi=["pointermove","pointerup"],gi=!1;function yi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function vi(t){t&&(t.zrByTouch=!0)}function mi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var xi=function(t,e){this.stopPropagation=xt,this.stopImmediatePropagation=xt,this.preventDefault=xt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},_i={mousedown:function(t){t=oe(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=oe(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=oe(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){mi(this,(t=oe(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){gi=!0,t=oe(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){gi||(t=oe(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){vi(t=oe(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),_i.mousemove.call(this,t),_i.mousedown.call(this,t)},touchmove:function(t){vi(t=oe(this.dom,t)),this.handler.processGesture(t,"change"),_i.mousemove.call(this,t)},touchend:function(t){vi(t=oe(this.dom,t)),this.handler.processGesture(t,"end"),_i.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&_i.click.call(this,t)},pointerdown:function(t){_i.mousedown.call(this,t)},pointermove:function(t){yi(t)||_i.mousemove.call(this,t)},pointerup:function(t){_i.mouseup.call(this,t)},pointerout:function(t){yi(t)||_i.mouseout.call(this,t)}};E(["click","dblclick","contextmenu"],(function(t){_i[t]=function(e){e=oe(this.dom,e),this.trigger(t,e)}}));var bi={pointermove:function(t){yi(t)||bi.mousemove.call(this,t)},pointerup:function(t){bi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function wi(t,e){var n=e.domHandlers;r.pointerEventsSupported?E(pi.pointer,(function(i){Mi(e,i,(function(e){n[i].call(t,e)}))})):(r.touchEventsSupported&&E(pi.touch,(function(i){Mi(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),E(pi.mouse,(function(i){Mi(e,i,(function(r){r=re(r),e.touching||n[i].call(t,r)}))})))}function Si(t,e){function n(n){Mi(e,n,(function(i){i=re(i),mi(t,i.target)||(i=function(t,e){return oe(t.dom,new xi(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}r.pointerEventsSupported?E(fi,n):r.touchEventsSupported||E(di,n)}function Mi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,ae(t.domTarget,e,n,i)}function Ii(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],e.removeEventListener(n,i,r));t.mounted={}}var Ti=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Ci=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new Ti(e,_i),ci&&(i._globalHandlerScope=new Ti(document,bi)),wi(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){Ii(this._localHandlerScope),ci&&Ii(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,ci&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?Si(this,e):Ii(e)}},e}(Xt),Di=1;r.hasGlobalWindow&&(Di=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Ai=Di,ki="#333",Li="#ccc";function Pi(){return[1,0,0,1,0,0]}function Oi(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Ri(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ni(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function Ei(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function zi(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function Vi(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function Bi(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function Fi(t){var e=[1,0,0,1,0,0];return Ri(e,t),e}var Gi=Object.freeze({__proto__:null,create:Pi,identity:Oi,copy:Ri,mul:Ni,translate:Ei,rotate:zi,scale:Vi,invert:Bi,clone:Fi}),Wi=Oi,Hi=5e-5;function Yi(t){return t>Hi||t<-5e-5}var Ui=[],Xi=[],Zi=[1,0,0,1,0,0],ji=Math.abs,qi=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Yi(this.rotation)||Yi(this.x)||Yi(this.y)||Yi(this.scaleX-1)||Yi(this.scaleY-1)||Yi(this.skewX)||Yi(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):Wi(n),t&&(e?Ni(n,t,n):Ri(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&Wi(n)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Ui);var n=Ui[0]<0?-1:1,i=Ui[1]<0?-1:1,r=((Ui[0]-n)*e+n)/Ui[0]||0,o=((Ui[1]-i)*e+i)/Ui[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Bi(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Ni(Xi,t.invTransform,e),e=Xi);var n=this.originX,i=this.originY;(n||i)&&(Zi[4]=n,Zi[5]=i,Ni(Xi,e,Zi),Xi[4]-=n,Xi[5]-=i,e=Xi),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Ft(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Ft(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&ji(t[0]-1)>1e-10&&ji(t[3]-1)>1e-10?Math.sqrt(ji(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){$i(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var d=n+a,f=i+s;e[4]=-d*r-c*f*o,e[5]=-f*o-p*d*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=p*r,e[2]=c*o,l&&zi(e,e,l),e[4]+=n+u,e[5]+=i+h,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Ki=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function $i(t,e){for(var n=0;nf&&(f=x,gf&&(f=_,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}er.x=ir.x=n.x,er.y=rr.y=n.y,nr.x=rr.x=n.x+n.width,nr.y=ir.y=n.y+n.height,er.transform(i),rr.transform(i),nr.transform(i),ir.transform(i),e.x=Qi(er.x,nr.x,ir.x,rr.x),e.y=Qi(er.y,nr.y,ir.y,rr.y);var l=tr(er.x,nr.x,ir.x,rr.x),u=tr(er.y,nr.y,ir.y,rr.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),lr={};function ur(t,e){var n=lr[e=e||a];n||(n=lr[e]=new ln(500));var i=n.get(t);return null==i&&(i=h.measureText(t,e).width,n.put(t,i)),i}function hr(t,e,n,i){var r=ur(t,e),o=fr(e),a=pr(0,r,n),s=dr(0,o,i);return new sr(a,s,r,o)}function cr(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return hr(r[0],e,n,i);for(var o=new sr(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function yr(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=gr(i[0],n.width),u+=gr(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var vr="__zr_normal__",mr=Ki.concat(["ignore"]),xr=V(Ki,(function(t,e){return t[e]=!0,t}),{ignore:!1}),_r={},br=new sr(0,0,0,0),wr=function(){function t(t){this.id=M(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(e),null!=n.position){var u=br;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(_r,n,u):yr(_r,n,u),r.x=_r.x,r.y=_r.y,o=_r.align,a=_r.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=gr(h[0],u.width),p=gr(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Li:ki},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&bn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,kn(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},A(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(q(t))for(var n=G(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(vr,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===vr;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(P(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,h=this._textGuide;return u&&u.useState(t,e,n,l),h&&h.useState(t,e,n,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}I("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,d);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=P(i,t),o=P(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){var w,S=void 0,M=void 0,I=void 0;if(s){M={},p&&(S={});for(_=0;_=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=P(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=P(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function Er(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return X(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function zr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Vr(t){return t.sort((function(t,e){return t-e})),t}function Br(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return Fr(t)}function Fr(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function Gr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Wr(t,e,n){if(!t[e])return 0;var i=V(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),o=z(t,(function(t){return(isNaN(t)?0:t)/i*r*100})),a=100*r,s=z(o,(function(t){return Math.floor(t)})),l=V(s,(function(t,e){return t+e}),0),u=z(o,(function(t,e){return t-s[e]}));lh&&(h=u[p],c=p);++s[c],u[c]=0,++l}return s[e]/r}function Hr(t,e){var n=Math.max(Br(t),Br(e)),i=t+e;return n>20?i:zr(i,n)}var Yr=9007199254740991;function Ur(t){var e=2*Math.PI;return(t%e+e)%e}function Xr(t){return t>-1e-4&&t=10&&e++,e}function $r(t,e){var n=Kr(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function Jr(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function Qr(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&P(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var Ho=Wo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Yo=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Ho(this,t,e)},t}(),Uo=new ln(50);function Xo(t){if("string"==typeof t){var e=Uo.get(t);return e&&e.image}return t}function Zo(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=Uo.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!qo(e=o.image)&&o.pending.push(a):((e=h.loadImage(t,jo,jo)).__zrImageSrc=t,Uo.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function jo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=ur(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function Qo(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=ur(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ta(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=ur(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function ta(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=sa(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=33&&e<=383}(t)||!!oa[t]}function sa(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var la="__zr_style_"+Math.round(10*Math.random()),ua={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ha={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ua[la]=!0;var ca=["z","z2","invisible"],pa=["invisible"],da=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=G(e),i=0;i1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(ba[0]=xa(r)*n+t,ba[1]=ma(r)*i+e,wa[0]=xa(o)*n+t,wa[1]=ma(o)*i+e,u(s,ba,wa),h(l,ba,wa),(r%=_a)<0&&(r+=_a),(o%=_a)<0&&(o+=_a),r>o&&!a?o+=_a:rr&&(Sa[0]=xa(d)*n+t,Sa[1]=ma(d)*i+e,u(s,Sa,s),h(l,Sa,l))}var La={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Pa=[],Oa=[],Ra=[],Na=[],Ea=[],za=[],Va=Math.min,Ba=Math.max,Fa=Math.cos,Ga=Math.sin,Wa=Math.abs,Ha=Math.PI,Ya=2*Ha,Ua="undefined"!=typeof Float32Array,Xa=[];function Za(t){return Math.round(t/Ha*1e8)/1e8%2*Ha}function ja(t,e){var n=Za(t[0]);n<0&&(n+=Ya);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=Ya?r=n+Ya:e&&n-r>=Ya?r=n-Ya:!e&&n>r?r=n+(Ya-Za(n-r)):e&&n0&&(this._ux=Wa(n/Ai/t)||0,this._uy=Wa(n/Ai/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(La.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=Wa(t-this._xi),i=Wa(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(La.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(La.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(La.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),Xa[0]=i,Xa[1]=r,ja(Xa,o),i=Xa[0];var a=(r=Xa[1])-i;return this.addData(La.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Fa(r)*n+t,this._yi=Ga(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(La.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(La.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Ua||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Ra[0]=Ra[1]=Ea[0]=Ea[1]=Number.MAX_VALUE,Na[0]=Na[1]=za[0]=za[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||Wa(y)>i||c===e-1)&&(f=Math.sqrt(A*A+y*y),r=g,o=x);break;case La.C:var v=t[c++],m=t[c++],x=(g=t[c++],t[c++]),_=t[c++],b=t[c++];f=qe(r,o,v,m,g,x,_,b,10),r=_,o=b;break;case La.Q:f=en(r,o,v=t[c++],m=t[c++],g=t[c++],x=t[c++],10),r=g,o=x;break;case La.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],C=t[c++],D=C+T;c+=1;t[c++];d&&(a=Fa(T)*M+w,s=Ga(T)*I+S),f=Ba(M,I)*Va(Ya,Math.abs(C)),r=Fa(D)*M+w,o=Ga(D)*I+S;break;case La.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case La.Z:var A=a-r;y=s-o;f=Math.sqrt(A*A+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p=this.data,d=this._ux,f=this._uy,g=this._len,y=e<1,v=0,m=0,x=0;if(!y||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var _=0;_0&&(t.lineTo(h,c),x=0),b){case La.M:n=r=p[_++],i=o=p[_++],t.moveTo(r,o);break;case La.L:a=p[_++],s=p[_++];var S=Wa(a-r),M=Wa(s-o);if(S>d||M>f){if(y){if(v+(j=l[m++])>u){var I=(u-v)/j;t.lineTo(r*(1-I)+a*I,o*(1-I)+s*I);break t}v+=j}t.lineTo(a,s),r=a,o=s,x=0}else{var T=S*S+M*M;T>x&&(h=a,c=s,x=T)}break;case La.C:var C=p[_++],D=p[_++],A=p[_++],k=p[_++],L=p[_++],P=p[_++];if(y){if(v+(j=l[m++])>u){Ze(r,C,A,L,I=(u-v)/j,Pa),Ze(o,D,k,P,I,Oa),t.bezierCurveTo(Pa[1],Oa[1],Pa[2],Oa[2],Pa[3],Oa[3]);break t}v+=j}t.bezierCurveTo(C,D,A,k,L,P),r=L,o=P;break;case La.Q:C=p[_++],D=p[_++],A=p[_++],k=p[_++];if(y){if(v+(j=l[m++])>u){Qe(r,C,A,I=(u-v)/j,Pa),Qe(o,D,k,I,Oa),t.quadraticCurveTo(Pa[1],Oa[1],Pa[2],Oa[2]);break t}v+=j}t.quadraticCurveTo(C,D,A,k),r=A,o=k;break;case La.A:var O=p[_++],R=p[_++],N=p[_++],E=p[_++],z=p[_++],V=p[_++],B=p[_++],F=!p[_++],G=N>E?N:E,W=Wa(N-E)>.001,H=z+V,Y=!1;if(y)v+(j=l[m++])>u&&(H=z+V*(u-v)/j,Y=!0),v+=j;if(W&&t.ellipse?t.ellipse(O,R,N,E,B,z,H,F):t.arc(O,R,G,z,H,F),Y)break t;w&&(n=Fa(z)*N+O,i=Ga(z)*E+R),r=Fa(H)*N+O,o=Ga(H)*E+R;break;case La.R:n=r=p[_],i=o=p[_+1],a=p[_++],s=p[_++];var U=p[_++],X=p[_++];if(y){if(v+(j=l[m++])>u){var Z=u-v;t.moveTo(a,s),t.lineTo(a+Va(Z,U),s),(Z-=U)>0&&t.lineTo(a+U,s+Va(Z,X)),(Z-=X)>0&&t.lineTo(a+Ba(U-Z,0),s+X),(Z-=U)>0&&t.lineTo(a,s+Ba(X-Z,0));break t}v+=j}t.rect(a,s,U,X);break;case La.Z:if(y){var j;if(v+(j=l[m++])>u){I=(u-v)/j;t.lineTo(r*(1-I)+n*I,o*(1-I)+i*I);break t}v+=j}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=La,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Ka(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=es);var p=Math.atan2(l,s);return p<0&&(p+=es),p>=i&&p<=r||p+es>=i&&p+es<=r}function is(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var rs=qa.CMD,os=2*Math.PI;var as=[-1,-1,-1],ss=[-1,-1];function ls(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=ss[0],ss[0]=ss[1],ss[1]=h),f=He(e,i,o,s,ss[0]),d>1&&(g=He(e,i,o,s,ss[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(Ge(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=Oe(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,as);if(0===l)return 0;var u=Je(e,i,o);if(u>=0&&u<=1){for(var h=0,c=Ke(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);as[0]=-l,as[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=os-1e-4){i=0,r=os;var h=o?1:-1;return a>=as[0]+t&&a<=as[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=os,r+=os);for(var p=0,d=0;d<2;d++){var f=as[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=os+g),(g>=i&&g<=r||g+os>=i&&g+os<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function cs(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=is(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case rs.M:p=f=u[y++],d=g=u[y++];break;case rs.L:if(n){if(Ka(p,d,u[y],u[y+1],e,i,r))return!0}else c+=is(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case rs.C:if(n){if($a(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=ls(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case rs.Q:if(n){if(Ja(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=us(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case rs.A:var x=u[y++],_=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var I=!!(1-u[y++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,m?(f=o,g=a):c+=is(p,d,o,a,i,r);var T=(i-x)*w/b+x;if(n){if(ns(x,_,w,S,S+M,I,e,T,r))return!0}else c+=hs(x,_,w,S,S+M,I,T,r);p=Math.cos(S+M)*b+x,d=Math.sin(S+M)*w+_;break;case rs.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(Ka(f,g,o,g,e,i,r)||Ka(o,g,o,a,e,i,r)||Ka(o,a,f,a,e,i,r)||Ka(f,a,f,g,e,i,r))return!0}else c+=is(o,g,o,a,i,r),c+=is(f,a,f,g,i,r);break;case rs.Z:if(n){if(Ka(p,d,f,g,e,i,r))return!0}else c+=is(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=is(p,d,f,g,i,r)||0),0!==c}var ps=k({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ua),ds={style:k({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ha.style)},fs=Ki.concat(["invisible","culling","z","z2","zlevel","parent"]),gs=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?ki:e>.2?"#eee":Li}if(t)return Li}return ki},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(X(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Ln(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new qa(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return cs(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return cs(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:A(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return yt(ps,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=A({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=A({},i.shape),A(s,n.shape)):(s=A({},r?this.shape:i.shape),A(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=A({},this.shape);for(var u={},h=G(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return yt(ys,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=cr(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(da);vs.prototype.type="tspan";var ms=k({x:0,y:0},ua),xs={style:k({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ha.style)};var _s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return yt(ms,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return xs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new sr(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(da);_s.prototype.type="image";var bs=Math.round;function ws(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(bs(2*i)===bs(2*r)&&(t.x1=t.x2=Ms(i,s,!0)),bs(2*o)===bs(2*a)&&(t.y1=t.y2=Ms(o,s,!0)),t):t}}function Ss(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=Ms(i,s,!0),t.y=Ms(r,s,!0),t.width=Math.max(Ms(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Ms(r+a,s,!1)-t.y,0===a?0:1),t):t}}function Ms(t,e,n){if(!e)return t;var i=bs(2*t);return(i+bs(e))%2==0?i/2:(i+(n?1:-1))/2}var Is=function(){this.x=0,this.y=0,this.width=0,this.height=0},Ts={},Cs=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Is},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Ss(Ts,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(gs);Cs.prototype.type="rect";var Ds={fill:"#000"},As={style:k({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ha.style)},ks=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ds,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ed&&h){var f=Math.floor(d/l);n=n.slice(0,f)}if(t&&a&&null!=c)for(var g=Jo(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),y=0;y0,T=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=i.calculatedLineHeight,D=0;Dl&&ra(n,t.substring(l,u),e,s),ra(n,i[2],e,s,i[1]),l=Ko.lastIndex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var C=w.width,D=null==C||"auto"===C;if("string"==typeof C&&"%"===C.charAt(C.length-1))P.percentWidth=C,h.push(P),P.contentWidth=ur(P.text,I);else{if(D){var A=w.backgroundColor,k=A&&A.image;k&&qo(k=Xo(k))&&(P.width=Math.max(P.width,k.width*T/k.height))}var L=f&&null!=r?r-_:null;null!=L&&L=0&&"right"===(C=x[T]).align;)this._placeToken(C,t,b,f,I,"right",y),w-=C.width,I-=C.width,T--;for(M+=(n-(M-d)-(g-I)-w)/2;S<=T;)C=x[S],this._placeToken(C,t,b,f,M+C.width/2,"center",y),M+=C.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,s){var l=e.rich[t.styleName]||{};l.text=t.text;var u=t.verticalAlign,h=i+n/2;"top"===u?h=i+t.height/2:"bottom"===u&&(h=i+n-t.height/2),!t.isLineHolder&&Ws(l)&&this._renderBackground(l,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!l.backgroundColor,p=t.textPadding;p&&(r=Fs(r,o,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(vs),f=d.createStyle();d.useStyle(f);var g=this._defaultStyle,y=!1,v=0,m=Bs("fill"in l?l.fill:"fill"in e?e.fill:(y=!0,g.fill)),x=Vs("stroke"in l?l.stroke:"stroke"in e?e.stroke:c||s||g.autoStroke&&!y?null:(v=2,g.stroke)),_=l.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=h,_&&(f.shadowBlur=l.textShadowBlur||e.textShadowBlur||0,f.shadowColor=l.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=l.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=l.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||a,f.opacity=ot(l.opacity,e.opacity,1),Ns(f,l),x&&(f.lineWidth=ot(l.lineWidth,e.lineWidth,v),f.lineDash=rt(l.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=x),m&&(f.fill=m);var b=t.contentWidth,w=t.contentHeight;d.setBoundingRect(new sr(pr(f.x,b,f.textAlign),dr(f.y,w,f.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=u&&u.image,d=u&&!p,f=t.borderRadius,g=this;if(d||t.lineHeight||h&&c){(a=this._getOrCreateChild(Cs)).useStyle(a.createStyle()),a.style.fill=null;var y=a.shape;y.x=n,y.y=i,y.width=r,y.height=o,y.r=f,a.dirtyShape()}if(d)(l=a.style).fill=u||null,l.fillOpacity=rt(t.fillOpacity,1);else if(p){(s=this._getOrCreateChild(_s)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=i,v.width=r,v.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=rt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=ot(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return Es(t)&&(e=[t.fontStyle,t.fontWeight,Rs(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&ut(e)||t.textFont||t.font},e}(da),Ls={left:!0,right:1,center:1},Ps={top:1,bottom:1,middle:1},Os=["fontStyle","fontWeight","fontSize","fontFamily"];function Rs(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function Ns(t,e){for(var n=0;n=0,o=!1;if(t instanceof gs){var a=Zs(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(il(s)||il(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=A({},i),(u=A({},u)).fill=s):!il(u.fill)&&il(s)?(o=!0,i=A({},i),(u=A({},u)).fill=ol(s)):!il(u.stroke)&&il(l)&&(o||(i=A({},i),u=A({},u)),u.stroke=ol(l)),i.style=u}}if(i&&null==i.z2){o||(i=A({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:$s)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=P(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Ol(t,e,n){Bl(t,!0),fl(t,vl),Nl(t,e,n)}function Rl(t,e,n,i){i?function(t){Bl(t,!1)}(t):Ol(t,e,n)}function Nl(t,e,n){var i=Hs(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var El=["emphasis","blur","select"],zl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Vl(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=jl(f),s*=jl(f));var g=(r===o?-1:1)*jl((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+Kl(c)*y-ql(c)*v,x=(e+i)/2+ql(c)*y+Kl(c)*v,_=tu([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],S=tu(b,w);if(Ql(b,w)<=-1&&(S=$l),Ql(b,w)>=1&&(S=0),S<0){var M=Math.round(S/$l*1e6)/1e6;S=2*$l+M%2*$l}h.addData(u,m,x,a,s,_,S,c,o)}var nu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,iu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var ru=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(gs);function ou(t){return null!=t.setData}function au(t,e){var n=function(t){var e=new qa;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=qa.CMD,l=t.match(nu);if(!l)return e;for(var u=0;uk*k+L*L&&(M=T,I=C),{cx:M,cy:I,x0:-h,y0:-c,x1:M*(r/b-1),y1:I*(r/b-1)}}function Iu(t,e){var n,i=bu(e.r,0),r=bu(e.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,h=e.cy,c=!!e.clockwise,p=xu(l-s),d=p>fu&&p%fu;if(d>Su&&(p=d),i>Su)if(p>fu-Su)t.moveTo(u+i*yu(s),h+i*gu(s)),t.arc(u,h,i,s,l,!c),r>Su&&(t.moveTo(u+r*yu(l),h+r*gu(l)),t.arc(u,h,r,l,s,c));else{var f=void 0,g=void 0,y=void 0,v=void 0,m=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=void 0,I=void 0,T=void 0,C=void 0,D=void 0,A=void 0,k=i*yu(s),L=i*gu(s),P=r*yu(l),O=r*gu(l),R=p>Su;if(R){var N=e.cornerRadius;N&&(f=(n=function(t){var e;if(Y(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(N))[0],g=n[1],y=n[2],v=n[3]);var E=xu(i-r)/2;if(m=wu(E,y),x=wu(E,v),_=wu(E,f),b=wu(E,g),M=w=bu(m,x),I=S=bu(_,b),(w>Su||S>Su)&&(T=i*yu(l),C=i*gu(l),D=r*yu(s),A=r*gu(s),pSu){var U=wu(y,M),X=wu(v,M),Z=Mu(D,A,k,L,i,U,c),j=Mu(T,C,P,O,i,X,c);t.moveTo(u+Z.cx+Z.x0,h+Z.cy+Z.y0),M0&&t.arc(u+Z.cx,h+Z.cy,U,mu(Z.y0,Z.x0),mu(Z.y1,Z.x1),!c),t.arc(u,h,i,mu(Z.cy+Z.y1,Z.cx+Z.x1),mu(j.cy+j.y1,j.cx+j.x1),!c),X>0&&t.arc(u+j.cx,h+j.cy,X,mu(j.y1,j.x1),mu(j.y0,j.x0),!c))}else t.moveTo(u+k,h+L),t.arc(u,h,i,s,l,!c);else t.moveTo(u+k,h+L);if(r>Su&&R)if(I>Su){U=wu(f,I),Z=Mu(P,O,T,C,r,-(X=wu(g,I)),c),j=Mu(k,L,D,A,r,-U,c);t.lineTo(u+Z.cx+Z.x0,h+Z.cy+Z.y0),I0&&t.arc(u+Z.cx,h+Z.cy,X,mu(Z.y0,Z.x0),mu(Z.y1,Z.x1),!c),t.arc(u,h,r,mu(Z.cy+Z.y1,Z.cx+Z.x1),mu(j.cy+j.y1,j.cx+j.x1),c),U>0&&t.arc(u+j.cx,h+j.cy,U,mu(j.y1,j.x1),mu(j.y0,j.x0),!c))}else t.lineTo(u+P,h+O),t.arc(u,h,r,l,s,c);else t.lineTo(u+P,h+O)}else t.moveTo(u,h);t.closePath()}}}var Tu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Cu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Tu},e.prototype.buildPath=function(t,e){Iu(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(gs);Cu.prototype.type="sector";var Du=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Au=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Du},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(gs);function ku(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pqu[1]){if(a=!1,r)return a;var u=Math.abs(qu[0]-ju[1]),h=Math.abs(ju[0]-qu[1]);Math.min(u,h)>i.len()&&(u0){var c={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,c):e.animateTo(n,c)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function rh(t,e,n,i,r,o){ih("update",t,e,n,i,r,o)}function oh(t,e,n,i,r,o){ih("enter",t,e,n,i,r,o)}function ah(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Dh(t){return!t.isGroup}function Ah(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){Dh(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(Dh(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),rh(t,i,n,Hs(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=A({},t.shape)),e}}function kh(t,e){return z(t,(function(t){var n=t[0];n=ch(n,e.x),n=ph(n,e.x+e.width);var i=t[1];return i=ch(i,e.y),[n,i=ph(i,e.y+e.height)]}))}function Lh(t,e){var n=ch(t.x,e.x),i=ph(t.x+t.width,e.x+e.width),r=ch(t.y,e.y),o=ph(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Ph(t,e,n){var i=A({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),k(r,n),new _s(i)):xh(t.replace("path://",""),i,n,"center")}function Oh(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,y=Nh(f,g,u,h)/d;if(y<0||y>1)return!1;var v=Nh(f,g,c,p)/d;return!(v<0||v>1)}function Nh(t,e,n,i){return t*i-n*e}function Eh(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=X(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&E(G(l),(function(t){mt(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=Hs(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:k({content:i,formatterParams:s},r)}}function zh(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Vh(t,e){if(t)if(Y(t))for(var n=0;n-1?vc:xc;function Sc(t,e){t=t.toUpperCase(),bc[t]=new dc(e),_c[t]=e}function Mc(t){return bc[t]}Sc(mc,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Sc(vc,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Ic=1e3,Tc=6e4,Cc=36e5,Dc=864e5,Ac=31536e6,kc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Lc="{yyyy}-{MM}-{dd}",Pc={year:"{yyyy}",month:"{yyyy}-{MM}",day:Lc,hour:"{yyyy}-{MM}-{dd} "+kc.hour,minute:"{yyyy}-{MM}-{dd} "+kc.minute,second:"{yyyy}-{MM}-{dd} "+kc.second,millisecond:kc.none},Oc=["year","month","day","hour","minute","second","millisecond"],Rc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Nc(t,e){return"0000".substr(0,e-(t+="").length)+t}function Ec(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function zc(t){return t===Ec(t)}function Vc(t,e,n,i){var r=jr(t),o=r[Gc(n)](),a=r[Wc(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[Hc(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[Yc(n)](),c=(h-1)%12+1,p=r[Uc(n)](),d=r[Xc(n)](),f=r[Zc(n)](),g=(i instanceof dc?i:Mc(i||wc)||bc.EN).getModel("time"),y=g.get("month"),v=g.get("monthAbbr"),m=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,Nc(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Nc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,m[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Nc(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Nc(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Nc(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Nc(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Nc(f,3)).replace(/{S}/g,f+"")}function Bc(t,e){var n=jr(t),i=n[Wc(e)]()+1,r=n[Hc(e)](),o=n[Yc(e)](),a=n[Uc(e)](),s=n[Xc(e)](),l=0===n[Zc(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function Fc(t,e,n){var i=j(t)?jr(t):t;switch(e=e||Bc(t,n)){case"year":return i[Gc(n)]();case"half-year":return i[Wc(n)]()>=6?1:0;case"quarter":return Math.floor((i[Wc(n)]()+1)/4);case"month":return i[Wc(n)]();case"day":return i[Hc(n)]();case"half-day":return i[Yc(n)]()/24;case"hour":return i[Yc(n)]();case"minute":return i[Uc(n)]();case"second":return i[Xc(n)]();case"millisecond":return i[Zc(n)]()}}function Gc(t){return t?"getUTCFullYear":"getFullYear"}function Wc(t){return t?"getUTCMonth":"getMonth"}function Hc(t){return t?"getUTCDate":"getDate"}function Yc(t){return t?"getUTCHours":"getHours"}function Uc(t){return t?"getUTCMinutes":"getMinutes"}function Xc(t){return t?"getUTCSeconds":"getSeconds"}function Zc(t){return t?"getUTCMilliseconds":"getMilliseconds"}function jc(t){return t?"setUTCFullYear":"setFullYear"}function qc(t){return t?"setUTCMonth":"setMonth"}function Kc(t){return t?"setUTCDate":"setDate"}function $c(t){return t?"setUTCHours":"setHours"}function Jc(t){return t?"setUTCMinutes":"setMinutes"}function Qc(t){return t?"setUTCSeconds":"setSeconds"}function tp(t){return t?"setUTCMilliseconds":"setMilliseconds"}function ep(t){if(!eo(t))return X(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function np(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var ip=st,rp=/([&<>"'])/g,op={"&":"&","<":"<",">":">",'"':""","'":"'"};function ap(t){return null==t?"":(t+"").replace(rp,(function(t,e){return op[e]}))}function sp(t,e,n){function i(t){return t&&ut(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?jr(t):t;if(!isNaN(+s))return Vc(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return Z(t)?i(t):j(t)&&r(t)?t+"":"-";var l=to(t);return r(l)?ep(l):Z(t)?i(t):"boolean"==typeof t?t+"":"-"}var lp=["a","b","c","d","e","f","g"],up=function(t,e){return"{"+t+(null==e?"":e)+"}"};function hp(t,e,n){Y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function pp(t,e){return e=e||"transparent",X(t)?t:q(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function dp(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var fp=E,gp=["left","right","top","bottom","width","height"],yp=[["width","left","right"],["height","top","bottom"]];function vp(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var mp=vp;H(vp,"vertical"),H(vp,"horizontal");function xp(t,e,n){n=ip(n||0);var i=e.width,r=e.height,o=Er(t.left,i),a=Er(t.top,r),s=Er(t.right,i),l=Er(t.bottom,r),u=Er(t.width,i),h=Er(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new sr(o+n[3],a+n[0],u,h);return f.margin=n,f}function _p(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new sr(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(a=a.clone()).applyTransform(h)}var c=xp(k({width:a.width,height:a.height},e),n,i),p=s?c.x-a.x:0,d=l?c.y-a.y:0;return"raw"===u?(o.x=p,o.y=d):(o.x+=p,o.y+=d),o===t&&t.markRedraw(),!0}function bp(t){var e=t.layoutMode||t.constructor.layoutMode;return q(e)?e:e?{type:e}:null}function wp(t,e,n){var i=n&&n.ignoreSize;!Y(i)&&(i=[i,i]);var r=a(yp[0],0),o=a(yp[1],1);function a(n,r){var o={},a=0,u={},h=0;if(fp(n,(function(e){u[e]=t[e]})),fp(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=C(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Ao(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(dc);zo(Tp,dc),Go(Tp),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=No(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=No(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(Tp),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return E(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return E(t,(function(t){P(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),E(s,(function(t){P(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);P(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(E(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),E(c.successor,p?f:d)}E(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(Tp,(function(t){var e=[];E(Tp.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=z(e,(function(t){return No(t).main})),"dataset"!==t&&P(e,"dataset")<=0&&e.unshift("dataset");return e}));var Cp="";"undefined"!=typeof navigator&&(Cp=navigator.platform||"");var Dp="rgba(0, 0, 0, 0.2)",Ap={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Dp,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Dp,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Dp,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Dp,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Dp,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Dp,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Cp.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},kp=ft(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Lp="original",Pp="arrayRows",Op="objectRows",Rp="keyedColumns",Np="typedArray",Ep="unknown",zp="column",Vp="row",Bp=1,Fp=2,Gp=3,Wp=So();function Hp(t,e,n){var i={},r=Up(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=Wp(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;E(t=t.slice(),(function(e,n){var r=q(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var id=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new dc(i),this._locale=new dc(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=ad(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,ad(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):$p(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&E(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=ft(),s=e&&e.replaceMergeMainTypeMap;Wp(this).datasetMap=ft(),E(t,(function(t,e){null!=t&&(Tp.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?T(t):C(n[e],t,!0))})),s&&s.each((function(t,e){Tp.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),Tp.topologicalTravel(o,Tp.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=jp.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,ho(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=yo(a,o,l);(function(t,e,n){E(t,(function(t){var i=t.newOption;q(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,Tp),n[e]=null,i.set(e,null),r.set(e,0);var h,c=[],p=[],d=0;E(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=Tp.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(h)return void 0;h=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=A({componentIndex:n},t.keyInfo);A(i=new a(r,this,this,s),s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(c.push(i.option),p.push(i),d++):(c.push(void 0),p.push(void 0))}),this),n[e]=c,i.set(e,p),r.set(e,d),"series"===e&&qp(this)}),this),this._seriesIndices||qp(this)},e.prototype.getOption=function(){var t=T(this.option);return E(t,(function(e,n){if(Tp.hasClass(n)){for(var i=ho(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!bo(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var fd=E,gd=q,yd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function vd(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=yd.length;n=0;g--){var y=t[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,c)),p>=0){var v=y.data.getByRawIndex(y.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&d>=0&&v>0||"samesign"===l&&d<=0&&v<0){d=Hr(d,v),f=v;break}}}return i[0]=d,i[1]=f,i}))}))}var Nd,Ed,zd,Vd,Bd,Fd=function(t){this.data=t.data||(t.sourceFormat===Rp?{}:[]),this.sourceFormat=t.sourceFormat||Ep,this.seriesLayoutBy=t.seriesLayoutBy||zp,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return af(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function uf(t){var e,n;return q(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function hf(t){return new cf(t)}var cf=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,a=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},vf=function(){function t(t,e){if(!j(e)){var n="";0,ao(n)}this._opFn=yf[t],this._rvalFloat=to(e)}return t.prototype.evaluate=function(t){return j(t)?this._opFn(t,this._rvalFloat):this._opFn(to(t),this._rvalFloat)},t}(),mf=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=j(t)?t:to(t),i=j(e)?e:to(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=X(t),s=X(e);a&&(n=s?t:0),s&&(i=a?e:0)}return ni?-this._resultLT:0},t}(),xf=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=to(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=to(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function _f(t,e){return"eq"===t||"ne"===t?new xf("eq"===t,e):mt(yf,t)?new vf(t,e):null}var bf=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return df(t,e)},t}();function wf(t){var e=t.sourceFormat;if(!Df(e)){var n="";0,ao(n)}return t.data}function Sf(t){var e=t.sourceFormat,n=t.data;if(!Df(e)){var i="";0,ao(i)}if(e===Pp){for(var r=[],o=0,a=n.length;o65535?Lf:Pf}function zf(t,e,n,i,r){var o=Nf[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=z(o,(function(t){return t.property})),u=0;uy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=u&&x<=h||isNaN(x))&&(a[s++]=d),d++}p=!0}else if(2===r){f=c[i[0]];var y=c[i[1]],v=t[i[1]][0],m=t[i[1]][1];for(g=0;g=u&&x<=h||isNaN(x))&&(_>=v&&_<=m||isNaN(_))&&(a[s++]=d),d++}p=!0}}if(!p)if(1===r)for(g=0;g=u&&x<=h||isNaN(x))&&(a[s++]=b)}else for(g=0;gt[M][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sy[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(Ef(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var p=1;pn&&(n=i,r=I)}M>0&&M<_-x&&(c[l++]=Math.min(S,r),r=Math.max(S,r)),c[l++]=r,h=r}return c[l++]=this.getRawIndex(s-1),o._count=l,o._indices=c,o.getRawIndex=this._getRawIdx,o},t.prototype.downSample=function(t,e,n,i){for(var r=this.clone([t],!0),o=r._chunks,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=r._rawExtent[t]=[1/0,-1/0],c=new(Ef(this._rawCount))(Math.ceil(u/s)),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return df(t[i],this._dimensions[i])}Af={arrayRows:t,objectRows:function(t,e,n,i){return df(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return df(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),Bf=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(Gf(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=$(a=o.get("data",!0))?Np:Lp,e=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},p=rt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=rt(h.sourceHeader,c.sourceHeader),f=rt(h.dimensions,c.dimensions);t=p!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||f?[Wd(a,{seriesLayoutBy:p,sourceHeader:d,dimensions:f},s)]:[]}else{var g=n;if(r){var y=this._applyTransform(i);t=y.sourceList,e=y.upstreamSignList}else{t=[Wd(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&Wf(o)}var a,s=[],l=[];return E(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||Wf(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=ho(t),r=i.length,o="";r||ao(o);for(var a=0,s=r;a1||n>0&&!t.noHeader;return E(t.blocks,(function(t){var n=qf(t);n>=e&&(e=n+ +(i&&(!n||Zf(t)&&!t.noHeader)))})),e}return 0}function Kf(t,e,n,i){var r,o=e.noHeader,a=(r=qf(e),{html:Yf[r],richText:Uf[r]}),s=[],l=e.blocks||[];lt(!l||Y(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(mt(h,u)){var c=new mf(h[u],null);l.sort((function(t,e){return c.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===u&&l.reverse()}E(l,(function(n,r){var o=e.valueFormatter,l=jf(n)(o?A(A({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)}));var p="richText"===t.renderMode?s.join(a.richText):Qf(s.join(""),o?n:a.html);if(o)return p;var d=sp(e.header,"ordinal",t.useUTC),f=Hf(i,t.renderMode).nameStyle;return"richText"===t.renderMode?tg(t,d,f)+a.richText+p:Qf('
      '+ap(d)+"
      "+p,n)}function $f(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return z(t=Y(t)?t:[t],(function(t,e){return sp(t,Y(d)?d[e]:d,u)}))};if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":sp(l,"ordinal",u),d=e.valueType,f=a?[]:h(e.value),g=!s||!o,y=!s&&o,v=Hf(i,r),m=v.nameStyle,x=v.valueStyle;return"richText"===r?(s?"":c)+(o?"":tg(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Y(e)?e.join(" "):e,o)}(t,f,g,y,x)):Qf((s?"":c)+(o?"":function(t,e,n){return''+ap(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=Y(t)?t:[t],''+z(t,(function(t){return ap(t)})).join("  ")+""}(f,g,y,x)),n)}}function Jf(t,e,n,i,r,o){if(t)return jf(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function Qf(t,e){return'
      '+t+'
      '}function tg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function eg(t,e){return pp(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function ng(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var ig=function(){function t(){this.richTextStyles={},this._nextStyleNameId=no()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=cp({color:e,type:t,renderMode:n,markerId:i});return X(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};Y(e)?E(e,(function(t){return A(n,t)})):A(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function rg(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=Y(c),d=eg(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=V(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(Xf("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?E(i,(function(t){h(af(o,n,t),t)})):E(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=af(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=_o(o),v=y&&o.name||"",m=l.getName(a),x=s?v:m;return Xf("section",{header:v,noHeader:s||!y,sortParam:r,blocks:[Xf("nameValue",{markerType:"item",markerColor:d,name:x,noName:!ut(x),value:e,valueType:n})].concat(i||[])})}var og=So();function ag(t,e){return t.getName(e)||t.getId(e)}var sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=hf({count:ug,reset:hg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(og(this).sourceManager=new Bf(this)).prepareSource();var i=this.getInitialData(t,n);pg(i,this),this.dataTask.context.data=i,og(this).dataBeforeProcessed=i,lg(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=bp(this),i=n?Sp(t):{},r=this.subType;Tp.hasClass(r)&&(r+="Series"),C(t,e.getTheme().get(this.subType)),C(t,this.getDefaultOption()),co(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&wp(t,i,n)},e.prototype.mergeOption=function(t,e){t=C(this.option,t,!0),this.fillDataTextStyle(t.data);var n=bp(this);n&&wp(this.option,t,n);var i=og(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);pg(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,og(this).dataBeforeProcessed=r,lg(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!$(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=td.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[ag(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){q(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return Tp.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Tp);function lg(t){var e=t.name;_o(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return E(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function ug(t){return t.model.getRawData().count()}function hg(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),cg}function cg(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function pg(t,e){E(gt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,H(dg,e))}))}function dg(t,e){var n=fg(t);return n&&n.setOutputEnd((e||this).count()),e}function fg(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}R(sg,lf),R(sg,td),zo(sg,Tp);var gg=function(){function t(){this.group=new Cr,this.uid=gc("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function yg(){var t=So();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Eo(gg),Go(gg);var vg=So(),mg=yg(),xg=function(){function t(){this.group=new Cr,this.uid=gc("viewChart"),this.renderTask=hf({plan:wg,reset:Sg}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&bg(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&bg(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){Vh(this.group,t)},t.markUpdateMethod=function(t,e){vg(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function _g(t,e,n){t&&Fl(t)&&("emphasis"===e?_l:bl)(t,n)}function bg(t,e,n){var i=wo(t,e),r=e&&null!=e.highlightKey?function(t){var e=Xs[t];return null==e&&Us<=32&&(e=Xs[t]=Us++),e}(e.highlightKey):null;null!=i?E(ho(i),(function(e){_g(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){_g(t,n,r)}))}function wg(t){return mg(t.model)}function Sg(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&vg(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Mg[l]}Eo(xg),Go(xg);var Mg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Ig="\0__throttleOriginMethod",Tg="\0__throttleRate",Cg="\0__throttleType";function Dg(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function Ag(t,e,n,i){var r=t[e];if(r){var o=r[Ig]||r,a=r[Cg];if(r[Tg]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Dg(o,n,"debounce"===i))[Ig]=o,r[Cg]=i,r[Tg]=n}return r}}function kg(t,e){var n=t[e];n&&n[Ig]&&(n.clear&&n.clear(),t[e]=n[Ig])}var Lg=So(),Pg={itemStyle:Wo(hc,!0),lineStyle:Wo(sc,!0)},Og={lineStyle:"stroke",itemStyle:"fill"};function Rg(t,e){var n=t.visualStyleMapper||Pg[e];return n||(console.warn("Unkown style type '"+e+"'."),Pg.itemStyle)}function Ng(t,e){var n=t.visualDrawType||Og[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var Eg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=Rg(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Ng(t,i),l=o[s],u=U(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||U(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||U(o.stroke)?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=A({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},zg=new dc,Vg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=Rg(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){zg.option=n[i];var a=r(zg);A(t.ensureUniqueItemVisual(e,"style"),a),zg.option.decal&&(t.setItemVisual(e,"decal",zg.option.decal),zg.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Bg={performRawSeries:!0,overallReset:function(t){var e=ft();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),Lg(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Lg(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Ng(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},Fg=Math.PI;var Gg=function(){function t(t,e,n,i){this._stageTaskMap=ft(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=ft();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;E(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";lt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}E(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=ft(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||hf({plan:Xg,reset:Zg,count:Kg}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||hf({reset:Wg});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=ft(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,hf({reset:Hg,onDirty:Ug})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}lt(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,E(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return U(t)&&(t={overallReset:t,seriesType:$g(t)}),t.uid=gc("stageHandler"),e&&(t.visualType=e),t},t}();function Wg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Hg(t){return t.overallProgress&&Yg}function Yg(){this.agent.dirty(),this.getDownstream().dirty()}function Ug(){this.agent&&this.agent.dirty()}function Xg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Zg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=ho(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?z(e,(function(t,e){return qg(e)})):jg}var jg=qg(0);function qg(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),hy=["symbol","symbolSize","symbolRotate","symbolOffset"],cy=hy.concat(["symbolKeepAspect"]),py={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&Ry(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=Ry(i)?i:0,r=Ry(r)?r:1,o=Ry(o)?o:0,a=Ry(a)?a:0,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:j(e)?[e]:Y(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=z(r,(function(t){return t/a})),o/=a)}return[r,o]}var By=new qa(!0);function Fy(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Gy(t){return"string"==typeof t&&"none"!==t}function Wy(t){var e=t.fill;return null!=e&&"none"!==e}function Hy(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Yy(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Uy(t,e,n){var i=Zo(e.image,e.__image,n);if(qo(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*_t),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var Xy=["shadowBlur","shadowOffsetX","shadowOffsetY"],Zy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function jy(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){$y(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?ua.opacity:a}(i||e.blend!==n.blend)&&(o||($y(t,r),o=!0),t.globalCompositeOperation=e.blend||ua.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this.__flagInMainProcess)if(this._disposed)Hv(this.id);else{var i,r,o;if(q(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new pd(this._api),s=this._theme,l=this._model=new id;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},Zv);var u={seriesTransition:o,optionChanged:!0};if(n)this.__pendingUpdate={silent:i,updateParams:u},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{_v(this),Sv.update.call(this,null,u)}catch(t){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,t}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Cv.call(this,i),Dv.call(this,i)}}},e.prototype.setTheme=function(){oo()},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||cv&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var e=this._zr.painter;return e.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var e=this._zr.painter;return e.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(r.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;E(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return E(i,(function(t){t.group.ignore=!1})),o}Hv(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Jv[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();E($v,(function(o,h){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(T(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),c.push({dom:p,left:d.left,top:d.top})}}));var d=(l*=p)-(a*=p),f=(u*=p)-(s*=p),g=h.createCanvas(),y=Lr(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return E(c,(function(t){var e=t.left-a,n=t.top-s;v+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new Cs({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),E(c,(function(t){var e=new _s({style:{x:t.left*p-a,y:t.top*p-s,image:t.dom}});y.add(e)})),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}Hv(this.id)},e.prototype.convertToPixel=function(t,e){return Mv(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Mv(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return E(Io(this._model,t),(function(t,i){i.indexOf("Models")>=0&&E(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;Hv(this.id)},e.prototype.getVisual=function(t,e){var n=Io(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?fy(r,o,e):gy(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;E(Wv,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&xy(o,(function(t){var e=Hs(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=A({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),E(Uv,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),E(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(my("map","selectchanged",e,i,t),my("pie","selectchanged",e,i,t)):"select"===t.fromAction?(my("map","selected",e,i,t),my("pie","selected",e,i,t)):"unselect"===t.fromAction&&(my("map","unselected",e,i,t),my("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Hv(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Hv(this.id);else{this._disposed=!0,this.getDom()&&ko(this.getDom(),em,"");var t=this,e=t._api,n=t._model;E(t._componentsViews,(function(t){t.dispose(n,e)})),E(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete $v[t.id]}},e.prototype.resize=function(t){if(!this.__flagInMainProcess)if(this._disposed)Hv(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__pendingUpdate&&(null==i&&(i=this.__pendingUpdate.silent),n=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{n&&_v(this),Sv.update.call(this,{type:"resize",animation:A({duration:0},t&&t.animation)})}catch(t){throw this.__flagInMainProcess=!1,t}this.__flagInMainProcess=!1,Cv.call(this,i),Dv.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Hv(this.id);else if(q(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Kv[t]){var n=Kv[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?Hv(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=A({},t);return e.type=Uv[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Hv(this.id);else if(q(e)||(e={silent:!!e}),Yv[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Tv.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&r.browser.weChat&&this._throttledZrFlush(),Cv.call(this,n),Dv.call(this,n)}},e.prototype.updateLabelLayout=function(){lv.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)Hv(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(ah(t))return;if(t instanceof gs&&function(t){var e=Zs(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}_v=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),bv(t,!0),bv(t,!1),e.plan()},bv=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!r.node&&!r.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),lv.trigger("series:afterupdate",e,n,l)},Ev=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},zv=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){ah(t)||e(t)})),t.__needsUpdateStatus=!1)},Rv=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){_l(e,n),Ev(t)},i.prototype.leaveEmphasis=function(e,n){bl(e,n),Ev(t)},i.prototype.enterBlur=function(e){wl(e),Ev(t)},i.prototype.leaveBlur=function(e){Sl(e),Ev(t)},i.prototype.enterSelect=function(e){Ml(e),Ev(t)},i.prototype.leaveSelect=function(e){Il(e),Ev(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(ld))(t)},Nv=function(t){function e(t,e){for(var n=0;n=0)){gm.push(n);var o=Gg.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function vm(t,e){Kv[t]=e}function mm(t,e,n){var i=hv("registerMap");i&&i(t,e,n)}var xm=function(t){var e=(t=T(t)).type,n="";e||ao(n);var i=e.split(":");2!==i.length&&ao(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,Tf.set(e,t)};fm(pv,Eg),fm(dv,Vg),fm(dv,Bg),fm(pv,py),fm(dv,dy),fm(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=rv(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=rv(r,e)}}))})),am(Od),sm(900,(function(t){var e=ft();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(Rd)})),vm("default",(function(t,e){k(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Cr,i=new Cs({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new ks({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Cs({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new Hu({shape:{startAngle:-Fg/2,endAngle:-Fg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Fg/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Fg/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),cm({type:Js,event:Js,update:Js},xt),cm({type:Qs,event:Qs,update:Qs},xt),cm({type:tl,event:tl,update:tl},xt),cm({type:el,event:el,update:el},xt),cm({type:nl,event:nl,update:nl},xt),om("light",iy),om("dark",ly);var _m=[],bm={registerPreprocessor:am,registerProcessor:sm,registerPostInit:lm,registerPostUpdate:um,registerUpdateLifecycle:hm,registerAction:cm,registerCoordinateSystem:pm,registerLayout:dm,registerVisual:fm,registerTransform:xm,registerLoading:vm,registerMap:mm,registerImpl:function(t,e){uv[t]=e},PRIORITY:fv,ComponentModel:Tp,ComponentView:gg,SeriesModel:sg,ChartView:xg,registerComponentModel:function(t){Tp.registerClass(t)},registerComponentView:function(t){gg.registerClass(t)},registerSeriesModel:function(t){sg.registerClass(t)},registerChartView:function(t){xg.registerClass(t)},registerSubTypeDefaulter:function(t,e){Tp.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Pr(t,e)}};function wm(t){Y(t)?E(t,(function(t){wm(t)})):P(_m,t)>=0||(_m.push(t),U(t)&&(t={install:t}),t.install(bm))}function Sm(t){return null==t?0:t.length||1}function Mm(t){return t}var Im=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||Mm,this._newKeyGetter=i||Mm,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;a30}var zm,Vm,Bm,Fm,Gm,Wm,Hm,Ym=q,Um=z,Xm="undefined"==typeof Int32Array?Array:Int32Array,Zm=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],jm=["_approximateExtent"],qm=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;Om(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===Lp&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(Y(r=this.getVisual(e))?r=r.slice():Ym(r)&&(r=A({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Ym(e)?A(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){Ym(t)?A(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?A(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Ys(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){E(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Um(this.dimensions,this._getDimInfo,this),this.hostModel)),Gm(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];U(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(at(arguments)))})},t.internalField=(zm=function(t){var e=t._invertedIndicesMap;E(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new Xm(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}();function Km(t,e){Gd(t)||(t=Hd(t));var n=(e=e||{}).coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=ft(),o=[],a=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return E(e,(function(t){var e;q(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Em(a),l=i===t.dimensionsDefine,u=l?Nm(t):Rm(i),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(t,a));for(var c=ft(h),p=new Of(a),d=0;d0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(o),new Pm({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function $m(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){for(var r=0;i.hasOwnProperty(t+r);)r++;t+=r}return e.set(t,!0),t}var Jm=function(t){this.coordSysDims=[],this.axisMap=ft(),this.categoryAxisMap=ft(),this.coordSysName=t};var Qm={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",Co).models[0],o=t.getReferringComponents("yAxis",Co).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),tx(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),tx(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",Co).models[0];e.coordSysDims=["single"],n.set("single",r),tx(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",Co).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),tx(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),tx(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();E(o.parallelAxisIndex,(function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),tx(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function tx(t){return"category"===t.get("type")}function ex(t,e,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!Om(t.schema)}(e)?(r=e.schema,i=r.dimensions,o=e.store):i=e;var l,u,h,c,p=!(!t||!t.get("stack"));if(E(i,(function(t,e){X(t)&&(i[e]=t={name:t}),p&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,f=u.type,g=0;E(i,(function(t){t.coordDim===d&&g++}));var y={name:h,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:c,coordDim:c,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(y.storeDimIndex=o.ensureCalculationDimension(c,f),v.storeDimIndex=o.ensureCalculationDimension(h,f)),r.appendCalculationDimension(y),r.appendCalculationDimension(v)):(i.push(y),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function nx(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function ix(t,e){return nx(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rx(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=Hd(t)):o=(i=r.getSource()).sourceFormat===Lp;var a=function(t){var e=t.get("coordinateSystem"),n=new Jm(e),i=Qm[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,i=t.get("coordinateSystem"),r=hd.get(i);return e&&e.coordSysDims&&(n=z(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=Dm(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=U(l)?l:l?H(Hp,s,e):null,h=Km(i,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),c=function(t,e,n){var i,r;return n&&E(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}(h.dimensions,n.createInvertedIndices,a),p=o?null:r.getSharedDataStore(h),d=ex(e,{schema:h,store:p}),f=new qm(h,e);f.setCalculationInfo(d);var g=null!=c&&function(t){if(t.sourceFormat===Lp){return!Y(fo(function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Go(ox);var ax=0,sx=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++ax}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&z(i,lx);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!X(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ft(this.categories))},t}();function lx(t){return q(t)&&null!=t.value?t.value:t+""}function ux(t){return"interval"===t.type||"log"===t.type}function hx(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=$r(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=px(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),dx(t,0,e),dx(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[zr(Math.ceil(t[0]/a)*a,s),zr(Math.floor(t[1]/a)*a,s)],t),r}function cx(t){var e=Math.pow(10,Kr(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,zr(n*e)}function px(t){return Br(t)+2}function dx(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function fx(t,e){return t>=e[0]&&t<=e[1]}function gx(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function yx(t,e){return t*(e[1]-e[0])+e[0]}var vx=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new sx({})),Y(i)&&(i=new sx({categories:z(i,(function(t){return q(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return null==t?NaN:X(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return fx(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return gx(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(yx(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(ox);ox.registerClass(vx);var mx=zr,xx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return fx(t,this._extent)},e.prototype.normalize=function(t){return gx(t,this._extent)},e.prototype.scale=function(t){return yx(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=px(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:mx(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return E(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=Er(t.get("barWidth"),i),d=Er(t.get("barMaxWidth"),i),f=Er(t.get("barMinWidth")||(Ox(t)?.5:1),i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:Tx(r),stackId:Ix(t)})})),Ax(n)}function Ax(t){var e={};E(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return E(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=G(i).length;o=Math.max(35-4*a,15)+"%"}var s=Er(o,r),l=Er(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),E(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;E(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;E(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function kx(t,e){var n=Cx(t,e),i=Dx(n);E(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=Ix(t),o=i[Tx(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function Lx(t){return{seriesType:t,plan:yg(),reset:function(t){if(Px(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(r.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),h=nx(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),c=r.isHorizontal(),p=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,r),d=Ox(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),y=e.getLayout("size"),v=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,l=d&&Sx(3*r),u=d&&s&&Sx(3*r),m=d&&Sx(r),x=n.master.getRect(),_=c?x.width:x.height,b=e.getStore(),w=0;null!=(i=t.next());){var S=b.get(h?g:o,i),M=b.get(a,i),I=p,T=void 0;h&&(T=+S-b.get(o,i));var C=void 0,D=void 0,A=void 0,k=void 0;if(c){var L=n.dataToPoint([S,M]);if(h)I=n.dataToPoint([T,M])[0];C=I,D=L[1]+v,A=L[0]-I,k=y,Math.abs(A)0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Y(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return Vc(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r=1e4,o=Rc,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var x=B(z(u,(function(t){return B(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),_=[],b=x.length-1;for(d=0;dn&&(this._approxInterval=n);var o=Nx.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function zx(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function Vx(t){return(t/=Cc)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Bx(t,e){return(t/=e?Tc:Ic)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Fx(t){return $r(t,!0)}function Gx(t,e,n){var i=new Date(t);switch(Ec(e)){case"year":case"month":i[qc(n)](0);case"day":i[Kc(n)](1);case"hour":i[$c(n)](0);case"minute":i[Jc(n)](0);case"second":i[Qc(n)](0),i[tp(n)](0)}return i.getTime()}ox.registerClass(Rx);var Wx=ox.prototype,Hx=xx.prototype,Yx=zr,Ux=Math.floor,Xx=Math.ceil,Zx=Math.pow,jx=Math.log,qx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new xx,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return z(Hx.getTicks.call(this,t),(function(t){var e=t.value,r=zr(Zx(this.base,e));return r=e===n[0]&&this._fixMin?$x(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?$x(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=jx(t)/jx(n),e=jx(e)/jx(n),Hx.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=Wx.getExtent.call(this);e[0]=Zx(t,e[0]),e[1]=Zx(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=$x(e[0],n[0])),this._fixMax&&(e[1]=$x(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=jx(t[0])/jx(e),t[1]=jx(t[1])/jx(e),Wx.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=qr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[zr(Xx(e[0]/i)*i),zr(Ux(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){Hx.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return fx(t=jx(t)/jx(this.base),this._extent)},e.prototype.normalize=function(t){return gx(t=jx(t)/jx(this.base),this._extent)},e.prototype.scale=function(t){return t=yx(t,this._extent),Zx(this.base,t)},e.type="log",e}(ox),Kx=qx.prototype;function $x(t,e){return Yx(t,Br(e))}Kx.getMinorTicks=Hx.getMinorTicks,Kx.getLabel=Hx.getLabel,ox.registerClass(qx);var Jx=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[t_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=Qx[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),Qx={min:"_determinedMin",max:"_determinedMax"},t_={min:"_dataMin",max:"_dataMax"};function e_(t,e,n){var i=t.rawExtentInfo;return i||(i=new Jx(t,e,n),t.rawExtentInfo=i,i)}function n_(t,e){return null==e?null:nt(e)?NaN:t.parse(e)}function i_(t,e){var n=t.type,i=e_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Cx("bar",a),l=!1;if(E(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=Dx(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=function(t,e,n){if(t&&e){var i=t[Tx(e)];return null!=i&&null!=n?i[Ix(n)]:i}}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;E(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;E(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function r_(t,e){var n=e,i=i_(t,n),r=i.extent,o=n.get("splitNumber");t instanceof qx&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function o_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new vx({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Rx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(ox.getClass(e)||xx)}}function a_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):X(i)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):U(i)?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(s_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function s_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function l_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new sr(t.x,t.y,o,a)}function u_(t){var e=t.get("interval");return null==e?"auto":e}function h_(t){return"category"===t.type&&0===u_(t.getLabelModel())}function c_(t,e){var n={};return E(t.mapDimensionsAll(e),(function(e){n[ix(t,e)]=!0})),G(n)}var p_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var d_={isDimensionStacked:nx,enableDataStack:ex,getStackedDimension:ix};var f_=Object.freeze({__proto__:null,createList:function(t){return rx(null,t)},getLayoutRect:xp,dataStack:d_,createScale:function(t,e){var n=e;e instanceof dc||(n=new dc(e));var i=o_(n);return i.setExtent(t[0],t[1]),r_(i,n),i},mixinAxisModelCommonMethods:function(t){R(t,p_)},getECData:Hs,createTextStyle:function(t,e){return Uh(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:function(t,e){return Km(t,e).dimensions},createSymbol:Ly,enableHoverEmphasis:Ol});function g_(t,e){return Math.abs(t-e)<1e-8}function y_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;on&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function C_(t,e){return z(B((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),E(e.features,(function(t){var e=t.geometry,i=e.encodeOffsets,r=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=T_(r,i,n);break;case"Polygon":case"MultiLineString":I_(r,i,n);break;case"MultiPolygon":E(r,(function(t,e){return I_(t,i[e],n)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new b_(o[0],o.slice(1)));break;case"MultiPolygon":E(i.coordinates,(function(t){t[0]&&r.push(new b_(t[0],t.slice(1)))}));break;case"LineString":r.push(new w_([i.coordinates]));break;case"MultiLineString":r.push(new w_(i.coordinates))}var a=new S_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var D_=Object.freeze({__proto__:null,linearMap:Nr,round:zr,asc:Vr,getPrecision:Br,getPrecisionSafe:Fr,getPixelPrecision:Gr,getPercentWithPrecision:Wr,MAX_SAFE_INTEGER:Yr,remRadian:Ur,isRadianAroundZero:Xr,parseDate:jr,quantity:qr,quantityExponent:Kr,nice:$r,quantile:Jr,reformIntervals:Qr,isNumeric:eo,numericToNumber:to}),A_=Object.freeze({__proto__:null,parse:jr,format:Vc}),k_=Object.freeze({__proto__:null,extendShape:fh,extendPath:yh,makePath:xh,makeImage:_h,mergePath:wh,resizePath:Sh,createIcon:Ph,updateProps:rh,initProps:oh,getTransform:Ih,clipPointsByRect:kh,clipRectByRect:Lh,registerShape:vh,getShapeClass:mh,Group:Cr,Image:_s,Text:ks,Circle:hu,Ellipse:pu,Sector:Cu,Ring:Au,Polygon:Pu,Polyline:Ru,Rect:Cs,Line:zu,BezierCurve:Gu,Arc:Hu,IncrementalDisplayable:th,CompoundPath:Yu,LinearGradient:Xu,RadialGradient:Zu,BoundingRect:sr}),L_=Object.freeze({__proto__:null,addCommas:ep,toCamelCase:np,normalizeCssArray:ip,encodeHTML:ap,formatTpl:hp,getTooltipMarker:cp,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=jr(e),r=n?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),h=i[r+"Seconds"](),c=i[r+"Milliseconds"]();return t=t.replace("MM",Nc(a,2)).replace("M",a).replace("yyyy",o).replace("yy",Nc(o%100+"",2)).replace("dd",Nc(s,2)).replace("d",s).replace("hh",Nc(l,2)).replace("h",l).replace("mm",Nc(u,2)).replace("m",u).replace("ss",Nc(h,2)).replace("s",h).replace("SSS",Nc(c,3))},capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:$o,getTextRect:function(t,e,n,i,r,o,a,s){return new ks({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),P_=Object.freeze({__proto__:null,map:z,each:E,indexOf:P,inherits:O,reduce:V,filter:B,bind:W,curry:H,isArray:Y,isString:X,isObject:q,isFunction:U,extend:A,defaults:k,clone:T,merge:C}),O_=So();function R_(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=E_(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=a_(t);return{labels:z(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function N_(t,e){return"category"===t.type?function(t,e){var n,i,r=z_(t,"ticks"),o=u_(e),a=V_(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(U(o))n=G_(t,o,!0);else if("auto"===o){var s=E_(t,t.getLabelModel());i=s.labelCategoryInterval,n=z(s.labels,(function(t){return t.tickValue}))}else n=F_(t,i=o,!0);return B_(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:z(t.scale.getTicks(),(function(t){return t.value}))}}function E_(t,e){var n,i,r=z_(t,"labels"),o=u_(e),a=V_(r,o);return a||(U(o)?n=G_(t,o):(i="auto"===o?function(t){var e=O_(t).autoInterval;return null!=e?e:O_(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=F_(t,i)),B_(r,o,{labels:n,labelCategoryInterval:i}))}function z_(t,e){return O_(t)[e]||(O_(t)[e]=[])}function V_(t,e){for(var n=0;n1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=h_(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function G_(t,e,n){var i=t.scale,r=a_(t),o=[];return E(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var W_=[0,1],H_=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Gr(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Y_(n=n.slice(),i.count()),Nr(t,W_,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Y_(n=n.slice(),i.count());var r=Nr(t,n,W_,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=z(N_(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;E(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=zr(t),e=zr(e),h?t>e:t0&&t<100||(t=5),z(this.scale.getMinorTicks(t),(function(t){return z(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return R_(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=a_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=cr(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var v=p/h,m=d/c;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var x=Math.max(0,Math.floor(Math.min(v,m))),_=O_(t.model),b=t.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},t}();function Y_(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var U_=2*Math.PI,X_=qa.CMD,Z_=["top","right","bottom","left"];function j_(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function q_(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%U_<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=ts(r),r=ts(p)}else i=ts(i),r=ts(r);i>r&&(r+=U_);var d=Math.atan2(s,a);if(d<0&&(d+=U_),d>=i&&d<=r||d+U_>=i&&d+U_<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(r)+t,v=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(v-s)*(v-s);return m0){e=e/180*Math.PI,eb.fromArray(t[0]),nb.fromArray(t[1]),ib.fromArray(t[2]),Ji.sub(rb,eb,nb),Ji.sub(ob,ib,nb);var n=rb.len(),i=ob.len();if(!(n<.001||i<.001)){rb.scale(1/n),ob.scale(1/i);var r=rb.dot(ob);if(Math.cos(e)1&&Ji.copy(lb,ib),lb.toArray(t[1])}}}}function hb(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,eb.fromArray(t[0]),nb.fromArray(t[1]),ib.fromArray(t[2]),Ji.sub(rb,nb,eb),Ji.sub(ob,ib,nb);var i=rb.len(),r=ob.len();if(!(i<.001||r<.001))if(rb.scale(1/i),ob.scale(1/r),rb.dot(e)=a)Ji.copy(lb,ib);else{lb.scaleAndAdd(ob,o/Math.tan(Math.PI/2-s));var l=ib.x!==nb.x?(lb.x-nb.x)/(ib.x-nb.x):(lb.y-nb.y)/(ib.y-nb.y);if(isNaN(l))return;l<0?Ji.copy(lb,nb):l>1&&Ji.copy(lb,ib)}lb.toArray(t[1])}}}function cb(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function pb(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Et(i[0],i[1]),o=Et(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Bt([],i[1],i[0],a/r),l=Bt([],i[1],i[2],a/o),u=Bt([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&_(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),x(f,g,1),x(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function x(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){_(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function _(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){_(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?_(n,0,i+1):_(-n,a-i-1,a),(t-=n)<=0)return}}function vb(t,e,n,i){return yb(t,"y","height",e,n,i)}function mb(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new sr(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r=0&&n.attr(d.oldLayoutSelect),P(u,"emphasis")>=0&&n.attr(d.oldLayoutEmphasis)),rh(n,s,e,a)}else if(n.attr(s),!Jh(n).valueAnimation){var h=rt(n.style.opacity,1);n.style.opacity=0,oh(n,{style:{opacity:h}},e,a)}if(d.oldLayout=s,n.states.select){var c=d.oldLayoutSelect={};Ib(c,s,Tb),Ib(c,n.states.select,Tb)}if(n.states.emphasis){var p=d.oldLayoutEmphasis={};Ib(p,s,Tb),Ib(p,n.states.emphasis,Tb)}tc(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=Mb(i)).oldLayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),rh(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,oh(i,{style:{strokePercent:1}},e)),d.oldLayout=f}},t}(),Db=So();var Ab=Math.sin,kb=Math.cos,Lb=Math.PI,Pb=2*Math.PI,Ob=180/Lb,Rb=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,u=!s,h=Math.abs(l),c=En(h-Pb)||(u?l>=Pb:-l>=Pb),p=l>0?l%Pb:l%Pb+Pb,d=!1;d=!!c||!En(h)&&p>=Lb==!!u;var f=t+n*kb(o),g=e+i*Ab(o);this._start&&this._add("M",f,g);var y=Math.round(r*Ob);if(c){var v=1/this._p,m=(u?1:-1)*(Pb-v);this._add("A",n,i,y,1,+u,t+n*kb(o+m),e+i*Ab(o+m)),v>.01&&this._add("A",n,i,y,0,+u,f,g)}else{var x=t+n*kb(a),_=e+i*Ab(a);this._add("A",n,i,y,+d,+u,x,_)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,e.attrs)+(e.text||"")+(i?""+n+z(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function Ub(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Xb(t,e,n,i){return Hb("svg","root",{width:t,height:e,xmlns:Fb,"xmlns:xlink":Gb,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var Zb={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},jb="transform-origin";function qb(t,e,n){var i=A({},t.shape);A(i,e),t.buildPath(n,i);var r=new Rb;return r.reset(Yn(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function Kb(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[jb]=n+"px "+i+"px")}var $b={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Jb(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function Qb(t){return X(t)?Zb[t]?"cubic-bezier("+Zb[t]+")":rn(t)?t:"":""}function tw(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof Yu){if(y=function(t,e,n){var i,r,o=t.shape.paths,a={};if(E(o,(function(t){var e=Ub(n.zrId);e.animation=!0,tw(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=G(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var p=h[c];a[c]=a[c]||{d:""},a[c].d+=p.d||""}for(var d in s){var f=s[d].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=Jb(a,n);return i.replace(r,s)}}(t,e,n))a.push(y);else if(!o)return}else if(!o)return;for(var s={},l=0;l0})).length)return Jb(h,n)+" "+r[0]+" both"}for(var g in s){var y;(y=f(s[g]))&&a.push(y)}if(a.length){var v=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+v]={animation:a.join(",")},e.class=v}}var ew=Math.round;function nw(t){return t&&X(t.src)}function iw(t){return t&&U(t.toDataURL)}function rw(t,e,n,i){Bb((function(r,o){var a="fill"===r||"stroke"===r;a&&function(t){return t&&("linear"===t.type||"radial"===t.type)}(o)?function(t,e,n,i){var r,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Gn(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Wn(o))return void 0;r="radialGradient",a.cx=rt(o.x,.5),a.cy=rt(o.y,.5),a.r=rt(o.r,.5)}for(var s=o.colorStops,l=[],u=0,h=s.length;ul?Dw(t,null==n[c+1]?null:n[c+1].elm,n,s,c):Aw(t,e,a,l))}(n,i,r):Mw(r)?(Mw(t.text)&&bw(n,""),Dw(n,null,r,0,r.length-1)):Mw(i)?Aw(n,i,0,i.length-1):Mw(t.text)&&bw(n,""):t.text!==e.text&&(Mw(i)&&Aw(n,i,0,i.length-1),bw(n,e.text)))}var Pw=0,Ow=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=Rw("refreshHover"),this.configLayer=Rw("configLayer"),this.storage=e,this._opts=n=A({},n),this.root=t,this._id="zr"+Pw++,this._oldVNode=Xb(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=Wb("svg");kw(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Tw(t,e))Lw(t,e);else{var n=t.elm,i=xw(n);Cw(e),null!==i&&(yw(i,e.elm,_w(n)),Aw(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return dw(t,Ub(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._backgroundColor,i=this._width,r=this._height,o=Ub(this._id);o.animation=t.animation,o.willUpdate=t.willUpdate,o.compress=t.compress;var a=[];if(n&&"none"!==n){var s=Rn(n),l=s.color,u=s.opacity;this._bgVNode=Hb("rect","bg",{width:i,height:r,x:"0",y:"0",id:"0",fill:l,"fill-opacity":u}),a.push(this._bgVNode)}else this._bgVNode=null;var h=t.compress?null:this._mainVNode=Hb("g","main",{},[]);this._paintList(e,o,h?h.children:a),h&&a.push(h);var c=z(G(o.defs),(function(t){return o.defs[t]}));if(c.length&&a.push(Hb("defs","defs",{},c)),t.animation){var p=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=z(G(t),(function(e){return e+r+z(G(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=z(G(e),(function(t){return"@keyframes "+t+r+z(G(e[t]),(function(n){return n+r+z(G(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(o.cssNodes,o.cssAnims,{newline:!0});if(p){var d=Hb("style","stl",{},[],p);a.push(d)}}return Xb(i,r,a,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},Yb(this.renderToVNode({animation:rt(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:rt(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var n=Rn(t),i=n.color,r=n.opacity;e.elm.setAttribute("fill",i),r<1&&e.elm.setAttribute("fill-opacity",r)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=d-1;g>f;g--)i=a[--s-1];for(var y=f+1;y=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&u.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var _=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?Bw:0),this._needsManuallyCompositing),u.__builtin__||I("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?C(n[t],e,!0):n[t]=e;for(var i=0;i-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(sg);function Ww(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=af(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var Yw=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return n(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=Ly(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=Uw,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){_l(this.childAt(0))},e.prototype.downplay=function(){bl(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,h)}else{(p=this.childAt(0)).silent=!1;var c={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(c):rh(p,c,a,n),hh(p)}if(this._updateCommon(t,n,s,i,r),l){var p=this.childAt(0);if(!u){c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,oh(p,c,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,c=i.labelStatesModels,p=i.hoverScale,d=i.cursorStyle,h=i.emphasisDisabled),!i||t.hasItemOption){var y=i&&i.itemModel?i.itemModel:t.getItemModel(e),v=y.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=y.getModel(["select","itemStyle"]).getItemStyle(),a=y.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),h=v.get("disabled"),c=Yh(y),p=v.getShallow("scale"),d=y.getShallow("cursor")}var m=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(m||0)*Math.PI/180||0);var x=Oy(t.getItemVisual(e,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),d&&f.attr("cursor",d);var _=t.getItemVisual(e,"style"),b=_.fill;if(f instanceof _s){var w=f.style;f.useStyle(A({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(A({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var I=r&&r.useNameLabel;Hh(f,c,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return I?t.getName(e):Ww(t,e)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var T=f.ensureState("emphasis");if(T.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a,p){var C=Math.max(j(p)?p:1.1,3/this._sizeY);T.scaleX=this._sizeX*C,T.scaleY=this._sizeY*C}this.setSymbolScale(1),Rl(this,l,u,h)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=Hs(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&sh(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();sh(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return Py(t.getItemVisual(e,"symbolSize"))},e}(Cr);function Uw(t,e){this.parent.drift(t,e)}function Xw(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function Zw(t){return null==t||q(t)||(t={isIgnore:t}),t||{}}function jw(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Yh(e),cursorStyle:e.get("cursor")}}var qw=function(){function t(t){this.group=new Cr,this._SymbolCtor=t||Yw}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=Zw(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=jw(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(Xw(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(h,c){var p=r.getItemGraphicEl(c),d=u(h);if(Xw(t,d,h,e)){var f=t.getItemVisual(h,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(t,h,s,l)).setPosition(d);else{p.updateData(t,h,s,l);var y={x:d[0],y:d[1]};a?p.attr(y):rh(p,y,i)}n.add(p),t.setItemGraphicEl(h,p)}else n.remove(p)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=jw(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=Zw(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=z(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return nx(e,c[0])&&(p=!0,c[0]=d),nx(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function $w(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var Jw=Math.min,Qw=Math.max;function tS(t,e){return isNaN(t)||isNaN(e)}function eS(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(tS(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),c=v,p=m;else{var x=v-u,_=m-h;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===m&&y=i||tS(w,S))d=v,f=m;else{T=w-u,C=S-h;var k=v-u,L=w-v,P=m-h,O=S-m,R=void 0,N=void 0;if("x"===s){var E=T>0?1:-1;d=v-E*(R=Math.abs(k))*a,f=m,D=v+E*(N=Math.abs(L))*a,A=m}else if("y"===s){var z=C>0?1:-1;d=v,f=m-z*(R=Math.abs(P))*a,D=v,A=m+z*(N=Math.abs(O))*a}else R=Math.sqrt(k*k+P*P),d=v-T*a*(1-(I=(N=Math.sqrt(L*L+O*O))/(N+R))),f=m-C*a*(1-I),A=m+C*a*I,D=Jw(D=v+T*a*I,Qw(w,v)),A=Jw(A,Qw(S,m)),D=Qw(D,Jw(w,v)),f=m-(C=(A=Qw(A,Jw(S,m)))-m)*R/N,d=Jw(d=v-(T=D-v)*R/N,Qw(u,v)),f=Jw(f,Qw(h,m)),D=v+(T=v-(d=Qw(d,Jw(u,v))))*N/R,A=m+(C=m-(f=Qw(f,Jw(h,m))))*N/R}t.bezierCurveTo(c,p,d,f,v,m),c=D,p=A}else t.lineTo(v,m)}u=v,h=m,g+=o}return y}var nS=function(){this.smooth=0,this.smoothConstraint=!0},iS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new nS},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&tS(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?Ue(n,u,c,d,t,s):Ue(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?He(i,h,p,f,x):He(n,u,c,d,x);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(gs),rS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(nS),oS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new rS},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&tS(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=z(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var p=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:Tn((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),d=p.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var f=p[0].coord-10,g=p[d-1].coord+10,y=g-f;if(y<.001)return"transparent";E(p,(function(t){t.offset=(t.coord-f)/y})),p.push({offset:d?p[d-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:c[0]||"transparent"});var v=new Xu(0,0,0,0,p,!0);return v[r]=f,v[r+"2"]=g,v}}}function yS(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return E(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function vS(t,e){return[t[2*e],t[2*e+1]]}function mS(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1);Hs(d).seriesIndex=t.seriesIndex,Rl(d,L,P,O);var R=dS(t.get("smooth")),N=t.get("smoothMonotone");if(d.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var E=a.getCalculationInfo("stackedOnSeries"),z=0;f.useStyle(k(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),E&&(z=dS(E.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:z,smoothMonotone:N,connectNulls:w}),Vl(f,t,"areaStyle"),Hs(f).seriesIndex=t.seriesIndex,Rl(f,L,P,O)}var V=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=V)})),this._polyline.onHoverStateChange=V,this._data=a,this._coordSys=r,this._stackedOnPoints=_,this._points=u,this._step=T,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,d),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){Hs(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=wo(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel"),c=t.get("z");(s=new Yw(r,o)).x=l,s.y=u,s.setZ(h,c);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else xg.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=wo(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else xg.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;gl(this._polyline,t),e&&gl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new iS({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new oS({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");U(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=U(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(n)if(r){var g=n,y=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-y[1]/180*Math.PI):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var x=U(u)?u(o):l*m+h,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(mS(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new ks({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(Hh(o,Yh(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?Hw(r,n):Ww(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?d:0)*(y?-1:1),_=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!c){var T=vS(u,S[0]);s.attr({x:T[0]+x,y:T[1]+_}),r&&(I=h.getRawValue(S[0]))}else{(T=l.getPointOn(m,b))&&s.attr({x:T[0]+x,y:T[1]+_});var C=h.getRawValue(S[0]),D=h.getRawValue(S[1]);r&&(I=Po(n,p,C,D,w.t))}i.lastFrameIndex=S[0]}else{var A=1===t||i.lastFrameIndex>0?S[0]:0;T=vS(u,A);r&&(I=h.getRawValue(A)),s.attr({x:T[0]+x,y:T[1]+_})}r&&Jh(s).setLabelText(I)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=Kw(r,e,a),v=t.getLayout("points")||[],m=e.getLayout("points")||[],x=0;x3e3||l&&pS(p,f)>3e3)return s.stopAnimation(),s.setShape({points:d}),void(l&&(l.stopAnimation(),l.setShape({points:d,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:d}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),rh(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:p}),l.stopAnimation(),rh(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],v=h.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(isFinite(p)&&p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;X(r)?d=wS[r]:U(r)&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,SS))}}}}}var IS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return rx(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e&&e.clampData){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(sg);sg.registerClass(IS);var TS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return rx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=yc(IS.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(IS),CS=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},DS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new CS},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,p=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){uh(e,t,Hs(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(xg),RS={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=LS(e.x,t.x),s=PS(e.x+e.width,r),l=LS(e.y,t.y),u=PS(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=PS(e.r,t.r),o=LS(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},NS={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new Cs({shape:A({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?DS:Cu,h=new u({shape:i,z2:1});h.name="item";var c,p,d=WS(r);if(h.calculateTextPosition=(c=d,p=({isRoundCap:u===DS}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return yr(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,d=(u+h)/2,f=a.startAngle,g=a.endAngle,y=(f+g)/2,v=p?Math.abs(u-h)/2:0,m=Math.cos,x=Math.sin,_=s+u*m(f),b=l+u*x(f),w="left",S="top";switch(r){case"startArc":_=s+(h-o)*m(y),b=l+(h-o)*x(y),w="center",S="top";break;case"insideStartArc":_=s+(h+o)*m(y),b=l+(h+o)*x(y),w="center",S="bottom";break;case"startAngle":_=s+d*m(f)+AS(f,o+v,!1),b=l+d*x(f)+kS(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+d*m(f)+AS(f,-o+v,!1),b=l+d*x(f)+kS(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+d*m(y),b=l+d*x(y),w="center",S="middle";break;case"endArc":_=s+(u+o)*m(y),b=l+(u+o)*x(y),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*m(y),b=l+(u-o)*x(y),w="center",S="top";break;case"endAngle":_=s+d*m(g)+AS(g,o+v,!0),b=l+d*x(g)+kS(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+d*m(g)+AS(g,-o+v,!0),b=l+d*x(g)+kS(g,-o+v,!0),w="right",S="middle";break;default:return yr(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?0:i.startAngle,g[f]=i[f],(s?rh:oh)(h,{shape:g},o)}return h}};function ES(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?rh:oh)(n,{shape:l},e,r,null),(a?rh:oh)(n,{shape:u},e?t.baseAxis.model:null,r)}function zS(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function WS(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function HS(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u);var h=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",c=Yh(i);Hh(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:Ww(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var p=t.getTextContent();if(s&&p){var d=i.get(["label","position"]);t.textConfig.inside="middle"===d||null,function(t,e,n,i){if(j(i))t.setTextConfig({rotation:i});else if(Y(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===d?h:d,WS(a),i.get(["label","rotate"]))}Qh(p,c,o.getRawValue(n),(function(t){return Hw(e,t)}));var f=i.getModel(["emphasis"]);Rl(t,f.get("focus"),f.get("blurScope"),f.get("disabled")),Vl(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",E(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var YS=function(){},US=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new YS},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);Hs(this).dataIndex=e>=0?e:null}),30,!1);function jS(t,e,n){if(uS(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var qS=2*Math.PI,KS=Math.PI/180;function $S(t,e){return xp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function JS(t,e){var n=$S(t,e),i=t.get("center"),r=t.get("radius");Y(r)||(r=[0,r]),Y(i)||(i=[i,i]);var o=Er(n.width,e.getWidth()),a=Er(n.height,e.getHeight()),s=Math.min(o,a);return{cx:Er(i[0],o)+n.x,cy:Er(i[1],a)+n.y,r0:Er(r[0],s/2),r:Er(r[1],s/2)}}function QS(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=$S(t,n),o=JS(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*KS,c=t.get("minAngle")*KS,p=0;e.each(i,(function(t){!isNaN(t)&&p++}));var d=e.getSum(i),f=Math.PI/(d||p)*2,g=t.get("clockwise"),y=t.get("roseType"),v=t.get("stillShowZeroSum"),m=e.getDataExtent(i);m[0]=0;var x=qS,_=0,b=h,w=g?1:-1;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:y?NaN:l});else{(i="area"!==y?0===d&&v?f:t*f:qS/p)n?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:d:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var y=(i.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-c)/2}}}function rM(t){return"center"===t.position}function oM(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*eM,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,p=s.height;function d(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,p=s.getTextContent(),f=s.getTextGuideLine(),g=i.getItemModel(t),y=g.getModel("label"),v=y.get("position")||g.get(["emphasis","label","position"]),m=y.get("distanceToLabelLine"),x=y.get("alignTo"),_=Er(y.get("edgeDistance"),u),b=y.get("bleedMargin"),w=g.getModel("labelLine"),S=w.get("length");S=Er(S,u);var M=w.get("length2");if(M=Er(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":k>0?"left":"right"}var B=Math.PI,F=0,G=y.get("rotate");if(j(G))F=G*(B/180);else if("center"===v)F=0;else if("radial"===G||!0===G){F=k<0?-A+B:-A}else if("tangential"===G&&"outside"!==v&&"outer"!==v){var W=Math.atan2(k,L);W<0&&(W=2*B+W),L>0&&(W=B+W),F=W-B}if(o=!!F,p.x=I,p.y=T,p.rotation=F,p.setStyle({verticalAlign:"middle"}),P){p.setStyle({align:D});var H=p.states.select;H&&(H.x+=p.x,H.y+=p.y)}else{var Y=p.getBoundingRect().clone();Y.applyTransform(p.getComputedTransform());var U=(p.style.margin||0)+2.1;Y.y-=U/2,Y.height+=U,r.push({label:p,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new Ji(k,L),linePoints:C,textAlign:D,labelDistance:m,labelAlignTo:x,edgeDistance:_,bleedMargin:b,rect:Y,unconstrainedWidth:Y.width,labelStyleWidth:p.style.width})}s.setTextConfig({inside:P})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(xg);function uM(t,e,n){e=Y(e)&&{coordDimensions:e}||A({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=Km(i,e).dimensions,o=new qm(r,t);return o.initData(i,n),o}var hM=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),cM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new hM(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return uM(this,{coordDimensions:["value"],encodeDefaulter:H(Yp,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=Wr(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){co(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(sg);var pM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return rx(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(sg),dM=function(){},fM=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.getDefaultShape=function(){return new dM},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),yM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=bS("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new gM:new qw,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(xg),vM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Tp),mM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Co).models[0]},e.type="cartesian2dAxis",e}(Tp);R(mM,p_);var xM={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},_M=C({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},xM),bM=C({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},xM),wM={category:_M,value:bM,time:C({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},bM),log:k({logBase:10},bM)},SM={value:1,category:1,time:1,log:1};function MM(t,e,i,r){E(SM,(function(o,a){var s=C(C({},wM[a],!0),r,!0),l=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return n(i,t),i.prototype.mergeDefaultAndTheme=function(t,e){var n=bp(this),i=n?Sp(t):{};C(t,e.getTheme().get(a+"Axis")),C(t,this.getDefaultOption()),t.type=IM(t),n&&wp(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=sx.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=e+"Axis."+a,i.defaultOption=s,i}(i);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",IM)}function IM(t){return t.type||(t.data?"category":"value")}var TM=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return z(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),B(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),CM=["x","y"];function DM(t){return"interval"===t.type||"time"===t.type}var AM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=CM,e}return n(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(DM(t)&&DM(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,p=this._transform=[l,0,0,u,h,c];this._invTransform=Bi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new sr(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return Ft(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return Ft(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new sr(n,i,r,o)},e}(TM),kM=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return n(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(H_);function LM(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),it(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function PM(t){return"cartesian2d"===t.get("coordinateSystem")}function OM(t){var e={xAxisModel:null,yAxisModel:null};return E(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Co).models[0];e[i]=o})),e}var RM=Math.log;function NM(t,e,n){var i=xx.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=i_(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var p=RM(t.base);u=[RM(u[0])/p,RM(u[1])/p]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var d=i.getExtent.call(t);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var f=i.getInterval.call(t),g=u[0],y=u[1];if(h&&c)f=(y-g)/a;else if(h)for(y=u[0]+f*a;yu[0]&&isFinite(g)&&isFinite(u[0]);)f=cx(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=cx(f));var v=f*a;(g=zr((y=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,y=zr(v)):y>0&&u[1]<=0&&(y=0,g=-zr(v))}var m=(r[0].value-o[0].value)/s,x=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*m,y+f*x),i.setInterval.call(t,f),(m||x)&&i.setNiceExtent.call(t,g+f,y-f)}var EM=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=CM,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=G(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;ux(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(r_(l,s),ux(l)&&(e=a))}r.length&&(e||r_((e=r.pop()).scale,e.model),E(r,(function(t){NM(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};E(n.x,(function(t){VM(n,"y",t,r)})),E(n.y,(function(t){VM(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=xp(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){E(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(E(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof vx?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=a_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var FM=Math.PI,GM=function(){function t(t,e){this.group=new Cr,this.opt=e,this.axisModel=t,k(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Cr({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!WM[t]},t.prototype.add=function(t){WM[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=Ur(e-t);return Xr(o)?(r=n>0?"top":"bottom",i="center"):Xr(o-FM)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),WM={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(Ft(s,s,a),Ft(l,l,a));var u=A({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new zu({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});h.anid="line",n.add(h);var c=e.get(["axisLine","symbol"]);if(null!=c){var p=e.get(["axisLine","symbolSize"]);X(c)&&(c=[c,c]),(X(p)||j(p))&&(p=[p,p]);var d=Oy(e.get(["axisLine","symbolOffset"])||0,p),f=p[0],g=p[1];E([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==c[i]&&null!=c[i]){var r=Ly(c[i],-f/2,-g/2,f,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=XM(r.getTicksCoords(),e.transform,l,k(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,UM(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*FM/180),UM(s)?o=GM.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=Ur(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;Xr(a-FM/2)?(o=l?"bottom":"top",r="center"):Xr(a-1.5*FM)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*FM&&a>FM/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=it(t.nameTruncateMaxWidth,y.maxWidth,a),x=new ks({x:d[0],y:d[1],rotation:o.rotation,silent:GM.isLabelSilent(e),style:Uh(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Eh({el:x,componentModel:e,itemName:r}),x.__fullText=r,x.anid="name",e.get("triggerEvent")){var _=GM.makeAxisEventDataBase(e);_.targetType="axisName",_.name=r,Hs(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function HM(t){t&&(t.ignore=!0)}function YM(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Oi([]);return zi(r,r,-t.rotation),n.applyTransform(Ni([],r,t.getLocalTransform())),i.applyTransform(Ni([],r,e.getLocalTransform())),n.intersect(i)}}function UM(t){return"middle"===t||"center"===t}function XM(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function qM(t){var e=KM(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=$M(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var p=a;null!=c.color&&(p=k({color:c.color},a));var d=C(T(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:h},!1);if(X(l)){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else U(l)&&(d.name=l(d.name,d));var g=new dc(d,null,this.ecModel);return R(g,p_.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:C({lineStyle:{color:"#bbb"}},xI.axisLine),axisLabel:_I(xI.axisLabel,!1),axisTick:_I(xI.axisTick,!1),splitLine:_I(xI.splitLine,!0),splitArea:_I(xI.splitArea,!0),indicator:[]},e}(Tp),wI=["axisLine","axisTickLabel","axisName"],SI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;E(z(e.getIndicatorAxes(),(function(t){var n=t.model.get("showName")?t.name:"";return new GM(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){E(wI,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),p=Y(h)?h:[h],d=Y(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].getTicksCoords(),v=e.cx,m=e.cy,x=0;x3?1.4:r>1?1.2:1.1;LI(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);LI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){DI(this._zr,"globalPan")||LI(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(Xt);function LI(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(se(i.event),PI(t,e,n,i,r))}function PI(t,e,n,i,r){r.isAvailableBehavior=W(OI,null,n,i),t.trigger(e,r)}function OI(t,e,n){var i=n[t];return!t||i&&(!X(i)||e.event[i+"Key"])}function RI(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function NI(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var EI,zI={axisPointer:1,tooltip:1,brush:1};function VI(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!zI.hasOwnProperty(i.mainType)&&r&&r.model!==n}function BI(t){X(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var FI={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},GI=G(FI),WI={"alignment-baseline":"textBaseline","stop-color":"stopColor"},HI=G(WI),YI=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=BI(t);this._defsUsePending=[];var i=new Cr;this._root=i;var r=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),KI(n,i,null,!0,!1);for(var l,u,h=n.firstChild;h;)this._parseNode(h,i,r,null,!1,!1),h=h.nextSibling;if(function(t,e){for(var n=0;n=4&&(l={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(l&&null!=a&&null!=s&&(u=oT(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new Cr).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new Cs({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=EI[s];if(u&&mt(EI,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var p=UI[s];if(p&&mt(UI,s)){var d=p.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=d)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new vs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});jI(e,n),KI(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(EI={g:function(t,e){var n=new Cr;return jI(e,n),KI(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Cs;return jI(e,n),KI(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new hu;return jI(e,n),KI(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new zu;return jI(e,n),KI(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new pu;return jI(e,n),KI(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=qI(i));var r=new Pu({shape:{points:n||[]},silent:!0});return jI(e,r),KI(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=qI(i));var r=new Ru({shape:{points:n||[]},silent:!0});return jI(e,r),KI(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new _s;return jI(e,n),KI(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Cr;return jI(e,a),KI(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Cr;return jI(e,a),KI(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=su(t.getAttribute("d")||"");return jI(e,n),KI(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),UI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new Xu(e,n,i,r);return XI(t,o),ZI(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new Zu(e,n,i);return XI(t,r),ZI(t,r),r}};function XI(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function ZI(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};rT(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function jI(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),k(e.__inheritedStyle,t.__inheritedStyle))}function qI(t){for(var e=tT(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=tT(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":Ei(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Vi(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":zi(r,r,-parseFloat(l[0])*nT);break;case"skewX":Ni(r,[1,0,Math.tan(parseFloat(l[0])*nT),1,0,0],r);break;case"skewY":Ni(r,[1,Math.tan(parseFloat(l[0])*nT),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),rT(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=ft(),n=ft(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(p=r);var d=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Hh(e,Yh(i),{labelFetcher:p,labelDataIndex:c,defaultText:n},d);var f=e.getTextContent();if(f&&(TT(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function PT(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):Hs(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function OT(t,e,n,i,r){t.data||Eh({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function RT(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return Rl(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&function(t,e,n){var i=Hs(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}function NT(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),E(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(sg);function VT(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),E(e,(function(t,e){for(var n,i,r,o=(n=z(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},E(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(d.width=p,d.height=p/x):(d.height=p,d.width=p*x),d.y=c[1]-d.height/2,d.x=c[0]-d.width/2;else{var b=t.getBoxLayoutParams();b.aspect=x,d=xp(b,{width:v,height:m})}this.setViewRect(d.x,d.y,d.width,d.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}R(UT,GT);var jT=new(function(){function t(){this.dimensions=YT}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new UT(o+r,o,A({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=ZT,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),E(r,(function(t,r){var o=z(t,(function(t){return t.get("nameMap")})),a=new UT(r,r,A({nameMap:D(o)},i(t[0])));a.zoomLimit=it.apply(null,z(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=ZT,a.resize(t[0],e),E(t,(function(t){t.coordinateSystem=a,function(t,e){E(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=ft(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=oC(s),o=aC(o),s&&o;){r=oC(r),a=aC(a),r.hierNode.ancestor=t;var p=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);p>0&&(lC(sC(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!oC(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!aC(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function nC(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function iC(t){return arguments.length?t:uC}function rC(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function oC(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function aC(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function sC(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function lC(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function uC(t,e){return t.parentNode===e.parentNode?1:2}var hC=function(){this.parentPoint=[],this.childPoints=[]},cC=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new hC},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Er(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var p=1;pm.x)||(_-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),T=I*(Math.PI/180),C=y.getTextContent();C&&(y.setTextConfig({position:M.get("position")||S,rotation:null==I?-_:T,origin:"center"}),C.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),A="relative"===D?gt(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():null;A&&(Hs(n).focus=A),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new Gu({shape:mC(h,c,p,r,r)})),rh(g,{shape:mC(h,c,p,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;me&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(X(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function LC(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function PC(t,e){return P(LC(t),e)>=0}function OC(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var RC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return n(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new dc(n,this,this.ecModel),r=AC.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return Xf("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=OC(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(sg);function NC(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function EC(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return xp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=iC((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=iC());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var p=u===h?1:a(u,h)/2,d=p-u.getLayout().x,f=0,g=0,y=0,v=0;if("radial"===i)f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),NC(l,(function(t){y=(t.getLayout().x+d)*f,v=(t.depth-1)*g;var e=rC(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(g=o/(h.getLayout().x+p+d),f=r/(c.depth-1||1),NC(l,(function(t){v=(t.getLayout().x+d)*g,y="LR"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),NC(l,(function(t){y=(t.getLayout().x+d)*f,v="TB"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function zC(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();A(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}var VC=["treemapZoomToNode","treemapRender","treemapMove"];function BC(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=ed(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var FC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};GC(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new dc({itemStyle:r},this,e),a=z((i=t.levels=function(t,e){var n,i,r=ho(e.get("color")),o=ho(e.get(["aria","decal","decals"]));if(!r)return;E(t=t||[],(function(t){var e=new dc(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e))||[],(function(t){return new dc(t,o,e)}),this),s=AC.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return Xf("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=OC(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},A(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ft(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){BC(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(sg);function GC(t){var e=0;E(t.children,(function(t){GC(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var WC=function(){function t(t){this.group=new Cr,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),_p(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=xo(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o,a,s,l,u,h,c,p,d,f=0,g=e.emptyItemWidth,y=t.get(["breadcrumb","height"]),v=(o=e.pos,a=e.box,l=a.width,u=a.height,h=Er(o.left,l),c=Er(o.top,u),p=Er(o.right,l),d=Er(o.bottom,u),(isNaN(h)||isNaN(parseFloat(o.left)))&&(h=0),(isNaN(p)||isNaN(parseFloat(o.right)))&&(p=l),(isNaN(c)||isNaN(parseFloat(o.top)))&&(c=0),(isNaN(d)||isNaN(parseFloat(o.bottom)))&&(d=u),s=ip(s||0),{width:Math.max(p-h-s[1]-s[3],0),height:Math.max(d-c-s[0]-s[2],0)}),m=e.totalWidth,x=e.renderList,_=x.length-1;_>=0;_--){var b=x[_],w=b.node,S=b.width,M=b.text;m>v.width&&(m-=S-g,S=g,M=null);var I=new Pu({shape:{points:HC(f,0,S,y,_===x.length-1,0===_)},style:k(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new ks({style:{text:M,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e5,onclick:H(r,w)});I.disableLabelAnimation=!0,this.group.add(I),YC(I,t,w),f+=S+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function HC(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function YC(t,e,n){Hs(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&OC(n,e)}}var UC=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new sr(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];Ei(s,s,[-(e-=a.x),-(n-=a.y)]),Vi(s,s,[t.scale,t.scale]),Ei(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&dp(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new WC(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(PC(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(xg);var tD=E,eD=q,nD=-1,iD=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=T(e);this.type=i,this.mappingMethod=n,this._normalizeData=dD[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(rD(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,E(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(tD(e,(function(t,e){n[t]=e})),!Y(i)){var r=[];q(i)?tD(i,(function(t,e){var i=n[e];r[null!=i?i:nD]=t})):r[-1]=i,i=pD(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):rD(r,!0):(lt("linear"!==n||r.dataExtent),rD(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return W(this._normalizeData,this)},t.listVisualTypes=function(){return G(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){q(t)?E(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=Y(e)?[]:q(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&tD(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(Y(t))t=t.slice();else{if(!eD(t))return[];var e=[];tD(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var p=new iD(c);return gD(p).drColorMappingBy=h,p}(0,r,o,0,u,d);E(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=A({},e);if(r){var s=r.type,l="color"===s&&gD(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);vD(t,o,n,i)}}))}else s=mD(u),h.fill=s}}function mD(t){var e=xD(t,"color");if(e){var n=xD(t,"colorAlpha"),i=xD(t,"colorSaturation");return i&&(e=Dn(e,null,null,i)),n&&(e=An(e,n)),e}}function xD(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function _D(t,e){var n=t.get(e);return Y(n)&&n.length?{name:e,range:n}:null}var bD=Math.max,wD=Math.min,SD=it,MD=E,ID=["itemStyle","borderWidth"],TD=["itemStyle","gapWidth"],CD=["upperLabel","show"],DD=["upperLabel","height"],AD={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=xp(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Er(SD(s.width,l[0]),r),h=Er(SD(s.height,l[1]),o),c=i&&i.type,p=kC(i,["treemapZoomToNode","treemapRootToNode"],t),d="treemapRender"===c||"treemapMove"===c?i.rootRect:null,f=t.getViewRoot(),g=LC(f);if("treemapMove"!==c){var y="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,p=0,d=c.length;pYr&&(u=Yr),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?bD(u*i/l,l/(u*r)):1/0}function PD(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var _=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originX=-f*_,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originX=f*_,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(Cr),gA=function(){function t(t){this.group=new Cr,this._LineCtor=t||fA}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=yA(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yA(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function TA(t,e){var n=[],i=Qe,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[Mt(l[0]),Mt(l[1])],l[2]&&l.__original.push(Mt(l[2])));var c=l.__original;if(null!=l[2]){if(St(r[0],c[0]),St(r[1],c[2]),St(r[2],c[1]),u&&"none"!==u){var p=KD(t.node1),d=IA(r,c[0],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],d,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){p=KD(t.node2),d=IA(r,c[1],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],d,n),r[1][1]=n[1],r[2][1]=n[2]}St(l[0],r[0]),St(l[1],r[2]),St(l[2],r[1])}else{if(St(o[0],c[0]),St(o[1],c[1]),Dt(a,o[1],o[0]),Rt(a,a),u&&"none"!==u){p=KD(t.node1);Ct(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=KD(t.node2);Ct(o[1],o[1],a,-p*e)}St(l[0],o[0]),St(l[1],o[1])}}))}function CA(t){return"view"===t.type}var DA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){var n=new qw,i=new gA,r=this.group;this._controller=new kI(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(CA(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):rh(s,l,t)}TA(t.getGraph(),qD(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p),u.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),r=t.getModel();if(n){n.off("drag").off("dragend");var o=r.get("draggable");o&&n.on("drag",(function(){c&&(c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(e),u.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){c&&c.setUnfixed(e)})),n.setDraggable(o&&!!c,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(Hs(n).focus=t.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(Hs(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var d="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),f=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var n=u.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();if(d){var r=u.getItemLayout(e),o=Math.atan2(r[1]-g,r[0]-f);o<0&&(o=2*Math.PI+o);var a=r[0]=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof LA||(e=this._nodesMap[AA(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function RA(t,e,n,i,r){for(var o=new kA(i),a=0;a "+p)),u++)}var d,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)d=rx(t,n);else{var g=hd.get(f),y=g&&g.dimensions||[];P(y,"value")<0&&y.concat(["value"]);var v=Km(t,{coordDimensions:y,encodeDefine:n.getEncode()}).dimensions;(d=new qm(v,n)).initData(t)}var m=new qm(["value"],n);return m.initData(l,s),r&&r(d,m),_C({mainData:d,struct:o,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}R(LA,OA("hostGraph","data")),R(PA,OA("hostGraph","edgeData"));var NA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new hM(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),co(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){FD(n=this)&&(n.__curvenessList=[],n.__edgeMap={},GD(n));var a=RA(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=dc.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return E(a.edges,(function(t){!function(t,e,n,i){if(FD(n)){var r=WD(t,e,n),o=n.__edgeMap,a=o[HD(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Xf("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return rg({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=z(this.option.categories||[],(function(t){return null!=t.value?t:A({value:0},t)})),e=new qm(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(sg),EA={type:"graphRoam",event:"graphRoam",update:"none"};var zA=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},VA=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return n(e,t),e.prototype.getDefaultShape=function(){return new zA},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(gs);function BA(t,e){var n=null==t?"":t+"";return e&&(X(e)?n=e.replace("{value}",n):U(e)&&(n=e(t))),n}var FA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:Er(n[0],e.getWidth()),cy:Er(n[1],e.getHeight()),r:Er(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?DS:Cu,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=[s,l];ja(f,!a);for(var g=(l=f[1])-(s=f[0]),y=s,v=0;c&&v=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(m.get("show")&&k!==_){P=(P=m.get("distance"))?P+l:l;for(var N=0;N<=b;N++){u=Math.cos(M),h=Math.sin(M);var E=new zu({shape:{x1:u*(f-P)+p,y1:h*(f-P)+d,x2:u*(f-S-P)+p,y2:h*(f-S-P)+d},silent:!0,style:D});"auto"===D.stroke&&E.setStyle({stroke:i((k+N/b)/_)}),c.add(E),M+=T}M-=T}else M+=I}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),y=t.getData(),v=y.mapDimension("value"),m=+t.get("min"),x=+t.get("max"),_=[m,x],b=[o,a];function w(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=Er(o.get("width"),r.r),s=Er(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),h=Er(u[0],r.r),c=Er(u[1],r.r),p=o.get("keepAspect");return(i=l?Ly(l,h-a/2,c-s,a,s,null,p):new VA({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?DS:Cu,i=f.get("overlap"),a=i?f.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=x-y.get(v,t)%x),c}(g||d)&&(y.diff(h).add((function(e){var n=y.get(v,e);if(d){var i=w(e,o);oh(i,{rotation:-((isNaN(+n)?b[0]:Nr(n,_,b,!0))+Math.PI/2)},t),u.add(i),y.setItemGraphicEl(e,i)}if(g){var r=S(e,o),a=f.get("clip");oh(r,{shape:{endAngle:Nr(n,_,b,a)}},t),u.add(r),Ys(t.seriesIndex,y.dataType,e,r),p[e]=r}})).update((function(e,n){var i=y.get(v,e);if(d){var r=h.getItemGraphicEl(n),a=r?r.rotation:o,s=w(e,a);s.rotation=a,rh(s,{rotation:-((isNaN(+i)?b[0]:Nr(i,_,b,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(g){var l=c[n],m=S(e,l?l.shape.endAngle:o),x=f.get("clip");rh(m,{shape:{endAngle:Nr(i,_,b,x)}},t),u.add(m),Ys(t.seriesIndex,y.dataType,e,m),p[e]=m}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(d){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof _s){var h=s.style;s.useStyle(A({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(Nr(y.get(v,t),_,[0,1],!0))),s.z2EmphasisLift=0,Vl(s,e),Rl(s,r,o,a)}if(g){var c=p[t];c.useStyle(y.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,Vl(c,e),Rl(c,r,o,a)}})),this._progressEls=p)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=Ly(r,e.cx-i/2+Er(o[0],e.r),e.cy-i/2+Er(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new Cr,c=[],p=[],d=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){c[t]=new ks({silent:!0}),p[t]=new ks({silent:!0})})).update((function(t,e){c[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),g=new Cr,y=i(Nr(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var m=v.get("offsetCenter"),x=r.cx+Er(m[0],r.r),_=r.cy+Er(m[1],r.r);(D=c[e]).attr({z2:f?0:2,style:Uh(v,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(D)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),S=r.cx+Er(w[0],r.r),M=r.cy+Er(w[1],r.r),I=Er(b.get("width"),r.r),T=Er(b.get("height"),r.r),C=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,D=p[e],A=b.get("formatter");D.attr({z2:f?0:2,style:Uh(b,{x:S,y:M,text:BA(o,A),width:isNaN(I)?null:I,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:C})}),Qh(D,{normal:b},o,(function(t){return BA(t,A)})),d&&tc(D,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return BA(a?a.interpolatedValue:o,A)}}),g.add(D)}h.add(g)})),this.group.add(h),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(xg),GA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return n(e,t),e.prototype.getInitialData=function(t,e){return uM(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(sg);var WA=["itemStyle","opacity"],HA=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new Ru,a=new ks;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return n(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(WA);l=null==l?1:l,n||hh(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,oh(i,{style:{opacity:l}},r,e)):rh(i,{style:{opacity:l},shape:{points:a.points}},r,e),Vl(i,o),this._updateLabel(t,e),Rl(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;Hh(r,Yh(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Ji(h[0][0],h[0][1]):null},rh(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),db(n,fb(a),{stroke:u})},e}(Pu),YA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new HA(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){uh(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(xg),UA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new hM(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return uM(this,{coordDimensions:["value"],encodeDefaulter:H(Yp,this)})},e.prototype._defaultLabelLine=function(t){co(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(sg);function XA(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return xp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&ok(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function ok(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var ak=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&C(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];E(B(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Tp),sk=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return n(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(H_);function lk(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=hk(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=hk(s,[0,a]),r=o=hk(s,[r,o]),i=0}e[0]=hk(e[0],n),e[1]=hk(e[1],n);var l=uk(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=hk(e[i],c),u=uk(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function uk(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function hk(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var ck=E,pk=Math.min,dk=Math.max,fk=Math.floor,gk=Math.ceil,yk=zr,vk=Math.PI,mk=function(){function t(t,e,n){this.type="parallel",this._axesMap=ft(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;ck(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new sk(t,o_(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();ck(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),r_(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=xp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=xk(e.get("axisExpandWidth"),l),c=xk(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow");d?(t=xk(d[1]-d[0],l),d[1]=d[0]+t):(t=xk(h*(c-1),l),(d=[h*(e.get("axisExpandCenter")||fk(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[fk(yk(d[0]/h,1))+1,gk(yk(d[1]/h,1))-1],y=f/h*d[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:p,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:d,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),ck(n,(function(e,n){var o=(i.axisExpandable?bk:_k)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:vk/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];zi(h,h,u),Ei(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];E(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?lk(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[dk(0,o[1]*s/p-p/2)])[1]=pk(o[1],i[0]+p),i[0]=i[1]-p}return{axisExpandWindow:i,behavior:l}},t}();function xk(t,e){return pk(dk(t,e[0]),e[1])}function _k(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function bk(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)Vr(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&Wk(t);var l=T(s);l.brushType=oL(l.brushType,a),l.panelId=a===Mk?null:a.panelId,o=t._creatingCover=Rk(t,l),t._covers.push(o)}if(o){var u=lL[oL(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(eL(t,o,t._track)),i&&(Nk(t,o),u.updateCommon(t,o)),Ek(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&Fk(t,e,n)&&Wk(t)&&(r={isEnd:i,removeOnClick:!0});return r}function oL(t,e){return"auto"===t?e.defaultBrushType:t}var aL={mousedown:function(t){if(this._dragging)sL(this,t);else if(!t.target||!t.target.draggable){nL(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Fk(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=Fk(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new dc(r[a],this,e));if(i&&n)return RA(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))})).data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return Xf("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return Xf("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(sg);function SL(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return xp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){E(t,(function(t){var e=OL(t.outEdges,PL),n=OL(t.inEdges,PL),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p=0;v&&y.depth>d&&(d=y.depth),g.setLayout({depth:v?y.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mc-1?d:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)TL(s,l*=.99,a),IL(s,r,n,i,a),RL(s,l,a),IL(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";E(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),E(t,(function(t){var e=0,n=0;E(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),E(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==B(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function ML(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function IL(t,e,n,i,r){var o="vertical"===r?"x":"y";E(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",p=0;p0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=h-2;p>=0;--p)(l=(s=t[p]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function TL(t,e,n){E(t.slice().reverse(),(function(t){E(t,(function(t){if(t.outEdges.length){var i=OL(t.outEdges,CL,n)/OL(t.outEdges,PL);if(isNaN(i)){var r=t.outEdges.length;i=r?OL(t.outEdges,DL,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-LL(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-LL(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function CL(t,e){return LL(t.node2,e)*t.getValue()}function DL(t,e){return LL(t.node2,e)}function AL(t,e){return LL(t.node1,e)*t.getValue()}function kL(t,e){return LL(t.node1,e)}function LL(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function PL(t){return t.getValue()}function OL(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),E(e,(function(e){var r=new iD({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var EL=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],p=[r,o],d=p[u].get("type"),f=p[1-u].get("type"),g=t.data;if(g&&i){var y=[];E(g,(function(t,e){var n;Y(t)?(n=t.slice(),t.unshift(e)):Y(t.value)?((n=A({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultValueDimensions,m=[{name:h,type:Dm(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Dm(f),dimsDef:v.slice()}];return uM(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:H(Hp,m,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),zL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return n(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(sg);R(zL,EL,!0);var VL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=GL(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?(hh(n),WL(s,n,i,t)):n=GL(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(xg),BL=function(){},FL=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return n(e,t),e.prototype.getDefaultShape=function(){return new BL},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var _=[v,x];i.push(_)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var jL=["color","borderColor"],qL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){Vh(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&QL(s,a))return;var l=JL(a,n,!0);oh(l,{shape:{points:a.ends}},t,n),tP(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&QL(s,h)?i.remove(u):(u?(rh(u,{shape:{points:h.ends}},t,a),hh(u)):u=JL(h),tP(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),rP(t,this.group);var e=t.get("clip",!0)?lS(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=JL(i.getItemLayout(n));tP(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){rP(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(xg),KL=function(){},$L=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return n(e,t),e.prototype.getDefaultShape=function(){return new KL},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(gs);function JL(t,e,n){var i=t.ends;return new $L({shape:{points:n?eP(i,t):i},z2:100})}function QL(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(jL);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var aP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return n(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(sg);function sP(t){t&&Y(t.series)&&E(t.series,(function(t){q(t)&&"k"===t.type&&(t.type="candlestick")}))}R(aP,EL,!0);var lP=["itemStyle","borderColor"],uP=["itemStyle","borderColor0"],hP=["itemStyle","color"],cP=["itemStyle","color0"],pP={seriesType:"candlestick",plan:yg(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?hP:cP)}function i(t,e){return e.get(t>0?lP:uP)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,A(e.ensureUniqueItemVisual(r,"style"),s)}}}}},dP={seriesType:"candlestick",plan:yg(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=Er(rt(t.get("barMaxWidth"),r),r),a=Er(rt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?Er(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=z(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=Sx(4*t.count),c=0,p=[],d=[],f=n.getStore();for(;null!=(r=t.next());){var g=f.get(o,r),y=f.get(s,r),v=f.get(l,r),m=f.get(u,r),x=f.get(h,r);isNaN(g)||isNaN(m)||isNaN(x)?(a[c++]=NaN,c+=3):(a[c++]=fP(f,r,y,v,l),p[0]=g,p[1]=m,i=e.dataToPoint(p,null,d),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,p[1]=x,i=e.dataToPoint(p,null,d),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var c=a.get(o,r),p=a.get(s,r),d=a.get(l,r),f=a.get(u,r),g=a.get(h,r),y=Math.min(p,d),v=Math.max(p,d),m=S(y,c),x=S(v,c),_=S(f,c),b=S(g,c),w=[];M(w,x,0),M(w,m,1),w.push(T(b),T(x),T(_),T(m)),n.setItemLayout(r,{sign:fP(a,r,p,d,l),initBaseline:p>d?x[1]:m[1],ends:w,brushRect:I(f,g,c)})}function S(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function M(t,e,n){var r=e.slice(),o=e.slice();r[0]=Mh(r[0]+i/2,1,!1),o[0]=Mh(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function I(t,e,n){var r=S(t,n),o=S(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function T(t){return t[0]=Mh(t[0],1),t}}}}};function fP(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function gP(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var yP=function(t){function e(e,n){var i=t.call(this)||this,r=new Yw(e,n),o=new Cr;return i.add(r),i.add(o),i.updateData(e,n),i}return n(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),o=0;o0&&(o=this._getLineLength(i)/s*1e3),o!==this._period||a!==this._loop){i.stopAnimation();var u=void 0;u=U(l)?l(n):l,i.__t>0&&(u=-o*i.__t),this._animateSymbol(i,o,u,a)}this._period=o,this._loop=a}},e.prototype._animateSymbol=function(t,e,n,i){if(e>0){t.__t=0;var r=this,o=t.animate("",i).when(e,{__t:1}).delay(n).during((function(){r._updateSymbolPosition(t)}));i||o.done((function(){r.remove(t)})),o.start()}},e.prototype._getLineLength=function(t){return Et(t.__p1,t.__cp1)+Et(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=Ke,l=$e;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=l(e[0],i[0],n[0],r),h=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(xP),wP=function(){this.polyline=!1,this.curveness=0,this.segs=[]},SP=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new wP},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,p=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,p,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(Ja(u,h,(u+p)/2-(h-d)*r,(h+d)/2-(p-u)*r,p,d,o,t,e))return a}else if(Ka(u,h,p,d,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),IP={seriesType:"lines",plan:yg(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&lS(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=IP.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext.large;return n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new MP:new gA(r?i?bP:_P:i?xP:fA),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(xg),CP="undefined"==typeof Uint32Array?Array:Uint32Array,DP="undefined"==typeof Float64Array?Array:Float64Array;function AP(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=z(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),D([e,t[0],t[1]])})))}var kP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return n(e,t),e.prototype.init=function(e){e.data=e.data||[],AP(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(AP(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=gt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=gt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t),n=e.option instanceof Array?e.option:e.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(sg);function LP(t){return t instanceof Array||(t=[t,t]),t}var PP={seriesType:"lines",reset:function(t){var e=LP(t.get("symbol")),n=LP(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=LP(n.getShallow("symbol",!0)),r=LP(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};var OP=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=h.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=n;for(var d=0;d0){var I=o(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(m,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=h.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function RP(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var NP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):RP(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(RP(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Vh(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=uS(u,"cartesian2d");if(h){var c=u.getAxis("x"),p=u.getAxis("y");0,o=c.getBandWidth()+.5,a=p.getBandWidth()+.5,s=c.scale.getExtent(),l=p.scale.getExtent()}for(var d=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),m=t.get(["itemStyle","borderRadius"]),x=Yh(t),_=t.getModel("emphasis"),b=_.get("focus"),w=_.get("blurScope"),S=_.get("disabled"),M=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||Al[1])continue;var k=u.dataToPoint([D,A]);T=new Cs({shape:{x:k[0]-o/2,y:k[1]-a/2,width:o,height:a},style:C})}else{if(isNaN(f.get(M[1],I)))continue;T=new Cs({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:C})}if(f.hasItemOption){var L=f.getItemModel(I),P=L.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),y=L.getModel(["blur","itemStyle"]).getItemStyle(),v=L.getModel(["select","itemStyle"]).getItemStyle(),m=L.get(["itemStyle","borderRadius"]),b=P.get("focus"),w=P.get("blurScope"),S=P.get("disabled"),x=Yh(L)}T.shape.r=m;var O=t.getRawValue(I),R="-";O&&null!=O[2]&&(R=O[2]+""),Hh(T,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:C.opacity,defaultText:R}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=y,T.ensureState("select").style=v,Rl(T,b,w,S),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),d.add(T),f.setItemGraphicEl(I,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new OP;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),p=Math.min(l.width+l.x,i.getWidth()),d=Math.min(l.height+l.y,i.getHeight()),f=p-h,g=d-c,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),m=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=z(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,p=l.categoryDim,d=Math.abs(n[p.wh]),f=t.getItemVisual(e,"symbolSize");h=Y(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=Er(h[p.index],d),h[c.index]=Er(h[c.index],i?d:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,r){var o=t.get(zP)||0;o&&(BP.attr({scaleX:e[0],scaleY:e[1],rotation:n}),BP.updateTransform(),o/=BP.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,c.symbolScale,l,i,c);var p=c.symbolSize,d=Oy(n.get("symbolOffset"),p);return function(t,e,n,i,r,o,a,s,l,u,h,c){var p=h.categoryDim,d=h.valueDim,f=c.pxSign,g=Math.max(e[d.index]+s,0),y=g;if(i){var v=Math.abs(l),m=it(t.get("symbolMargin"),"15%")+"",x=!1;m.lastIndexOf("!")===m.length-1&&(x=!0,m=m.slice(0,m.length-1));var _=Er(m,e[d.index]),b=Math.max(g+2*_,0),w=x?0:2*_,S=eo(i),M=S?i:iO((v+w)/b);b=g+2*(_=(v-M*g)/2/(x?M:Math.max(M-1,1))),w=x?0:2*_,S||"fixed"===i||(M=u?iO((Math.abs(u)+w)/b):0),y=M*b-w,c.repeatTimes=M,c.symbolMargin=_}var I=f*(y/2),T=c.pathPosition=[];T[p.index]=n[p.wh]/2,T[d.index]="start"===a?I:"end"===a?l-I:l/2,o&&(T[0]+=o[0],T[1]+=o[1]);var C=c.bundlePosition=[];C[p.index]=n[p.xy],C[d.index]=n[d.xy];var D=c.barRectShape=A({},n);D[d.wh]=f*Math.max(Math.abs(n[d.wh]),Math.abs(T[d.index]+I)),D[p.wh]=n[p.wh];var k=c.clipShape={};k[p.xy]=-n[p.xy],k[p.wh]=h.ecSize[p.wh],k[d.xy]=0,k[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function WP(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function HP(t){var e=t.symbolPatternSize,n=Ly(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function YP(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(tO(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function UP(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?eO(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=HP(n),r.add(o),eO(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function XP(t,e,n){var i=A({},e.barRectShape),r=t.__pictorialBarRect;r?eO(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new Cs({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function ZP(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=A({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)rh(r,{shape:o},s,l);else{o[a.wh]=0,r=new Cs({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],Bh[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function jP(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=qP,n.isAnimationEnabled=KP,n}function qP(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function KP(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $P(t,e,n,i){var r=new Cr,o=new Cr;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?YP(r,e,n):UP(r,0,n),XP(r,n,i),ZP(r,e,n,i),r.__pictorialShapeStr=QP(t,n),r.__pictorialSymbolMeta=n,r}function JP(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];tO(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),E(o,(function(t){sh(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function QP(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tO(t,e,n){E(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function eO(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&Bh[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function nO(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),p=o.get("scale");tO(t,(function(t){if(t instanceof _s){var e=t.style;t.useStyle(A({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,p&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var d=e.valueDim.posDesc[+(n.boundingLength>0)];Hh(t.__pictorialBarRect,Yh(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:Ww(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:d}),Rl(t,h,c,o.get("disabled"))}function iO(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var rO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return n(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=yc(IS.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(IS);var oO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new Im(this._layersSeries||[],a,h,h),p=[];function d(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,p=o.length,d=o[0].indices.length,f=0;fMath.PI/2?"right":"left"):S&&"center"!==S?"left"===S?(m=r.r0+w,a>Math.PI/2&&(S="right")):"right"===S&&(m=r.r-w,a>Math.PI/2&&(S="left")):(m=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,S="center"),g.style.align=S,g.style.verticalAlign=f(p,"verticalAlign")||"middle",g.x=m*s+r.cx,g.y=m*l+r.cy;var M=f(p,"rotate"),I=0;"radial"===M?(I=-a)<-Math.PI/2&&(I+=Math.PI):"tangential"===M?(I=Math.PI/2-a)>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI):j(M)&&(I=M*Math.PI/180),g.rotation=I})),h.dirtyStyle()},e}(Cu),hO="sunburstRootToNode",cO="sunburstHighlight";var pO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new uO(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new Im(r,i,s,s).add(h).update(h).remove(H(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new uO(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)dp(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:hO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(xg),dO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};fO(n);var i=this._levelModels=z(t.levels||[],(function(t){return new dc(t,this,e)}),this),r=AC.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=OC(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){BC(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(sg);function fO(t){var e=0;E(t.children,(function(t){fO(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var gO=Math.PI/180;function yO(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");Y(i)||(i=[0,i]),Y(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=Er(e[0],r),l=Er(e[1],o),u=Er(i[0],a/2),h=Er(i[1],a/2),c=-t.get("startAngle")*gO,p=t.get("minAngle")*gO,d=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,y=t.get("sort");null!=y&&vO(f,y);var v=0;E(f.children,(function(t){!isNaN(t.getValue())&&v++}));var m=f.getValue(),x=Math.PI/(m||v)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(h-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,T=function(e,n){if(e){var i=n;if(e!==d){var r=e.getValue(),o=0===m&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&X(o)&&(o=Sn(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),A(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}var xO={color:"fill",borderColor:"stroke"},_O={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},bO=So(),wO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return rx(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=bO(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(sg);function SO(t,e){return e=e||[0,0],z(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function MO(t,e){return e=e||[0,0],z([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function IO(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function TO(t,e){return e=e||[0,0],z(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function CO(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||mt(t,"text")))}function DO(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},mt(a,"text")&&(o.text=a.text),mt(a,"rich")&&(o.rich=a.rich),mt(a,"textFill")&&(o.fill=a.textFill),mt(a,"textStroke")&&(o.stroke=a.textStroke),mt(a,"fontFamily")&&(o.fontFamily=a.fontFamily),mt(a,"fontSize")&&(o.fontSize=a.fontSize),mt(a,"fontStyle")&&(o.fontStyle=a.fontStyle),mt(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=mt(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),mt(a,"textPosition")&&(i.position=a.textPosition),mt(a,"textOffset")&&(i.offset=a.textOffset),mt(a,"textRotation")&&(i.rotation=a.textRotation),mt(a,"textDistance")&&(i.distance=a.textDistance)}return AO(o,t),E(o.rich,(function(t){AO(t,t)})),{textConfig:i,textContent:r}}function AO(t,e){e&&(e.font=e.textFont||e.font,mt(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),mt(e,"textAlign")&&(t.align=e.textAlign),mt(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),mt(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),mt(e,"textWidth")&&(t.width=e.textWidth),mt(e,"textHeight")&&(t.height=e.textHeight),mt(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),mt(e,"textPadding")&&(t.padding=e.textPadding),mt(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),mt(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),mt(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),mt(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),mt(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),mt(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),mt(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function kO(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";LO(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,E(e.rich,(function(t){LO(t,t)})),i}function LO(t,e){e&&(mt(e,"fill")&&(t.textFill=e.fill),mt(e,"stroke")&&(t.textStroke=e.fill),mt(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),mt(e,"font")&&(t.font=e.font),mt(e,"fontStyle")&&(t.fontStyle=e.fontStyle),mt(e,"fontWeight")&&(t.fontWeight=e.fontWeight),mt(e,"fontSize")&&(t.fontSize=e.fontSize),mt(e,"fontFamily")&&(t.fontFamily=e.fontFamily),mt(e,"align")&&(t.textAlign=e.align),mt(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),mt(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),mt(e,"width")&&(t.textWidth=e.width),mt(e,"height")&&(t.textHeight=e.height),mt(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),mt(e,"padding")&&(t.textPadding=e.padding),mt(e,"borderColor")&&(t.textBorderColor=e.borderColor),mt(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),mt(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),mt(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),mt(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),mt(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),mt(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),mt(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),mt(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),mt(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),mt(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var PO={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},OO=G(PO),RO=(V(Ki,(function(t,e){return t[e]=1,t}),{}),Ki.join(", "),["","style","shape","extra"]),NO=So();function EO(t,e,n,i,r){var o=t+"Animation",a=nh(t,i,r)||{},s=NO(e).userDuring;return a.duration>0&&(a.during=s?W(HO,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),A(a,n[o]),a}function zO(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=NO(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),p=c?c.style:null;if(p){!r&&(r=i.style={});var d=G(n);for(u=0;u0&&t.animateFrom(p,d)}else!function(t,e,n,i,r){if(r){var o=EO("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);VO(t,e),u?t.dirty():t.markRedraw()}function VO(t,e){for(var n=NO(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var p=G(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:W(TO,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function sR(t){return t instanceof gs}function lR(t){return t instanceof da}var uR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=fR(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){yR(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);BO(n,bO(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);yR(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?lS(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=fR(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){0;null==i&&(i=s);var r=m(i,$O).getItemStyle(),o=x(i,$O),a=Uh(o,null,null,!0,!0);a.text=o.getShallow("show")?ot(t.getFormattedLabel(i,$O),t.getFormattedLabel(i,JO),Ww(e,i)):null;var l=Xh(o,null,!0);return b(n,r),r=kO(r,a,l),n&&_(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),mt(xO,t)){var i=e.getItemVisual(n,"style");return i?i[xO[t]]:null}if(mt(_O,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o=c;p--){BO(e.childAt(p),bO(e).option,r)}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function mR(t,e,n){var i,r=bO(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&(mt(i,"pathData")||mt(i,"d")))&&IR(a)!==r.customPathData||"image"===o&&mt(s,"image")&&s.image!==r.customImagePath}function xR(t,e,n){var i=e?_R(t,e):t,r=e?bR(t,i,$O):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?_R(s,e):s:null;if(r&&(n.isLegacy||CO(r,o,!!a,!!l))){n.isLegacy=!0;var u=DO(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function _R(t,e){return e?t?t[e]:null:t}function bR(t,e,n){var i=e&&e.style;return null==i&&n===$O&&t&&(i=t.styleEmphasis),i}function wR(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function SR(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;vR(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function MR(t){var e=this.context,n=e.oldChildren[t];BO(n,bO(n).option,e.seriesModel)}function IR(t){return t&&(t.pathData||t.d)}var TR=So(),CR=T,DR=W,AR=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=H(kR,e,h);this.updatePointerEl(a,l,c),this.updateLabelEl(a,l,c,e)}else a=this._group=new Cr,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);RR(a,e,!0),this._renderHandle(r)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=KM(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=TR(t).pointerEl=new Bh[r.type](CR(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=TR(t).labelEl=new ks(CR(e.label));t.add(r),PR(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=TR(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=TR(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),PR(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Ph(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){se(t.event)},onmousedown:DR(this._onHandleDragMove,this,0,0),drift:DR(this._onHandleDragMove,this),ondragend:DR(this._onHandleDragEnd,this)}),i.add(r)),RR(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Y(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Ag(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){kR(this._axisPointerModel,!e&&this._moveAnimation,this._handle,OR(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(OR(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(OR(i)),TR(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),kg(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function kR(t,e,n,i){LR(TR(n).lastProp,i)||(TR(n).lastProp=i,e?rh(n,i,t):(n.stopAnimation(),n.attr(i)))}function LR(t,e){if(q(t)&&q(e)){var n=!0;return E(e,(function(e,i){n=n&&LR(t[i],e)})),!!n}return t===e}function PR(t,e){t[e.get(["label","show"])?"show":"hide"]()}function OR(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function RR(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function NR(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function ER(t,e,n,i,r){var o=zR(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=ip(a.get("padding")||0),l=a.getFont(),u=cr(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:Uh(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function zR(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:s_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),X(a)?o=a.replace("{value}",o):U(a)&&(o=a(s))}return o}function VR(t,e,n){var i=[1,0,0,1,0,0];return zi(i,i,n.rotation),Ei(i,i,n.position),Th([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function BR(t,e,n,i,r,o){var a=GM.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),ER(e,i,r,o,{position:VR(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function FR(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function GR(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function WR(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var HR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=YR(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=NR(i),c=UR[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}BR(e,t,LM(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=LM(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=VR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=YR(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(AR);function YR(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var UR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:FR([e,n[0]],[e,n[1]],XR(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:GR([e-i/2,n[0]],[i,r],XR(t))}}};function XR(t){return"x"===t.dim?0:1}var ZR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Tp),jR=So(),qR=E;function KR(t,e,n){if(!r.node){var i=e.getZr();jR(i).records||(jR(i).records={}),function(t,e){if(jR(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);qR(jR(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}jR(t).initialized=!0,n("click",H(JR,"click")),n("mousemove",H(JR,"mousemove")),n("globalout",$R)}(i,e),(jR(i).records[t]||(jR(i).records[t]={})).handler=n}}function $R(t,e,n){t.handler("leave",null,n)}function JR(t,e,n,i){e.handler(t,n,i)}function QR(t,e){if(!r.node){var n=e.getZr();(jR(n).records||{})[t]&&(jR(n).records[t]=null)}}var tN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";KR("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){QR("axisPointer",e)},e.prototype.dispose=function(t,e){QR("axisPointer",e)},e.type="axisPointer",e}(gg);function eN(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=wo(o,t);if(null==a||a<0||Y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(z(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var nN=So();function iN(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||W(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){lN(r)&&(r=eN({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=lN(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||lN(r),p={},d={},f={list:[],map:{}},g={showPointer:H(oN,d),showTooltip:H(aN,f)};E(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);E(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&rN(t,a,g,!1,p)}}))}));var y={};return E(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&E(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,sN(e),sN(t)))),y[t.key]=o}}))})),E(y,(function(t,e){rN(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];E(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(lN(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=nN(i)[r]||{},a=nN(i)[r]={};E(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&E(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];E(o,(function(t,e){!a[e]&&l.push(t)})),E(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function rN(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return E(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),E(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&A(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function oN(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function aN(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=JM(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function sN(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function lN(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function uN(t){tI.registerAxisPointerClass("CartesianAxisPointer",HR),t.registerComponentModel(ZR),t.registerComponentView(tN),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Y(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ZM(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},iN)}var hN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=NR(i),c=cN[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var p=[1,0,0,1,0,0];zi(p,p,s),Ei(p,p,[i.cx,i.cy]),l=Th([a,-r],p);var d=e.getModel("axisLabel").get("rotate")||0,f=GM.innerTextLayout(s,d*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var y=i.cx,v=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));ER(t,n,i,r,p)},e}(AR);var cN={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:FR(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:WR(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:WR(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},pN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Tp),dN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Co).models[0]},e.type="polarAxis",e}(Tp);R(dN,p_);var fN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="angleAxis",e}(dN),gN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="radiusAxis",e}(dN),yN=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(H_);yN.prototype.dataToRadius=H_.prototype.dataToCoord,yN.prototype.radiusToData=H_.prototype.coordToData;var vN=So(),mN=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=cr(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=vN(t.model),p=c.lastAutoInterval,d=c.lastTickCount;return null!=p&&null!=d&&Math.abs(p-h)<=1&&Math.abs(d-r)<=1&&p>h?h=p:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(H_);mN.prototype.dataToAngle=H_.prototype.dataToCoord,mN.prototype.angleToData=H_.prototype.coordToData;var xN=["radius","angle"],_N=function(){function t(t){this.dimensions=xN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new yN,this._angleAxis=new mN,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return bN(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return bN(e)===this?this.pointToData(n):null},t}();function bN(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function wN(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();E(c_(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),E(c_(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),r_(i.scale,i.model),r_(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function SN(t,e){if(t.type=e.get("type"),t.scale=o_(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var MN={dimensions:xN,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new _N(i+"");r.update=wN;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");SN(o,s),SN(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=Er(i[0],r),t.cy=Er(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:Y(l)||(l=[0,l]);var u=[Er(l[0],s),Er(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Co).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}},IN=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function TN(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function CN(t){return t.getRadiusAxis().inverse?0:1}function DN(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var AN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return n(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=z(n.getViewLabels(),(function(t){t=T(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));DN(s),DN(o),E(IN,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||kN[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(tI),kN={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=CN(n),u=l?0:1;(a=0===o[u]?new hu({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new Au({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[CN(n)],u=z(i,(function(t){return new zu({shape:TN(n,[l,l+s],t.coord)})}));t.add(wh(u,{style:k(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[CN(n)],h=[],c=0;cf?"left":"right",v=Math.abs(d[1]-g)/p<.3?"middle":d[1]>g?"top":"bottom";if(s&&s[c]){var m=s[c];q(m)&&m.textStyle&&(a=new dc(m.textStyle,l,l.ecModel))}var x=new ks({silent:GM.isLabelSilent(e),style:Uh(a,{x:d[0],y:d[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:y,verticalAlign:v})});if(t.add(x),h){var _=GM.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=i.rawLabel,Hs(x).eventData=_}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",T=_;m&&(i[s][M]||(i[s][M]={p:_,n:_}),T=i[s][M][I]);var C=void 0,D=void 0,A=void 0,k=void 0;if("radius"===c.dim){var L=c.dataToCoord(S)-_,P=o.dataToCoord(M);Math.abs(L)=k})}}}))}var VN={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},BN={splitNumber:5},FN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="polar",e}(gg);function GN(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),it(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var WN=["axisLine","axisTickLabel","axisName"],HN=["splitArea","splitLine"],YN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return n(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Cr;var s=GN(e),l=new GM(e,s);E(WN,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),E(HN,(function(t){e.get([t,"show"])&&UN[t](this,this.group,this._axisGroup,e)}),this),Ah(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){iI(this)},e.type="singleAxis",e}(tI),UN={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=i.coordinateSystem.getRect(),u=r.isHorizontal(),h=[],c=0,p=r.getTicksCoords({tickModel:o}),d=[],f=[],g=0;g=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return KN(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return KN(e)===this?this.pointToData(n):null},t}();function KN(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var $N={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new qN(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Co).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:jN},JN=["x","y"],QN=["width","height"],tE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=iE(a,1-nE(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=NR(i),c=eE[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}BR(e,t,GN(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=GN(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=VR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=nE(r),s=iE(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=iE(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(AR),eE={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:FR([e,n[0]],[e,n[1]],nE(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:GR([e-i/2,n[0]],[i,r],nE(t))}}};function nE(t){return t.isHorizontal()?0:1}function iE(t,e){var n=t.getRect();return[n[JN[e]],n[JN[e]]+n[QN[e]]]}var rE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="single",e}(gg);var oE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=Sp(e);t.prototype.init.apply(this,arguments),aE(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),aE(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Tp);function aE(t,e){var n,i=t.cellSize;1===(n=Y(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=z([0,1],(function(t){return function(t,e){return null!=t[yp[e][0]]||null!=t[yp[e][1]]&&null!=t[yp[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));wp(t,e,{type:"box",ignoreSize:r})}var sE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Cs({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){p(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function p(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}p(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new Ru({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return X(t)&&t?(n=t,E(e,(function(t,e){n=n.replace("{"+e+"}",i?ap(t):t)})),n):U(t)?t(e):e.nameMap;var n,i},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var d=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:p},g=this._formatterLabel(d,f),y=new ks({z2:30,style:Uh(r,{text:g})});y.attr(this._yearTextPositionControl(y,c[a],n,a,o)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!X(o)||(o&&(e=Mc(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var p="center"===l,d=0;d=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/lE)-Math.floor(n[0].time/lE)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function hE(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}function cE(t,e){var n;return E(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var pE=["transition","enterFrom","leaveTo"],dE=pE.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function fE(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?pE:dE,r=0;r=0;l--){var p,d,f;if(f=null!=(d=xo((p=n[l]).id,null))?r.get(d):null){var g=f.parent,y=(c=vE(g),{}),v=_p(f,p,g===i?{width:o,height:a}:{width:c.width,height:c.height},null,{hv:p.hv,boundingMode:p.bounding},y);if(!vE(f).isNew&&v){for(var m=p.transition,x={},_=0;_=0)?x[b]=w:f[b]=w}rh(f,x,t,0)}else f.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){bE(n,vE(n).option,e,t._lastGraphicModel)})),this._elMap=ft()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(gg);function xE(t){var e=mt(yE,t)?yE[t]:mh(t);var n=new e({});return vE(n).type=t,n}function _E(t,e,n,i){var r=xE(n);return e.add(r),i.set(t,r),vE(r).id=t,vE(r).isNew=!0,r}function bE(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){bE(t,e,n,i)})),BO(t,e,i),n.removeKey(vE(t).id))}function wE(t,e,n,i){t.isGroup||E([["cursor",da.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];mt(e,i)?t[i]=rt(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),E(G(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=U(i)?i:null}})),mt(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var SE=["x","y","radius","angle","single"],ME=["cartesian2d","polar","singleAxis"];function IE(t){return t+"Axis"}function TE(t,e){var n,i=ft(),r=[],o=ft();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function CE(t){var e=t.ecModel,n={infoList:[],infoMap:ft()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(IE(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var DE=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),AE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=kE(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=kE(t);C(this.option,t,!0),C(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;E([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ft();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return E(SE,(function(n){var i=this.getReferringComponents(IE(n),Do);if(i.specified){e=!0;var r=new DE;E(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new DE;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Co).models[0];a&&E(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Co).models[0]&&o.add(t.componentIndex)}))}}}i&&E(SE,(function(e){if(i){var r=n.findComponents({mainType:IE(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new DE;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");E([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(IE(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){E(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(IE(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;E([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;E(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=IE(this._dimName),i=e.getReferringComponents(n,Co).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return T(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];RE(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Nr(h,o,n))):(e=!0,h=Nr(c=null==c?n[u]:i.parse(c),n,o)),s[u]=c,a[u]=h})),NE(s),NE(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";lk(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Nr(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];RE(n,(function(t){!function(t,e,n){e&&E(c_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=e_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&RE(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=z(i,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,r,l=0;lo[1];if(h&&!c&&!p)return!0;h&&(r=!0),c&&(e=!0),p&&(n=!0)}return r&&e&&n}))}else RE(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}}));RE(i,(function(t){e.setApproximateExtent(o,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;RE(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Nr(n[0]+o,n,[0,100],!0):null!=r&&(o=Nr(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Gr(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var zE={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(IE(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new EE(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=ft();return E(n,(function(t){E(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var VE=!1;function BE(t){VE||(VE=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,zE),function(t){t.registerAction("dataZoom",(function(t,e){E(TE(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function FE(t){t.registerComponentModel(LE),t.registerComponentView(OE),BE(t)}var GE=function(){},WE={};function HE(t,e){WE[t]=e}function YE(t){return WE[t]}var UE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;E(this.option.feature,(function(t,n){var i=YE(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),C(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Tp);function XE(t,e){var n=ip(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Cs({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var ZE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];E(s,(function(t,e){u.push(e)})),new Im(this._featureNames||[],u).add(h).update(h).remove(H(h,null)).execute(),this._featureNames=u,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=xp(i,o,r);mp(e.get("orient"),t,e.get("itemGap"),a.width,a.height),_p(t,i,o,r)}(r,t,n),r.add(XE(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!U(l)&&e){var u=l.style||(l.style={}),h=cr(e,ks.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+10;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function h(h,c){var p,d=u[h],f=u[c],g=s[d],y=new dc(g,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(g.title=i.newTitle),d&&!f){if(function(t){return 0===t.indexOf("my")}(d))p={onclick:y.option.onclick,featureName:d};else{var v=YE(d);if(!v)return;p=new v}l[d]=p}else if(!(p=l[f]))return;p.uid=gc("toolbox-feature"),p.model=y,p.ecModel=e,p.api=n;var m=p instanceof GE;d||!f?!y.get("show")||m&&p.unusable?m&&p.remove&&p.remove(e,n):(!function(i,s,l){var u,h,c=i.getModel("iconStyle"),p=i.getModel(["emphasis","iconStyle"]),d=s instanceof GE&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};X(d)?(u={})[l]=d:u=d;X(f)?(h={})[l]=f:h=f;var g=i.iconPaths={};E(u,(function(l,u){var d=Ph(l,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(c.getItemStyle()),d.ensureState("emphasis").style=p.getItemStyle();var f=new ks({style:{text:h[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null},ignore:!0});d.setTextContent(f),Eh({el:d,componentModel:t,itemName:u,formatterParamsExtra:{title:h[u]}}),d.__title=h[u],d.on("mouseover",(function(){var e=p.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:p.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:p.get("textBackgroundColor")}),d.setTextConfig({position:p.get("textPosition")||i}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===i.get(["iconStatus",u])?_l:bl)(d),r.add(d),d.on("click",W(s.onclick,s,e,n,u)),g[u]=d}))}(y,p,d),y.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?_l:bl)(i[t])},p instanceof GE&&p.render&&p.render(y,e,n,i)):m&&p.dispose&&p.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){E(this._features,(function(t){t instanceof GE&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){E(this._features,(function(n){n instanceof GE&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){E(this._features,(function(n){n instanceof GE&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(gg);var jE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),a=o?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),l=r.browser;if(U(MouseEvent)&&(l.newEdge||!l.ie&&!l.edge)){var u=document.createElement("a");u.download=i+"."+a,u.target="_blank",u.href=s;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});u.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var c=s.split(","),p=c[0].indexOf("base64")>-1,d=o?decodeURIComponent(c[1]):c[1];p&&(d=window.atob(d));var f=i+"."+a;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var v=new Blob([y]);window.navigator.msSaveOrOpenBlob(v,f)}else{var m=document.createElement("iframe");document.body.appendChild(m);var x=m.contentWindow,_=x.document;_.open("image/svg+xml","replace"),_.write(d),_.close(),x.focus(),_.execCommand("SaveAs",!0,f),document.body.removeChild(m)}}else{var b=n.get("lang"),w='',S=window.open();S.document.write(w),S.document.title=i}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(GE),qE="__ec_magicType_stack__",KE=[["line","bar"],["stack"]],$E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return E(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(JE[n]){var o,a={series:[]};E(KE,(function(t){P(t,n)>=0&&E(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=JE[n](e,r,t,i);o&&(k(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Co).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=C({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(GE),JE={line:function(t,e,n,i){if("bar"===t)return C({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return C({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===qE;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),C({id:e,stack:r?"":qE},i.get(["option","stack"])||{},!0)}};cm({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var QE=new Array(60).join("-"),tz="\t";function ez(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var nz=new RegExp("[\t]+","g");function iz(t,e){var n=t.split(new RegExp("\n*"+QE+"\n*","g")),i={series:[]};return E(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(tz)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=z(ez(e.shift()).split(nz),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=vz[t.brushType](0,n,e);t.__rangeOffset={offset:xz[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){E(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&E(i.coordSyses,(function(i){var r=vz[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){E(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=vz[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?xz[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=bz(n),o=bz(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return z(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:hL(i),isTargetByCursor:pL(i,t,n.coordSysModel),getLinearBrushOtherExtent:cL(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&P(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=dz(e,t),r=0;rt[1]&&t.reverse(),t}function dz(t,e){return Io(t,e,{includeMainTypes:hz})}var fz={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=ft(),a={},s={};(n||i||r)&&(E(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),E(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),E(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];E(r.getCartesians(),(function(t,e){(P(n,t.getAxis("x").model)>=0||P(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:yz.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){E(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:yz.geo})}))}},gz=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],yz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ih(t)),e}},vz={lineX:H(mz,0),lineY:H(mz,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[pz([r[0],o[0]]),pz([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:z(n,(function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o})),xyMinMax:r}}};function mz(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=pz(z([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var xz={lineX:H(_z,0),lineY:H(_z,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return z(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function _z(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function bz(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var wz,Sz,Mz=E,Iz=uo+"toolbox-dataZoom_",Tz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new Ok(n.getZr()),this._brushController.on("brush",W(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new cz(Dz(t),e,{include:["grid"]}).makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return lz(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){Cz[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new cz(Dz(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=lz(t);az(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=lk(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];Mz(t,(function(t,n){e.push(T(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(GE),Cz={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=lz(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return az(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function Dz(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}wz="dataZoom",Sz=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=Io(t,Dz(i));return Mz(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),Mz(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:Iz+e+o};a[n]=o,r.push(a)}},lt(null==jp.get(wz)&&Sz),jp.set(wz,Sz);var Az=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Tp);function kz(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function Lz(t){if(r.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(u+="top:50%",h+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",h+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var c=a*Math.PI/180,p=l+r,d=p*Math.abs(Math.cos(c))+p*Math.abs(Math.sin(c)),f=e+" solid "+r+"px;";return'
      '}(n,i,r)),X(t))o.innerHTML=t+a;else if(t){o.innerHTML="",Y(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!r.node&&n.getDom()){var o=jz(i,n);this._ticket="";var a=i.dataByCoordSys,s=function(t,e,n){var i=To(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=Ao(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(e){var n=Hs(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0})),o)return{componentMainType:r,componentIndex:a.componentIndex,el:o}}(i,e,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=Uz;u.x=i.x,u.y=i.y,u.update(),Hs(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},o)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:a,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=eN(i,e),c=h.point[0],p=h.point[1];null!=c&&null!=p&&this._tryShow({offsetX:c,offsetY:p,target:h.el,position:i.position,positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(jz(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===Zz([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,xy(n,(function(t){return null!=Hs(t).dataIndex?(r=t,!0):null!=Hs(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=W(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=Zz([e.tooltipOption],i),a=this._renderMode,s=[],l=Xf("section",{blocks:[],noHeader:!0}),u=[],h=new ig;E(t,(function(t){E(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=zR(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=Xf("section",{header:o,noHeader:!ut(o),sortBlocks:!0,blocks:[]});l.blocks.push(c),E(t.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),d=l.dataIndexInside,f=p.getDataParams(d);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=s_(e.axis,{value:r}),f.axisValueLabel=o,f.marker=h.makeTooltipMarker("item",pp(f.color),a);var g=uf(p.formatTooltip(d,!0,null)),y=g.frag;if(y){var v=Zz([p],i).get("valueFormatter");c.blocks.push(v?A({valueFormatter:v},y):y)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=Jf(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
      ",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=Hs(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,h=s.getData(u),c=this._renderMode,p=t.positionDefault,d=Zz([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=d.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),y=new ig;g.marker=y.makeTooltipMarker("item",pp(g.color),c);var v=uf(s.formatTooltip(l,!1,u)),m=d.get("order"),x=d.get("valueFormatter"),_=v.frag,b=_?Jf(x?A({valueFormatter:x},_):_,y,c,m,i.get("useUTC"),d.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,b,g,w,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=Hs(e),r=i.tooltipConfig.option||{};if(X(r)){r={content:r,formatter:r}}var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a),o.push({formatter:r.content});var s=t.positionDefault,l=Zz(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),h=Math.random()+"",c=new ig;this._showOrMove(l,(function(){var n=T(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,h,t.offsetX,t.offsetY,t.position,e,c)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(h)if(X(h)){var d=t.ecModel.get("useUTC"),f=Y(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=Vc(f.axisValue,c,d)),c=hp(c,n,!0)}else if(U(h)){var g=W((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}else c=h;u.setContent(c,l,t,p,a),u.show(t,p),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||Y(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:Y(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),U(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),Y(e))n=Er(e[0],s),i=Er(e[1],l);else if(q(e)){var d=e;d.width=u[0],d.height=u[1];var f=xp(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(X(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,p,u,t.get("borderWidth"));n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=qz(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=qz(c)?u[1]/2:"bottom"===c?u[1]:0),kz(t)){g=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&E(n,(function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&E(a,(function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&E(a,(function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&E(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!r.node&&e.getDom()&&(kg(this,"_updatePosition"),this._tooltipContent.dispose(),QR("itemTooltip",e))},e.type="tooltip",e}(gg);function Zz(t,e,n){var i,r=e.ecModel;n?(i=new dc(n,r,r),i=new dc(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof dc&&(a=a.get("tooltip",!0)),X(a)&&(a={formatter:a}),a&&(i=new dc(a,i,r)))}return i}function jz(t,e){return t.dispatchAction||W(e.dispatchAction,e)}function qz(t){return"center"===t||"middle"===t}var Kz=["rect","polygon","keep","clear"];function $z(t,e){var n=ho(t?t.brush:[]);if(n.length){var i=[];E(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;Y(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};E(t,(function(t){e[t]=1})),t.length=0,E(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,Kz)}}var Jz=E;function Qz(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function tV(t,e,n){var i={};return Jz(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);Jz(t[e],(function(t,i){if(iD.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new iD(r),"opacity"===i&&((r=T(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new iD(r))}}))})),i}function eV(t,e,n){var i;E(n,(function(t){e.hasOwnProperty(t)&&Qz(e[t])&&(i=!0)})),i&&E(n,(function(n){e.hasOwnProperty(n)&&Qz(e[n])?t[n]=T(e[n]):delete t[n]}))}var nV={lineX:iV(0),lineY:iV(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&y_(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(y_(i,r,o)||y_(i,r+a,o)||y_(i,r,o+s)||y_(i,r+a,o+s)||sr.create(t).contain(l[0],l[1])||Oh(r,o,r+a,o,i)||Oh(r,o,r,o+s,i)||Oh(r+a,o,r+a,o+s,i)||Oh(r,o+s,r+a,o+s,i))||void 0}}};function iV(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return rV(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&dV(e)}};function dV(t){return new sr(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var fV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Ok(e.getZr())).on("brush",W(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){lV(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:T(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:T(n),$from:e})},e.type="brush",e}(gg),gV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return n(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&eV(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=z(t,(function(t){return yV(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=yV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Tp);function yV(t,e){return C({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new dc(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var vV=["rect","polygon","lineX","lineY","keep","clear"],mV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,E(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return E(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:vV.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(GE);var xV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Tp),_V=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=rt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new ks({style:Uh(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new ks({style:Uh(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){dp(p,"_"+t.get("target"))})),d&&c.on("click",(function(){dp(d,"_"+t.get("subtarget"))})),Hs(l).eventData=Hs(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=xp(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new Cs({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(gg);var bV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],E(n,(function(e,n){var i,o=xo(fo(e),"");q(e)?(i=T(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new qm([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Tp),wV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline.slider",e.defaultOption=yc(bV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(bV);R(wV,lf.prototype);var SV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline",e}(gg),MV=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return n(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(H_),IV=Math.PI,TV=So(),CV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return Xf("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},E(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return xp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:IV/2},p="vertical"===s?l.height:l.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*IV/180;var x=d.get("position",!0),_=f&&d.get("showPlayBtn",!0),b=f&&d.get("showPrevBtn",!0),w=f&&d.get("showNextBtn",!0),S=0,M=p;"left"===x||"bottom"===x?(_&&(i=[0,0],S+=v),b&&(r=[S,0],S+=v),w&&(o=[M-g,0],M-=v)):(_&&(i=[M-g,0],M-=v),b&&(r=[0,0],S+=v),w&&(o=[M-g,0],M-=v));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:c[s],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:y}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;Ei(o,o,[-a,-s]),zi(o,o,-IV/2),Ei(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=y(r),u=y(n.getBoundingRect()),h=y(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=l[0][0];var d,f=t.labelPosOpt;null==f||X(f)?(v(c,u,l,1,d="+"===f?0:1),v(p,h,l,1,1-d)):(v(c,u,l,1,d=f>=0?0:1),p[1]=c[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new vx({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Rx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new xx}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new MV("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new Cr;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new zu({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:A({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new zu({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:k({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],E(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:W(r._changeTimeline,r,t.value)},p=DV(s,l,e,c);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=h.getItemStyle(),Ol(p);var d=Hs(p);s.get("tooltip")?(d.dataIndex=t.value,d.dataModel=i):d.dataIndex=d.dataModel=null,r._tickSymbols.push(p)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],E(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),p=new ks({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:W(r._changeTimeline,r,a),silent:!1,style:Uh(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});p.ensureState("emphasis").style=Uh(u),p.ensureState("progress").style=Uh(h),e.add(p),Ol(p),TV(p).dataIndex=a,r._tickLabels.push(p)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=gr(rt(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=Ph(t.get(["controlStyle",e]),i||{},new sr(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),Ol(c)}}h(t.nextBtnPosition,"next",W(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",W(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",W(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=W(s._handlePointerDrag,s),t.ondragend=W(s._handlePointerDragend,s),AV(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){AV(t,s._progressLine,o,n,i)}};this._currentPointer=DV(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=Vr(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var FV={min:H(BV,"min"),max:H(BV,"max"),average:H(BV,"average"),median:H(BV,"median")};function GV(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!Y(e.coord)&&i){var r=i.dimensions,o=WV(e,n,i,t);if((e=T(e)).type&&FV[e.type]&&o.baseAxis&&o.valueAxis){var a=P(r,o.baseAxis.dim),s=P(r,o.valueAxis.dim),l=FV[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)FV[u[h]]&&(u[h]=UV(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function WV(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function HV(t,e){return!(t&&t.containData&&e.coord&&!VV(e))||t.containData(e.coord)}function YV(t,e){return t?function(t,n,i,r){return df(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return df(t.value,e[r])}}function UV(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var XV=So(),ZV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this.markerGroupMap=ft()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){XV(t).keep=!1})),e.eachSeries((function(t){var r=EV.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!XV(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){XV(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;E(t,(function(t){var i=EV.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?wl(t):Sl(t))}))}))},e.type="marker",e}(gg);function jV(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=Er(a.get("x"),n.getWidth()),l=Er(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}var qV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=EV.getMarkerModelFromSeries(t,"markPoint");e&&(jV(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new qw),u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return A(A({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new qm(i,n),o=z(n.get("data"),H(GV,e));t&&(o=B(o,H(HV,t)));var a=YV(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),jV(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(U(i)||U(r)||U(o)||U(s)){var h=e.getRawValue(t),c=e.getDataParams(t);U(i)&&(i=i(h,c)),U(r)&&(r=r(h,c)),U(o)&&(o=o(h,c)),U(s)&&(s=s(h,c))}var p=n.getModel("itemStyle").getItemStyle(),d=gy(a,"color");p.fill||(p.fill=d),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:p})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){Hs(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(ZV);var KV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(EV),$V=So(),JV=function(t,e,n,i){var r,o=t.getData();if(Y(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=it(i.yAxis,i.xAxis);else{var u=WV(i,o,e,t);s=u.valueAxis,l=UV(o,ix(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,p=T(i),d={coord:[]};p.type=null,p.coord=[],p.coord[c]=-1/0,d.coord[c]=1/0;var f=n.get("precision");f>=0&&j(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[GV(t,r[0]),GV(t,r[1]),A({},r[2])];return g[2].type=g[2].type||null,C(g[2],g[0]),C(g[2],g[1]),g};function QV(t){return!isNaN(t)&&!isFinite(t)}function tB(t,e,n,i){var r=1-t,o=i.dimensions[t];return QV(e[r])&&QV(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function eB(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(tB(1,n,i,t)||tB(0,n,i,t)))return!0}return HV(t,e[0])&&HV(t,e[1])}function nB(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Er(s.get("x"),r.getWidth()),u=Er(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(uS(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;QV(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):QV(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var iB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=EV.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=$V(e).from,o=$V(e).to;r.each((function(e){nB(r,e,!0,t,n),nB(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new gA);this.group.add(l.group);var u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return A(A({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new qm(i,n),o=new qm(i,n),a=new qm([],n),s=z(n.get("data"),H(JV,e,t,n));t&&(s=B(s,H(eB,t)));var l=YV(!!t,i);return r.initData(z(s,(function(t){return t[0]})),null,l),o.initData(z(s,(function(t){return t[1]})),null,l),a.initData(z(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;$V(e).from=h,$V(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),y=e.get("symbolOffset");function v(e,n,r){var o=e.getItemModel(n);nB(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=gy(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:rt(o.get("symbolOffset",!0),y[r?0:1]),symbolRotate:rt(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:rt(o.get("symbolSize"),f[r?0:1]),symbol:rt(o.get("symbol",!0),d[r?0:1]),style:s})}Y(d)||(d=[d,d]),Y(f)||(f=[f,f]),Y(g)||(g=[g,g]),Y(y)||(y=[y,y]),u.from.each((function(t){v(h,t,!0),v(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t){Hs(t).dataModel=e,t.traverse((function(t){Hs(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(ZV);var rB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(EV),oB=So(),aB=function(t,e,n,i){var r=GV(t,i[0]),o=GV(t,i[1]),a=r.coord,s=o.coord;a[0]=it(a[0],-1/0),a[1]=it(a[1],-1/0),s[0]=it(s[0],1/0),s[1]=it(s[1],1/0);var l=D([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function sB(t){return!isNaN(t)&&!isFinite(t)}function lB(t,e,n,i){var r=1-t;return sB(e[r])&&sB(n[r])}function uB(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return uS(t,"cartesian2d")?!(!n||!i||!lB(1,n,i)&&!lB(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!VV(e)&&!VV(n))||t.containZone(e.coord,n.coord)}(t,r,o):HV(t,r)||HV(t,o)}function hB(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Er(s.get(n[0]),r.getWidth()),u=Er(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[d=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(uS(a,"cartesian2d")){var c=a.getAxis("x"),p=a.getAxis("y"),d=t.get(n[0],e),f=t.get(n[1],e);sB(d)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):sB(f)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var cB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],pB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=EV.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=z(cB,(function(r){return hB(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Cr});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=z(t&&t.dimensions,(function(t){var n=e.getData();return A(A({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));r=z(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new qm(r,n)}else i=new qm(r=[{name:"value",type:"float"}],n);var s=z(n.get("data"),H(aB,e,t,n));t&&(s=B(s,H(uB,t)));var l=t?function(t,e,n,i){return df(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return df(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=z(cB,(function(n){return hB(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],p=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Vr(c),Vr(p);var d=!!(l[0]>c[1]||l[1]p[1]||h[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Tp),fB=H,gB=E,yB=Cr,vB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new yB),this.group.add(this._selectorGroup=new yB),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=xp(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=xp(k({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=XE(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=ft(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),gB(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new yB;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("legendLineStyle")||{},g=d.getVisual("legendIcon"),y=d.getVisual("style");this._createItem(p,a,o,r,e,t,f,y,g,u,i).on("click",fB(mB,a,null,i,h)).on("mouseover",fB(_B,p.name,null,i,h)).on("mouseout",fB(bB,p.name,null,i,h)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),p=s.getItemVisual(c,"style"),d=s.getItemVisual(c,"legendIcon"),f=bn(p.fill);f&&0===f[3]&&(f[3]=.2,p=A(A({},p),{fill:kn(f,"rgba")})),this._createItem(n,a,o,r,e,t,{},p,d,u,i).on("click",fB(mB,null,a,i,h)).on("mouseover",fB(_B,null,a,i,h)).on("mouseout",fB(bB,null,a,i,h)),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();gB(t,(function(t){var i=t.type,r=new ks({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),Hh(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Ol(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=t.visualDrawType,p=r.get("itemWidth"),d=r.get("itemHeight"),f=r.isSelected(e),g=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),v=i.get("icon"),m=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),gB(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?rv(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var p=e.getModel("lineStyle"),d=p.getLineStyle();if(s(d,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===d.stroke&&(d.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=p.get("inactiveColor"),d.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}(l=v||l||"roundRect",i,a,s,c,f,h),x=new yB,_=i.getModel("textStyle");if(!U(t.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;x.add(function(t){var e=t.icon||"roundRect",n=Ly(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:d,icon:l,iconRotate:b,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:y}))}else x.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:l,iconRotate:g,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:y}));var w="left"===o?p+5:-5,S=o,M=r.get("formatter"),I=e;X(M)&&M?I=M.replace("{name}",null!=e?e:""):U(M)&&(I=M(e));var T=i.get("inactiveColor");x.add(new ks({style:Uh(_,{text:I,x:w,y:d/2,fill:f?_.getTextColor():T,align:S,verticalAlign:"middle"})}));var C=new Cs({shape:x.getBoundingRect(),invisible:!0}),D=i.getModel("tooltip");return D.get("show")&&Eh({el:C,componentModel:r,itemName:e,itemTooltipOption:D.option}),x.add(C),x.eachChild((function(t){t.silent=!0})),C.silent=!u,this.getContentGroup().add(x),Ol(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();mp(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){mp("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=Math.max(l[g],h[g]),v[y]=Math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(gg);function mB(t,e,n,i){bB(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),_B(t,e,n,i)}function xB(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=rt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+y[1-i]),u.__rectSize=n[r],d){var x={x:0,y:0};x[r]=Math.max(n[r]-p[r]-v,0),x[o]=m[o],u.setClipPath(new Cs({shape:x})),u.__rectSize=x[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(t);return null!=_.pageIndex&&rh(l,{x:_.contentPosition[0],y:_.contentPosition[1]},d?t:null),this._updatePageInfoView(t,_),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;E(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",X(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=DB[r],a=AB[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!x(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&x(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(vB);function LB(t){wm(MB),t.registerComponentModel(IB),t.registerComponentView(kB),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var PB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=yc(AE.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(AE),OB=So();function RB(t,e,n){OB(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function NB(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function EB(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function zB(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function VB(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=OB(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=ft());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){E(CE(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:H(zB,e),dispatchAction:H(EB,t),dataZoomInfoMap:null,controller:null},i=n.controller=new kI(t.getZr());return E(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=ft())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Ag(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else NB(i,t)}))}))}var BB=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),RB(i,e,{pan:W(FB.pan,this),zoom:W(FB.zoom,this),scrollMove:W(FB.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=OB(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return lk(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:GB((function(t,e,n,i,r,o){var a=WB[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:GB((function(t,e,n,i,r,o){return WB[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function GB(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return lk(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var WB={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function HB(t){BE(t),t.registerComponentModel(PB),t.registerComponentView(BB),VB(t)}var YB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=yc(AE.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(AE),UB=Cs,XB="horizontal",ZB="vertical",jB=["line","bar","candlestick","scatter"],qB={easing:"cubicOut",duration:100,delay:0},KB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=W(this._onBrush,this),this._onBrushEnd=W(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),Ag(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){kg(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new Cr;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===XB?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Sp(t.option);E(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=xp(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===ZB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==XB||r?n===XB&&r?{scaleY:a?1:-1,scaleX:-1}:n!==ZB||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new UB({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new UB({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:W(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(r!==this._shadowData||o!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var l=r.getDataExtent(o),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var h,c=[0,e[1]],p=[0,e[0]],d=[[e[0],0],[0,0]],f=[],g=p[1]/(r.count()-1),y=0,v=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(v>0&&e%v)y+=g;else{var n=null==t||isNaN(t)||""===t,i=n?0:Nr(t,l,c,!0);n&&!h&&e?(d.push([d[d.length-1][0],0]),f.push([f[f.length-1][0],0])):!n&&h&&(d.push([y,0]),f.push([y,0])),d.push([y,i]),f.push([y,i]),y+=g,h=n}})),a=this._shadowPolygonPts=d,s=this._shadowPolylinePts=f}this._shadowData=r,this._shadowDim=o,this._shadowSize=[e[0],e[1]];for(var m=this.dataZoomModel,x=0;x<3;x++){var _=b(1===x);this._displayables.sliderGroup.add(_),this._displayables.dataShadowSegs.push(_)}}}function b(t){var e=m.getModel(t?"selectedDataBackground":"dataBackground"),n=new Cr,i=new Pu({shape:{points:a},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Ru({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){E(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&P(jB,t.get("type"))<0)){var a,s=i.getComponent(IE(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new UB({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new UB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),E([0,1],(function(e){var o=a.get("handleIcon");!Dy[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Ly(o,-1,0,2,2,null,!0);s.attr({cursor:$B(this._orient),draggable:!0,drift:W(this._onDragMove,this,e),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Er(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Ol(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new ks({silent:!0,invisible:!0,style:Uh(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))}),this);var c=h;if(u){var p=Er(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new Cs({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=Ly(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new Cs({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:$B(this._orient),drift:W(this._onDragMove,this,"all"),ondragstart:W(this._showDataInfo,this,!0),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Nr(t[0],[0,100],e,!0),Nr(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];lk(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Nr(o.minSpan,a,r,!0):null,null!=o.maxSpan?Nr(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Vr([Nr(i[0],r,a,!0),Nr(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=Vr(n.slice()),r=this._size;E([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Ji(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Vr([Nr(n.x,i,r,!0),Nr(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(se(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new UB({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?qB:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=CE(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(PE);function $B(t){return"vertical"===t?"ns-resize":"ew-resize"}function JB(t){t.registerComponentModel(YB),t.registerComponentView(KB),BE(t)}var QB=function(t,e,n){var i=T((tF[t]||{})[e]);return n&&Y(i)?i[i.length-1]:i},tF={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},eF=iD.mapVisual,nF=iD.eachVisual,iF=Y,rF=E,oF=Vr,aF=Nr,sF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&eV(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=W(t,this),this.controllerVisuals=tV(this.option.controller,e,t),this.targetVisuals=tV(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=ho(t),e},e.prototype.eachTargetSeries=function(t,e){E(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],Y(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return X(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):U(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=oF([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});C(i,n),C(r,n);var o=this.isCategory();function a(n){iF(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},rF(i,(function(t,e){if(iD.isValidType(e)){var n=QB(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";rF(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&T(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&T(n)||(o?s[0]:[s[0],s[0]])),l.symbol=eF(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;nF(u,(function(t){t>h&&(h=t)})),l.symbolSize=eF(u,(function(t){return aF(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Tp),lF=[20,140],uF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=lF[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=lF[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):Y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Vr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=hF(this,"outOfRange",this.getExtent()),n=hF(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Cr("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();yF([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=gF(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var p=Th(n.handleLabelPoints[l],Ih(u,this.group));o[l].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=gF(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=Th(l.indicatorLabelPoint,Ih(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var x={x:d,y:p,style:{fill:h}},_={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||bF(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var p=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function TF(t,e,n,i){for(var r=e.targetVisuals[i],o=iD.prepareVisualTypes(r),a={color:gy(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(SF,MF),E(IF,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(DF))}function PF(t){t.registerComponentModel(uF),t.registerComponentView(xF),LF(t)}var OF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],RF[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=T(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=z(this._pieceList,(function(t){return t=T(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=iD.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}E(e.pieces,(function(t){E(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),E(n,(function(t,n){var i=!1;E(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&E(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=QB(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,E(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;E(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=T(t)},e.prototype.getValueState=function(t){var e=iD.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){iD.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return E(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=yc(sF.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(sF),RF={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function NF(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var EF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=it(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),E(l.viewPieceList,(function(i){var l=i.piece,u=new Cr;u.onclick=W(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(c);u.add(new ks({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),mp(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:fF(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return dF(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new Cr,a=this.visualMapModel.textStyleModel;o.add(new ks({style:Uh(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=z(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(Ly(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=T(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,E(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(cF);function zF(t){t.registerComponentModel(OF),t.registerComponentView(EF),LF(t)}var VF={label:{enabled:!0},decal:{show:!1}},BF=So(),FF={};function GF(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=T(VF);C(i.label,t.getLocaleModel().get("aria"),!1),C(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=ft();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),BF(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(U(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=ed(e.ecModel,e.name,FF,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=BF(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=ed(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?A(A({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=k(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(p){var d=o.get(["general","withTitle"]);s=r(d,{title:p})}else s=o.get(["general","withoutTitle"]);var f=[],g=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(g,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,t.getLocaleModel().get(["series","typeNames"])[x]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=o.get(["data","separator","middle"]),p=o.get(["data","separator","end"]),d=[],g=0;g":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},YF=function(){function t(t){if(null==(this._condVal=X(t)?new RegExp(t):et(t)?t:null)){var e="";0,ao(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return X(e)?this._condVal.test(t):!!j(e)&&this._condVal.test(t+"")},t}(),UF=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),XF=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){oG(t,i)&&oG(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:C2&&l.push(e),l}function sG(t,e,n,i,r,o,a,s,l,u){if(oG(t,n)&&oG(e,i)&&oG(r,a)&&oG(o,s))l.push(a,s);else{var h=2/u,c=h*h,p=a-t,d=s-e,f=Math.sqrt(p*p+d*d);p/=f,d/=f;var g=n-t,y=i-e,v=r-a,m=o-s,x=g*g+y*y,_=v*v+m*m;if(x=0&&_-w*w=0)l.push(a,s);else{var S=[],M=[];Ze(t,n,r,a,.5,S),Ze(e,i,o,s,.5,M),sG(S[0],M[0],S[1],M[1],S[2],M[2],S[3],M[3],l,u),sG(S[4],M[4],S[5],M[5],S[6],M[6],S[7],M[7],l,u)}}}}function lG(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=lG([l,u],h?0:1,e),p=(h?s:u)/c.length,d=0;d1?null:new Ji(d*l+t,d*u+e)}function pG(t,e,n){var i=new Ji;Ji.sub(i,n,e),i.normalize();var r=new Ji;return Ji.sub(r,t,e),r.dot(i)}function dG(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function fG(t){var e=t.points,n=[],i=[];Ma(e,n,i);var r=new sr(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new Ji,h=new Ji;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=lG([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,p=0;p0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),M=Math.cos(w),I=0;for(x=0;x0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function LG(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=z(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return z(o,(function(o,a){return{cp:o,z:kG(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function PG(t){return vG(t.path,t.count)}function OG(t){return Y(t[0])}function RG(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var NG={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);OG(t)&&(s=t,l=e),OG(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,p=s?RG(l,s):RG(c?e:t,[c?t:e]),d=0,f=0;f1e4))for(var i=n.getIndices(),r=function(t){for(var e=t.dimensions,n=0;n0&&i.group.traverse((function(t){t instanceof gs&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function UG(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function XG(t){return Y(t)?t.sort().join(","):t}function ZG(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function jG(t,e){for(var n=0;n=0&&r.push({data:e.oldData[n],divide:ZG(e.oldData[n]),dim:t.dimension})})),E(ho(t.to),(function(t){var e=jG(n.updatedSeries,t);if(e>=0){var i=n.updatedSeries[e].getData();o.push({data:i,divide:ZG(i),dim:t.dimension})}})),r.length>0&&o.length>0&&YG(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=ft(),i=ft(),r=ft();return E(t.oldSeries,(function(e,n){var o=t.oldData[n],a=UG(e),s=XG(a);i.set(s,o),Y(a)&&E(a,(function(t){r.set(t,{data:o,key:s})}))})),E(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.getData(),o=UG(t),a=XG(o),s=i.get(a);if(s)n.set(a,{oldSeries:[{divide:ZG(s),data:s}],newSeries:[{divide:ZG(e),data:e}]});else if(Y(o)){var l=[];E(o,(function(t){var e=i.get(t);e&&l.push({divide:ZG(e),data:e})})),l.length&&n.set(a,{oldSeries:l,newSeries:[{data:e,divide:ZG(e)}]})}else{var u=r.get(o);if(u){var h=n.get(u.key);h||(h={oldSeries:[{data:u.data,divide:ZG(u.data)}],newSeries:[]},n.set(u.key,h)),h.newSeries.push({data:e,divide:ZG(e)})}}}})),n}(i,n);E(o.keys(),(function(t){var n=o.get(t);YG(n.oldSeries,n.newSeries,e)}))}E(n.updatedSeries,(function(t){t.__universalTransitionEnabled&&(t.__universalTransitionEnabled=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldData=[],u=0;uli{$p:10px 0!important}.luna-object-viewer-null{$c:var(--operator-color)}.luna-object-viewer-regexp,.luna-object-viewer-string{$c:var(--string-color)}.luna-object-viewer-number{$c:var(--number-color)}.luna-object-viewer-boolean{$c:var(--keyword-color)}.luna-object-viewer-special{$c:var(--operator-color)}.luna-object-viewer-key,.luna-object-viewer-key-lighter{$c:var(--var-color)}.luna-object-viewer-expanded:before{border-color:transparent;$btc:var(--foreground)}.luna-object-viewer-collapsed:before{$btc:transparent;$blc:var(--foreground)}.luna-notification{$pe:none!important;$p:10px;$z:1000}.luna-notification-item{$z:500;$c:var(--foreground);$b:var(--background);$bs:none;$p:5px 10px;$bo:1px solid var(--border)}.luna-notification-upper{$mb:10px}.luna-notification-lower{$mt:10px}._container{$pe:none;$po:fixed;$l:0;$t:0;$w:100%;$h:100%;$z:1000000;$c:var(--foreground);$ff:".SFNSDisplay-Regular","Helvetica Neue","Lucida Grande","Segoe UI",Tahoma,sans-serif;$fs:14px;direction:ltr}._container *{$bsi:border-box;$pe:all;-webkit-user-select:none;$us:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none}._container ul{list-style:none;$p:0;$m:0}._container h1,._container h2,._container h3,._container h4{$m:0}._hidden{$d:none}._tag-name-color{$c:var(--tag-name-color)}._function-color{$c:var(--function-color)}._attribute-name-color{$c:var(--attribute-name-color)}._operator-color{$c:var(--operator-color)}._string-color{$c:var(--string-color)}',""]),t.exports=e},276:function(t,e,n){(e=n(3645)(!1)).push([t.id,"@font-face{$ff:luna-console-icon;src:url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAasAAsAAAAACnAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAI4AAADcIsYnIk9TLzIAAAGYAAAAPgAAAFZWmlGRY21hcAAAAdgAAAD2AAACyDioZ9NnbHlmAAAC0AAAAZgAAAH8Lq6nDGhlYWQAAARoAAAAMQAAADZ25cSzaGhlYQAABJwAAAAdAAAAJAgCBBRobXR4AAAEvAAAABkAAABYGAH//GxvY2EAAATYAAAAGAAAAC4J8glUbWF4cAAABPAAAAAfAAAAIAEjAFBuYW1lAAAFEAAAASkAAAIWm5e+CnBvc3QAAAY8AAAAcAAAAJ7qA/7MeJxNjTsOwjAQRJ8TJzE2hPBrKBBHQByAAiGqFBRcIBVCiqhyBA7O2AgRr9Y7M2+lxQCeAyeyy7W9U/fd8GKL5fsiH2vTPx8d7ufEbJpO/aagYc+RM7fEjBKnmiRuySmZUTNNf0wybYSRj9VoO4iU7NQh+Up8qelZs5EupP75Shfm2oz3Kmkvt/gARcgJKwAAeJxjYGQUZ5zAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHGHQ/srGAuDEsTGBhRhABALQ1CMwAAHiczdJNbsIwEIbh1+QHQsJviNRFF1XX7aEQRZQNRQjEHXqgrnopn4B+E8+qqip117GeRB4nk4lloAAyeZIcwicBiw9lQ5/PGPf5nHfNV8yVyXlmzZY9R05cuMbydtOqZTfsOCh7Vjb02e8RVMXGHfc8aDxqwFKVF7QMtdLpmzUVDSOmTJjpnUH/3YJSBcofqv4Wyz8+b6FuWvXSjW1SV30r1sl/icYuofFZh+1+Yn+7dnPZuIW8uFa2big7t5JXZzX3znbh4Gp5c5UcnfVyciM5u6lc3ESuTnsZQ2JnLQ4S7J4ldjZjntj5jEVi5zaWCeUXWN4q9AAAeJxdUMFOU0EUnTMzb2o1FB5O5wENg31k5mExVEo7jSGBEuO6CStDmtbIBuiKBYg/gRu/ABO3/ocscOEXsHBpogtWvFfnvQgxJnduztx7zknuIXQyIYSDE9IgLwmBmIZI1pDYbTSxBqeW4KvrVKSmaaRKFZREE7YJIyONSLW6W37bLiRxscXNTH1zbnFqlnJ5Eu+G9MnT8JBy9l69ELx69Ohd9JCryrwcU07TbCU5H4y+jQbnyco/EF+8x1/eaX03bCzR8IgGwVn0WC/I8YOzaLGS+4+p4K8O/lcXkPhj/CP0ig1JQIhJyugCxz3o7LqH4YUH0L3swlMK3q+CV/HMbhkJAqlarm1jgd+97DpnfsKPeH15eT2+l9L5OJ/kcjZJfY6MU++wQPzI+PRECUJjo97aAtqupaqhFLHtRLHNf1Kwn9lAOid9L7tV9nzVldNL3dC+NmrGOGM+sme2VrO335Mda3foXlXravY57zemY23HkLs72RsW5JegDjZK99FnPPtwl8FX1i92IfAax6yfvkWf/AHb1F1JeJxjYGRgYABi3/mPYuP5bb4ycLOABKI4H+9rgNH//zIwsDCzMAElOBhAJAMAQ2IK+QAAAHicY2BkYGBhAAEWhv9///9lYWZgZEAFYgBbLQQgAAAAeJxjYGBgYGH4/58FTIPZf2FsSgAAM58EEwAAAHicY2AAgjyGJoYlDI8YPjD8ww8BeTMTR3icY2BkYGAQY3BhYGYAASYg5gJCBob/YD4DABGFAXQAeJxlkD1uwkAUhMdgSAJSghQpKbNVCiKZn5IDQE9Bl8KYtTGyvdZ6QaLLCXKEHCGniHKCHChj82hgLT9/M2/e7soABviFh3p5uG1qvVq4oTpxm/Qg7JOfhTvo40W4S38o3MMbpsJ9POKdO3j+HZ0BSuEW7vEh3Kb/KeyTv4Q7eMK3cJf+j3APK/wJ9/HqDdPIFLEp3FIn+yy0Z3n+rrStUlOoSTA+WwtdaBs6vVHro6oOydS5WMXW5GrOrs4yo0prdjpywda5cjYaxeIHkcmRIoJBgbipDktoJNgjQwh71b3UK6YtKvq1VpggwPgqtWCqaJIhlcaGyTWOrBUOPG1K1zGt+FrO5KS5zGreJCMr/u+6t6MT0Q+wbaZKzDDiE1/kg+YO+T89EV6oAAAAeJxtxksOgjAUQNF3kaIW/x9cBYtqgEAnLXlp0+1rwtQzuVcq2Vj5r6NiR42hYc+BI5aWE2cuXLlx58GTF286PmIm1ajGhzWnJub0S12cBjs4nVI/xhLabdXPS2JCiXgCK5lEwTHQMzKziHwBqnYYpg==') format('woff')}[class*=' luna-console-icon-'],[class^=luna-console-icon-]{$d:inline-block;$ff:luna-console-icon!important;$fs:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.luna-console-icon-error:before{$co:'\\f101'}.luna-console-icon-input:before{$co:'\\f102'}.luna-console-icon-output:before{$co:'\\f103'}.luna-console-icon-warn:before{$co:'\\f104'}.luna-console-icon-caret-down:before{$co:'\\f105'}.luna-console-icon-caret-right:before{$co:'\\f106'}.luna-console{$b:#fff;$oy:auto;$wos:touch;$h:100%;$po:relative;$wc:scroll-position;$cu:default;$fs:12px;$ff:Menlo,Consolas,Lucida Console,Courier New,monospace}.luna-console-hidden{$d:none}.luna-console-fake-logs{$po:absolute;$l:0;$t:0;$pe:none;$v:hidden;$w:100%}.luna-console-fake-logs *{$o:hidden;$c:#000;$po:static}.luna-console-logs{$pt:1px;$po:absolute;$w:100%}.luna-console-log-container{$bsi:content-box}.luna-console-header{$ws:nowrap;$d:flex;$fs:11px;$c:#545454;$bt:1px solid transparent;$bb:1px solid #ccc}.luna-console-header .luna-console-time-from-container{$ox:auto;$wos:touch;$p:3px 10px}.luna-console-nesting-level{$w:14px;$fsh:0;$mt:-1px;$mb:-1px;$po:relative;$br:1px solid #ccc}.luna-console-nesting-level.luna-console-group-closed::before{$co:''}.luna-console-nesting-level::before{$bb:1px solid #ccc;$po:absolute;$t:0;$l:0;$ml:100%;$w:5px;$h:100%;$bsi:border-box}.luna-console-log-item{$po:relative;$d:flex;$bt:1px solid transparent;$bb:1px solid #ccc;$mt:-1px;$c:#333}.luna-console-log-item:after{$co:'';$d:block;$cl:both}.luna-console-log-item .luna-console-code{$d:inline;$ff:Menlo,Consolas,Lucida Console,Courier New,monospace}.luna-console-log-item .luna-console-code .luna-console-keyword{$c:#881280}.luna-console-log-item .luna-console-code .luna-console-number{$c:#1c00cf}.luna-console-log-item .luna-console-code .luna-console-operator{$c:grey}.luna-console-log-item .luna-console-code .luna-console-comment{$c:#236e25}.luna-console-log-item .luna-console-code .luna-console-string{$c:#1a1aa6}.luna-console-log-item a{$c:#15c!important}.luna-console-log-item .luna-console-icon-container{$m:0 -6px 0 10px}.luna-console-log-item .luna-console-icon-container .luna-console-icon{$lh:20px;$fs:12px;$c:#333;$po:relative}.luna-console-log-item .luna-console-icon-container .luna-console-icon-caret-down,.luna-console-log-item .luna-console-icon-container .luna-console-icon-caret-right{$t:0;$l:-2px}.luna-console-log-item .luna-console-icon-container .luna-console-icon-error{$t:0;$c:#ef3842}.luna-console-log-item .luna-console-icon-container .luna-console-icon-warn{$t:0;$c:#e8a400}.luna-console-log-item .luna-console-count{$b:#8097bd;$p:2px 4px;$c:#000;$bra:10px;$fs:12px;$f:left;$m:1px -6px 0 10px}.luna-console-log-item .luna-console-log-content-wrapper{$fl:1;$o:hidden}.luna-console-log-item .luna-console-log-content{$p:3px 0;$m:0 10px;$ox:auto;$wos:touch;$ws:pre-wrap;-webkit-user-select:text;$us:text}.luna-console-log-item .luna-console-log-content *{-webkit-user-select:text;$us:text}.luna-console-log-item.luna-console-html table,.luna-console-log-item.luna-console-table table{$w:100%;$bc:collapse;$o:hidden;$c:#333}.luna-console-log-item.luna-console-html table th,.luna-console-log-item.luna-console-table table th{$b:#f3f3f3}.luna-console-log-item.luna-console-html table td,.luna-console-log-item.luna-console-html table th,.luna-console-log-item.luna-console-table table td,.luna-console-log-item.luna-console-table table th{$bo:1px solid #ccc;$p:3px 10px}.luna-console-log-item.luna-console-html table tr:nth-child(even),.luna-console-log-item.luna-console-table table tr:nth-child(even){$b:#f2f7fd}.luna-console-log-item.luna-console-error{$z:50;$b:#fff0f0;$c:red;$bt:1px solid #ffd6d6;$bb:1px solid #ffd6d6}.luna-console-log-item.luna-console-error .luna-console-stack{$pl:1.2em;$ws:nowrap}.luna-console-log-item.luna-console-error .luna-console-count{$b:red}.luna-console-log-item.luna-console-debug{$z:20}.luna-console-log-item.luna-console-input{border-bottom-color:transparent}.luna-console-log-item.luna-console-warn{$z:40;$c:#5c5c00;$b:#fffbe5;$bt:1px solid #fff5c2;$bb:1px solid #fff5c2}.luna-console-log-item.luna-console-warn .luna-console-count{$b:#e8a400}.luna-console-log-item.luna-console-info{$z:30}.luna-console-log-item.luna-console-group,.luna-console-log-item.luna-console-groupCollapsed{$fw:700}.luna-console-abstract .luna-console-key{$c:#881391}.luna-console-abstract .luna-console-number{$c:#1c00cf}.luna-console-abstract .luna-console-null{$c:#5e5e5e}.luna-console-abstract .luna-console-string{$c:#c41a16}.luna-console-abstract .luna-console-boolean{$c:#0d22aa}.luna-console-abstract .luna-console-special{$c:#5e5e5e}",""]),t.exports=e},5674:function(t,e,n){(e=n(3645)(!1)).push([t.id,".luna-notification{$po:fixed;$t:0;$l:0;$w:100%;$h:100%;$p:20px;$bsi:border-box;$pe:none;$d:flex;flex-direction:column;$fs:14px;$ff:Arial,Helvetica,sans-serif}.luna-notification-item{$d:flex;$bs:0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);$p:10px 16px;$c:#333;$b:#fff}.luna-notification-lower{$mt:16px}.luna-notification-upper{$mb:16px}.luna-notification-theme-dark .luna-notification-item{$bs:0 2px 2px 0 rgba(255,255,255,.07),0 1px 5px 0 rgba(255,255,255,.1);$c:#a5a5a5;$b:#242424}",""]),t.exports=e},8418:function(t,e,n){(e=n(3645)(!1)).push([t.id,"@font-face{$ff:luna-object-viewer-icon;src:url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAS8AAsAAAAAB7QAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAGEAAACMISgl+k9TLzIAAAFsAAAAPQAAAFZLxUkWY21hcAAAAawAAADWAAACdBU42qdnbHlmAAAChAAAAC4AAAAwabU7V2hlYWQAAAK0AAAALwAAADZzjr4faGhlYQAAAuQAAAAYAAAAJAFyANlobXR4AAAC/AAAABAAAABAAZAAAGxvY2EAAAMMAAAAEAAAACIAtACobWF4cAAAAxwAAAAfAAAAIAEbAA9uYW1lAAADPAAAASkAAAIWm5e+CnBvc3QAAARoAAAAUwAAAHZW8MNZeJxNjTsOQFAQRc/z/+sV1mABohKV0gZeJRJR2X9cT4RJZu7nFIMBMjoGvHGaF6rdngcNAc/c/O/Nvq2W5E1igdNE2zv1iGh1c5FQPlYXUlJRyxt9+/pUKadQa/AveGEGZQAAAHicY2BkkGScwMDKwMBQx9ADJGWgdAIDJ4MxAwMTAyszA1YQkOaawnCAQfcjE8MJIFcITDIwMIIIAFqDCGkAAAB4nM2STQ4BQRCFv54ZP8MwFhYW4gQcShBsSERi50BWDuFCcwJedddKRGKnOt8k9aanqudVAy0gF3NRQLgTsLhJDVHP6UW94Kp8zEhKwYIlG/YcOXHm0mTPp96aumLLwdUQ1fcIqmJrwpSZL+iqak5JmyE1Ayr1bdGhr/2ZPmp/qPQtuj/uJzqQl+pfDyypesQD6AT/ElV8PjyrMccT9rdLR3PUFBI227VTio1jbm6dodg5VnPvmAsHxzofHfmi+Sbs/pwdWcXFkWdNSNg9arIE2QufuSCyAAB4nGNgZACBlQzTGZgYGMyVxVc2O073AIpAxHsYloHFRc2dPZY2OTIwAACmEQesAAB4nGNgZGBgAOINe2b6x/PbfGXgZjgBFIjifLyvAUEDwUqGZUCSg4EJxAEAUn4LLAB4nGNgZGBgOMHAACdXMjAyoAIBADizAkx4nGNgAIITUEwGAABZUAGReJxjYAACHgYJ3BAAE94BXXicY2BkYGAQYGBmANEMDExAzAWEDAz/wXwGAApcASsAeJxlkD1uwkAUhMdgSAJSghQpKbNVCiKZn5IDQE9Bl8KYtTGyvdZ6QaLLCXKEHCGniHKCHChj82hgLT9/M2/e7soABviFh3p5uG1qvVq4oTpxm/Qg7JOfhTvo40W4S38o3MMbpsJ9POKdO3j+HZ0BSuEW7vEh3Kb/KeyTv4Q7eMK3cJf+j3APK/wJ9/HqDdPIFLEp3FIn+yy0Z3n+rrStUlOoSTA+WwtdaBs6vVHro6oOydS5WMXW5GrOrs4yo0prdjpywda5cjYaxeIHkcmRIoJBgbipDktoJNgjQwh71b3UK6YtKvq1VpggwPgqtWCqaJIhlcaGyTWOrBUOPG1K1zGt+FrO5KS5zGreJCMr/u+6t6MT0Q+wbaZKzDDiE1/kg+YO+T89EV6oAAAAeJxdxjkOgCAUANE/uOOGB+FQBIjaaEJIuL6FsfE1M6Lk9fXPoKioaWjp6BnQjEzMLKwYNtHepZhtuMs1vpvO/ch4HIlIxhK4KVyc7BwiD8nvDlkA') format('woff')}[class*=' luna-object-viewer-icon-'],[class^=luna-object-viewer-icon-]{$d:inline-block;$ff:luna-object-viewer-icon!important;$fs:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.luna-object-viewer-icon-caret-down:before{$co:'\\f101'}.luna-object-viewer-icon-caret-right:before{$co:'\\f102'}.luna-object-viewer{$ox:auto;$wos:touch;$oy:hidden;$cu:default;$ff:Menlo,Consolas,Lucida Console,Courier New,monospace;$fs:12px;$lh:1.2;$mh:100%;$c:#333;list-style:none!important}.luna-object-viewer ul{list-style:none!important;$p:0!important;$pl:12px!important;$m:0!important}.luna-object-viewer li{$po:relative;$ws:nowrap;$lh:16px;$mh:16px}.luna-object-viewer>li>.luna-object-viewer-key{$d:none}.luna-object-viewer span{$po:static!important}.luna-object-viewer li .luna-object-viewer-collapsed~.luna-object-viewer-close:before{$c:#999}.luna-object-viewer-array .luna-object-viewer-object .luna-object-viewer-key{$d:inline}.luna-object-viewer-null{$c:#5e5e5e}.luna-object-viewer-regexp,.luna-object-viewer-string{$c:#c41a16}.luna-object-viewer-number{$c:#1c00cf}.luna-object-viewer-boolean{$c:#0d22aa}.luna-object-viewer-special{$c:#5e5e5e}.luna-object-viewer-key,.luna-object-viewer-key-lighter{$c:#881391}.luna-object-viewer-key-lighter{opacity:.6}.luna-object-viewer-collapsed .luna-object-viewer-icon,.luna-object-viewer-expanded .luna-object-viewer-icon{$po:absolute!important;$l:-12px;$c:#727272;$fs:12px}.luna-object-viewer-icon-caret-right{$t:1px}.luna-object-viewer-icon-caret-down{$t:2px}.luna-object-viewer-expanded>.luna-object-viewer-icon-caret-down{$d:inline}.luna-object-viewer-expanded>.luna-object-viewer-icon-caret-right{$d:none}.luna-object-viewer-collapsed>.luna-object-viewer-icon-caret-down{$d:none}.luna-object-viewer-collapsed>.luna-object-viewer-icon-caret-right{$d:inline}.luna-object-viewer-hidden~ul{$d:none}.luna-object-viewer-theme-dark{$c:#fff}.luna-object-viewer-theme-dark .luna-object-viewer-null,.luna-object-viewer-theme-dark .luna-object-viewer-special{$c:#a1a1a1}.luna-object-viewer-theme-dark .luna-object-viewer-regexp,.luna-object-viewer-theme-dark .luna-object-viewer-string{$c:#f28b54}.luna-object-viewer-theme-dark .luna-object-viewer-boolean,.luna-object-viewer-theme-dark .luna-object-viewer-number{$c:#9980ff}.luna-object-viewer-theme-dark .luna-object-viewer-key,.luna-object-viewer-theme-dark .luna-object-viewer-key-lighter{$c:#5db0d7}",""]),t.exports=e},8998:function(t,e,n){(e=n(3645)(!1)).push([t.id,"@font-face{$ff:eruda-icon;src:url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAvoAAsAAAAAEZgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQAAAAFZHb1PUY21hcAAAAYQAAACVAAACUPKX+h1nbHlmAAACHAAAB1oAAAoQydSW4mhlYWQAAAl4AAAAMQAAADYapMv4aGhlYQAACawAAAAdAAAAJAgEBBVobXR4AAAJzAAAABcAAABIRAb//GxvY2EAAAnkAAAAJgAAACYRiA/MbWF4cAAACgwAAAAfAAAAIAEjAQ1uYW1lAAAKLAAAASkAAAIWm5e+CnBvc3QAAAtYAAAAjwAAAMnZZQoFeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGQ+zjiBgZWBgamX6QwDA0M/hGZ8zWDEyAEUZWBlZsAKAtJcUxgcPjJ+FGQBcWNYmBgYgTQIMwAA9pkJ13ic7ZHJDcMwDATHtnyf6iNVpKC8Um6aUAUOV5syQmA4EEEJAgn0QBc8ggTNmwbFK6pNrXcstZ541p6kesn3HblRjnOquY3eFC8OjEzMcW9lY+fg5CJHy8A/tpo/v1PWFE2da2uQO6P9lGQ06dIb7a4MBnk0yJNBng3yYrTTshrkzeh3ZTfIh0E+DfJlkLMhfwF2lyt5AAAAeJx1FltsFNf1nntnZ/YxO7PjnZ3ZB55ld9kZ73q9750FO9hYGDDYYLB5NLwMNRgCqFFpkhqFDz6IlKCUqLSfSb7cfkDVRCoVbdWgiqqNqoJUKYR+VMpHP9JWfXzSNu2ue+7sBreV4rXOPfee93OXAME/RtnPiUJIPusEwK0buhQAQxfpR3q4Ows/VOyU0n0TvqakxhW4i/eUE+6+2f1G2EkRT54+ZavER0gA2gFw6PnuO7vgdvfwLujAqZ3do91jO3t8LE+/xe2ALoGYdcBuuo1M3WD50BoJWRwYKiWqQb+i8ksI8DUW69u4yvLrsnZLa7p1Ewz6KnIGLcOwgsiNwutaOEaYZ/cT9gkJkhixvRhtx2412yBGUZXbqJuGaUBWAd2Cetttu03OQMNH9kwPD9fg3uzva93pvScOz0wXS91fvPrk6tUn/7h0fuvExNbzl56UitMzh4/NdadrMHFsH9yrDQ9P74HLVz/++5OrnOEzzum57/nxPnufmKSKUWi6mK2AxIHdnACnnwrQVTAx9blMP8Q0tDkwKDEGQwsfiKo46fPdnw8ZCmCI8F4PX0N8nQ6/WyOKEZq/7/NN4sMHC6FBw4CvSn1MhXVqvy4fsp9hrghg+bH0JtYR2C9Xuj/o3l2BWQ/A3pXuXbYLAcz+D4HHtrZGiAACIUWyHbWIKohOGWOagAqUwTXQfx4H5lmlpiEpGDeGXYG8bloYbr09DjztXCTrUeFpJDMWHwwPUEF/OTuv0Y0F7QUqsCvGFlGIXQh93QwKhpLQL1KBdrpDzs3ji79ZPH7TGfovFN5DHX2+VzLzWjFNtQvU51sxo1ZSv+hfMQcVrv8iFYUd5/9f2kOf1e0eu0fiXt2+qD5fWNB/ilihmOpVyAr2KiTC/XW8R/eq+R0/log3M7/GsEQi5/10bf2i9hn6ff0xO0wGSJrU0DMvc8/SyXPJsmVojkPdAl0BllVoDFu8YYzTZpnCv144deJmPn/zxKmPPkcujC6Nji69zMFYorpJz43lknjom6rsUKFw6+TiraFicejW4slbhULn0z4nAngeWRKbxrKAZwMl0LVeX02ya0Tle8HOZcWYphuNehvcJit2HodCmmlqQZmWDFqGWdHUOvs1U4KZgc3kmfwddgd7imAT5bKSKIk6n9WGF2BOoTlvlJt8Zr0pljIaG3nu7UMvnTm1ZXR0y6kzL53+0sEV80Xj2JXtR2ZwmnE4Z45Mjm0pfQ9eYSNbJ8c2n17649LpzWPFwq1jE6dbpeLuPd/fs7tYSsZHkGXdjwfsARnC3aFAtkxbDc+N9V3h+WZmNJPnmuoiG9+2enf12tSlysi+uZ/M7RupcOTEjm1bqze6P7rcI0492DY1dW316InP6R5jKlm5AdOXPdLd1Wf99xf2V5LwMpFzxqGF9cNq6hZt1N22GcNpRbea45RbVyj9bUktjrTPvvbW9eV2++z16ckrNRViC513a8d32vbO40u9A26otSuT09fPttvL19967Wx7pKiWun9egNg6Dz/6PvwUd2iUJDELuSy2PjY3z8Ig5FoZrQGSKTkSg0O3z52jy+Vk1M+mOocf0nOPHu14+Mbrd5bp8rlk1FLDtx91DoH2xsMdjx7RHKqVCFlbE3wCkG+SO+QxeUo+Ix2edHAnoIXZLeNM2TzLbdc7RN4H2T5BBQVw+HCn4KNHw0ANs/+J4bB6T/wVH6zeDuLcCNLQcL3WMeu9G17GcWF5ptoufzLwRC/65qF/9qhm36okDkPb9vzhsmXqYCY8Y54GjlHT8UQc9INjbc8p29t6DteAXNwQKjfbDko7ksk+VCxtIB6SjIHBcmJjQI7QgNTaLicFNR7bbyRVlpKs0bQSFJgEzJepqCUjFQgaEUGQtKg/LEgCgN8nS8GYEknKkqlZI4mNfllhsrRhdFMiaOrpaEEXFZ8/IscLzZQWEEGkqKka1EMm06KSnIiUIlHGJKG77cz8XGmEsXr9wMLi0vz+kTKl1erc/KL8B18wvKGye0oZ8Adi+Wy9MgmSX27HtXixEtfwzc42DL8ckX+lDwmBsOwXVDWghQWRGcwnFepmVNDLTqKSZ75dsXdLB2enz9I03RfUgnHHTWlBSZYTWSOd95k0FRdC/o2yHApnpCALJMJiVA0aoQF/bWMo4leMZHMoAtQXCInBoGEN5P2iX/D7RFmK2M+le5oycSsvGoKSjNhR1UchKIY3xKImz7JghKKBalpkVAJfILLBtePJSDRlumr3edaoHTy0fHL/3lKZ0XrtwMKXFw/Mlas/tvWEHJ3YpUbjg5bCRpubxaKWlLVQolBNDPA3usUSA35xDBPqjwyoGpN84ZAcEk1JDtvVuF7Uy5viNYeJq/rrhT/NzL0IaT5qax38PmUCxd87SYJTkscFKOLPHtzemfo4AH7vGDH+hWO3zKzNb7h0/tY9rruujjDgDrPqsBvo/NoqWvjfSOXzbj7/bVayUyn734+dSduepEdjlhXrfpfDp/mWbbfyaPo/itrIyAAAeJxjYGRgYABii2PFJvH8Nl8ZuFkYQOD2wcO1MPr/3///WVhZmIBcDgYQyQAAXLENIQAAAHicY2BkYGBhAAEW1v9///9lYWVgZEAFQgBbzAQjAAAAeJxjYGBgYMGL///HK88KVvMXAFerBEQAAAAAAAAgADQAUgBwALQBAAEiAZAB3AIsAkwCkALQAxIDQATKBQgAAHicY2BkYGAQYmRkYGcAASYg5gJCBob/YD4DAAsEATIAeJxlkD1uwkAUhMdgSAJSghQpKbNVCiKZn5IDQE9Bl8KYtTGyvdZ6QaLLCXKEHCGniHKCHChj82hgLT9/M2/e7soABviFh3p5uG1qvVq4oTpxm/Qg7JOfhTvo40W4S38o3MMbpsJ9POKdO3j+HZ0BSuEW7vEh3Kb/KeyTv4Q7eMK3cJf+j3APK/wJ9/HqDdPIFLEp3FIn+yy0Z3n+rrStUlOoSTA+WwtdaBs6vVHro6oOydS5WMXW5GrOrs4yo0prdjpywda5cjYaxeIHkcmRIoJBgbipDktoJNgjQwh71b3UK6YtKvq1VpggwPgqtWCqaJIhlcaGyTWOrBUOPG1K1zGt+FrO5KS5zGreJCMr/u+6t6MT0Q+wbaZKzDDiE1/kg+YO+T89EV6oAAAAeJxti9EOgjAUQ1fYBg4Vxe/go5ZxEZPJyOUmyN+7yKt9aE+aVhXqkFP/1aFACQ0Diwo1TnBocMYFV7S44Y4OD+U8c9r6SKM0B/LrOYkLnkn6IW1zc+CvNiGS5zqk98K0rnagSEKG8pEtfRY/DyXtpJfo94ppzKPJZCOxaz6GKUekIFpSinrzPCv1BZLnLysA') format('woff')}[class*=' _icon-'],[class^='_icon-']{$ff:eruda-icon!important;$fs:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}._icon-arrow-left:before{$co:'\\f101'}._icon-arrow-right:before{$co:'\\f102'}._icon-caret-down:before{$co:'\\f103'}._icon-caret-right:before{$co:'\\f104'}._icon-clear:before{$co:'\\f105'}._icon-compress:before{$co:'\\f106'}._icon-delete:before{$co:'\\f107'}._icon-error:before{$co:'\\f108'}._icon-expand:before{$co:'\\f109'}._icon-eye:before{$co:'\\f10a'}._icon-play:before{$co:'\\f10b'}._icon-refresh:before{$co:'\\f10c'}._icon-reset:before{$co:'\\f10d'}._icon-search:before{$co:'\\f10e'}._icon-select:before{$co:'\\f10f'}._icon-tool:before{$co:'\\f110'}._icon-warn:before{$co:'\\f111'}",""]),t.exports=e},4814:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      All Error Warning Info
      Cancel
      Execute
      "},useData:!0})},4801:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      '},useData:!0})},6077:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "},useData:!0})},8946:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+(null!=(o=s(n,"each").call(a,null!=e?s(e,"parents"):e,{name:"each",hash:{},fn:t.program(2,i,0),inverse:t.noop,data:i}))?o:"")+"
      "},2:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
    • '+(null!=(o=s(null!=e?u(e,"text"):e,e))?o:"")+"
    • "},4:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+(null!=(o=s(n,"each").call(a,null!=e?s(e,"children"):e,{name:"each",hash:{},fn:t.program(5,i,0),inverse:t.noop,data:i}))?o:"")+"
      "},5:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
    • '+(null!=(o=s(null!=e?u(e,"text"):e,e))?o:"")+"
    • "},6:function(t,e,n,r,i){return"eruda-green"},8:function(t,e,n,r,i){return"eruda-active-effect"},10:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"attributes"):e,{name:"each",hash:{},fn:t.program(11,i,0),inverse:t.noop,data:i}))?o:"")+" "},11:function(t,e,n,r,i){var o,a=t.lambda,s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return' '+t.escapeExpression(a(null!=e?s(e,"name"):e,e))+''+(null!=(o=a(null!=e?s(e,"value"):e,e))?o:"")+" "},13:function(t,e,n,r,i){return" Empty "},15:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"

      Styles

      "+(null!=(o=s(n,"each").call(a,null!=e?s(e,"styles"):e,{name:"each",hash:{},fn:t.program(16,i,0),inverse:t.noop,data:i}))?o:"")+"
      "},16:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "+t.escapeExpression(t.lambda(null!=e?s(e,"selectorText"):e,e))+" {
      "+(null!=(o=s(n,"each").call(a,null!=e?s(e,"style"):e,{name:"each",hash:{},fn:t.program(17,i,0),inverse:t.noop,data:i}))?o:"")+"
      }
      "},17:function(t,e,n,r,i){var o,a=t.lambda,s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "+t.escapeExpression(a(i&&s(i,"key"),e))+": "+(null!=(o=a(e,e))?o:"")+";
      "},19:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"

      Computed Style "+(null!=(o=l(n,"if").call(a,null!=e?l(e,"rmDefComputedStyle"):e,{name:"if",hash:{},fn:t.program(20,i,0),inverse:t.program(22,i,0),data:i}))?o:"")+"
      "+(null!=(o=l(n,"if").call(a,null!=e?l(e,"computedStyleSearchKeyword"):e,{name:"if",hash:{},fn:t.program(24,i,0),inverse:t.noop,data:i}))?o:"")+"

      "+(null!=(o=l(n,"if").call(a,null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"position"):o,{name:"if",hash:{},fn:t.program(26,i,0),inverse:t.noop,data:i}))?o:"")+"
      margin
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"margin"):o)?l(o,"top"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"margin"):o)?l(o,"left"):o,e))+"
      border
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"border"):o)?l(o,"top"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"border"):o)?l(o,"left"):o,e))+"
      padding
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"padding"):o)?l(o,"top"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"padding"):o)?l(o,"left"):o,e))+"
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"content"):o)?l(o,"width"):o,e))+" × "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"content"):o)?l(o,"height"):o,e))+"
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"padding"):o)?l(o,"right"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"padding"):o)?l(o,"bottom"):o,e))+"
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"border"):o)?l(o,"right"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"border"):o)?l(o,"bottom"):o,e))+"
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"margin"):o)?l(o,"right"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"margin"):o)?l(o,"bottom"):o,e))+"
      "+(null!=(o=l(n,"if").call(a,null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"position"):o,{name:"if",hash:{},fn:t.program(28,i,0),inverse:t.noop,data:i}))?o:"")+"
      "+(null!=(o=l(n,"each").call(a,null!=e?l(e,"computedStyle"):e,{name:"each",hash:{},fn:t.program(30,i,0),inverse:t.noop,data:i}))?o:"")+"
      "},20:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "},22:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "},24:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "+t.escapeExpression(t.lambda(null!=e?a(e,"computedStyleSearchKeyword"):e,e))+"
      "},26:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      position
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"position"):o)?l(o,"top"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"position"):o)?l(o,"left"):o,e))+"
      "},28:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"position"):o)?l(o,"right"):o,e))+"

      "+u(s(null!=(o=null!=(o=null!=e?l(e,"boxModel"):e)?l(o,"position"):o)?l(o,"bottom"):o,e))+"
      "},30:function(t,e,n,r,i){var o,a=t.lambda,s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+t.escapeExpression(a(i&&s(i,"key"),e))+""+(null!=(o=a(e,e))?o:"")+" "},32:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"

      Event Listeners

      "+(null!=(o=s(n,"each").call(a,null!=e?s(e,"listeners"):e,{name:"each",hash:{},fn:t.program(33,i,0),inverse:t.noop,data:i}))?o:"")+"
      "},33:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "+t.escapeExpression(t.lambda(i&&s(i,"key"),e))+"
        "+(null!=(o=s(n,"each").call(a,e,{name:"each",hash:{},fn:t.program(34,i,0),inverse:t.noop,data:i}))?o:"")+"
      "},34:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
    • "+t.escapeExpression(t.lambda(null!=e?a(e,"listenerStr"):e,e))+"
    • "},35:function(t,e,n,r,i){var o;return null!=(o=(t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]})(n,"class").call(null!=e?e:t.nullContext||{},"capture",{name:"class",hash:{},data:i}))?o:""},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return(null!=(o=s(n,"if").call(a,null!=e?s(e,"parents"):e,{name:"if",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?o:"")+"
      "+(null!=(o=t.lambda(null!=e?s(e,"name"):e,e))?o:"")+"
      "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"children"):e,{name:"if",hash:{},fn:t.program(4,i,0),inverse:t.noop,data:i}))?o:"")+"

      Attributes

      "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"attributes"):e,{name:"if",hash:{},fn:t.program(10,i,0),inverse:t.program(13,i,0),data:i}))?o:"")+"
      "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"styles"):e,{name:"if",hash:{},fn:t.program(15,i,0),inverse:t.noop,data:i}))?o:"")+" "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"computedStyle"):e,{name:"if",hash:{},fn:t.program(19,i,0),inverse:t.noop,data:i}))?o:"")+" "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"listeners"):e,{name:"if",hash:{},fn:t.program(32,i,0),inverse:t.noop,data:i}))?o:"")},useData:!0})},3119:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      "},useData:!0})},8950:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
    • "+t.escapeExpression(s(null!=e?u(e,"name"):e,e))+"

      "+(null!=(o=s(null!=e?u(e,"val"):e,e))?o:"")+"
    • "},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"infos"):e,{name:"each",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?o:"")+"
      "},useData:!0})},8:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      Request
        "},useData:!0})},836:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+t.escapeExpression(t.lambda(null!=e?a(e,"data"):e,e))+"
        "},3:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"reqHeaders"):e,{name:"each",hash:{},fn:t.program(4,i,0),inverse:t.noop,data:i}))?o:"")+" "},4:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+s(a(i&&u(i,"key"),e))+""+s(a(e,e))+" "},6:function(t,e,n,r,i){return" Empty "},8:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"resHeaders"):e,{name:"each",hash:{},fn:t.program(4,i,0),inverse:t.noop,data:i}))?o:"")+" "},10:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+t.escapeExpression(t.lambda(null!=e?a(e,"resTxt"):e,e))+"
        "},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+t.escapeExpression(t.lambda(null!=e?s(e,"url"):e,e))+"
        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"data"):e,{name:"if",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?o:"")+"

        Request Headers

        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"reqHeaders"):e,{name:"if",hash:{},fn:t.program(3,i,0),inverse:t.program(6,i,0),data:i}))?o:"")+"

        Response Headers

        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"resHeaders"):e,{name:"if",hash:{},fn:t.program(8,i,0),inverse:t.program(6,i,0),data:i}))?o:"")+"
        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"resTxt"):e,{name:"if",hash:{},fn:t.program(10,i,0),inverse:t.noop,data:i}))?o:"")+"
        Back to the List
        "},useData:!0})},9487:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"requests"):e,{name:"each",hash:{},fn:t.program(2,i,0),inverse:t.noop,data:i}))?o:"")+" "},2:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
      • "+u(s(null!=e?l(e,"name"):e,e))+""+u(s(null!=e?l(e,"status"):e,e))+""+u(s(null!=e?l(e,"method"):e,e))+""+u(s(null!=e?l(e,"subType"):e,e))+""+u(s(null!=e?l(e,"size"):e,e))+""+u(s(null!=e?l(e,"displayTime"):e,e))+"
      • "},3:function(t,e,n,r,i){return"eruda-error"},5:function(t,e,n,r,i){var o;return"
      • Empty
      • "},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return null!=(o=a(n,"if").call(null!=e?e:t.nullContext||{},null!=e?a(e,"requests"):e,{name:"if",hash:{},fn:t.program(1,i,0),inverse:t.program(5,i,0),data:i}))?o:""},useData:!0})},120:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+t.escapeExpression(t.lambda(null!=e?a(e,"localStoreSearchKeyword"):e,e))+"
        "},3:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"localStoreData"):e,{name:"each",hash:{},fn:t.program(4,i,0),inverse:t.noop,data:i}))?o:"")+" "},4:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+u(s(null!=e?l(e,"key"):e,e))+"'+u(s(null!=e?l(e,"val"):e,e))+" '},6:function(t,e,n,r,i){return" Empty "},8:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+t.escapeExpression(t.lambda(null!=e?a(e,"sessionStoreSearchKeyword"):e,e))+"
        "},10:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"sessionStoreData"):e,{name:"each",hash:{},fn:t.program(11,i,0),inverse:t.noop,data:i}))?o:"")+" "},11:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+u(s(null!=e?l(e,"key"):e,e))+"'+u(s(null!=e?l(e,"val"):e,e))+" '},13:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+t.escapeExpression(t.lambda(null!=e?a(e,"cookieSearchKeyword"):e,e))+"
        "},15:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"cookieData"):e,{name:"each",hash:{},fn:t.program(16,i,0),inverse:t.noop,data:i}))?o:"")+" "},16:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+u(s(null!=e?l(e,"key"):e,e))+""+u(s(null!=e?l(e,"val"):e,e))+" '},18:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"scriptData"):e,{name:"each",hash:{},fn:t.program(19,i,0),inverse:t.noop,data:i}))?o:"")+" "},19:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
      • "+s(a(e,e))+"
      • "},21:function(t,e,n,r,i){return"
      • Empty
      • "},23:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"stylesheetData"):e,{name:"each",hash:{},fn:t.program(24,i,0),inverse:t.noop,data:i}))?o:"")+" "},24:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
      • "+s(a(e,e))+"
      • "},26:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"iframeData"):e,{name:"each",hash:{},fn:t.program(27,i,0),inverse:t.noop,data:i}))?o:"")+" "},27:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
      • "+s(a(e,e))+"
      • "},29:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return" "+(null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"imageData"):e,{name:"each",hash:{},fn:t.program(30,i,0),inverse:t.noop,data:i}))?o:"")+" "},30:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
      • "},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"

        Local Storage
        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"localStoreSearchKeyword"):e,{name:"if",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?o:"")+"

        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"localStoreData"):e,{name:"if",hash:{},fn:t.program(3,i,0),inverse:t.program(6,i,0),data:i}))?o:"")+"

        Session Storage
        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"sessionStoreSearchKeyword"):e,{name:"if",hash:{},fn:t.program(8,i,0),inverse:t.noop,data:i}))?o:"")+"

        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"sessionStoreData"):e,{name:"if",hash:{},fn:t.program(10,i,0),inverse:t.program(6,i,0),data:i}))?o:"")+"

        Cookie
        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"cookieSearchKeyword"):e,{name:"if",hash:{},fn:t.program(13,i,0),inverse:t.noop,data:i}))?o:"")+"

        "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"cookieData"):e,{name:"if",hash:{},fn:t.program(15,i,0),inverse:t.program(6,i,0),data:i}))?o:"")+"

        Script

          "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"scriptData"):e,{name:"if",hash:{},fn:t.program(18,i,0),inverse:t.program(21,i,0),data:i}))?o:"")+"

        Stylesheet

          "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"stylesheetData"):e,{name:"if",hash:{},fn:t.program(23,i,0),inverse:t.program(21,i,0),data:i}))?o:"")+"

        Iframe

          "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"iframeData"):e,{name:"if",hash:{},fn:t.program(26,i,0),inverse:t.program(21,i,0),data:i}))?o:"")+"

        Image

          "+(null!=(o=s(n,"if").call(a,null!=e?s(e,"imageData"):e,{name:"if",hash:{},fn:t.program(29,i,0),inverse:t.program(21,i,0),data:i}))?o:"")+"
        "},useData:!0})},9129:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){return'
      • '},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=null!=e?e:t.nullContext||{},l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
        "+s(a(null!=e?l(e,"desc"):e,e))+"
          '+(null!=(o=l(n,"each").call(u,null!=e?l(e,"colors"):e,{name:"each",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?o:"")+"
        "},useData:!0})},5575:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=null!=e?e:t.nullContext||{},l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
        "+s(a(null!=e?l(e,"desc"):e,e))+" "+s(a(null!=e?l(e,"val"):e,e))+"
        '},useData:!0})},7300:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){return"
      • "+t.escapeExpression(t.lambda(e,e))+"
      • "},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=null!=e?e:t.nullContext||{},l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
        "+s(a(null!=e?l(e,"desc"):e,e))+" "+s(a(null!=e?l(e,"val"):e,e))+'
          '+(null!=(o=l(n,"each").call(u,null!=e?l(e,"selections"):e,{name:"each",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?o:"")+"
        "},useData:!0})},973:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){return' checked="checked" '},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lambda,s=t.escapeExpression,u=null!=e?e:t.nullContext||{},l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'
        "+s(a(null!=e?l(e,"desc"):e,e))+"
        "},useData:!0})},9299:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){var o=t.lambda,a=t.escapeExpression,s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'

        '+a(o(null!=e?s(e,"name"):e,e))+'

        '+a(o(null!=e?s(e,"desc"):e,e))+"
        "},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return null!=(o=a(n,"each").call(null!=e?e:t.nullContext||{},null!=e?a(e,"snippets"):e,{name:"each",hash:{},fn:t.program(1,i,0),inverse:t.noop,data:i}))?o:""},useData:!0})},8422:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({1:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+(null!=(o=s(n,"each").call(a,null!=e?s(e,"code"):e,{name:"each",hash:{},fn:t.program(2,i,0),inverse:t.noop,data:i}))?o:"")+" "+(null!=(o=s(n,"each").call(a,null!=e?s(e,"code"):e,{name:"each",hash:{},fn:t.program(4,i,0),inverse:t.noop,data:i}))?o:"")+"
        "},2:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+t.escapeExpression(t.lambda(null!=e?a(e,"idx"):e,e))+"
        "},4:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+(null!=(o=t.lambda(null!=e?a(e,"val"):e,e))?o:"")+"
        "},6:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+(null!=(o=t.lambda(null!=e?s(e,"code"):e,e))?o:"")+"
        "},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return null!=(o=a(n,"if").call(null!=e?e:t.nullContext||{},null!=e?a(e,"showLineNum"):e,{name:"if",hash:{},fn:t.program(1,i,0),inverse:t.program(6,i,0),data:i}))?o:""},useData:!0})},2197:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return''},useData:!0})},4280:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lambda,u=t.escapeExpression,l=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
        "+u(s(null!=e?l(e,"src"):e,e))+"
        "+u(s(null!=e?l(e,"width"):e,e))+" × "+u(s(null!=e?l(e,"height"):e,e))+"
        "},useData:!0})},3121:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o;return"
          "},useData:!0})},7740:function(t,e,n){var r=n(9871);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,i){var o,a=null!=e?e:t.nullContext||{},s=t.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return"
          "+t.escapeExpression(t.lambda(null!=e?s(e,"val"):e,e))+"
          "},useData:!0})},688:function(t,e,n){"use strict";n.d(e,{default:function(){return Fs}});var r={};function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:["#2196f3","#707d8b","#f44336","#009688","#ffc107"],i=this._genId("settings");return this._settings.push({config:t,key:e,id:i}),this._$el.append(this._colorTpl({desc:n,colors:r,id:i,val:t.get(e)})),this}},{key:"select",value:function(t,e,n,r){var i=this._genId("settings");return this._settings.push({config:t,key:e,id:i}),this._$el.append(this._selectTpl({desc:n,selections:r,id:i,val:t.get(e)})),this}},{key:"range",value:function(t,e,n,r){var i=r.min,o=void 0===i?0:i,a=r.max,s=void 0===a?1:a,u=r.step,l=void 0===u?.1:u,c=this._genId("settings");this._settings.push({config:t,key:e,min:o,max:s,step:l,id:c});var h=t.get(e);return this._$el.append(this._rangeTpl({desc:n,min:o,max:s,step:l,val:h,progress:Oo(h,o,s),id:c})),this}},{key:"separator",value:function(){return this._$el.append('
          '),this}},{key:"text",value:function(t){return this._$el.append('
          '.concat(t,"
          ")),this}},{key:"_cleanSeparator",value:function(){var t=xt()(this._$el.get(0).children);function e(t){return"eruda-separator"===t.getAttribute("class")}for(var n=0,r=t.length;n=0&&e<=xo&&!Wo(t)}),Yo=Eo.each=function(t,e,n){var r,i;if(e=Mo(e,n),Ko(t))for(r=0,i=t.length;r=o?"":t.substr(i,o)}),ea=Eo.matcher=function(t){return t=Xo({},t),function(e){return Zo(e,t)}},na=Eo.memStorage=function(t){t={getItem:function(t){return(n[t]?e[t]:this[t])||null},setItem:function(t,r){n[t]?e[t]=r:this[t]=r},removeItem:function(t){n[t]?delete e[t]:delete this[t]},key:function(t){var e=r();return t>=0&&t1&&void 0!==arguments[1]?arguments[1]:{},i=r.prototype,o=void 0===i||i,a=r.unenumerable,s=void 0!==a&&a,u=r.symbol,l=void 0!==u&&u,c=[];if((s||l)&&e){var h=To;s&&e&&(h=e);do{c=c.concat(h(t)),l&&n&&(c=c.concat(n(t)))}while(o&&(t=Uo(t))&&t!==Object.prototype);c=aa(c)}else if(o)for(var p in t)c.push(p);else c=To(t);return c},t}({}),ua=Eo.extend=Vo(sa),la=Eo.map=function(t,e,n){e=ia(e,n);for(var r=!Ko(t)&&To(t),i=(r||t).length,o=Array(i),a=0;a=0;)for(s=!1,r=-1,i=t.charAt(o);++r=0?t.substring(0,o+1):""}}(),_a=Eo.trim=function(t){var e=/^\s+|\s+$/g;return function(t,n){return null==n?t.replace(e,""):ta(da(t,n),n)}}(),va=Eo.query=function(t){t={parse:function(t){var n={};return t=_a(t).replace(e,""),Yo(t.split("&"),(function(t){var e=t.split("="),r=e.shift(),i=e.length>0?e.join("="):null;r=decodeURIComponent(r),i=decodeURIComponent(i),No(n[r])?n[r]=i:Fo(n[r])?n[r].push(i):n[r]=[n[r],i]})),n},stringify:function(e,n){return oa(la(e,(function(e,r){return So(e)&&Jo(e)?"":Fo(e)?t.stringify(e,r):(n?encodeURIComponent(n):encodeURIComponent(r))+"="+encodeURIComponent(e)})),(function(t){return t.length>0})).join("&")}};var e=/^(\?|#|&)/g;return t}({}),ma=Eo.Url=function(t){t=ha({className:"Url",initialize:function(e){!e&&$o&&(e=window.location.href),ua(this,t.parse(e||""))},setQuery:function(t,e){var n=this.query;return So(t)?Yo(t,(function(t,e){n[e]=Co(t)})):n[t]=Co(e),this},rmQuery:function(t){var e=this.query;return Fo(t)||(t=ca(t)),Yo(t,(function(t){delete e[t]})),this},toString:function(){return t.stringify(this)}},{parse:function(t){var i={protocol:"",auth:"",hostname:"",hash:"",query:{},port:"",pathname:"",slashes:!1},o=_a(t),a=!1,s=o.match(e);if(s&&(s=s[0],i.protocol=s.toLowerCase(),o=o.substr(s.length)),s&&(a="//"===o.substr(0,2))&&(o=o.slice(2),i.slashes=!0),a){for(var u=o,l=-1,c=0,h=r.length;c-1&&(u=o.slice(0,l),o=o.slice(l));var f=u.lastIndexOf("@");-1!==f&&(i.auth=decodeURIComponent(u.slice(0,f)),u=u.slice(f+1)),i.hostname=u;var d=u.match(n);d&&(":"!==(d=d[0])&&(i.port=d.substr(1)),i.hostname=u.substr(0,u.length-d.length))}var _=o.indexOf("#");-1!==_&&(i.hash=o.substr(_),o=o.slice(0,_));var v=o.indexOf("?");return-1!==v&&(i.query=va.parse(o.substr(v+1)),o=o.slice(0,v)),i.pathname=o||"/",i},stringify:function(t){var e=t.protocol+(t.slashes?"//":"")+(t.auth?encodeURIComponent(t.auth)+"@":"")+t.hostname+(t.port?":"+t.port:"")+t.pathname;return Jo(t.query)||(e+="?"+va.stringify(t.query)),t.hash&&(e+=t.hash),e}});var e=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,r=["/","?","#"];return t}({}),ga=Eo.getFileName=function(t){var e=Lo(t.split("/"));return e.indexOf("?")>-1&&(e=_a(e.split("?")[0])),""===e&&(e=(t=new ma(t)).hostname),e},ba=Eo.safeStorage=function(t){return t=function(t,e){var n;switch(No(e)&&(e=!0),t){case"local":n=window.localStorage;break;case"session":n=window.sessionStorage}try{var r="test-localStorage-"+Date.now();n.setItem(r,r);var i=n.getItem(r);if(n.removeItem(r),i!==r)throw new Error}catch(t){return e?na:void 0}return n},t}({});function ya(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var wa=function(t){u(r,t);var e=ya(r);function r(t){var o;return i(this,r),(o=e.call(this))._style=vo(n(7693)),o._$container=t,o._appendTpl(),o._makeDraggable(),o._bindEvent(),o._registerListener(),o}return a(r,[{key:"hide",value:function(){this._$el.hide()}},{key:"show",value:function(){this._$el.show()}},{key:"setPos",value:function(t){this._isOutOfRange(t)&&(t=this._getDefPos()),this._$el.css({left:t.x,top:t.y}),this.config.set("pos",t)}},{key:"getPos",value:function(){return this.config.get("pos")}},{key:"destroy",value:function(){vo.remove(this._style),this._unregisterListener(),this._$el.remove()}},{key:"_isOutOfRange",value:function(t){t=t||this.config.get("pos");var e=this._getDefPos();return t.x>e.x+10||t.x<0||t.y<0||t.y>e.y+10}},{key:"_registerListener",value:function(){var t=this;this._scaleListener=function(){return hr()((function(){t._isOutOfRange()&&t._resetPos()}))},Qi.on(Qi.SCALE,this._scaleListener)}},{key:"_unregisterListener",value:function(){Qi.off(Qi.SCALE,this._scaleListener)}},{key:"_appendTpl",value:function(){var t=this._$container;t.append(n(3119)()),this._$el=t.find(".eruda-entry-btn")}},{key:"_resetPos",value:function(t){var e=this.config,n=e.get("pos"),r=this._getDefPos();e.get("rememberPos")&&!t||(n=r),this.setPos(n)}},{key:"_bindEvent",value:function(){var t=this,e=this._draggabilly,n=this._$el;e.on("staticClick",(function(){return t.emit("click")})).on("dragStart",(function(){return n.addClass("eruda-active")})),e.on("dragEnd",(function(){var e=t.config;e.get("rememberPos")&&e.set("pos",{x:fa(t._$el.css("left")),y:fa(t._$el.css("top"))}),n.rmClass("eruda-active")})),kr().on("change",(function(){return t._resetPos(!0)})),window.addEventListener("resize",(function(){return t._resetPos()}))}},{key:"_makeDraggable",value:function(){this._draggabilly=new(d())(this._$el.get(0),{containment:!0})}},{key:"initCfg",value:function(t){var e=this.config=Ao.createCfg("entry-button",{rememberPos:!0,pos:this._getDefPos()});t.separator().switch(e,"rememberPos","Remember Entry Button Position"),this._resetPos()}},{key:"_getDefPos",value:function(){var t=this._$el.get(0).offsetWidth+10;return{x:window.innerWidth-t,y:window.innerHeight-t}}}]),r}(H());function xa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var ka,Aa=function(t){u(r,t);var e=xa(r);function r(t){var o;return i(this,r),(o=e.call(this))._style=vo(n(3409)),o._$el=t.find(".eruda-nav-bar"),o._$bottomBar=t.find(".eruda-bottom-bar"),o._len=0,o._bindEvent(),o}return a(r,[{key:"add",value:function(t){var e=this._$el;this._len++;var n=e.find(".eruda-nav-bar-item").last(),r='
          '.concat(t,"
          ");n.length>0&&"settings"===n.text()?n.before(r):e.append(r),this.resetBottomBar()}},{key:"remove",value:function(t){this._len--,this._$el.find(".eruda-nav-bar-item").each((function(){var e=v()(this);e.text().toLowerCase()===t.toLowerCase()&&e.remove()})),this.resetBottomBar()}},{key:"activateTool",value:function(t){var e=this;this._$el.find(".eruda-nav-bar-item").each((function(){var n=v()(this);n.text()===t?(n.addClass("eruda-active"),e.resetBottomBar(),e._scrollItemToView()):n.rmClass("eruda-active")}))}},{key:"destroy",value:function(){vo.remove(this._style),this._$el.remove()}},{key:"_scrollItemToView",value:function(){var t,e=this._$el,n=e.find(".eruda-active").get(0),r=e.get(0),i=n.offsetLeft,o=n.offsetWidth,a=r.offsetWidth,s=r.scrollLeft;ia+s&&(t=i+o-a),mn()(t)&&(r.scrollLeft=t)}},{key:"resetBottomBar",value:function(){var t=this._$bottomBar,e=this._$el,n=e.find(".eruda-active").get(0);n&&t.css({width:n.offsetWidth,left:n.offsetLeft-e.get(0).scrollLeft})}},{key:"_bindEvent",value:function(){var t=this,e=this;this._$el.on("click",".eruda-nav-bar-item",(function(){e.emit("showTool",v()(this).text())})).on("scroll",(function(){return t.resetBottomBar()}))}}]),r}(H()),Oa=ka=new(Y())("[Eruda]","warn");ka.formatter=function(t,e){return e.unshift(this.name),e};var Ea=n(6093),$a=n.n(Ea);function Sa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var Ca=function(t){u(r,t);var e=Sa(r);function r(t){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=a.defaults,u=void 0===s?{}:s;return i(this,r),(o=e.call(this))._defCfg=ue()({transparency:1,displaySize:80,theme:Ue()()?"Dark":"Light"},u),o._style=vo(n(9217)),o.$container=t,o._isShow=!1,o._opacity=1,o._tools={},o._isResizing=!1,o._resizeTimer=null,o._resizeStartY=0,o._resizeStartSize=0,o._appendTpl(),o._initNavBar(),o._initNotification(),o._bindEvent(),o}return a(r,[{key:"show",value:function(){var t=this;return this._isShow=!0,this._$el.show(),this._navBar.resetBottomBar(),setTimeout((function(){t._$el.css("opacity",t._opacity)}),50),this.emit("show"),this}},{key:"hide",value:function(){var t=this;return this._isShow=!1,this.emit("hide"),this._$el.css({opacity:0}),setTimeout((function(){return t._$el.hide()}),300),this}},{key:"toggle",value:function(){return this._isShow?this.hide():this.show()}},{key:"add",value:function(t){if(!(t instanceof to)){var e=new to,n=e.init,r=e.show,i=e.hide,o=e.destroy;Ft()(t,{init:n,show:r,hide:i,destroy:o})}var a=t.name;return a?(a=a.toLowerCase(),this._tools[a]?Oa.warn("Tool ".concat(a," already exists")):(this._$tools.prepend('
          ')),t.init(this._$tools.find(".eruda-".concat(a,".eruda-tool")),this),t.active=!1,this._tools[a]=t,this._navBar.add(a),this)):Oa.error("You must specify a name for a tool")}},{key:"remove",value:function(t){var e=this._tools;if(!e[t])return Oa.warn("Tool ".concat(t," doesn't exist"));this._navBar.remove(t);var n=e[t];if(delete e[t],n.active){var r=Mn()(e);r.length>0&&this.showTool(e[Dn()(r)].name)}return n.destroy(),this}},{key:"removeAll",value:function(){var t=this;return Jt()(this._tools,(function(e){return t.remove(e.name)})),this}},{key:"get",value:function(t){var e=this._tools[t];if(e)return e}},{key:"showTool",value:function(t){if(this._curTool===t)return this;this._curTool=t;var e=this._tools,n=e[t];if(n){var r={};return Jt()(e,(function(t){t.active&&(r=t,t.active=!1,t.hide())})),n.active=!0,n.show(),this._navBar.activateTool(t),this.emit("showTool",t,r),this}}},{key:"initCfg",value:function(t){var e=this,n=this.config=Ao.createCfg("dev-tools",this._defCfg);this._setTransparency(n.get("transparency")),this._setDisplaySize(n.get("displaySize")),vo.setTheme(n.get("theme")),n.on("change",(function(t,n){switch(t){case"transparency":return e._setTransparency(n);case"displaySize":return e._setDisplaySize(n);case"theme":return vo.setTheme(n)}})),t.separator().select(n,"theme","Theme",Mn()(vo.getThemes())).range(n,"transparency","Transparency",{min:.2,max:1,step:.01}).range(n,"displaySize","Display Size",{min:40,max:100,step:1}).separator()}},{key:"notify",value:function(t,e){this._notification.notify(t,e)}},{key:"destroy",value:function(){vo.remove(this._style),this.removeAll(),this._navBar.destroy(),this._$el.remove()}},{key:"_setTransparency",value:function(t){mn()(t)&&(this._opacity=t,this._isShow&&this._$el.css({opacity:t}))}},{key:"_setDisplaySize",value:function(t){mn()(t)&&this._$el.css({height:t+"%"})}},{key:"_appendTpl",value:function(){var t=this.$container;t.append(n(4801)()),this._$el=t.find(".eruda-dev-tools"),this._$tools=this._$el.find(".eruda-tools")}},{key:"_initNavBar",value:function(){var t=this;this._navBar=new Aa(this._$el.find(".eruda-nav-bar-container")),this._navBar.on("showTool",(function(e){return t.showTool(e)}))}},{key:"_initNotification",value:function(){this._notification=new($a())(this._$el.find(".eruda-notification").get(0),{position:{x:"center",y:"top"}})}},{key:"_bindEvent",value:function(){var t=this,e=this._$el.find(".eruda-nav-bar"),n=function(n){n=n.origEvent,t._resizeTimer=setTimeout((function(){n.preventDefault(),n.stopPropagation(),t._isResizing=!0,t._resizeStartSize=t.config.get("displaySize"),t._resizeStartY=a(n),e.css("filter","brightness(1.2)")}),1e3)},r=mi()((function(e){return t.config.set("displaySize",e)}),50),i=function(e){if(!t._isResizing)return clearTimeout(t._resizeTimer);e.preventDefault(),e.stopPropagation(),e=e.origEvent;var n=Math.round((t._resizeStartY-a(e))/window.innerHeight*100),i=t._resizeStartSize+n;i<40?i=40:i>100&&(i=100),r(i)},o=function(){clearTimeout(t._resizeTimer),t._isResizing=!1,e.css("filter","brightness(1)")},a=function(t){return t.clientY?t.clientY:t.touches?t.touches[0].clientY:0};e.on("contextmenu",(function(t){return t.preventDefault()}));var s=v()(document.documentElement);ln()()?(e.on("touchstart",n).on("touchmove",i),s.on("touchend",o)):(e.on("mousedown",n),s.on("mousemove",i),s.on("mouseup",o))}}]),r}(H());function ja(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ta=n(7132),Pa=n.n(Ta);function Ra(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}Mi().start();var Na=function(t){u(r,t);var e=Ra(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.name,a=void 0===o?"console":o;return i(this,r),ja(c(t=e.call(this)),"_handleShow",(function(){nn()(t._$el.get(0))||t._logger.renderViewport()})),ja(c(t),"_handleErr",(function(e){t._logger.error(e)})),H().mixin(c(t)),t.name=a,t._scale=1,t._registerListener(),t}return a(r,[{key:"init",value:function(t,e){Zi(p(r.prototype),"init",this).call(this,t),this._container=e,this._appendTpl(),this._initCfg(),this._initLogger(),this._exposeLogger(),this._bindEvent()}},{key:"show",value:function(){Zi(p(r.prototype),"show",this).call(this),this._handleShow()}},{key:"overrideConsole",value:function(){var t=this,e=this._origConsole={},n=window.console;return Ma.forEach((function(r){var i=e[r]=fr();n[r]&&(i=e[r]=n[r].bind(n)),n[r]=function(){t[r].apply(t,arguments),i.apply(void 0,arguments)}})),this}},{key:"setGlobal",value:function(t,e){this._logger.setGlobal(t,e)}},{key:"restoreConsole",value:function(){var t=this;return this._origConsole?(Ma.forEach((function(e){return window.console[e]=t._origConsole[e]})),delete this._origConsole,this):this}},{key:"catchGlobalErr",value:function(){return Mi().addListener(this._handleErr),this}},{key:"ignoreGlobalErr",value:function(){return Mi().rmListener(this._handleErr),this}},{key:"destroy",value:function(){this._logger.destroy(),Zi(p(r.prototype),"destroy",this).call(this),this._container.off("show",this._handleShow),this._style&&vo.remove(this._style),this.ignoreGlobalErr(),this.restoreConsole(),this._unregisterListener(),this._rmCfg()}},{key:"_enableJsExecution",value:function(t){var e=this._$el,n=e.find(".eruda-console-container"),r=e.find(".eruda-js-input");t?(r.show(),n.rmClass("eruda-js-input-hidden")):(r.hide(),n.addClass("eruda-js-input-hidden"))}},{key:"_registerListener",value:function(){var t=this;this._scaleListener=function(e){return t._scale=e},Qi.on(Qi.SCALE,this._scaleListener)}},{key:"_unregisterListener",value:function(){Qi.off(Qi.SCALE,this._scaleListener)}},{key:"_appendTpl",value:function(){var t=this._$el;this._style=vo(n(3816)),t.append(n(4814)());var e=t.find(".eruda-js-input"),r=e.find("textarea"),i=e.find(".eruda-buttons");Object.assign(this,{_$control:t.find(".eruda-control"),_$logs:t.find(".eruda-logs-container"),_$inputContainer:e,_$input:r,_$inputBtns:i,_$searchKeyword:t.find(".eruda-search-keyword")})}},{key:"_initLogger",value:function(){var t=this.config,e=t.get("maxLogNum");e="infinite"===e?0:+e;var n=this._$control.find(".eruda-filter"),r=new(Pa())(this._$logs.get(0),{asyncRender:t.get("asyncRender"),maxNum:e,showHeader:t.get("displayExtraInfo"),unenumerable:t.get("displayUnenumerable"),accessGetter:t.get("displayGetterVal"),lazyEvaluation:t.get("lazyEvaluation")});r.on("optionChange",(function(t,e){"filter"===t&&n.each((function(){var t=v()(this),n=t.data("filter")===e;t[n?"addClass":"rmClass"]("eruda-active")}))})),t.get("overrideConsole")&&this.overrideConsole(),this._logger=r}},{key:"_exposeLogger",value:function(){var t=this,e=this._logger;["filter","html"].concat(Ma).forEach((function(n){return t[n]=function(){for(var r=arguments.length,i=new Array(r),o=0;o=300)&&(n.hasErr=!0),o&&(n.resHeaders=o,t._updateType(n)),t._render()}})),ja(c(t),"_loadingFinished",(function(e){var n=t._requests[e.requestId];if(n){var r=1e3*e.timestamp;n.time=r-n.startTime,n.displayTime=lr()(n.time),n.size=e.encodedDataLength,n.done=!0,n.resTxt=Da().domain("Network").getResponseBody({requestId:e.requestId}).body,t._render()}})),t._style=vo(n(3985)),t.name="network",t._requests={},t._tpl=n(8),t._detailTpl=n(836),t._requestsTpl=n(9487),t._detailData={},t}return a(r,[{key:"init",value:function(t,e){Zi(p(r.prototype),"init",this).call(this,t),this._container=e,this._bindEvent(),this._appendTpl()}},{key:"show",value:function(){Zi(p(r.prototype),"show",this).call(this),this._render()}},{key:"clear",value:function(){this._requests={},this._render()}},{key:"requests",value:function(){var t=[];return Jt()(this._requests,(function(e){t.push(e)})),t}},{key:"_updateType",value:function(t){var e=function(t){if(!t)return"unknown";var e=t.split(";")[0].split("/");return{type:e[0],subType:Dn()(e)}}(t.resHeaders["content-type"]||""),n=e.type,r=e.subType;t.type=n,t.subType=r}},{key:"_bindEvent",value:function(){var t=this,e=this._$el,n=this._container,r=this;function i(t,e){var r=n.get("sources");r&&(r.set(t,e),n.showTool("sources"))}e.on("click",".eruda-request",(function(){var t=v()(this).data("id"),e=r._requests[t];e.done&&r._showDetail(e)})).on("click",".eruda-clear-request",(function(){return t.clear()})).on("click",".eruda-back",(function(){return t._hideDetail()})).on("click",".eruda-http .eruda-response",(function(){var e=t._detailData,n=e.resTxt;switch(e.subType){case"css":return i("css",n);case"html":return i("html",n);case"javascript":return i("js",n);case"json":return i("object",n)}if("image"===e.type)return i("img",e.url)})),Da().domain("Network").enable();var o=Da().domain("Network");o.on("requestWillBeSent",this._reqWillBeSent),o.on("responseReceivedExtraInfo",this._resReceivedExtraInfo),o.on("responseReceived",this._resReceived),o.on("loadingFinished",this._loadingFinished)}},{key:"destroy",value:function(){Zi(p(r.prototype),"destroy",this).call(this),vo.remove(this._style);var t=Da().domain("Network");t.off("requestWillBeSent",this._reqWillBeSent),t.off("responseReceivedExtraInfo",this._resReceivedExtraInfo),t.off("responseReceived",this._resReceived),t.off("loadingFinished",this._loadingFinished)}},{key:"_showDetail",value:function(t){t.resTxt&&""===Ci()(t.resTxt)&&delete t.resTxt,Xe()(t.resHeaders)&&delete t.resHeaders,Xe()(t.reqHeaders)&&delete t.reqHeaders,this._$detail.html(this._detailTpl(t)).show(),this._detailData=t}},{key:"_hideDetail",value:function(){this._$detail.hide()}},{key:"_appendTpl",value:function(){var t=this._$el;t.html(this._tpl()),this._$detail=t.find(".eruda-detail"),this._$requests=t.find(".eruda-requests")}},{key:"_render",value:function(){if(this.active){var t={};Xe()(this._requests)||(t.requests=this._requests),this._renderHtml(this._requestsTpl(t))}}},{key:"_renderHtml",value:function(t){t!==this._lastHtml&&(this._lastHtml=t,this._$requests.html(t))}}]),r}(to);function Fa(t){for(var e={},n=0,r=t.length;nr?r:n,o=0;or?1:n(e=qa(e))?1:t
          '),this._$showArea=t.find(".eruda-show-area"),t.append(n(6077)()),this._htmlEl=document.documentElement,this._highlight=new Ga(this._container.$container),this._select=new Qa,this._bindEvent(),this._initObserver(),this._initCfg(),hr()((function(){return i._updateHistory()}))}},{key:"show",value:function(){Zi(p(r.prototype),"show",this).call(this),this._observeElement&&this._enableObserver(),this._curEl||this._setEl(this._htmlEl),this._render()}},{key:"hide",value:function(){return this._disableObserver(),Zi(p(r.prototype),"hide",this).call(this)}},{key:"set",value:function(t){if(t!==this._curEl)return this._setEl(t),this.scrollToTop(),this._render(),this._updateHistory(),this.emit("change",t),this}},{key:"overrideEventTarget",value:function(){var t=hs(),e=this._origAddEvent=t.addEventListener,n=this._origRmEvent=t.removeEventListener;t.addEventListener=function(t,n,r){ls(this,t,n,r),e.apply(this,arguments)},t.removeEventListener=function(t,e,r){cs(this,t,e,r),n.apply(this,arguments)}}},{key:"scrollToTop",value:function(){this._$showArea.get(0).scrollTop=0}},{key:"restoreEventTarget",value:function(){var t=hs();this._origAddEvent&&(t.addEventListener=this._origAddEvent),this._origRmEvent&&(t.removeEventListener=this._origRmEvent)}},{key:"destroy",value:function(){Zi(p(r.prototype),"destroy",this).call(this),vo.remove(this._style),this._select.disable(),this._highlight.destroy(),this._disableObserver(),this.restoreEventTarget(),this._rmCfg()}},{key:"_back",value:function(){if(this._curEl!==this._htmlEl){for(var t=this._curParentQueue,e=t.shift();!is(e);)e=t.shift();this.set(e)}}},{key:"_bindEvent",value:function(){var t=this,e=this,n=this._container,r=this._select;this._$el.on("click",".eruda-child",(function(){var t=v()(this).data("idx"),r=e._curEl,i=r.childNodes[t];if(i&&3===i.nodeType){var o;switch(r.tagName){case"SCRIPT":o="js";break;case"STYLE":o="css";break;default:return}var a=n.get("sources");a&&(a.set(o,i.nodeValue),n.showTool("sources"))}else is(i)?e.set(i):e._render()})).on("click",".eruda-listener-content",(function(){var t=v()(this).text(),e=n.get("sources");e&&(e.set("js",t),n.showTool("sources"))})).on("click",".eruda-breadcrumb",(function(){var e=n.get("sources");e&&(e.set("object",t._curEl),n.showTool("sources"))})).on("click",".eruda-parent",(function(){for(var t=v()(this).data("idx"),n=e._curEl.parentNode;t--&&n.parentNode;)n=n.parentNode;is(n)?e.set(n):e._render()})).on("click",".eruda-toggle-all-computed-style",(function(){return t._toggleAllComputedStyle()})).on("click",".eruda-computed-style-search",(function(){var e=prompt("Filter");_n()(e)||(e=Ci()(e),t._computedStyleSearchKeyword=e,t._render())})),this._$el.find(".eruda-bottom-bar").on("click",".eruda-refresh",(function(){t._render(),n.notify("Refreshed")})).on("click",".eruda-highlight",(function(){return t._toggleHighlight()})).on("click",".eruda-select",(function(){return t._toggleSelect()})).on("click",".eruda-reset",(function(){return t.set(t._htmlEl)})),r.on("select",(function(e){return t.set(e)}))}},{key:"_toggleAllComputedStyle",value:function(){this._rmDefComputedStyle=!this._rmDefComputedStyle,this._render()}},{key:"_enableObserver",value:function(){this._observer.observe(this._htmlEl,{attributes:!0,childList:!0,subtree:!0})}},{key:"_disableObserver",value:function(){this._observer.disconnect()}},{key:"_toggleHighlight",value:function(){this._selectElement||(this._$el.find(".eruda-highlight").toggleClass("eruda-active"),this._highlightElement=!this._highlightElement,this._render())}},{key:"_toggleSelect",value:function(){var t=this._select;this._$el.find(".eruda-select").toggleClass("eruda-active"),this._selectElement||this._highlightElement||this._toggleHighlight(),this._selectElement=!this._selectElement,this._selectElement?(t.enable(),this._container.hide()):t.disable()}},{key:"_setEl",value:function(t){this._curEl=t,this._curCssStore=new Wa(t),this._highlight.setEl(t),this._rmDefComputedStyle=!0;for(var e=[],n=t.parentNode;n;)e.push(n),n=n.parentNode;this._curParentQueue=e}},{key:"_getData",value:function(){var t={},e=this._curEl,n=this._curCssStore,r=e.className,i=e.id,o=e.attributes,a=e.tagName;t.computedStyleSearchKeyword=this._computedStyleSearchKeyword,t.parents=function(t){var e=[],n=0,r=t.parentNode;for(;r&&1===r.nodeType;)e.push({text:os(r,{noAttr:!0}),idx:n++}),r=r.parentNode;return e.reverse()}(e),t.children=function(t){for(var e=[],n=0,r=t.length;n5&&e.pop();for(var n=0;n<5;n++)t.setGlobal("$".concat(n),e[n])}}},{key:"_initObserver",value:function(){var t=this;this._observer=new(J())((function(e){Jt()(e,(function(e){return t._handleMutation(e)}))}))}},{key:"_handleMutation",value:function(t){var e,n;if(!Va(t.target))if("attributes"===t.type){if(t.target!==this._curEl)return;this._render()}else if("childList"===t.type){if(t.target===this._curEl)return this._render();var r=t.addedNodes;for(e=0,n=r.length;e$&').replace(ns,(function(t,e){return'url("'.concat(ps(e),'")')}))}var is=function(t){return Ye()(t)&&t.parentNode};function os(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.noAttr,r=void 0!==n&&n,i=t.id,o=t.className,a=t.attributes,s=''.concat(t.tagName.toLowerCase(),"");if(""!==i&&(s+='#'.concat(i,"")),Cn()(o)){var u="";Jt()(o.split(/\s+/g),(function(t){""!==t.trim()&&(u+=".".concat(t))})),s+=''.concat(u,"")}return r||Jt()(a,(function(t){var e=t.name;"id"!==e&&"class"!==e&&"style"!==e&&(s+=' '.concat(e,'="').concat(t.value,'"'))})),s}var as=function(t){return Vn()(t,(function(t){var e=t.value,n=t.name;return e=ne()(e),("src"===n||"href"===n)&&!hi()(e,"data")&&(e=ps(e)),"style"===n&&(e=rs(e)),{name:n,value:e}}))};var ss=["script","style","meta","title","link","head"],us=function(t){return ss.indexOf(t.toLowerCase())>-1};function ls(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Ye()(t)&&tn()(n)&&Ie()(r)){var i=t.erudaEvents=t.erudaEvents||{};i[e]=i[e]||[],i[e].push({listener:n,listenerStr:n.toString(),useCapture:r})}}function cs(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Ye()(t)&&tn()(n)&&Ie()(r)){var i=t.erudaEvents;if(i&&i[e]){for(var o=i[e],a=0,s=o.length;a').concat(t,"")};function fs(t,e){if(mn()(t))return t;if(!Cn()(t))return"‒";var n=fa(t);return hn()(n)?t:"position"===e?n:0===n?"‒":n}var ds=null,_s=[{name:"Border All",fn:function(){if(ds)return vo.remove(ds),void(ds=null);ds=vo("* { outline: 2px dashed #707d8b; outline-offset: -3px; }",document.head)},desc:"Add color borders to all elements"},{name:"Refresh Page",fn:function(){var t=new(ut());t.setQuery("timestamp",_r()()),window.location.replace(t.toString())},desc:"Add timestamp to url and refresh"},{name:"Search Text",fn:function(){var t=prompt("Enter the text")||"";""!==Ci()(t)&&function(t){var e=document.body,n=new RegExp(t,"ig");vs(e,(function(t){var e=v()(t);if(e.hasClass("eruda-search-highlight-block"))return document.createTextNode(e.text())})),vs(e,(function(t){if(3===t.nodeType){var e=t.nodeValue;if((e=e.replace(n,(function(t){return''.concat(t,"")})))!==t.nodeValue){var r=v()(document.createElement("div"));return r.html(e),r.addClass("eruda-search-highlight-block"),r.get(0)}}}))}(t)},desc:"Highlight given text on page"},{name:"Edit Page",fn:function(){var t=document.body;t.contentEditable="true"!==t.contentEditable},desc:"Toggle body contentEditable"},{name:"Fit Screen",fn:function(){var t=document.body,e=document.documentElement,n=v()(t);if(n.data("scaled"))window.scrollTo(0,+n.data("scaled")),n.rmAttr("data-scaled"),n.css("transform","none");else{var r=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight),i=Math.max(document.documentElement.clientHeight,window.innerHeight||0),o=i/r;n.css("transform","scale(".concat(o,")")),n.data("scaled",window.scrollY),window.scrollTo(0,r/2-i/2)}},desc:"Scale down the whole page to fit screen"},{name:"Load Fps Plugin",fn:function(){ms("fps")},desc:"Display page fps"},{name:"Load Features Plugin",fn:function(){ms("features")},desc:"Browser feature detections"},{name:"Load Timing Plugin",fn:function(){ms("timing")},desc:"Show performance and resource timing"},{name:"Load Memory Plugin",fn:function(){ms("memory")},desc:"Display memory"},{name:"Load Code Plugin",fn:function(){ms("code")},desc:"Edit and run JavaScript"},{name:"Load Benchmark Plugin",fn:function(){ms("benchmark")},desc:"Run JavaScript benchmarks"},{name:"Load Geolocation Plugin",fn:function(){ms("geolocation")},desc:"Test geolocation"},{name:"Load Dom Plugin",fn:function(){ms("dom")},desc:"Navigate dom tree"},{name:"Load Orientation Plugin",fn:function(){ms("orientation")},desc:"Test orientation api"},{name:"Load Touches Plugin",fn:function(){ms("touches")},desc:"Visualize screen touches"},{name:"Restore Settings",fn:function(){var t=ba("local"),e=JSON.parse(JSON.stringify(t));Jt()(e,(function(e,n){Cn()(e)&&hi()(n,"eruda")&&t.removeItem(n)})),window.location.reload()},desc:"Restore defaults and reload"}];function vs(t,e){var n=t.childNodes;if(!Va(t)){for(var r=0,i=n.length;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function xs(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=r?"danger":e>=n?"warn":"ok"}var Es=function(t,e){return t.length",'screen'.concat(screen.width," * ").concat(screen.height,""),"viewport".concat(window.innerWidth," * ").concat(window.innerHeight,""),"pixel ratio".concat(window.devicePixelRatio,""),""].join("")},{name:"System",val:["",'"),""),"
          os'.concat(Yt()(),"
          browser".concat(Cs.name+" "+Cs.version,"
          "].join("")},{name:"About",val:'Eruda v2.5.0'}];function Ts(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var Ps=function(t){u(r,t);var e=Ts(r);function r(){var t;return i(this,r),(t=e.call(this))._style=vo(n(9577)),t.name="info",t._tpl=n(8950),t._infos=[],t}return a(r,[{key:"init",value:function(t){Zi(p(r.prototype),"init",this).call(this,t),this._addDefInfo()}},{key:"destroy",value:function(){Zi(p(r.prototype),"destroy",this).call(this),vo.remove(this._style)}},{key:"add",value:function(t,e){var n=this._infos,r=!1;return Jt()(n,(function(n){t===n.name&&(n.val=e,r=!0)})),r||n.push({name:t,val:e}),this._render(),this}},{key:"get",value:function(t){var e,n=this._infos;return Tn()(t)?At()(n):(Jt()(n,(function(n){t===n.name&&(e=n.val)})),e)}},{key:"remove",value:function(t){for(var e=this._infos,n=e.length-1;n>=0;n--)e[n].name===t&&e.splice(n,1);return this._render(),this}},{key:"clear",value:function(){return this._infos=[],this._render(),this}},{key:"_addDefInfo",value:function(){var t=this;Jt()(js,(function(e){return t.add(e.name,e.val)}))}},{key:"_render",value:function(){var t=[];Jt()(this._infos,(function(e){var n=e.name,r=e.val;tn()(r)&&(r=r()),t.push({name:n,val:r})})),this._renderHtml(this._tpl({infos:t}))}},{key:"_renderHtml",value:function(t){t!==this._lastHtml&&(this._lastHtml=t,this._$el.html(t))}}]),r}(to),Rs=n(4030),Ns=n.n(Rs);function Ms(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var Ls,Ds=function(t){u(r,t);var e=Ms(r);function r(){var t;return i(this,r),(t=e.call(this))._style=vo(n(4214)),t.name="sources",t._showLineNum=!0,t._formatCode=!0,t._indentSize=4,t._loadTpl(),t}return a(r,[{key:"init",value:function(t,e){Zi(p(r.prototype),"init",this).call(this,t),this._container=e,this._bindEvent(),this._initCfg()}},{key:"destroy",value:function(){Zi(p(r.prototype),"destroy",this).call(this),vo.remove(this._style),this._rmCfg()}},{key:"set",value:function(t,e){if("img"===t){this._isFetchingData=!0;var n=new Image,r=this;return n.onload=function(){r._isFetchingData=!1,r._data={type:"img",val:{width:this.width,height:this.height,src:e}},r._render()},n.onerror=function(){r._isFetchingData=!1},void(n.src=e)}return this._data={type:t,val:e},this._render(),this}},{key:"show",value:function(){return Zi(p(r.prototype),"show",this).call(this),this._data||this._isFetchingData||this._renderDef(),this}},{key:"_renderDef",value:function(){var t=this;if(this._html)return this._data={type:"html",val:this._html},this._render();this._isGettingHtml||(this._isGettingHtml=!0,ct()({url:location.href,success:function(e){return t._html=e},error:function(){return t._html="Sorry, unable to fetch source code:("},complete:function(){t._isGettingHtml=!1,t._renderDef()},dataType:"raw"}))}},{key:"_bindEvent",value:function(){var t=this;this._container.on("showTool",(function(e,n){e!==t.name&&n.name===t.name&&delete t._data}))}},{key:"_loadTpl",value:function(){this._codeTpl=n(8422),this._imgTpl=n(4280),this._objTpl=n(3121),this._rawTpl=n(7740),this._iframeTpl=n(2197)}},{key:"_rmCfg",value:function(){var t=this.config,e=this._container.get("settings");e&&e.remove(t,"showLineNum").remove(t,"formatCode").remove(t,"indentSize").remove("Sources")}},{key:"_initCfg",value:function(){var t=this,e=this.config=Ao.createCfg("sources",{showLineNum:!0,formatCode:!0,indentSize:4});e.get("showLineNum")||(this._showLineNum=!1),e.get("formatCode")||(this._formatCode=!1),this._indentSize=e.get("indentSize"),e.on("change",(function(e,n){switch(e){case"showLineNum":return void(t._showLineNum=n);case"formatCode":return void(t._formatCode=n);case"indentSize":return void(t._indentSize=+n)}})),this._container.get("settings").text("Sources").switch(e,"showLineNum","Show Line Numbers").switch(e,"formatCode","Beautify Code").select(e,"indentSize","Indent Size",["2","4"]).separator()}},{key:"_render",value:function(){switch(this._isInit=!0,this._data.type){case"html":case"js":case"css":return this._renderCode();case"img":return this._renderImg();case"object":return this._renderObj();case"raw":return this._renderRaw();case"iframe":return this._renderIframe()}}},{key:"_renderImg",value:function(){this._renderHtml(this._imgTpl(this._data.val))}},{key:"_renderCode",value:function(){var t=this._data,e=this._indentSize,n=t.val,r=t.val.length;if(r1&&void 0!==arguments[1])||arguments[1];n&&t===this._lastHtml||(this._lastHtml=t,this._$el.html(t),setTimeout((function(){return e._$el.get(0).scrollTop=0}),0))}}]),r}(to),Is=1e5,zs=4e5,Fs={init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.container,n=t.tool,r=t.autoScale,i=void 0===r||r,o=t.useShadowDom,a=void 0===o||o,s=t.defaults,u=void 0===s?{}:s;this._isInit||(this._isInit=!0,this._scale=1,this._initContainer(e,a),this._initStyle(),this._initDevTools(u),this._initEntryBtn(),this._initSettings(),this._initTools(n),this._registerListener(),i&&this._autoScale())},_isInit:!1,version:"2.5.0",util:r,chobitsu:Da(),Tool:to,Console:Na,Elements:Za,Network:za,Sources:Ds,Resources:As,Info:Ps,Snippets:ys,Settings:Ao,get:function(t){if(this._checkInit()){if("entryBtn"===t)return this._entryBtn;var e=this._devTools;return t?e.get(t):e}},add:function(t){if(this._checkInit())return tn()(t)&&(t=t(this)),this._devTools.add(t),this},remove:function(t){return this._devTools.remove(t),this},show:function(t){if(this._checkInit()){var e=this._devTools;return t?e.showTool(t):e.show(),this}},hide:function(){if(this._checkInit())return this._devTools.hide(),this},destroy:function(){this._devTools.destroy(),delete this._devTools,this._entryBtn.destroy(),delete this._entryBtn,this._unregisterListener(),this._$el.remove(),vo.clear(),this._isInit=!1},scale:function(t){return mn()(t)?(this._scale=t,Qi.emit(Qi.SCALE,t),this):this._scale},position:function(t){var e=this._entryBtn;return bn()(t)?(e.setPos(t),this):e.getPos()},_autoScale:function(){ln()()&&this.scale(1/qi()())},_registerListener:function(){var t=this;this._addListener=function(){return t.add.apply(t,arguments)},this._showListener=function(){return t.show.apply(t,arguments)},Qi.on(Qi.ADD,this._addListener),Qi.on(Qi.SHOW,this._showListener),Qi.on(Qi.SCALE,vo.setScale)},_unregisterListener:function(){Qi.off(Qi.ADD,this._addListener),Qi.off(Qi.SHOW,this._showListener),Qi.off(Qi.SCALE,vo.setScale)},_checkInit:function(){return this._isInit||Oa.error('Please call "eruda.init()" first'),this._isInit},_initContainer:function(t,e){var r;t||(t=document.createElement("div"),document.documentElement.appendChild(t),t.style.all="initial"),e&&(t.attachShadow?r=t.attachShadow({mode:"open"}):t.createShadowRoot&&(r=t.createShadowRoot()),r&&(vo.container=document.head,vo(n(8998)+n(276)+n(8418)),t=document.createElement("div"),r.appendChild(t),this._shadowRoot=r)),Object.assign(t,{id:"eruda",className:"eruda-container",contentEditable:!1}),"ios"===Gt()().name&&t.setAttribute("ontouchstart",""),this._$el=v()(t)},_initDevTools:function(t){this._devTools=new Ca(this._$el,{defaults:t})},_initStyle:function(){var t="eruda-style-container",e=this._$el;this._shadowRoot?(vo.container=this._shadowRoot,vo(":host { all: initial }")):(e.append('
          ')),vo.container=e.find(".".concat(t)).get(0)),vo(n(8418)+n(276)+n(5674)+n(6802)+n(3146)+n(8998))},_initEntryBtn:function(){var t=this;this._entryBtn=new wa(this._$el),this._entryBtn.on("click",(function(){return t._devTools.toggle()}))},_initSettings:function(){var t=this._devTools,e=new Ao;t.add(e),this._entryBtn.initCfg(e),t.initCfg(e)},_initTools:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["console","elements","network","resources","sources","info","snippets"];e=bi()(e);var n=this._devTools;e.forEach((function(e){var r=t[Bi()(e)];try{r&&n.add(new r)}catch(t){hr()((function(){Oa.error("Something wrong when initializing tool ".concat(e,":"),t.message)}))}})),n.showTool(e[0]||"settings")}};Ls=r,Object.assign(Ls,{beautify:Ya(),evalCss:vo,isErudaEl:Va})},2234:function(t){t.exports={background:"b","background-image":"bi",border:"bo","border-bottom":"bb","border-collapse":"bc","border-left-color":"blc","border-right":"br","border-radius":"bra","border-top":"bt","border-top-color":"btc","box-shadow":"bs","box-sizing":"bsi",clear:"cl",color:"c",content:"co",cursor:"cu",display:"d",flex:"fl","flex-shrink":"fsh",float:"f","font-family":"ff","font-size":"fs","font-weight":"fw",height:"h",left:"l","line-height":"lh",margin:"m","margin-bottom":"mb","margin-left":"ml","margin-top":"mt","min-height":"mh",outline:"ou",overflow:"o","overflow-x":"ox","overflow-y":"oy",padding:"p","padding-bottom":"pb","padding-left":"pl","padding-top":"pt","pointer-events":"pe",position:"po","text-align":"ta","text-transform":"tt",top:"t",transition:"tr","user-select":"us","vertical-aligin":"va",visibility:"v",width:"w","will-change":"wc","white-space":"ws","-webkit-overflow-scrolling":"wos","z-index":"z"}},9871:function(t,e,n){var r=n(6834);r.registerHelper("repeat",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;if(t<1)return e.inverse(this);var n=1,r=0,i=t*n+r,o=r,a="";do{var s={index:o,count:t,start:r,step:n,first:o===r,last:o>=i-n},u=[o,s];a+=e.fn(this,{data:s,blockParams:u}),o+=s.step}while(o=0&&e<=a&&!Object(o.a)(t)},e.a=r},function(t,e,n){"use strict";var r,i=n(20),o=n(11),a=n(4);r=function(t){if(!Object(a.a)(t))return{};if(u)return u(t);function e(){}return e.prototype=t,new e};var s,u=Object.create,l=r,c=function(t,e){t.prototype=l(e.prototype)},h=n(43),p=n(10),f="undefined"!=typeof wx&&Object(p.a)(wx.openLocation),d=(s=function(t,e){return d.extend(t,e)}).Base=function t(e,n,r){r=r||{};var a=n.className||Object(h.a)(n,"initialize.name")||"";delete n.className;var s=function(){var t=Object(o.a)(arguments);return this.initialize&&this.initialize.apply(this,t)||this};if(!f)try{s=new Function("toArr","return function "+a+"(){var args = toArr(arguments);return this.initialize ? this.initialize.apply(this, args) || this : this;};")(o.a)}catch(t){}return c(s,e),s.prototype.constructor=s,s.extend=function(e,n){return t(s,e,n)},s.inherits=function(t){c(s,t)},s.methods=function(t){return Object(i.a)(s.prototype,t),s},s.statics=function(t){return Object(i.a)(s,t),s},s.methods(n).statics(r),s}(Object,{className:"Base",callSuper:function(t,e,n){return t.prototype[e].apply(this,n)},toString:function(){return this.constructor.name}});e.a=s},function(t,e){e=function(t){return void 0===t},t.exports=e},function(t,e,n){var r=n(12),i=n(28),o=n(53);e=function(t){return i(r(t)?new o(t):t)},t.exports=e},function(t,e,n){"use strict";var r,i=n(9);r=function(t){return"[object Number]"===Object(i.a)(t)},e.a=r},function(t,e,n){"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)}var i;i="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType,e.a=i},function(t,e,n){"use strict";var r,i=n(29),o=n(39);r=Object(i.a)(o.a),e.a=r},function(t,e){function n(t){return(n="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)}e=function(t){var e=n(t);return!!t&&("function"===e||"object"===e)},t.exports=e},function(t,e,n){"use strict";var r,i=n(23),o=n(7),a=n(14);r=function(t,e,n){e=Object(i.a)(e,n);for(var r=!Object(a.a)(t)&&Object(o.a)(t),s=(r||t).length,u=Array(s),l=0;l=0&&e<=o&&!i(t)},t.exports=e},function(t,e,n){var r=n(36);e=function(t){return"[object Number]"===r(t)},t.exports=e},function(t,e){var n=Object.prototype.hasOwnProperty;e=function(t,e){return n.call(t,e)},t.exports=e},function(t,e,n){var r=n(103),i=n(12),o=n(30),a=n(104);e=function(t,e){return i(t)?t.indexOf(e)>-1:(o(t)||(t=a(t)),r(t,e)>=0)},t.exports=e},function(t,e,n){"use strict";var r;n.r(e),r=function(){},e.default=r},function(t,e,n){e=n(47)(n(82)),t.exports=e},function(t,e){var n=Object.prototype.toString;e=function(t){return n.call(t)},t.exports=e},function(t,e,n){var r=n(24),i=n(21),o=n(27),a=n(48),s=n(86),u=n(89),l=n(90);e=function(t,e,n){return null==t?u:r(t)?a(t,e,n):i(t)&&!o(t)?s(t):l(t)},t.exports=e},function(t,e,n){"use strict";var r,i=n(3);r=function(t,e,n){if(Object(i.a)(e))return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},e.a=r},function(t,e,n){"use strict";var r,i=n(7),o=n(69),a=n(70),s=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols;r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.prototype,r=void 0===n||n,l=e.unenumerable,c=void 0!==l&&l,h=e.symbol,p=void 0!==h&&h,f=[];if((c||p)&&s){var d=i.a;c&&s&&(d=s);do{f=f.concat(d(t)),p&&u&&(f=f.concat(u(t)))}while(r&&(t=Object(o.a)(t))&&t!==Object.prototype);f=Object(a.a)(f)}else if(r)for(var _ in t)f.push(_);else f=Object(i.a)(t);return f},e.a=r},function(t,e,n){"use strict";var r,i=n(23),o=n(0);r=function(t,e,n){var r=[];return e=Object(i.a)(e,n),Object(o.default)(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r},e.a=r},function(t,e,n){"use strict";var r;r=function(t,e){return e=null==e?t.length-1:+e,function(){var n,r=Math.max(arguments.length-e,0),i=new Array(r);for(n=0;n1)for(var n=1;n]*>/g.test(t))try{var e=s.default.parse(t);return function t(e,n){for(var r=0,i=e.length;rt.offsetHeight},e.executeAfterTransition=function(t,e){t.addEventListener("transitionend",(function n(r){r.target===t&&(t.removeEventListener("transitionend",n),e())}))},e.pxToNum=function(t){return c.default(t.replace("px",""))}},function(t,e,n){(function(r){var i=n(117);e=i?window:r,t.exports=e}).call(this,n(46))},function(t,e){e=function(t,e){return 0===t.indexOf(e)},t.exports=e},function(t,e,n){var r=n(65);e=function(t){return r(t).toLocaleLowerCase()},t.exports=e},function(t,e){e=function(t){return null==t?"":t.toString()},t.exports=e},function(t,e,n){var r=n(31),i=n(21),o=n(24),a=n(12);e=function(t){if(r(t))return t;if(i(t)){var e=o(t.valueOf)?t.valueOf():t;t=i(e)?e+"":e}return a(t)?+t:0===t?t:+t},t.exports=e},function(t,e,n){"use strict";function r(t){return l(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||a()}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function o(t,e){return l(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||s(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n.03?t:t+Math.pow(.03-t,1.45)}function d(t,e){if(t=f(t),e=f(e),Math.abs(t-e)<5e-4)return 0;var n=0;return 100*(e>=t?(n=1.25*(Math.pow(e,.55)-Math.pow(t,.58)))<.001?0:n<.078?n-12.82051282051282*n*.06:n-.06:(n=1.25*(Math.pow(e,.62)-Math.pow(t,.57)))>-.001?0:n>-.078?n-12.82051282051282*n*.06:n+.06)}Object.defineProperty(e,"__esModule",{value:!0}),e.getContrastThreshold=e.isLargeFont=e.getAPCAThreshold=e.desiredLuminanceAPCA=e.contrastRatioByLuminanceAPCA=e.contrastRatioAPCA=e.luminanceAPCA=e.contrastRatio=e.luminance=e.rgbaToHsla=e.blendColors=void 0,e.blendColors=c,e.rgbaToHsla=function(t){var e=o(t,4),n=e[0],r=e[1],i=e[2],a=e[3],s=Math.max(n,r,i),u=Math.min(n,r,i),l=s-u,c=s+u,h=.5*c;return[u===s?0:n===s?(1/6*(r-i)/l+1)%1:r===s?1/6*(i-n)/l+1/3:1/6*(n-r)/l+2/3,0===h||1===h?0:h<=.5?l/c:l/(2-c),h,a]},e.luminance=h,e.contrastRatio=function(t,e){var n=h(c(t,e)),r=h(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},e.luminanceAPCA=p,e.contrastRatioAPCA=function(t,e){return d(p(t),p(e))},e.contrastRatioByLuminanceAPCA=d,e.desiredLuminanceAPCA=function(t,e,n){function r(){return n?Math.pow(Math.abs(Math.pow(t,.62)-(-e-.06)/1.25),1/.57):Math.pow(Math.abs(Math.pow(t,.55)-(e+.06)/1.25),1/.58)}t=f(t),e/=100;var i=r();return(i<0||i>1)&&(n=!n,i=r()),i};var _=[[12,-1,-1,-1,-1,100,90,80,-1,-1],[14,-1,-1,-1,100,90,80,60,60,-1],[16,-1,-1,100,90,80,60,55,50,50],[18,-1,-1,90,80,60,55,50,40,40],[24,-1,100,80,60,55,50,40,38,35],[30,-1,90,70,55,50,40,38,35,40],[36,-1,80,60,50,40,38,35,30,25],[48,100,70,55,40,38,35,30,25,20],[60,90,60,50,38,35,30,25,20,20],[72,80,55,40,35,30,25,20,20,20],[96,70,50,35,30,25,20,20,20,20],[120,60,40,30,25,20,20,20,20,20]];function v(t,e){var n=72*parseFloat(t.replace("px",""))/96;return-1!==["bold","bolder","600","700","800","900"].indexOf(e)?n>=14:n>=18}_.reverse(),e.getAPCAThreshold=function(t,e){var n,a=parseFloat(t.replace("px","")),s=parseFloat(e),u=i(_);try{for(u.s();!(n=u.n()).done;){var l=r(n.value),c=l[0],h=l.slice(1);if(a>=c){var p,f=i([900,800,700,600,500,400,300,200,100].entries());try{for(f.s();!(p=f.n()).done;){var d=o(p.value,2),v=d[0];if(s>=d[1]){var m=h[h.length-1-v];return-1===m?null:m}}}catch(t){f.e(t)}finally{f.f()}}}}catch(t){u.e(t)}finally{u.f()}return null},e.isLargeFont=v;var m={aa:3,aaa:4.5},g={aa:4.5,aaa:7};e.getContrastThreshold=function(t,e){return v(t,e)?m:g}},function(t,e,n){var r=n(137);e={encode:function(t){for(var e=[],n=0,r=t.length;n>>4).toString(16)),e.push((15&i).toString(16))}return e.join("")},decode:function(t){var e=[],n=t.length;r(n)&&n--;for(var i=0;i-1&&this._listeners.splice(e,1)},rmAllListeners:function(){this._listeners=[]},emit:function(){var t=this,e=Object(a.a)(arguments),n=Object(i.a)(this._listeners);Object(o.default)(n,(function(n){return n.apply(t,e)}),this)}},{mixin:function(t){Object(o.default)(["addListener","rmListener","emit","rmAllListeners"],(function(e){t[e]=s.prototype[e]})),t._listeners=t._listeners||[]}}),e.a=s},function(t,e,n){"use strict";var r;r=function(t,e,n){null==e&&(e=t,t=0);var r=Math.random();return n||t%1||e%1?Math.min(t+r*(e-t+parseFloat("1e-"+((r+"").length-1))),e):t+Math.floor(r*(e-t+1))},e.a=r},function(t,e,n){"use strict";(function(t){var r;r=n(19).a?window:t,e.a=r}).call(this,n(46))},function(t,e,n){"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 i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{},i=n.showRulers,a=void 0!==i&&i,s=n.showExtensionLines,u=void 0!==s&&s,c=n.showInfo,h=void 0===c||c,p=n.showStyles,f=void 0===p||p,d=n.showAccessibilityInfo,_=void 0===d||d,v=n.colorFormat,m=void 0===v?"hex":v,b=n.contentColor,y=void 0===b?"rgba(111, 168, 220, .66)":b,x=n.paddingColor,k=void 0===x?"rgba(147, 196, 125, .55)":x,A=n.borderColor,O=void 0===A?"rgba(255, 229, 153, .66)":A,E=n.marginColor,$=void 0===E?"rgba(246, 178, 107, .66)":E,S=n.monitorResize,C=void 0===S||S;return l(this,o),(e=r.call(this,t,{compName:"dom-highlighter"})).overlay=new g.HighlightOverlay(window),e.reset=function(){var t=document.documentElement.clientWidth,n=document.documentElement.clientHeight;e.overlay.reset({viewportSize:{width:t,height:n},deviceScaleFactor:1,pageScaleFactor:1,pageZoomFactor:1,emulationScaleFactor:1,scrollX:window.scrollX,scrollY:window.scrollY})},e.options={showRulers:a,showExtensionLines:u,showInfo:h,showStyles:f,showAccessibilityInfo:_,colorFormat:m,contentColor:y,paddingColor:k,borderColor:O,marginColor:$,monitorResize:C},e.overlay.setContainer(t),e.overlay.setPlatform("mac"),e.redraw=w.default((function(){e.reset(),e.draw()}),16),e.redraw(),e.bindEvent(),e}return e=o,(n=[{key:"highlight",value:function(t,e){e&&$.default(this.options,e),this.target=t,t instanceof HTMLElement&&this.options.monitorResize&&(this.resizeSensor&&this.resizeSensor.destroy(),this.resizeSensor=new y.default(t),this.resizeSensor.addListener(this.redraw)),this.redraw()}},{key:"hide",value:function(){this.target=null,this.redraw()}},{key:"intercept",value:function(t){this.interceptor=t}},{key:"destroy",value:function(){window.removeEventListener("resize",this.redraw),window.removeEventListener("scroll",this.redraw),this.resizeSensor&&this.resizeSensor.destroy(),h(_(o.prototype),"destroy",this).call(this)}},{key:"draw",value:function(){var t=this.target;t&&(t instanceof Text?this.drawText(t):this.drawElement(t))}},{key:"drawText",value:function(t){var e=this.options,n=document.createRange();n.selectNode(t);var r=n.getBoundingClientRect(),i=r.left,o=r.top,a=r.width,s=r.height;n.detach();var u={paths:[{path:this.rectToPath({left:i,top:o,width:a,height:s}),fillColor:I(e.contentColor),name:"content"}],showExtensionLines:e.showExtensionLines,showRulers:e.showRulers};e.showInfo&&(u.elementInfo={tagName:"#text",nodeWidth:a,nodeHeight:s}),this.overlay.drawHighlight(u)}},{key:"drawElement",value:function(t){var e={paths:this.getPaths(t),showExtensionLines:this.options.showExtensionLines,showRulers:this.options.showRulers,colorFormat:this.options.colorFormat};if(this.options.showInfo&&(e.elementInfo=this.getElementInfo(t)),this.interceptor){var n=this.interceptor(e);n&&(e=n)}this.overlay.drawHighlight(e)}},{key:"getPaths",value:function(t){var e=this.options,n=window.getComputedStyle(t),r=t.getBoundingClientRect(),i=r.left,o=r.top,a=r.width,s=r.height,u=function(t){return b.pxToNum(n.getPropertyValue(t))},l=u("margin-left"),c=u("margin-right"),h=u("margin-top"),p=u("margin-bottom"),f=u("border-left-width"),d=u("border-right-width"),_=u("border-top-width"),v=u("border-bottom-width"),m=u("padding-left"),g=u("padding-right"),y=u("padding-top"),w=u("padding-bottom");return[{path:this.rectToPath({left:i+f+m,top:o+_+y,width:a-f-m-d-g,height:s-_-y-v-w}),fillColor:I(e.contentColor),name:"content"},{path:this.rectToPath({left:i+f,top:o+_,width:a-f-d,height:s-_-v}),fillColor:I(e.paddingColor),name:"padding"},{path:this.rectToPath({left:i,top:o,width:a,height:s}),fillColor:I(e.borderColor),name:"border"},{path:this.rectToPath({left:i-l,top:o-h,width:a+l+c,height:s+h+p}),fillColor:I(e.marginColor),name:"margin"}]}},{key:"getElementInfo",value:function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height,i=t.getAttribute("class")||"";i=i.split(/\s+/).map((function(t){return"."+t})).join("");var o={tagName:x.default(t.tagName),className:i,idValue:t.id,nodeWidth:n,nodeHeight:r};return this.options.showStyles&&(o.style=this.getStyles(t)),this.options.showAccessibilityInfo&&$.default(o,this.getAccessibilityInfo(t)),o}},{key:"getStyles",value:function(t){for(var e=window.getComputedStyle(t),n=!1,r=t.childNodes,i=0,o=r.length;i-1)}},{key:"getAccessibleNameAndRole",value:function(t){var e=t.getAttribute("labelledby")||t.getAttribute("aria-label"),n=t.getAttribute("role"),r=x.default(t.tagName);return T.default.forEach((function(e){if(!n){var o=e[0],a=e[2];if(o===r){if(a){var s,u=i(a);try{for(u.s();!(s=u.n()).done;){var l=s.value;if(t.getAttribute(l[0])!==l[1])return}}catch(t){u.e(t)}finally{u.f()}}n=e[1]}}})),{accessibleName:e||t.getAttribute("title")||"",accessibleRole:n||"generic"}}},{key:"bindEvent",value:function(){var t=this;window.addEventListener("resize",this.redraw),window.addEventListener("scroll",this.redraw),this.on("optionChange",(function(){return t.redraw()}))}},{key:"rectToPath",value:function(t){var e=t.left,n=t.top,r=t.width,i=t.height,o=[];return o.push("M",e,n),o.push("L",e+r,n),o.push("L",e+r,n+i),o.push("L",e,n+i),o.push("Z"),o}}])&&c(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(m.default);e.default=R,t.exports=R,t.exports.default=R;var N=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,M=/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)$/;function L(t){return N.test(t)||M.test(t)}function D(t){var e=A.default.parse(t),n=e.val[3]||1;return e.val=e.val.slice(0,3),e.val.push(Math.round(255*n)),"#"+E.default(O.default.encode(e.val))}function I(t){return P.default(t)?t:t.a?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(t.a,")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")}function z(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={};return k.default(e,(function(e){var i=t["text-opacity"===e?"color":e];i&&(L(i)&&(i=D(i),"text-opacity"===e&&(i=i.slice(7),i=O.default.decode(i)[0]/255)),n&&(e=S.default(e)),r[e]=i)})),r}},function(module,__webpack_exports__,__nested_webpack_require_36973__){"use strict";var _random__WEBPACK_IMPORTED_MODULE_0__=__nested_webpack_require_36973__(72),_isBrowser__WEBPACK_IMPORTED_MODULE_1__=__nested_webpack_require_36973__(19),_isNode__WEBPACK_IMPORTED_MODULE_2__=__nested_webpack_require_36973__(76),exports={},crypto;exports=function(t){for(var e=new Uint8Array(t),n=0;n0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}),2),e.a=r},function(t,e,n){"use strict";n.r(e);var r=n(15),i=n(13),o=n(0),a=function(t,e,n){var r=t.length;e=null==e?0:e<0?Math.max(r+e,0):Math.min(e,r),n=null==n?r:n<0?Math.max(r+n,0):Math.min(n,r);for(var i=[];e-1&&n[t].splice(r,1),this}},once:function(t,e){return this.on(t,Object(s.a)(e)),this},emit:function(t){var e=this;if(Object(i.a)(this._events,t)){var n=a(arguments,1),r=Object(u.a)(this._events[t]);return Object(o.default)(r,(function(t){return t.apply(e,n)}),this),this}},removeAllListeners:function(t){return t?delete this._events[t]:this._events={},this}},{mixin:function(t){Object(o.default)(["on","off","once","emit","removeAllListeners"],(function(e){t[e]=l.prototype[e]})),t._events=t._events||{}}}),e.default=l},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&n[t].splice(r,1),this}},once:function(t,e){return this.on(t,s(e)),this},emit:function(t){var e=this;if(i(this._events,t)){var n=a(arguments,1),r=u(this._events[t]);return o(r,(function(t){return t.apply(e,n)}),this),this}},removeAllListeners:function(t){return t?delete this._events[t]:this._events={},this}},{mixin:function(t){o(["on","off","once","emit","removeAllListeners"],(function(n){t[n]=e.prototype[n]})),t._events=t._events||{}}}),t.exports=e},function(t,e,n){var r=n(25),i=n(83),o=n(84),a=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols;e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.prototype,u=void 0===n||n,l=e.unenumerable,c=void 0!==l&&l,h=e.symbol,p=void 0!==h&&h,f=[];if((c||p)&&a){var d=r;c&&a&&(d=a);do{f=f.concat(d(t)),p&&s&&(f=f.concat(s(t)))}while(u&&(t=i(t))&&t!==Object.prototype);f=o(f)}else if(u)for(var _ in t)f.push(_);else f=r(t);return f},t.exports=e},function(t,e,n){var r=n(21),i=n(24),o=Object.getPrototypeOf,a={}.constructor;e=function(t){if(r(t)){if(o)return o(t);var e=t.__proto__;return e||null===e?e:i(t.constructor)?t.constructor.prototype:t instanceof a?a.prototype:void 0}},t.exports=e},function(t,e,n){var r=n(85);function i(t,e){return t===e}e=function(t,e){return e=e||i,r(t,(function(t,n,r){for(var i=r.length;++n0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},t.exports=e},function(t,e,n){var r=n(53),i=n(101),o=n(102),a=n(44),s=n(57),u=n(108),l=n(58),c=n(109),h=n(110),p=n(59),f=n(60),d=n(113),_=n(16),v=n(12);e=function(t){return new r(t)},r.methods({offset:function(){return i(this)},hide:function(){return this.css("display","none")},show:function(){return o(this),this},first:function(){return e(this[0])},last:function(){return e(l(this))},get:function(t){return this[t]},eq:function(t){return e(this[t])},on:function(t,e,n){return p.on(this,t,e,n),this},off:function(t,e,n){return p.off(this,t,e,n),this},html:function(t){var e=u.html(this,t);return _(t)?e:this},text:function(t){var e=u.text(this,t);return _(t)?e:this},val:function(t){var e=u.val(this,t);return _(t)?e:this},css:function(t,e){var n=a(this,t,e);return m(t,e)?n:this},attr:function(t,e){var n=s(this,t,e);return m(t,e)?n:this},data:function(t,e){var n=h(this,t,e);return m(t,e)?n:this},rmAttr:function(t){return s.remove(this,t),this},remove:function(){return c(this),this},addClass:function(t){return f.add(this,t),this},rmClass:function(t){return f.remove(this,t),this},toggleClass:function(t){return f.toggle(this,t),this},hasClass:function(t){return f.has(this,t)},parent:function(){return e(this[0].parentNode)},append:function(t){return d.append(this,t),this},prepend:function(t){return d.prepend(this,t),this},before:function(t){return d.before(this,t),this},after:function(t){return d.after(this,t),this}});var m=function(t,e){return _(e)&&v(t)};t.exports=e},function(t,e,n){e=n(51)((function(t,e){for(var n=t.length,r=0,i=e.length;r=a?"":t.substr(o,a)},t.exports=e},function(t,e){e=function(t,e){if(null==e){if(t.trimRight)return t.trimRight();e=" \r\n\t\f\v"}for(var n,r,i=t.length-1,o=e.length,a=!0;a&&i>=0;)for(a=!1,n=-1,r=t.charAt(i);++n=0?t.substring(0,i+1):""},t.exports=e},function(t,e){function n(t){return(n="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)}e="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document))&&9===document.nodeType,t.exports=e},function(t,e,n){var r=n(119),i=n(121),o=n(27),a=n(5),s=n(12),u=n(123);e={parse:function(t){var e=[],n=new i;return r(t,{start:function(t,e){e=u(e,(function(t){return function(t){return t.replace(/"/g,'"')}(t)})),n.push({tag:t,attrs:e})},end:function(){var t=n.pop();if(n.size){var r=n.peek();o(r.content)||(r.content=[]),r.content.push(t)}else e.push(t)},comment:function(t){var r="\x3c!--".concat(t,"--\x3e"),i=n.peek();i?(i.content||(i.content=[]),i.content.push(r)):e.push(r)},text:function(t){var r=n.peek();r?(r.content||(r.content=[]),r.content.push(t)):e.push(t)}}),e},stringify:function t(e){var n="";return o(e)?a(e,(function(e){return n+=t(e)})):s(e)?n=e:(n+="<".concat(e.tag),a(e.attrs,(function(t,e){return n+=" ".concat(e,'="').concat(function(t){return t.replace(/"/g,""")}(t),'"')})),n+=">",e.content&&(n+=t(e.content)),n+="")),n}},t.exports=e},function(t,e,n){var r=n(58),i=n(120),o=n(63),a=n(64);e=function(t,e){for(var n,i=[],p=t;t;){if(n=!0,r(i)&&h[r(i)]){var f=new RegExp("]*>")).exec(t);if(f){var d=t.substring(0,f.index);t=t.substring(f.index+f[0].length),d&&e.text&&e.text(d)}x(0,r(i))}else{if(o(t,"\x3c!--")){var _=t.indexOf("--\x3e");_>=0&&(e.comment&&e.comment(t.substring(4,_)),t=t.substring(_+3),n=!1)}else if(o(t,"=0&&i[r]!==n;r--);else r=0;if(r>=0){for(var o=i.length-1;o>=r;o--)e.end&&e.end(i[o]);i.length=r}}x()};var s=/^\s]+))?)*)\s*(\/?)>/i,u=/^<\/([-A-Za-z0-9_]+)[^>]*>/,l=/^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_:@.]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/i,c=/([-A-Za-z0-9_:@.]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,h=i("script,style".split(","));t.exports=e},function(t,e,n){var r=n(5),i=n(16),o=n(24);e=function(t,e){i(e)&&(e=!0);var n=o(e),a={};return r(t,(function(t){a[t]=n?e(t):e})),a},t.exports=e},function(t,e,n){var r=n(26),i=n(122);e=r({initialize:function(){this.clear()},clear:function(){this._items=[],this.size=0},push:function(t){return this._items.push(t),++this.size},pop:function(){if(this.size)return this.size--,this._items.pop()},peek:function(){return this._items[this.size-1]},forEach:function(t,e){e=arguments.length>1?e:this;for(var n=this._items,r=this.size-1,i=0;r>=0;r--,i++)t.call(e,n[r],i,this)},toArr:function(){return i(this._items)}}),t.exports=e},function(t,e){e=function(t){var e=t.length,n=Array(e);e--;for(var r=0;r<=e;r++)n[e-r]=t[r];return n},t.exports=e},function(t,e,n){var r=n(37),i=n(25);e=function(t,e,n){e=r(e,n);for(var o=i(t),a=o.length,s={},u=0;u12&&v<_?v:f.constrainNumber(12,v,m)}var g=l<12||l>_,b=l-10;b=f.constrainNumber(b,2,i-c-2);var y=r.minY-8-h,w=!0;y<0?(y=Math.min(o-h,r.maxY+8),w=!1):r.minY>o&&(y=o-8-h);var x=b>=r.minX&&b+c<=r.maxX&&y>=r.minY&&y+h<=r.maxY;if(br.minX&&yr.minY&&!x)s.style.display="none";else if(s.style.top=y+"px",s.style.left=b+"px",!g){var k=f.createChild(s,"div","tooltip-arrow");k.style.clipPath=w?"polygon(0 0, 100% 0, 50% 100%)":"polygon(50% 0, 0 100%, 100% 100%)",k.style.top=(w?h-1:-8)+"px",k.style.left=l-b+"px"}}(this.tooltip,t.elementInfo,t.colorFormat,e,this.canvasWidth,this.canvasHeight)),this.context.restore(),{bounds:e}}},{key:"drawAxis",value:function(t,e,n){t.save();var r=this.pageZoomFactor*this.pageScaleFactor*this.emulationScaleFactor,i=this.scrollX*this.pageScaleFactor,o=this.scrollY*this.pageScaleFactor;function a(t){return Math.round(t*r)}function s(t){return Math.round(t/r)}var u=this.canvasWidth/r,l=this.canvasHeight/r;t.save(),t.fillStyle=g,n?t.fillRect(0,a(l)-15,a(u),a(l)):t.fillRect(0,0,a(u),15),t.globalCompositeOperation="destination-out",t.fillStyle="red",e?t.fillRect(a(u)-15,0,a(u),a(l)):t.fillRect(0,0,15,a(l)),t.restore(),t.fillStyle=g,e?t.fillRect(a(u)-15,0,a(u),a(l)):t.fillRect(0,0,15,a(l)),t.lineWidth=1,t.strokeStyle=m,t.fillStyle=m,t.save(),t.translate(-i,.5-o);for(var c=l+s(o),h=100;h=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:[];a(this,t),this.viewportSize={width:800,height:600},this.deviceScaleFactor=1,this.emulationScaleFactor=1,this.pageScaleFactor=1,this.pageZoomFactor=1,this.scrollX=0,this.scrollY=0,this.canvasWidth=0,this.canvasHeight=0,this._installed=!1,this._window=e,this._document=e.document,Array.isArray(n)||(n=[n]),this.style=n}var e,n;return e=t,(n=[{key:"setCanvas",value:function(t){this.canvas=t,this._context=t.getContext("2d")}},{key:"install",value:function(){var t,e=r(this.style);try{for(e.s();!(t=e.n()).done;)h(t.value)}catch(t){e.e(t)}finally{e.f()}this._installed=!0}},{key:"uninstall",value:function(){var t,e=r(this.style);try{var n=function(){var e=t.value;document.adoptedStyleSheets=document.adoptedStyleSheets.filter((function(t){return t!==e}))};for(e.s();!(t=e.n()).done;)n()}catch(t){e.e(t)}finally{e.f()}this._installed=!1}},{key:"reset",value:function(t){t&&(this.viewportSize=t.viewportSize,this.visualViewportSize=t.visualViewportSize,this.deviceScaleFactor=t.deviceScaleFactor,this.pageScaleFactor=t.pageScaleFactor,this.pageZoomFactor=t.pageZoomFactor,this.emulationScaleFactor=t.emulationScaleFactor,this.scrollX=Math.round(t.scrollX),this.scrollY=Math.round(t.scrollY)),this.resetCanvas()}},{key:"resetCanvas",value:function(){this.canvas&&this._context&&(this.canvas.width=this.deviceScaleFactor*this.viewportSize.width,this.canvas.height=this.deviceScaleFactor*this.viewportSize.height,this.canvas.style.width=this.viewportSize.width+"px",this.canvas.style.height=this.viewportSize.height+"px",this._context.scale(this.deviceScaleFactor,this.deviceScaleFactor),this.canvasWidth=this.viewportSize.width,this.canvasHeight=this.viewportSize.height)}},{key:"setPlatform",value:function(t){this.platform=t,this._installed||this.install()}},{key:"dispatch",value:function(t){this[t.shift()].apply(this,t)}},{key:"eventHasCtrlOrMeta",value:function(t){return"mac"===this.platform?t.metaKey&&!t.ctrlKey:t.ctrlKey&&!t.metaKey}},{key:"context",get:function(){if(!this._context)throw new Error("Context object is missing");return this._context}},{key:"document",get:function(){if(!this._document)throw new Error("Document object is missing");return this._document}},{key:"window",get:function(){if(!this._window)throw new Error("Window object is missing");return this._window}},{key:"installed",get:function(){return this._installed}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function l(t,e,n){var r=c(e,n);return r.addEventListener("click",(function(t){t.stopPropagation()}),!1),t.appendChild(r),r}function c(t,e){var n=document.createElement(t);if(e){var r=e.split(/\s+/);r=r.map((function(t){return"luna-dom-highlighter-"+t})),n.className=r.join(" ")}return n}function h(t){document.adoptedStyleSheets=[].concat(function(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(document.adoptedStyleSheets),[t])}e.Overlay=u,e.log=function(t){var e=document.getElementById("log");e||((e=l(document.body,"div")).id="log"),l(e,"div").textContent=t},e.createChild=l,e.createTextChild=function(t,e){var n=document.createTextNode(e);return t.appendChild(n),n},e.createElement=c,e.ellipsify=function(t,e){return t.length<=e?String(t):t.substr(0,e-1)+"…"},e.constrainNumber=function(t,e,n){return tn&&(t=n),t},e.adoptStyleSheet=h},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:1;n&&n.color&&(t.save(),t.translate(.5,.5),t.lineWidth=r,"dashed"===n.pattern&&t.setLineDash([3,3]),"dotted"===n.pattern&&t.setLineDash([2,2]),t.strokeStyle=n.color,t.stroke(e),t.restore())},e.fillPathWithBoxStyle=function(t,e,n,r,i){i&&(t.save(),i.fillColor&&(t.fillStyle=i.fillColor,t.fill(e)),i.hatchColor&&h(t,e,n,10,i.hatchColor,r,!1),t.restore())},e.buildPath=u,e.emptyBounds=function(){return{minX:Number.MAX_VALUE,minY:Number.MAX_VALUE,maxX:-Number.MAX_VALUE,maxY:-Number.MAX_VALUE,leftmostXForY:{},rightmostXForY:{},topmostYForX:{},bottommostYForX:{},allPoints:[]}},e.applyMatrixToPoint=function(t,e){var n=new DOMPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}};var l,c="";function h(t,e,n,r,i,o,a){if((t.canvas.width=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(e);try{for(l.s();!(a=l.n()).done;){var c=a.value;s=[].concat(i(s),["L",c.p4.x,c.p4.y,"L",c.p3.x,c.p3.y,"L",c.p2.x,c.p2.y,"L",c.p1.x,c.p1.y,"L",c.p4.x,c.p4.y,"L",t.p4.x,t.p4.y])}}catch(t){l.e(t)}finally{l.f()}return s.push("Z"),u(s,n,r)},e.parseHexa=p,e.formatRgba=f,e.formatColor=function(t,e){return"rgb"===e||"hsl"===e?f(p(t),e):t.endsWith("FF")?t.substr(0,7):t},e.drawPath=function(t,e,n,r,i,o,a){t.save();var s=u(e,o,a);return n&&(t.fillStyle=n,t.fill(s)),r&&("dashed"===i&&t.setLineDash([3,3]),"dotted"===i&&t.setLineDash([2,2]),t.lineWidth=2,t.strokeStyle=r,t.stroke(s)),t.restore(),s}},function(t,e,n){var r=n(128),i=n(129),o=n(59),a=n(44),s=n(33),u=n(35),l=n(62);e=l.ResizeObserver?r.extend({initialize:function(t){var e=this;if(t._resizeSensor)return t._resizeSensor;this.callSuper(r,"initialize");var n=new l.ResizeObserver((function(){return e.emit()}));n.observe(t),t._resizeSensor=this,this._resizeObserver=n,this._el=t},destroy:function(){var t=this._el;t._resizeSensor&&(this.rmAllListeners(),delete t._resizeSensor,this._resizeObserver.unobserve(t))}}):r.extend({initialize:function(t){if(t._resizeSensor)return t._resizeSensor;this.callSuper(r,"initialize"),this._el=t,t._resizeSensor=this,s(["absolute","relative","fixed","sticky"],a(t,"position"))||a(t,"position","relative"),this._appendResizeSensor(),this._bindEvent()},destroy:function(){var t=this._el;t._resizeSensor&&(this.rmAllListeners(),delete t._resizeSensor,t.removeChild(this._resizeSensorEl))},_appendResizeSensor:function(){var t=this._el,e={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},n={position:"absolute",left:"0px",top:"0px",transition:"0s"},r=i("div",{style:n}),o=i("div.resize-sensor-expand",{style:e},r),a=i("div.resize-sensor-shrink",{style:e},i("div",{style:u({width:"200%",height:"200%"},n)})),s=i("div.resize-sensor",{dir:"ltr",style:e},o,a);this._expandEl=o,this._expandChildEl=r,this._shrinkEl=a,this._resizeSensorEl=s,t.appendChild(s),this._resetExpandShrink()},_bindEvent:function(){var t=this;o.on(this._expandEl,"scroll",(function(){return t._onScroll()})),o.on(this._shrinkEl,"scroll",(function(){return t._onScroll()}))},_onScroll:function(){this.emit(),this._resetExpandShrink()},_resetExpandShrink:function(){var t=this._el,e=t.offsetWidth,n=t.offsetHeight;a(this._expandChildEl,{width:e+10,height:n+10}),u(this._expandEl,{scrollLeft:e+10,scrollTop:n+10}),u(this._shrinkEl,{scrollLeft:e+10,scrollTop:n+10})}}),t.exports=e},function(t,e,n){var r=n(26),i=n(52),o=n(5),a=n(28);e=r({initialize:function(){this._listeners=[]},addListener:function(t){this._listeners.push(t)},rmListener:function(t){var e=this._listeners.indexOf(t);e>-1&&this._listeners.splice(e,1)},rmAllListeners:function(){this._listeners=[]},emit:function(){var t=this,e=a(arguments),n=i(this._listeners);o(n,(function(n){return n.apply(t,e)}),this)}},{mixin:function(t){o(["addListener","rmListener","emit","rmAllListeners"],(function(n){t[n]=e.prototype[n]})),t._listeners=t._listeners||[]}}),t.exports=e},function(t,e,n){var r=n(130),i=n(12),o=n(63),a=n(60),s=n(44),u=n(5),l=n(24);function c(t){for(var e="div",n="",r=[],i=[],a="",s=0,u=t.length;s2?n-2:0),p=2;pn?n:t},t.exports=e},function(t,e){e=function(t){var e,o,a=t[0]/255,s=t[1]/255,u=t[2]/255,l=n(a,s,u),c=r(a,s,u),h=c-l;(e=n(60*(e=c===l?0:a===c?(s-u)/h:s===c?2+(u-a)/h:4+(a-s)/h),360))<0&&(e+=360);var p=(l+c)/2;o=c===l?0:p<=.5?h/(c+l):h/(2-c-l);var f=[i(e),i(100*o),i(100*p)];return t[3]&&(f[3]=t[3]),f};var n=Math.min,r=Math.max,i=Math.round;t.exports=e},function(t,e){e=function(t){var e,r,i,o=t[0]/360,a=t[1]/100,s=t[2]/100,u=[];if(t[3]&&(u[3]=t[3]),0===a)return i=n(255*s),u[0]=u[1]=u[2]=i,u;for(var l=2*s-(e=s<.5?s*(1+a):s+a-s*a),c=0;c<3;c++)(r=o+1/3*-(c-1))<0&&r++,r>1&&r--,i=6*r<1?l+6*(e-l)*r:2*r<1?e:3*r<2?l+(e-l)*(2/3-r)*6:l,u[c]=n(255*i);return u};var n=Math.round;t.exports=e},function(t,e,n){var r=n(138);e=function(t){return!!r(t)&&t%2!=0},t.exports=e},function(t,e,n){var r=n(31);e=function(t){return r(t)&&t%1==0},t.exports=e},function(t,e,n){var r=n(65);e=function(t){return r(t).toLocaleUpperCase()},t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=[["menuitem","command"],["rel","roletype"],["article","article"],["header","banner"],["input","button",[["type","checkbox"]]],["summary","button",[["aria-expanded","false"]]],["summary","button",[["aria-expanded","true"]]],["input","button",[["type","button"]]],["input","button",[["type","image"]]],["input","button",[["type","reset"]]],["input","button",[["type","submit"]]],["button","button"],["td","cell"],["input","checkbox",[["type","checkbox"]]],["th","columnheader"],["input","combobox",[["type","email"]]],["input","combobox",[["type","search"]]],["input","combobox",[["type","tel"]]],["input","combobox",[["type","text"]]],["input","combobox",[["type","url"]]],["input","combobox",[["type","url"]]],["select","combobox"],["select","combobox",[["size",1]]],["aside","complementary"],["footer","contentinfo"],["dd","definition"],["dialog","dialog"],["body","document"],["figure","figure"],["form","form"],["form","form"],["form","form"],["span","generic"],["div","generic"],["table","grid",[["role","grid"]]],["td","gridcell",[["role","gridcell"]]],["details","group"],["fieldset","group"],["optgroup","group"],["h1","heading"],["h2","heading"],["h3","heading"],["h4","heading"],["h5","heading"],["h6","heading"],["img","img"],["img","img"],["a","link"],["area","link"],["link","link"],["menu","list"],["ol","list"],["ul","list"],["select","listbox"],["select","listbox"],["select","listbox"],["datalist","listbox"],["li","listitem"],["main","main"],["math","math"],["menuitem","command"],["nav","navigation"],["option","option"],["progress","progressbar"],["input","radio",[["type","radio"]]],["section","region"],["section","region"],["frame","region"],["tr","row"],["tbody","rowgroup"],["tfoot","rowgroup"],["thead","rowgroup"],["th","rowheader",[["scope","row"]]],["input","searchbox",[["type","search"]]],["hr","separator"],["input","slider",[["type","range"]]],["input","spinbutton",[["type","number"]]],["output","status"],["table","table"],["dfn","term"],["input","textbox"],["input","textbox",[["type","email"]]],["input","textbox",[["type","tel"]]],["input","textbox",[["type","text"]]],["input","textbox",[["type","url"]]],["textarea","textbox"]]},function(t,e){t.exports='.luna-dom-highlighter{position:fixed;left:0;top:0;width:100%;height:100%;z-index:100000;pointer-events:none;font-size:13px}.luna-dom-highlighter-fill{position:absolute;top:0;right:0;bottom:0;left:0}.luna-dom-highlighter-platform-linux{font-family:Roboto,Ubuntu,Arial,sans-serif}.luna-dom-highlighter-platform-mac{color:#303942;font-family:\'.SFNSDisplay-Regular\',\'Helvetica Neue\',\'Lucida Grande\',sans-serif}.luna-dom-highlighter-platform-windows{font-family:\'Segoe UI\',Tahoma,sans-serif}.luna-dom-highlighter-px{color:gray}#luna-dom-highlighter-element-title{position:absolute;z-index:10}.luna-dom-highlighter-tooltip-content{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;padding:5px 8px;border:1px solid #fff;border-radius:3px;box-sizing:border-box;min-width:100px;max-width:min(300px,100% - 4px);z-index:2;background-clip:padding-box;will-change:transform;text-rendering:optimizeLegibility;pointer-events:none;filter:drop-shadow(0 2px 4px rgba(0,0,0,.35))}.luna-dom-highlighter-tooltip-content .luna-dom-highlighter-tooltip-arrow{background:#fff;width:15px;height:8px;position:absolute}.luna-dom-highlighter-element-info-section{margin-top:12px;margin-bottom:6px}.luna-dom-highlighter-section-name{color:#333;font-weight:500;font-size:10px;text-transform:uppercase;letter-spacing:.05em;line-height:12px}.luna-dom-highlighter-element-info{display:flex;flex-direction:column}.luna-dom-highlighter-element-info-header{display:flex;align-items:center}.luna-dom-highlighter-element-info-body{display:flex;flex-direction:column;padding-top:2px;margin-top:2px}.luna-dom-highlighter-element-info-row{display:flex;line-height:19px}.luna-dom-highlighter-separator-container{display:flex;align-items:center;flex:auto;margin-left:7px}.luna-dom-highlighter-separator{border-top:1px solid #ddd;width:100%}.luna-dom-highlighter-element-info-name{flex-shrink:0;color:#666}.luna-dom-highlighter-element-info-gap{flex:auto}.luna-dom-highlighter-element-info-value-color{display:flex;color:#303942;margin-left:10px;align-items:baseline}.luna-dom-highlighter-a11y-icon{width:16px;height:16px;background-repeat:no-repeat;display:inline-block}.luna-dom-highlighter-element-info-value-contrast{display:flex;align-items:center;text-align:right;color:#303942;margin-left:10px}.luna-dom-highlighter-element-info-value-contrast .luna-dom-highlighter-a11y-icon{margin-left:8px}.luna-dom-highlighter-element-info-value-icon{display:flex;align-items:center}.luna-dom-highlighter-element-info-value-text{text-align:right;color:#303942;margin-left:10px;align-items:baseline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.luna-dom-highlighter-color-swatch{display:flex;margin-right:2px;width:10px;height:10px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);line-height:10px}.luna-dom-highlighter-color-swatch-inner{flex:auto;border:1px solid #808002}.luna-dom-highlighter-element-layout-type{margin-right:10px;width:16px;height:16px}.luna-dom-highlighter-element-layout-type.luna-dom-highlighter-grid{background-image:url(\'data:image/svg+xml,\')}.luna-dom-highlighter-element-layout-type.luna-dom-highlighter-flex{background-image:url(\'data:image/svg+xml,\')}.luna-dom-highlighter-element-description{flex:1 1;font-weight:700;word-wrap:break-word;word-break:break-all}.luna-dom-highlighter-dimensions{color:#737373;text-align:right;margin-left:10px}.luna-dom-highlighter-material-node-width{margin-right:2px}.luna-dom-highlighter-material-node-height{margin-left:2px}.luna-dom-highlighter-material-tag-name{color:#881280}.luna-dom-highlighter-material-class-name,.luna-dom-highlighter-material-node-id{color:#1a1aa6}.luna-dom-highlighter-contrast-text{width:16px;height:16px;text-align:center;line-height:16px;margin-right:8px;border:1px solid #000;padding:0 1px}.luna-dom-highlighter-a11y-icon-not-ok{background-image:url(\'data:image/svg+xml,\')}.luna-dom-highlighter-a11y-icon-warning{background-image:url(\'data:image/svg+xml,\')}.luna-dom-highlighter-a11y-icon-ok{background-image:url(\'data:image/svg+xml,\')}@media (forced-colors:active){:root,body{background-color:transparent;forced-color-adjust:none}.luna-dom-highlighter-tooltip-content{border-color:Highlight;background-color:canvas;color:text;forced-color-adjust:none}.luna-dom-highlighter-tooltip-content::after{background-color:Highlight}.luna-dom-highlighter-color-swatch-inner,.luna-dom-highlighter-contrast-text,.luna-dom-highlighter-separator{border-color:Highlight}.luna-dom-highlighter-section-name{color:Highlight}.luna-dom-highlighter-dimensions,.luna-dom-highlighter-element-info-name,.luna-dom-highlighter-element-info-value-color,.luna-dom-highlighter-element-info-value-contrast,.luna-dom-highlighter-element-info-value-icon,.luna-dom-highlighter-element-info-value-text,.luna-dom-highlighter-material-class-name,.luna-dom-highlighter-material-node-id,.luna-dom-highlighter-material-tag-name{color:canvastext}}\n\n/*# sourceMappingURL=luna-dom-highlighter.css.map*/'},function(t,e,n){"use strict";n.r(e);var r,i=n(75);r=function(){var t=Object(i.a)(16);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,o[t[0]]+o[t[1]]+o[t[2]]+o[t[3]]+"-"+o[t[4]]+o[t[5]]+"-"+o[t[6]]+o[t[7]]+"-"+o[t[8]]+o[t[9]]+"-"+o[t[10]]+o[t[11]]+o[t[12]]+o[t[13]]+o[t[14]]+o[t[15]]};for(var o=[],a=0;a<256;a++)o[a]=(a+256).toString(16).substr(1);e.default=r},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"clear",(function(){return Q})),n.d(r,"wrap",(function(){return J})),n.d(r,"getObj",(function(){return Z})),n.d(r,"releaseObj",(function(){return tt})),n.d(r,"getProperties",(function(){return et}));var i,o=n(34),a=n(1),s=n(22),u=n(144),l=n(0),c=Date.now?Date.now:function(){return(new Date).getTime()};i=function(t){if(function(t){return null==t}(t))return"";try{return p.call(t)}catch(t){}try{return t+""}catch(t){}return""};var h,p=Function.prototype.toString,f=i,d=function(t,e){return 0===t.indexOf(e)},_=n(2);h=function(t){var e,n,r=function(t){for(var e={singleQuote:!1,doubleQuote:!1,regex:!1,blockComment:!1,lineComment:!1,condComp:!1},n=0,r=(t=("__"+t+"__").split("")).length;n"));var i=r.slice(e,n);return null===(i=i.match(m))?[]:i};var v,m=/[^\s,]+/g,g=h,b=/^\s+/,y=function(t,e){return null==e&&t.trim?t.trim():function(t,e){if(null==e)return t.trimLeft?t.trimLeft():t.replace(b,"");for(var n,r,i=0,o=t.length,a=e.length,s=!0;s&&i=o?"":t.substr(i,o)}(function(t,e){if(null==e){if(t.trimRight)return t.trimRight();e=" \r\n\t\f\v"}for(var n,r,i=t.length-1,o=e.length,a=!0;a&&i>=0;)for(a=!1,n=-1,r=t.charAt(i);++n=0?t.substring(0,i+1):""}(t,e),e)},w=function(t){return null==t?"":t.toString()},x=n(9),k=n(18),A=function(t){return Object(k.a)(t)&&t!==+t},O=function(t){return w(t).toLocaleLowerCase()},E=n(10),$=function(t){return null!=t&&(!!t._isBuffer||t.constructor&&Object(E.a)(t.constructor.isBuffer)&&t.constructor.isBuffer(t))};v=function(t){var e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null===t&&(e="Null"),void 0===t&&(e="Undefined"),A(t)&&(e="NaN"),$(t)&&(e="Buffer"),e||(e=Object(x.a)(t).match(S))&&(e=e[1]),e?n?O(e):e:""};var S=/^\[object\s+(.*?)]$/,C=v,j=n(39),T=n(69),P=n(13);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)}var N,M=function(t){return"symbol"===R(t)},L=n(4);N=function(t){return!!Object(L.a)(t)&&(Object(E.a)(t)?I.test(f(t)):z.test(f(t)))};var D=Object.prototype.hasOwnProperty,I=new RegExp("^"+f(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z=/^\[object .+?Constructor\]$/,F=N,B=n(7),H=function(t){return null===t},W=n(6),U=function(t){return!(!t||1!==t.nodeType)},q=function(){return(q=Object.assign||function(t){for(var e,n=1,r=arguments.length;n5&&(o=5,n=!0);for(var a=0;a0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]")+2)):a.push(o.slice(o.indexOf("{")+1,o.lastIndexOf("}"))),r=a,d(t,"async")?[4,pt.apply(null,r).apply(n,e)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,ht.apply(null,r).apply(n,e)]}var o,a}))}))}function dt(t){var e=[],n=t?t.stack:function(){var t=Error.prepareStackTrace;Error.prepareStackTrace=function(t,e){return e};var e=(new Error).stack.slice(1);return Error.prepareStackTrace=t,e}();return Object(_.a)(n)?(e=n.split("\n"),t||e.shift(),e.shift(),e=Object(s.a)(e,(function(t){return{functionName:y(t)}}))):(n.shift(),e=Object(s.a)(n,(function(t){return{functionName:t.getFunctionName(),lineNumber:t.getLineNumber(),columnNumber:t.getColumnNumber(),url:t.getFileName()}}))),e}u.a.addListener((function(t){a.default.trigger("Runtime.exceptionThrown",{exceptionDetails:{exception:J(t),stackTrace:{callFrames:dt(t)},text:"Uncaught"},timestamp:c})}));var _t,vt=n(15),mt=n(41),gt=Object(mt.a)((function(t,e){for(var n=t.length,r=0,i=e.length;r-1:(Object(Tt.a)(t)||(t=function(t){var e=[];return Object(l.default)(t,(function(t){e.push(t)})),e}(t)),function(t,e,n){return Array.prototype.indexOf.call(t,e,n)}(t,e)>=0)},Rt=function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return Object(P.a)(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n};function Nt(t,e){this[e]=t.replace(/\w/,(function(t){return t.toUpperCase()}))}var Mt=function(t){return t.length<1?t:t[0].toUpperCase()+t.slice(1)},Lt={};(Lt=Rt((function(t){if(t=function(t){var e=St(t),n=e[0];return e.shift(),e.forEach(Nt,e),n+e.join("")}(t=t.replace(zt,"")),Object(P.a)(Ft,t))return t;for(var e=It.length;e--;){var n=It[e]+Mt(t);if(Object(P.a)(Ft,n))return n}return t}))).dash=Rt((function(t){var e=Lt(t);return(zt.test(e)?"-":"")+Ct(e)}));var Dt,It=["O","ms","Moz","Webkit"],zt=/^(O)|(ms)|(Moz)|(Webkit)|(-o-)|(-ms-)|(-moz-)|(-webkit-)/g,Ft=document.createElement("p").style,Bt=Lt;Dt=function(t,e,n){if(t=xt(t),Object(jt.a)(n)&&Object(_.a)(e))return function(t,e){return t.style[Bt(e)]||getComputedStyle(t,"").getPropertyValue(e)}(t[0],e);var r=e;Object(L.a)(r)||((r={})[e]=n),function(t,e){Object(l.default)(t,(function(t){var n=";";Object(l.default)(e,(function(t,e){e=Bt.dash(e),n+=e+":"+function(t,e){return Object(k.a)(e)&&!Pt(Wt,Ct(t))?e+"px":e}(e,t)+";"})),t.style.cssText+=n}))}(t,r)};var Ht,Wt=["column-count","columns","font-weight","line-weight","opacity","z-index","zoom"],Ut=Dt;(Ht=function(t,e,n){if(t=xt(t),Object(jt.a)(n)&&Object(_.a)(e))return function(t,e){return t.getAttribute(e)}(t[0],e);var r=e;Object(L.a)(r)||((r={})[e]=n),function(t,e){Object(l.default)(t,(function(t){Object(l.default)(e,(function(e,n){t.setAttribute(n,e)}))}))}(t,r)}).remove=function(t,e){t=xt(t),e=Object(it.a)(e),Object(l.default)(t,(function(t){Object(l.default)(e,(function(e){t.removeAttribute(e)}))}))};var qt=Ht;function Gt(t){return function(e,n){var r=(e=xt(e))[0];if(Object(jt.a)(n))return r?r[t]:"";r&&Object(l.default)(e,(function(e){e[t]=n}))}}var Kt={html:Gt("innerHTML"),text:Gt("textContent"),val:Gt("value")},Yt=function(t){var e=t?t.length:0;if(e)return t[e-1]},Vt={};function Xt(){return!0}function Qt(){return!1}function Jt(t){var e,n=this.events[t.type],r=Zt.call(this,t,n);t=new Vt.Event(t);for(var i,o,a=0;(o=r[a++])&&!t.isPropagationStopped();)for(t.curTarget=o.el,i=0;(e=o.handlers[i++])&&!t.isImmediatePropagationStopped();)!1===e.handler.apply(o.el,[t])&&(t.preventDefault(),t.stopPropagation())}function Zt(t,e){var n,r,i,o,a=t.target,s=[],u=e.delegateCount;if(a.nodeType)for(;a!==this;a=a.parentNode||this){for(r=[],o=0;o=200&&e.status<400,status:e.status,statusText:e.statusText,url:e.responseURL,clone:function(){return t(e)},text:function(){return ve.resolve(e.responseText)},json:function(){return ve.resolve(e.responseText).then(JSON.parse)},xml:function(){return ve.resolve(e.responseXML)},blob:function(){return ve.resolve(new Blob([e.response]))},headers:{keys:function(){return r},entries:function(){return i},get:function(t){return o[t.toLowerCase()]},has:function(t){return Object(P.a)(o,t)}}}}(i))},i.onerror=r,i.open(e.method,t,!0),Object(l.default)(a,(function(t,e){i.setRequestHeader(e,t)})),u>0&&setTimeout((function(){i.onload=o.default,i.abort(),r(Error("timeout"))}),u),i.send(s)}))};var me=/^(.*?):\s*([\s\S]*?)$/gm;_e.setting={method:"GET",headers:{},timeout:0,xhr:function(){return new XMLHttpRequest}};var ge=_e,be=function(t){return null==t||(Object(Tt.a)(t)&&(Object(W.a)(t)||Object(_.a)(t)||function(t){return"[object Arguments]"===Object(x.a)(t)}(t))?0===t.length:0===Object(B.a)(t).length)},ye=n(78),we=function(t){if(Object(k.a)(t))return t;if(Object(L.a)(t)){var e=Object(E.a)(t.valueOf)?t.valueOf():t;t=Object(L.a)(e)?e+"":e}return Object(_.a)(t)?+t:0===t?t:+t},xe=n(40),ke={};ke={parse:function(t){var e={};return t=y(t).replace(Ae,""),Object(l.default)(t.split("&"),(function(t){var n=t.split("="),r=n.shift(),i=n.length>0?n.join("="):null;r=decodeURIComponent(r),i=decodeURIComponent(i),Object(jt.a)(e[r])?e[r]=i:Object(W.a)(e[r])?e[r].push(i):e[r]=[e[r],i]})),e},stringify:function(t,e){return Object(xe.a)(Object(s.a)(t,(function(t,n){return Object(L.a)(t)&&be(t)?"":Object(W.a)(t)?ke.stringify(t,n):(e?encodeURIComponent(e):encodeURIComponent(n))+"="+encodeURIComponent(t)})),(function(t){return t.length>0})).join("&")}};var Ae=/^(\?|#|&)/g,Oe=ke,Ee=n(19),$e={};$e=Object(vt.a)({className:"Url",initialize:function(t){!t&&Ee.a&&(t=window.location.href),Object(rt.a)(this,$e.parse(t||""))},setQuery:function(t,e){var n=this.query;return Object(L.a)(t)?Object(l.default)(t,(function(t,e){n[e]=w(t)})):n[t]=w(e),this},rmQuery:function(t){var e=this.query;return Object(W.a)(t)||(t=Object(it.a)(t)),Object(l.default)(t,(function(t){delete e[t]})),this},toString:function(){return $e.stringify(this)}},{parse:function(t){var e={protocol:"",auth:"",hostname:"",hash:"",query:{},port:"",pathname:"",slashes:!1},n=y(t),r=!1,i=n.match(Se);if(i&&(i=i[0],e.protocol=i.toLowerCase(),n=n.substr(i.length)),i&&(r="//"===n.substr(0,2))&&(n=n.slice(2),e.slashes=!0),r){for(var o=n,a=-1,s=0,u=je.length;s-1&&(o=n.slice(0,a),n=n.slice(a));var c=o.lastIndexOf("@");-1!==c&&(e.auth=decodeURIComponent(o.slice(0,c)),o=o.slice(c+1)),e.hostname=o;var h=o.match(Ce);h&&(":"!==(h=h[0])&&(e.port=h.substr(1)),e.hostname=o.substr(0,o.length-h.length))}var p=n.indexOf("#");-1!==p&&(e.hash=n.substr(p),n=n.slice(0,p));var f=n.indexOf("?");return-1!==f&&(e.query=Oe.parse(n.substr(f+1)),n=n.slice(0,f)),e.pathname=n||"/",e},stringify:function(t){var e=t.protocol+(t.slashes?"//":"")+(t.auth?encodeURIComponent(t.auth)+"@":"")+t.hostname+(t.port?":"+t.port:"")+t.pathname;return be(t.query)||(e+="?"+Oe.stringify(t.query)),t.hash&&(e+=t.hash),e}});var Se=/^([a-z0-9.+-]+:)/i,Ce=/:[0-9]*$/,je=["/","?","#"],Te=$e,Pe=n(72),Re=0,Ne=Object(Pe.a)(1e3,9999)+".";function Me(){return function(t){var e=++Re+"";return t?t+e:e}(Ne)}var Le,De=(Le=function(t,e){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}Le(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Ie=function(t){function e(e,n,r){var i=t.call(this)||this;return i.xhr=e,i.reqHeaders={},i.method=n,i.url=qe(r),i.id=Me(),i}return De(e,t),e.prototype.toJSON=function(){return{method:this.method,url:this.url,id:this.id}},e.prototype.handleSend=function(t){Object(_.a)(t)||(t=""),t={name:Ge(this.url),url:this.url,data:t,time:c(),reqHeaders:this.reqHeaders,method:this.method},be(this.reqHeaders)||(t.reqHeaders=this.reqHeaders),this.emit("send",this.id,t)},e.prototype.handleReqHeadersSet=function(t,e){t&&e&&(this.reqHeaders[t]=e)},e.prototype.handleHeadersReceived=function(){var t=this.xhr,e=Ke(t.getResponseHeader("Content-Type")||"");this.emit("headersReceived",this.id,{type:e.type,subType:e.subType,size:We(t,!0,this.url),time:c(),resHeaders:He(t)})},e.prototype.handleDone=function(){var t,e,n,r=this,i=this.xhr,o=i.responseType,a="",s=function(){r.emit("done",r.id,{status:i.status,size:We(i,!1,r.url),time:c(),resTxt:a})},u=Ke(i.getResponseHeader("Content-Type")||"");"blob"!==o||"text"!==u.type&&"javascript"!==u.subType&&"json"!==u.subType?(""!==o&&"text"!==o||(a=i.responseText),"json"===o&&(a=JSON.stringify(i.response)),s()):(t=i.response,e=function(t,e){e&&(a=e),s()},(n=new FileReader).onload=function(){e(0,n.result)},n.onerror=function(t){e()},n.readAsText(t))},e}(ye.default),ze=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this)||this;return e instanceof window.Request&&(e=e.url),r.url=qe(e),r.id=Me(),r.options=n,r.reqHeaders=n.headers||{},r.method=n.method||"GET",r}return De(e,t),e.prototype.send=function(t){var e=this,n=this.options,r=Object(_.a)(n.body)?n.body:"";this.emit("send",this.id,{name:Ge(this.url),url:this.url,data:r,reqHeaders:this.reqHeaders,time:c(),method:this.method}),t.then((function(t){var n=Ke((t=t.clone()).headers.get("Content-Type"));return t.text().then((function(r){var i={type:n.type,subType:n.subType,time:c(),size:Fe(t,r),resTxt:r,resHeaders:Be(t),status:t.status};be(e.reqHeaders)||(i.reqHeaders=e.reqHeaders),e.emit("done",e.id,i)})),t}))},e}(ye.default);function Fe(t,e){var n=t.headers.get("Content-length");return n?we(n):Ve(e)}function Be(t){var e={};return t.headers.forEach((function(t,n){return e[n]=t})),e}function He(t){var e=t.getAllResponseHeaders().split("\n"),n={};return Object(l.default)(e,(function(t){if(""!==(t=y(t))){var e=t.split(":",2),r=e[0],i=e[1];n[r]=y(i)}})),n}function We(t,e,n){var r=0;function i(){if(!e){var n=t.responseType,i="";""!==n&&"text"!==n||(i=t.responseText),i&&(r=Ve(i))}}if(function(t){return!d(t,Ye)}(n))i();else try{r=we(t.getResponseHeader("Content-Length"))}catch(t){i()}return 0===r&&i(),r}var Ue=document.createElement("a");function qe(t){return Ue.href=t,Ue.protocol+"//"+Ue.host+Ue.pathname+Ue.search+Ue.hash}function Ge(t){var e=Yt(t.split("/"));return e.indexOf("?")>-1&&(e=y(e.split("?")[0])),""===e&&(e=new Te(t).hostname),e}function Ke(t){if(!t)return{type:"unknown",subType:"unknown"};var e=t.split(";")[0].split("/");return{type:e[0],subType:Yt(e)}}var Ye=window.location.origin;function Ve(t){var e=encodeURIComponent(t).match(/%[89ABab]/g);return t.length+(e?e.length:0)}var Xe=new Map,Qe=new Map,Je=1;function Ze(t){var e=Qe.get(t);return e||(e=Je++,Qe.set(t,e),Xe.set(e,t),e)}function tn(t){return Qe.get(t)}function en(t,e){var n=(void 0===e?{}:e).depth,r=void 0===n?1:n,i=Ze(t),o={nodeName:t.nodeName,nodeType:t.nodeType,localName:t.localName||"",nodeValue:t.nodeValue||"",nodeId:i,backendNodeId:i};if(t.parentNode&&(o.parentId=Ze(t.parentNode)),t.attributes){var a=[];Object(l.default)(t.attributes,(function(t){var e=t.name,n=t.value;return a.push(e,n)})),o.attributes=a}var s=on(t.childNodes);o.childNodeCount=s.length;var u=1===o.childNodeCount&&3===s[0].nodeType;return(r>0||u)&&(o.children=nn(t,r)),o}function nn(t,e){var n=on(t.childNodes);return Object(s.a)(n,(function(t){return en(t,{depth:e-1})}))}function rn(t){var e=t.previousSibling;if(e){for(;!an(e)&&e.previousSibling;)e=e.previousSibling;return e&&an(e)?e:void 0}}function on(t){return Object(xe.a)(t,(function(t){return an(t)}))}function an(t){if(1===t.nodeType){var e=t.getAttribute("class")||"";if(Pt(e,"__chobitsu-hide__"))return!1}return!(3===t.nodeType&&""===y(t.nodeValue||""))}function sn(t){return Xe.get(t)}var un,ln=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=new(function(t){function e(){var e=t.call(this)||this;return e.observer=new MutationObserver((function(t){Object(l.default)(t,(function(t){return e.handleMutation(t)}))})),e}return ln(e,t),e.prototype.observe=function(){var t=this.observer;t.disconnect(),t.observe(document.documentElement,{attributes:!0,childList:!0,characterData:!0,subtree:!0})},e.prototype.handleMutation=function(t){"attributes"===t.type?this.emit("attributes",t.target,t.attributeName):"childList"===t.type?this.emit("childList",t.target,t.addedNodes,t.removedNodes):"characterData"===t.type&&this.emit("characterData",t.target)},e}(ye.default)),hn=n(70);un=function(t,e){for(var n,r=[],i=t;t;){if(n=!0,Yt(r)&&vn[Yt(r)]){var o=new RegExp("]*>")).exec(t);if(o){var a=t.substring(0,o.index);t=t.substring(o.index+o[0].length),a&&e.text&&e.text(a)}_(0,Yt(r))}else{if(d(t,"\x3c!--")){var s=t.indexOf("--\x3e");s>=0&&(e.comment&&e.comment(t.substring(4,s)),t=t.substring(s+3),n=!1)}else if(d(t,"=0&&r[i]!==n;i--);else i=0;if(i>=0){for(var o=r.length-1;o>=i;o--)e.end&&e.end(r[o]);r.length=i}}_()};var pn=/^\s]+))?)*)\s*(\/?)>/i,fn=/^<\/([-A-Za-z0-9_]+)[^>]*>/,dn=/^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_:@.]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/i,_n=/([-A-Za-z0-9_:@.]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,vn=function(t,e){Object(jt.a)(e)&&(e=!0);var n=Object(E.a)(e),r={};return Object(l.default)(t,(function(t){r[t]=n?e(t):e})),r}("script,style".split(",")),mn=un,gn=Object(vt.a)({initialize:function(){this.clear()},clear:function(){this._items=[],this.size=0},push:function(t){return this._items.push(t),++this.size},pop:function(){if(this.size)return this.size--,this._items.pop()},peek:function(){return this._items[this.size-1]},forEach:function(t,e){e=arguments.length>1?e:this;for(var n=this._items,r=this.size-1,i=0;r>=0;r--,i++)t.call(e,n[r],i,this)},toArr:function(){return function(t){var e=t.length,n=Array(e);e--;for(var r=0;r<=e;r++)n[e-r]=t[r];return n}(this._items)}}),bn=function(t){var e=[],n=new gn;return mn(t,{start:function(t,e){e=function(t,e,n){e=Object(re.a)(e,n);for(var r=Object(B.a)(t),i=r.length,o={},a=0;a=0&&t=55296&&i<=56319&&n>6*e)+n);e>0;)r+=lr(128|63&t>>6*(e-1)),e--;return r}function hr(t){for(;;){if(nr>=rr&&ar){if(t)return pr();throw new Error("Invalid byte index")}if(nr===rr)return!1;var e=er[nr];if(nr++,ar){if(eur){if(t)return nr--,pr();throw new Error("Invalid continuation byte")}if(sr=128,ur=191,ir=ir<<6|63&e,++or===ar){var n=ir;return ir=0,ar=0,or=0,n}}else{if(0==(128&e))return e;if(192==(224&e))ar=1,ir=31&e;else if(224==(240&e))224===e&&(sr=160),237===e&&(ur=159),ar=2,ir=15&e;else{if(240!=(248&e)){if(t)return pr();throw new Error("Invalid UTF-8 detected")}240===e&&(sr=144),244===e&&(ur=143),ar=3,ir=7&e}}}}function pr(){var t=nr-or-1;return nr=t+1,ir=0,ar=0,or=0,sr=128,ur=191,er[t]}var fr,dr=Jn;function _r(t){return+("0x"+t)}fr=function(t){try{return decodeURIComponent(t)}catch(n){var e=t.match(vr);return e?(Object(l.default)(e,(function(e){t=t.replace(e,function(t){t=t.split("%").slice(1);var e=Object(s.a)(t,_r);return t=Zn(e),dr.decode(t,!0)}(e))})),t):t}};var vr=/(%[a-f0-9]{2})+/gi,mr=fr,gr={},br={path:"/"};function yr(t,e,n){if(!Object(jt.a)(e)){if(n=fe(n=n||{},br),Object(k.a)(n.expires)){var r=new Date;r.setMilliseconds(r.getMilliseconds()+864e5*n.expires),n.expires=r}return e=encodeURIComponent(e),t=encodeURIComponent(t),document.cookie=[t,"=",e,n.expires&&"; expires="+n.expires.toUTCString(),n.path&&"; path="+n.path,n.domain&&"; domain="+n.domain,n.secure?"; secure":""].join(""),gr}for(var i=document.cookie?document.cookie.split("; "):[],o=t?void 0:{},a=0,s=i.length;a=0;l--){var c=o[l];if(""!==c){if(f({domain:s=""===s?c:c+"."+s,path:e="/"})||f({domain:s}))return;for(var h=0;h2?n-2:0),i=2;i",e))return void n.push(t);var o=[];Object(l.default)(t.attributes,(function(t){var e=t.name,n=t.value;return o.push(e,n)}));for(var a=0,s=o.length;a",bn(e)[0].attrs))},"DOM.setAttributeValue":function(t){var e=t.nodeId,n=t.name,r=t.value;sn(e).setAttribute(n,r)},"DOM.setInspectedNode":function(t){var e=sn(t.nodeId);kn.unshift(e),kn.length>5&&kn.pop();for(var n=0;n<5;n++)st("$"+n,kn[n])},"DOM.setNodeValue":function(t){var e=t.nodeId,n=t.value;sn(e).nodeValue=n},"DOM.setOuterHTML":function(t){var e=t.nodeId,n=t.outerHTML;sn(e).outerHTML=n},"DOM.undo":o.default,"DOM.getNodeId":function(t){return{nodeId:Ze(t.node)}},"DOMDebugger.getEventListeners":function(t){var e=Z(t.objectId).chobitsuEvents||[],n=[],r=Zr();return Object(l.default)(e,(function(t,e){Object(l.default)(t,(function(t){n.push({type:e,useCapture:t.useCapture,handler:J(t.listener),passive:t.passive,once:t.once,scriptId:r.scriptId,columnNumber:0,lineNumber:0})}))})),{listeners:n}},"Emulation.setEmulatedMedia":o.default,"Log.clear":o.default,"Log.enable":o.default,"Log.startViolationsReport":o.default,"Network.deleteCookies":function(t){xr(t.name)},"Network.enable":Er,"Network.getCookies":Ar,"Network.getResponseBody":function(t){return{base64Encoded:!1,body:Or.get(t.requestId)}},"Page.getResourceContent":o.default,"Page.getResourceTree":function(){return{frameTree:{frame:{id:"",mimeType:"text/html",securityOrigin:location.origin,url:location.href},resources:[]}}},"Runtime.callFunctionOn":function(t){return ut(this,void 0,void 0,(function(){var e,n,i,o,a,u,l;return lt(this,(function(c){switch(c.label){case 0:return e=t.functionDeclaration,n=t.objectId,i=t.arguments||[],i=Object(s.a)(i,(function(t){var e=t.objectId,n=t.value;if(e){var r=Z(e);if(r)return r}return n})),o=null,n&&(o=Z(n)),a={},l=(u=r).wrap,[4,ft(e,i,o)];case 1:return[2,(a.result=l.apply(u,[c.sent()]),a)]}}))}))},"Runtime.compileScript":o.default,"Runtime.discardConsoleEntries":o.default,"Runtime.enable":function(){u.a.start(),Object(l.default)({log:"log",warn:"warning",error:"error",info:"info",dir:"dir",table:"table",group:"startGroup",groupCollapsed:"startGroupCollapsed",groupEnd:"endGroup",debug:"debug",clear:"clear"},(function(t,e){var n=console[e].bind(console);console[e]=function(){for(var e=[],r=0;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]