commit 97c9ff745429ed7bf3ac396373193e160f581a6c Author: Lex Lim Date: Tue May 24 22:29:30 2022 +0800 创建工程 diff --git a/.yo-rc.json b/.yo-rc.json new file mode 100644 index 0000000..848d685 --- /dev/null +++ b/.yo-rc.json @@ -0,0 +1,140 @@ +{ + "*": { + "configuration": { + "config": { + "configName": "config", + "topScope": [ + "const path = require('path');", + "const webpack = require('webpack');", + "\n", + "/*\n * SplitChunksPlugin is enabled by default and replaced\n * deprecated CommonsChunkPlugin. It automatically identifies modules which\n * should be splitted of chunk by heuristics using module duplication count and\n * module category (i. e. node_modules). And splits the chunks…\n *\n * It is safe to remove \"splitChunks\" from the generated configuration\n * and was added as an educational example.\n *\n * https://webpack.js.org/plugins/split-chunks-plugin/\n *\n */", + "const HtmlWebpackPlugin = require('html-webpack-plugin')", + "\n", + "/*\n * We've enabled HtmlWebpackPlugin for you! This generates a html\n * page for you when you compile webpack, which will make you start\n * developing and prototyping faster.\n * \n * https://github.com/jantimon/html-webpack-plugin\n * \n */" + ], + "webpackOptions": { + "mode": "'development'", + "entry": "'./src/ext.isekai.discover.js'", + "output": { + "filename": "'[name].[chunkhash].js'", + "path": "path.resolve(__dirname, 'modules')" + }, + "plugins": [ + "new webpack.ProgressPlugin()", + "new HtmlWebpackPlugin()" + ], + "module": { + "rules": [ + { + "test": "/.(js|jsx)$/", + "include": [ + "path.resolve(__dirname, 'src')" + ], + "loader": "'babel-loader'", + "options": { + "plugins": [ + "'syntax-dynamic-import'" + ], + "presets": [ + [ + "'@babel/preset-env'", + { + "'modules'": false + } + ] + ] + } + } + ] + }, + "optimization": { + "splitChunks": { + "cacheGroups": { + "vendors": { + "priority": -10, + "test": "/[\\\\/]node_modules[\\\\/]/" + } + }, + "chunks": "'async'", + "minChunks": 1, + "minSize": 30000, + "name": true + } + }, + "devServer": { + "open": true + } + } + } + } + }, + "isekai-wiki": { + "configuration": { + "config": { + "configName": "config", + "topScope": [ + "const path = require('path');", + "const webpack = require('webpack');", + "\n", + "/*\n * SplitChunksPlugin is enabled by default and replaced\n * deprecated CommonsChunkPlugin. It automatically identifies modules which\n * should be splitted of chunk by heuristics using module duplication count and\n * module category (i. e. node_modules). And splits the chunks…\n *\n * It is safe to remove \"splitChunks\" from the generated configuration\n * and was added as an educational example.\n *\n * https://webpack.js.org/plugins/split-chunks-plugin/\n *\n */", + "const HtmlWebpackPlugin = require('html-webpack-plugin')", + "\n", + "/*\n * We've enabled HtmlWebpackPlugin for you! This generates a html\n * page for you when you compile webpack, which will make you start\n * developing and prototyping faster.\n * \n * https://github.com/jantimon/html-webpack-plugin\n * \n */" + ], + "webpackOptions": { + "mode": "'development'", + "entry": "'./src/ext.isekai.discover.js'", + "output": { + "filename": "'[name].[chunkhash].js'", + "path": "path.resolve(__dirname, 'modules')" + }, + "plugins": [ + "new webpack.ProgressPlugin()", + "new HtmlWebpackPlugin()" + ], + "module": { + "rules": [ + { + "test": "/.(js|jsx)$/", + "include": [ + "path.resolve(__dirname, 'src')" + ], + "loader": "'babel-loader'", + "options": { + "plugins": [ + "'syntax-dynamic-import'" + ], + "presets": [ + [ + "'@babel/preset-env'", + { + "'modules'": false + } + ] + ] + } + } + ] + }, + "optimization": { + "splitChunks": { + "cacheGroups": { + "vendors": { + "priority": -10, + "test": "/[\\\\/]node_modules[\\\\/]/" + } + }, + "chunks": "'async'", + "minChunks": 1, + "minSize": 30000, + "name": true + } + }, + "devServer": { + "open": true + } + } + } + } + } +} \ No newline at end of file diff --git a/BlockQuoteTagHandler.class.php b/BlockQuoteTagHandler.class.php new file mode 100644 index 0000000..dd53f6c --- /dev/null +++ b/BlockQuoteTagHandler.class.php @@ -0,0 +1,41 @@ +extTagToDOM( + $extArgs, + '', + $src, + [ + 'wrapperTag' => 'span', + 'parseOpts' => [ + 'extTag' => 'blockquote', + ], + ], + ); + + return $content; + } + + public function getInnerWikitext(ParsoidExtensionAPI $extApi, \DOMElement $dom) { + $wikiText = ''; + foreach($dom->childNodes as $child){ + if($child instanceof \DOMText){ + /** @type \DOMText $child */ + $wikiText .= $child->nodeValue; + } else { + $wikiText .= $extApi->domToWikitext([], $child); + } + } + return $wikiText; + } + + public function domToWikitext(ParsoidExtensionAPI $extApi, \DOMElement $node, bool $wrapperUnmodified): string { + $innerCode = $this->getInnerWikitext($extApi, $node); + return "\n{$innerCode}\n"; + } +} diff --git a/HideSpace.class.php b/HideSpace.class.php new file mode 100644 index 0000000..5ee34ec --- /dev/null +++ b/HideSpace.class.php @@ -0,0 +1,13 @@ +setFunctionHook('hide', 'Isekai\\HideSpace::createHideSpace'); + return true; + } + + public static function createHideSpace($parser, $title, $content) { + return ''; + } +} \ No newline at end of file diff --git a/InfoBox.class.php b/InfoBox.class.php new file mode 100644 index 0000000..4db7b4f --- /dev/null +++ b/InfoBox.class.php @@ -0,0 +1,144 @@ + [ + 'title' => '基本资料', + 'float' => 'right', + 'titleColor' => '#0088dd', + ], + '基本资料' => [ + 'title' => '基本资料', + 'float' => 'right', + 'titleColor' => '#0088dd', + ], + '参数' => [ + 'title' => '基本参数 (0-10)', + 'titleColor' => '#33ccff', + ], + '基本参数' => [ + 'title' => '基本参数 (0-10)', + 'titleColor' => '#33ccff', + ], + ]; + + public function __construct($args){ + $this->parseArgs($args); + } + + public function parseArgs($args){ + foreach($args as $one){ + if(is_string($one)){ + if($one == '居右'){ + $this->float = 'right'; + } elseif($one == '居左'){ + $this->float = 'left'; + } elseif($this->avatar == '' && preg_match('/\[\[文件:/', $one)){ + $this->avatar = str_replace(['|缩略图', '|有框'], '|无框', $one); + } elseif($this->title == '') { + preg_match('/\[(#[0-9a-fA-F]{3,6}|#[0-9a-fA-F]{3,6},#[0-9a-fA-F]{3,6}|,#[0-9a-fA-F]{3,6})\]/', $one, $match); + if(count($match) > 0){ + $this->titleColor = str_replace(['[', ']'], '', $match[0]); + $this->title = trim(str_replace($match[0], '', $one)); + } else { + $this->title = $one; + } + if(isset($this->defaultSet[$this->title])){ + $data = $this->defaultSet[$this->title]; + if(isset($data['title'])){ + $this->title = $data['title']; + } + if(isset($data['float']) && $this->float == ''){ + $this->float = $data['float']; + } + if(isset($data['titleColor']) && $this->titleColor == ''){ + $this->titleColor = $data['titleColor']; + } + } + } + } else { + $this->datas[$one[0]] = $one[1]; + } + } + } + + public function getHtml(){ + $ret = "
float){ + case 'left': + $ret .= ' style="float: left; margin-right: 5px;"'; + break; + case 'right': + $ret .= ' style="float: right; margin-left: 5px;"'; + break; + } + $ret .= ">\r\n{| class=\"wikitable\"\r\n"; + if($this->avatar != ''){ + $ret .= "|-\r\n| colspan=2 | " . $this->avatar . "\r\n"; + } + if($this->title != ''){ + $ret .= "|-\r\n| colspan=2 style=\"text-align:center;"; + //开始填充style项目 + if($this->titleColor != ''){ + $ret .= 'background-color:' . $this->titleColor . ';'; + if($this->isLightColor($this->titleColor)){ + $ret .= 'color:#000;'; + } else { + $ret .= 'color:#fff;'; + } + } + //填充内容 + $ret .= '" | ' . $this->title . "\r\n"; + } + foreach($this->datas as $name => $value){ + $ret .= "|-\r\n| " . $name . " || style=\"text-align:center\" | " . $value . "\r\n"; + } + $ret .= "|}\r\n
"; + return $ret; + } + + public function getRgb($hex){ + $hex = str_replace('#', '', $hex); + $rgb = []; + if(strlen($hex) == 3){ + $rgb[0] = $hex[0] . $hex[0]; + $rgb[1] = $hex[1] . $hex[1]; + $rgb[2] = $hex[2] . $hex[2]; + } else { + $rgb[0] = $hex[0] . $hex[1]; + $rgb[1] = $hex[2] . $hex[3]; + $rgb[2] = $hex[4] . $hex[5]; + } + foreach($rgb as $key => $one){ + $rgb[$key] = ord(hex2bin($one)); + } + return $rgb; + } + + public function isLightColor($hex){ + $rgb = $this->getRgb($hex); + return array_sum($rgb) >= 382; + } + + public static function onParserSetup(&$parser){ + $parser->setFunctionHook('infobox', 'Isekai\\InfoBox::createInfoBox'); + return true; + } + + public static function createInfoBox(){ + $args = func_get_args(); + $targetArgs = []; + for($i = 1; $i < count($args); $i ++){ + $t = explode('=', $args[$i]); + if(count($t) == 2){ + $targetArgs[] = [trim($t[0]), trim($t[1])]; + } else { + $targetArgs[] = $args[$i]; + } + } + $infobox = new InfoBox($targetArgs); + return $infobox->getHtml(); + } +} \ No newline at end of file diff --git a/Isekai.class.php b/Isekai.class.php new file mode 100644 index 0000000..072e64a --- /dev/null +++ b/Isekai.class.php @@ -0,0 +1,156 @@ +getTitle(); + + self::setHeader($output); + + if ($title->inNamespace(NS_USER)) { + self::onUserPage($output); + } + } + + public static function setHeader(OutputPage $outputPage) { + $outputPage->addHeadItem('dns-prefetch-main', Html::element('link', ['rel' => 'dns-prefetch', 'href' => '//www.isekai.cn'])); + $outputPage->addHeadItem('sitemap-link', Html::element('link', [ + 'rel' => 'sitemap', 'type' => 'application/xml', + 'title' => 'Sitemap', 'href' => '/sitemap/sitemap-index-wiki.xml', + ])); + // $outputPage->addHeadItem('dns-prefetch-static', \Html::element('link', ['rel' => 'dns-prefetch', 'href' => '//static-www.isekai.cn'])); + + $outputPage->addMeta('robots', 'all'); + $outputPage->addMeta('revisit-after', '1 days'); + $outputPage->addMeta('author', '异世界百科'); + + $outputPage->addModuleStyles('ext.isekai.styles'); + $outputPage->addModules('ext.isekai'); + $outputPage->addModules('ext.fontawesome'); + //$outputPage->addModules('ext.treeview'); + + // 百度统计 + $outputPage->addHeadItem( + 'baiduhm', + << +var _hmt = _hmt || []; +(function() { + var hm = document.createElement("script"); + hm.src = "https://hm.baidu.com/hm.js?2f650f34db6f2bbffa0af4d4e91a09a9"; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(hm, s); +})(); + +HTML + ); + } + + public static function onUserPage(OutputPage $outputPage) { + // 用户页 + $title = $outputPage->getTitle(); + if ($title->inNamespace(NS_USER)) { + $userName = $title->getText(); + $user = User::newFromName($userName); + if ($user && $user->isRegistered()) { + $showName = $user->getRealName(); + if (!$showName) { + $showName = $userName; + } + $outputPage->setPageTitle($showName); + $outputPage->setSubtitle('@' . $title->getText()); + $outputPage->setHTMLTitle(wfMessage('group-user')->text() . ' - ' . $outputPage->getHTMLTitle()); + } + } + } + + public static function onSkinTemplateOutputPageBeforeExec(\SkinTemplate &$skin, \QuickTemplate &$template) { + if (!$skin->getOutput()->isArticle()) return; + $title = $skin->getTitle(); + if ($title && $title->isSubpage()) { + //更改显示的标题 + $titleText = $template->get('title'); + if ($titleText) { + $template->set('title', basename($titleText)); + } + //面包屑 + $titlePathList = explode('/', $titleText); + $titlePathLen = count($titlePathList); + $breadcrumbsHtml = [ + Html::openElement('ol', ['class' => 'breadcrumb']), + ]; + $linkRender = MediaWikiServices::getInstance()->getLinkRenderer(); + foreach ($titlePathList as $key => $titleName) { + if ($key === $titlePathLen - 1) { + $breadcrumbsHtml[] = Html::element('li', ['class' => 'active'], $titleName); + } else { + $titleSubPath = implode('/', array_slice($titlePathList, 0, $key + 1)); + $breadcrumbsHtml[] = Html::openElement('li') . + $linkRender->makeLink(Title::newFromText($titleSubPath), $titleName) . Html::closeElement('li'); + } + } + $breadcrumbsHtml[] = Html::closeElement('ol'); + $template->extend('subtitle', implode($breadcrumbsHtml)); + } + } + + public static function onHtmlPageLinkRendererBegin( + LinkRenderer $linkRenderer, LinkTarget $target, + &$text, &$extraAttribs, &$query, &$ret + ) { + if ($target->inNamespace(NS_USER)) { + $userName = $target->getText(); + $user = User::newFromName($userName); + if ($user && $user->isRegistered()) { + $showName = $user->getRealName(); + if ($showName) { + $text = $showName; + } + } + } + } + + public static function onAttemptSave(EditPage $editPage) { + $services = MediaWikiServices::getInstance(); + $title = $editPage->getTitle(); + if ( + !$title || !$title->inNamespace(NS_MAIN) || + !$title->isSubpage() || $title->exists() + ) { + return true; + } + $path = explode('/', $title->getBaseText()); + $categoryList = []; + $pathLen = count($path); + for ($i = 0; $i < $pathLen; $i ++) { + if ($i === 0) { + $categoryList[] = $path[0]; + } else { + $categoryList[] = implode('/', array_slice($path, 0, $i + 1)); + } + } + + $categorySyntaxList = []; + $categoryNsText = $services->getContentLanguage()-> + getNsText($services->getNamespaceInfo()->getSubject(NS_CATEGORY)); + foreach ($categoryList as $categoryName) { + $categorySyntaxList[] = "[[{$categoryNsText}:{$categoryName}]]"; + } + if (substr($editPage->textbox1, -1, 1) !== "\n") { + $editPage->textbox1 .= "\n" . implode("", $categorySyntaxList); + } else { + $editPage->textbox1 .= implode("", $categorySyntaxList); + } + return true; + } +} diff --git a/Isekai.i18n.php b/Isekai.i18n.php new file mode 100644 index 0000000..60dd461 --- /dev/null +++ b/Isekai.i18n.php @@ -0,0 +1,11 @@ + [ + 'infobox' => [0, '信息框'], + 'hide' => [0, 'hide'], + ], + 'en' => [ + 'infobox' => [0, 'infobox'], + 'hide' => [0, 'hide'], + ], +]; \ No newline at end of file diff --git a/IsekaiChart.class.php b/IsekaiChart.class.php new file mode 100644 index 0000000..aaa2c1e --- /dev/null +++ b/IsekaiChart.class.php @@ -0,0 +1,139 @@ +setHook('isekaichart', self::class . '::create'); + return true; + } + + /** + * @param string $input + * @param string[] $args + * @param \Parser $parser + * @param \PPFrame $frame + */ + public static function create($input, $args, $parser, $frame) { + if (isset($args['type'])) { + switch ($args['type']) { + case 'radar': + return self::createRadar($input, $args, $parser, $frame); + break; + } + return '' . wfMessage("isekai-chart-unknow-type", $args['type'])->parse() . ''; + } + return '' . wfMessage("isekai-chart-undefined-type")->parse() . ''; + } + + public static function parseArgs(&$args, $defaultArgs = []) { + $newArgs = array_merge([ + 'legend' => true, + 'width' => 350, + 'height' => 300, + ], $defaultArgs); + $argsType = [ + 'width' => 'int', + 'height' => 'int', + ]; + foreach ($args as $key => $arg) { + if (isset($argsType[$key])) { + switch ($argsType[$key]) { + case 'int': + $arg = intval($arg); + break; + case 'float': + $arg = floatval($arg); + break; + } + } + $newArgs[$key] = $arg; + } + return $newArgs; + } + + /** + * @param string $input + * @param string[] $args + * @param \Parser $parser + * @param \PPFrame $frame + */ + public static function createRadar(&$input, &$inputArgs, &$parser, &$frame) { + $parser->getOutput()->addModules("ext.isekai.chart"); // 添加样式和脚本 + + $allowedArgs = ['width', 'height', 'shape']; + $args = self::parseArgs($inputArgs, [ + 'shape' => 'polygon' + ]); + $legend = $args['legend']; + + $lines = explode("\n", $input); + $csvData = []; + foreach ($lines as $line) { + if (!empty(trim($line))) { + $csvData[] = str_getcsv($line); + } + } + + $names = []; + $values = []; + if (count($csvData) > 1) { + if (count($csvData[0]) > 1 && $csvData[0][0] === "") { // 标题行 + $names = array_slice($csvData[0], 1); + array_splice($csvData, 0, 1); + } else { // 不存在标题行 + $legend = false; + $valueLen = count($csvData[0]); + for ($i = 0; $i < $valueLen; $i ++) { // 创建默认标题 + $names[] = wfMessage('isekai-chart-default-row-name', $i + 1)->text(); + } + } + } + + foreach ($csvData as $csvLine) { + $valueLine = []; + foreach ($csvLine as $pos => $csvCol) { + if ($pos === 0) { + $valueLine[$pos] = $csvCol; + } else { + $valueLine[$pos] = floatval($csvCol); + } + } + $values[] = $valueLine; + } + + $nameJson = json_encode($names, JSON_UNESCAPED_UNICODE); + $valueJson = json_encode($values, JSON_UNESCAPED_UNICODE); + if (!$valueJson) { + return '' . wfMessage("isekai-chart-transform-error", "Cannot encode json")->parse() . ''; + } + + $attr = []; + foreach ($args as $key => $val) { + if (in_array($key, $allowedArgs)) { + $attr['data-' . $key] = $val; + } + } + + $attr = array_merge($attr, [ + 'class' => 'isekai-chart', + 'style' => "width: {$args['width']}px; height: {$args['height']}px; display: inline-block", + 'data-name' => $nameJson, + 'data-value' => $valueJson, + 'data-legend' => $legend ? 'on' : 'off', + ]); + + ksort($attr); + $chartId = md5(serialize($attr)); + + $attr['data-chart-id'] = $chartId; + + $html = Html::openElement('div', $attr); + $html .= Html::closeElement('div'); + return $html; + } +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..500b88d --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# 🚀 Welcome to your new awesome project! + +This project has been created using **webpack scaffold**, you can now run + +``` +npm run build +``` + +or + +``` +yarn build +``` + +to bundle your application diff --git a/extension.json b/extension.json new file mode 100644 index 0000000..fb54c6f --- /dev/null +++ b/extension.json @@ -0,0 +1,105 @@ +{ + "name": "Isekai wiki", + "author": "Hyperzlib", + "version": "1.0.1", + "url": "https://www.isekai.cn", + "descriptionmsg": "isekai-desc", + "license-name": "ISC", + "type": "other", + "requires": { + + }, + "MessagesDirs": { + "Isekai": [ + "i18n" + ] + }, + "AutoloadClasses": { + "Isekai\\InfoBox": "InfoBox.class.php", + "Isekai\\IsekaiChart": "IsekaiChart.class.php", + "Isekai\\Isekai": "Isekai.class.php" + }, + "ExtensionMessagesFiles": { + "IsekaiMagic": "Isekai.i18n.php" + }, + "Hooks": { + "ParserFirstCallInit": [ + "Isekai\\InfoBox::onParserSetup", + "Isekai\\IsekaiChart::onParserSetup" + ], + "BeforePageDisplay": [ + "Isekai\\Isekai::onLoad" + ], + "SkinTemplateOutputPageBeforeExec": [ + "Isekai\\Isekai::onSkinTemplateOutputPageBeforeExec" + ], + "HtmlPageLinkRendererBegin": [ + "Isekai\\Isekai::onHtmlPageLinkRendererBegin" + ], + "EditPage::attemptSave": [ + "Isekai\\Isekai::onAttemptSave" + ] + }, + "ResourceModules": { + "ext.isekai": { + "scripts": ["ext.isekai.js"], + "dependencies": [ + "oojs-ui-core", + "oojs-ui-windows" + ], + "targets": [ + "desktop", + "mobile" + ], + "messages": [ + "isekai-collapse-show", + "isekai-collapse-hide", + "isekai-editor-prompt-content", + "isekai-editor-prompt-btn-cancel", + "isekai-editor-prompt-btn-use-mobile", + "isekai-editor-prompt-btn-use-desktop", + "isekai-login-prompt-content", + "isekai-login-prompt-btn-login", + "isekai-login-prompt-btn-createaccount", + "isekai-login-prompt-btn-cancel", + "nav-login-createaccount" + ] + }, + "ext.isekai.styles": { + "styles": ["ext.isekai.less"], + "targets": [ + "desktop", + "mobile" + ] + }, + "ext.fontawesome": { + "styles": [ + "font-awesome.less" + ], + "targets": [ + "desktop", + "mobile" + ] + }, + "lib.isekai.echarts": { + "scripts": ["lib/echarts.custom.min.js"] + }, + "ext.isekai.chart": { + "scripts": ["ext.isekai.chart.js"], + "styles": ["ext.isekai.chart.less"] + }, + "ext.treeview": { + "scripts": ["ext.treeview.js"], + "styles": ["ext.treeview.css"], + "targets": [ + "desktop", + "mobile" + ] + } + }, + "ResourceFileModulePaths": { + "localBasePath": "modules", + "remoteExtPath": "Isekai/modules" + }, + "manifest_version": 1 +} \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..729f428 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,10 @@ +{ + "isekai-desc": "Isekai wiki performance plugin", + "isekai-collapse-show": "Show", + "isekai-collapse-hide": "Hide", + + "isekai-login-prompt-content": "Share your imagine world, contribute your fictional settings, and help more people! now, let's join the Fantasy World wiki.", + "isekai-login-prompt-btn-login": "Login", + "isekai-login-prompt-btn-createaccount": "Create Account", + "isekai-login-prompt-btn-cancel": "Cancel" +} \ No newline at end of file diff --git a/i18n/ja.json b/i18n/ja.json new file mode 100644 index 0000000..1ddfc09 --- /dev/null +++ b/i18n/ja.json @@ -0,0 +1,10 @@ +{ + "isekai-desc": "Isekai wiki performance plugin", + "isekai-collapse-show": "展開", + "isekai-collapse-hide": "收起", + + "isekai-login-prompt-content": "加入异世界百科,贡献你的脑洞,帮助更多的人吧!", + "isekai-login-prompt-btn-login": "ログイン", + "isekai-login-prompt-btn-createaccount": "登録", + "isekai-login-prompt-btn-cancel": "いいぇ" +} \ No newline at end of file diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json new file mode 100644 index 0000000..030c4b9 --- /dev/null +++ b/i18n/zh-hans.json @@ -0,0 +1,23 @@ +{ + "isekai-desc": "异世界百科专用优化插件", + "isekai-collapse-show": "展开", + "isekai-collapse-hide": "收起", + + "isekai-login-prompt-content": "加入异世界百科,贡献你的脑洞,帮助更多的人吧!", + "isekai-login-prompt-btn-login": "登录", + "isekai-login-prompt-btn-createaccount": "创建账户", + "isekai-login-prompt-btn-cancel": "残忍拒绝", + "isekai-background-param-error": "背景图片参数错误:", + + "isekai-editor-prompt-content": "请选择编辑器,使用完整版编辑器可以获得更好的体验", + "isekai-editor-prompt-btn-cancel": "取消", + "isekai-editor-prompt-btn-use-mobile": "手机版", + "isekai-editor-prompt-btn-use-desktop": "完整版", + + "isekai-userpage": "用户", + + "isekai-chart-undefined-type": "未定义图表类型", + "isekai-chart-unknow-type": "未知的图表类型:{0}", + "isekai-chart-transform-error": "数据转换错误:{0}", + "isekai-chart-default-row-name": "数据 {0}" +} \ No newline at end of file diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json new file mode 100644 index 0000000..5a6c32e --- /dev/null +++ b/i18n/zh-hant.json @@ -0,0 +1,10 @@ +{ + "isekai-desc": "異世界百科專用優化插件", + "isekai-collapse-show": "展開", + "isekai-collapse-hide": "收起", + + "isekai-login-prompt-content": "加入異世界百科,貢獻你的腦洞,幫助更多的人吧!", + "isekai-login-prompt-btn-login": "登錄", + "isekai-login-prompt-btn-createaccount": "創建賬號", + "isekai-login-prompt-btn-cancel": "關閉" +} \ No newline at end of file diff --git a/modules/ext.isekai.chart.js b/modules/ext.isekai.chart.js new file mode 100644 index 0000000..e69de29 diff --git a/modules/ext.isekai.chart.less b/modules/ext.isekai.chart.less new file mode 100644 index 0000000..de54e89 --- /dev/null +++ b/modules/ext.isekai.chart.less @@ -0,0 +1,3 @@ +.isekai-chart { + display: inline-block; +} \ No newline at end of file diff --git a/modules/ext.isekai.js b/modules/ext.isekai.js new file mode 100644 index 0000000..bc853b6 --- /dev/null +++ b/modules/ext.isekai.js @@ -0,0 +1,231 @@ +var offsetSize = 55; + +function scrollToAnchor(link){ + var target = $(link.replace(/\./g, '\\.')); + if(target.length > 0){ + target.click(function(){ return false; }); + var position = target.offset().top - offsetSize; + $('html, body').animate({ + scrollTop: position, + }, 500); + return false; + } else { + return true; + } +} + +function incPageVisited(){ + var pageVisited = sessionStorage.getItem('pageVisited'); + if(pageVisited){ + pageVisited = parseInt(pageVisited) + 1; + } else { + pageVisited = 1; + } + sessionStorage.setItem('pageVisited', pageVisited.toString()); +} + +incPageVisited(); + +function getPageVisited(){ + var pageVisited = sessionStorage.getItem('pageVisited'); + if(pageVisited){ + return parseInt(pageVisited); + } else { + return 1; + } +} + +function setDismiss(){ + var time = Date.now() / 1000; + localStorage.setItem('dismissLoginPrompt', time.toFixed(0)); +} + +function shouldShowPrompt(){ + if(!mw.user.isAnon()){ //用户已登录 + setDismiss(); + return false; + } + + if(getPageVisited() < 4){ // 直到打开第四个页面,才弹出注册邀请 + return false; + } + + if(mw.config.get('wgCanonicalNamespace') === 'Special' && + ['Userlogin', 'CreateAccount', 'Userlogout'].indexOf(mw.config.get('wgCanonicalSpecialPageName')) >= 0){ //屏蔽登录和注册页面 + return false; + } + + var time = Date.now() / 1000; + var expire = 86400 * 7; //7天不提醒 + var dismissTime = localStorage.getItem('dismissLoginPrompt'); + if(dismissTime !== null){ + dismissTime = parseInt(dismissTime); + if(dismissTime + expire > time){ + return false; + } + } + + return true; +} + +$(function(){ + //折叠 + $('.mw-collapse').each(function(){ + var dom = $(this); + dom.find('.mw-collapse-title:first').append(' 显示 '); + var content = dom.find('.mw-collapse-content:first'); + var toggleBtn = dom.find('.mw-collapse-toggle:first'); + toggleBtn.click(function(){ + if(content.css('display') === 'none'){ + toggleBtn.text(mw.message('isekai-collapse-hide').parse()); + content.fadeIn(250); + } else { + toggleBtn.text(mw.message('isekai-collapse-show').parse()); + content.fadeOut(150); + } + }); + }); + + //锚链接偏移 + $('body').on('click', 'a', function(){ + var href = $(this).prop('href'); + var path = location.origin + location.pathname; + if(typeof href === 'string' && href.startsWith(path) && href[path.length] == '#' && href.length > path.length + 1){ + return scrollToAnchor(href.substr(path.length)); + } + }); + + // 替换搜索输入框的中文字符 + function replaceChars(dom){ + if(dom.value.indexOf(':') !== -1 || dom.value.indexOf('`') !== -1){ + var selectionStart = dom.selectionStart, + selectionEnd = dom.selectionEnd; + + dom.value = dom.value.replace(/:/g, ':').replace(/`/g, '·'); + dom.setSelectionRange(selectionStart, selectionEnd); + } + } + $('#searchInput, #wpNewTitleMain input, #searchText input[name="search"]').on('input', function(e){ + if(!e.originalEvent.isComposing){ + replaceChars(this); + } + }); + $('#searchInput, #wpNewTitleMain input, #searchText input[name="search"]').on('compositionend', function(e){ + replaceChars(this); + }); + + // 初始化dialog + var messageDialog = new OO.ui.MessageDialog(); + var windowManager = new OO.ui.WindowManager(); + $('body').append(windowManager.$element); + windowManager.addWindows([messageDialog]); + + // 替换手机端编辑按钮 + if (mw.config.get('skin') === 'minerva') { + $('#ca-edit, .mw-editsection a').click(function(e) { + e.preventDefault(); + + var cancelBtn = new OO.ui.ActionWidget({ + action: 'cancel', + label: mw.message('isekai-editor-prompt-btn-cancel').text(), + flags: ['safe', 'close'], + }); + + var useMobileEditorBtn = new OO.ui.ActionWidget({ + action: 'mobileEditor', + label: mw.message('isekai-editor-prompt-btn-use-mobile').text(), + }); + + var useDesktopEditorBtn = new OO.ui.ActionWidget({ + action: 'desktopEditor', + label: mw.message('isekai-editor-prompt-btn-use-desktop').text(), + flags: ['primary', 'progressive'], + }); + + useMobileEditorBtn.on('click', function() { + location.href = e.target.href; + }); + + useDesktopEditorBtn.on('click', function() { + var title = new mw.Title(mw.config.get('wgTitle'), mw.config.get('wgNamespaceNumber')); + location.href = title.getUrl({ veaction: 'edit', mobileaction: 'toggle_view_desktop' }); + }); + + windowManager.openWindow(messageDialog, { + message: mw.message('isekai-editor-prompt-content').parse(), + actions: [cancelBtn, useMobileEditorBtn, useDesktopEditorBtn], + }); + }); + } + + //显示登录引导框 + var cancelBtn = new OO.ui.ActionWidget({ + action: 'cancel', + label: mw.message('isekai-login-prompt-btn-cancel').text(), + flags: ['safe', 'close'], + }); + + var registerBtn = new OO.ui.ActionWidget({ + action: 'register', + label: mw.message('isekai-login-prompt-btn-createaccount').text(), + }); + + var loginBtn = new OO.ui.ActionWidget({ + action: 'login', + active: true, + label: mw.message('nav-login-createaccount').text(), + flags: ['primary', 'progressive'], + }); + + cancelBtn.on('click', function(){ + setDismiss(); + }); + + registerBtn.on('click', function(){ + location.href = mw.util.getUrl('Special:CreateAccount', {returnto: mw.config.get('wgPageName')}); + }); + + loginBtn.on('click', function(){ + location.href = mw.util.getUrl('Special:Userlogin', {returnto: mw.config.get('wgPageName')}); + }); + + if(shouldShowPrompt()){ + windowManager.openWindow(messageDialog, { + message: mw.message('isekai-login-prompt-content').parse(), + actions: [cancelBtn, loginBtn], // 去除注册按钮 + }); + } + + // 显示用户头像 + if(mw.config.get('wgNamespaceNumber') === 2 && mw.config.get('wgAvatarTemplate')) { + $('
').insertAfter("#firstHeading"); + var firstHeading = $("#firstHeading"); + var userHeading = $("#userHeading"); + userHeading.append(firstHeading); + var avatarUrl = mw.config.get('wgAvatarTemplate') + .replace(/\{username\}/g, encodeURI(mw.config.get('wgTitle'))); + var avatarAlt = mw.config.get('wgRelevantPageName'); + userHeading.append(`${avatarAlt}`); + } + + if (mw.cx && mw.cx.MachineTranslationManager) { + let _getProviderLabel = mw.cx.MachineTranslationManager.prototype.getProviderLabel; + mw.cx.MachineTranslationManager.prototype.getProviderLabel = function ( provider ) { + if (mw.config.get('wgUserLanguage', 'en').indexOf('zh') === 0) { + var labels = { + Google: mw.msg( 'cx-tools-mt-provider-title', 'Google翻译' ), + Yandex: mw.msg( 'cx-tools-mt-provider-title', 'Yandex翻译' ), + Baidu: mw.msg( 'cx-tools-mt-provider-title', '百度翻译' ), + Youdao: mw.msg( 'cx-tools-mt-provider-title', '有道翻译' ), + LingoCloud: mw.msg( 'cx-tools-mt-provider-title', '彩云小译' ), + }; + var label = labels[provider]; + if (label) { + return label; + } + } + + return _getProviderLabel.call(this, provider); + }; + } +}); \ No newline at end of file diff --git a/modules/ext.isekai.less b/modules/ext.isekai.less new file mode 100644 index 0000000..e63b06c --- /dev/null +++ b/modules/ext.isekai.less @@ -0,0 +1,159 @@ +.mw-collapse-content { + display: none; + margin: 1em 0 0; +} +.mw-collapse-toggle { + user-select: none; +} + +.wikitable-container .wikitable { + min-width: 200px; +} + +@media screen and (max-width: 850px){ + .wikitable-container { + width: 100%; + box-sizing: border-box; + float: none; + margin-left: 0px; + margin-right: 0px; + + .wikitable { + width: 100%; + } + } +} + +.black-space { + background-color: #252525; + color: #252525; + transition: color .15s; + + &:hover { + color: #fff; + transition: color .15s; + } +} + +.ve-init-target-visual .black-space { + color: #fff; +} + +#toc > ul { + overflow-y: auto; + max-height: 50vh; + scrollbar-width: thin; + + &::-webkit-scrollbar { + width: 8px; + } + + &::-webkit-scrollbar-thumb { + border-radius: 0; + background: #cdcdcd; + + &:hover { + background: #a6a6a6; + } + + &:active { + background: #606060; + } + } + + &::-webkit-scrollbar-track { + border-radius: 0; + background: #f0f0f0; + } +} + +@media screen and (min-width: 851px){ + #user-tools { + #personal { + margin-left: 0; + padding-left: 0.5em; + + h2 { + padding: 7px 0 20px 25px; + background-position: 0 6px; + /*margin-top: -3px;*/ + + span { + margin-top: 1px; + overflow: visible; + } + } + } + + #personal-extra { + margin-top: 0.8em; + } + } +} + +@media screen and (min-width: 1100px){ + #mw-header #user-tools { + width: 10em; + } +} + +@media screen and (min-width: 851px){ + #mw-footer .footer-places li { + white-space: pre; + } +} + +@media screen and (max-width: 850px){ + #mw-footer #copyright { + display: block; + } +} + +.breadcrumb { + padding: 8px 15px; + margin-bottom: 10px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; + margin-block-start: 0; + font-size: 14px; + + > li { + display: inline-block; + + &.active { + color: #777; + } + } + + > li+li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; + } + + a { + text-decoration: none; + } +} + +.subpages { + display: none !important; +} + +#content { + .user-heading { + display: flex; + align-items: flex-end; + + .user-avatar { + width: 64px; + height: 64px; + } + + #firstHeading { + flex-grow: 1; + margin: 0 0.5em 0.25em 0; + } + } +} \ No newline at end of file diff --git a/modules/ext.treeview.css b/modules/ext.treeview.css new file mode 100644 index 0000000..e69de29 diff --git a/modules/ext.treeview.js b/modules/ext.treeview.js new file mode 100644 index 0000000..685e47c --- /dev/null +++ b/modules/ext.treeview.js @@ -0,0 +1,24 @@ +function getTocData(){ + var root = $('#toc>ul'); + var data = {}; + var temp = data; + + function getData(dom){ + var data = []; + dom.find('>li').each((key, item) => { + + }); + } +} + +$(function(){ + //对于目录树的操作 + if($('#toc').length > 0){ + $('#toc .toctitle').append(' [切换'); + $('#toc ul').addClass('subtoc'); + $('#toc>ul:first').removeClass('subtoc'); + $('#toc .tocmode').click(function(){ + alert('还没写好呢,再等等吧'); + }); + } +}); \ No newline at end of file diff --git a/modules/flex.less b/modules/flex.less new file mode 100644 index 0000000..e69de29 diff --git a/modules/font-awesome.less b/modules/font-awesome.less new file mode 100644 index 0000000..1ad9e3b --- /dev/null +++ b/modules/font-awesome.less @@ -0,0 +1,18 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ + +@import "fontawesome/variables.less"; +@import "fontawesome/mixins.less"; +@import "fontawesome/path.less"; +@import "fontawesome/core.less"; +@import "fontawesome/larger.less"; +@import "fontawesome/fixed-width.less"; +@import "fontawesome/list.less"; +@import "fontawesome/bordered-pulled.less"; +@import "fontawesome/animated.less"; +@import "fontawesome/rotated-flipped.less"; +@import "fontawesome/stacked.less"; +@import "fontawesome/icons.less"; +@import "fontawesome/screen-reader.less"; diff --git a/modules/fontawesome/animated.less b/modules/fontawesome/animated.less new file mode 100644 index 0000000..66ad52a --- /dev/null +++ b/modules/fontawesome/animated.less @@ -0,0 +1,34 @@ +// Animated Icons +// -------------------------- + +.@{fa-css-prefix}-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} + +.@{fa-css-prefix}-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} diff --git a/modules/fontawesome/bordered-pulled.less b/modules/fontawesome/bordered-pulled.less new file mode 100644 index 0000000..f1c8ad7 --- /dev/null +++ b/modules/fontawesome/bordered-pulled.less @@ -0,0 +1,25 @@ +// Bordered & Pulled +// ------------------------- + +.@{fa-css-prefix}-border { + padding: .2em .25em .15em; + border: solid .08em @fa-border-color; + border-radius: .1em; +} + +.@{fa-css-prefix}-pull-left { float: left; } +.@{fa-css-prefix}-pull-right { float: right; } + +.@{fa-css-prefix} { + &.@{fa-css-prefix}-pull-left { margin-right: .3em; } + &.@{fa-css-prefix}-pull-right { margin-left: .3em; } +} + +/* Deprecated as of 4.4.0 */ +.pull-right { float: right; } +.pull-left { float: left; } + +.@{fa-css-prefix} { + &.pull-left { margin-right: .3em; } + &.pull-right { margin-left: .3em; } +} diff --git a/modules/fontawesome/core.less b/modules/fontawesome/core.less new file mode 100644 index 0000000..c577ac8 --- /dev/null +++ b/modules/fontawesome/core.less @@ -0,0 +1,12 @@ +// Base Class Definition +// ------------------------- + +.@{fa-css-prefix} { + display: inline-block; + font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + text-rendering: auto; // optimizelegibility throws things off #1094 + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + +} diff --git a/modules/fontawesome/fixed-width.less b/modules/fontawesome/fixed-width.less new file mode 100644 index 0000000..110289f --- /dev/null +++ b/modules/fontawesome/fixed-width.less @@ -0,0 +1,6 @@ +// Fixed Width Icons +// ------------------------- +.@{fa-css-prefix}-fw { + width: (18em / 14); + text-align: center; +} diff --git a/modules/fontawesome/icons.less b/modules/fontawesome/icons.less new file mode 100644 index 0000000..159d600 --- /dev/null +++ b/modules/fontawesome/icons.less @@ -0,0 +1,789 @@ +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ + +.@{fa-css-prefix}-glass:before { content: @fa-var-glass; } +.@{fa-css-prefix}-music:before { content: @fa-var-music; } +.@{fa-css-prefix}-search:before { content: @fa-var-search; } +.@{fa-css-prefix}-envelope-o:before { content: @fa-var-envelope-o; } +.@{fa-css-prefix}-heart:before { content: @fa-var-heart; } +.@{fa-css-prefix}-star:before { content: @fa-var-star; } +.@{fa-css-prefix}-star-o:before { content: @fa-var-star-o; } +.@{fa-css-prefix}-user:before { content: @fa-var-user; } +.@{fa-css-prefix}-film:before { content: @fa-var-film; } +.@{fa-css-prefix}-th-large:before { content: @fa-var-th-large; } +.@{fa-css-prefix}-th:before { content: @fa-var-th; } +.@{fa-css-prefix}-th-list:before { content: @fa-var-th-list; } +.@{fa-css-prefix}-check:before { content: @fa-var-check; } +.@{fa-css-prefix}-remove:before, +.@{fa-css-prefix}-close:before, +.@{fa-css-prefix}-times:before { content: @fa-var-times; } +.@{fa-css-prefix}-search-plus:before { content: @fa-var-search-plus; } +.@{fa-css-prefix}-search-minus:before { content: @fa-var-search-minus; } +.@{fa-css-prefix}-power-off:before { content: @fa-var-power-off; } +.@{fa-css-prefix}-signal:before { content: @fa-var-signal; } +.@{fa-css-prefix}-gear:before, +.@{fa-css-prefix}-cog:before { content: @fa-var-cog; } +.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-o; } +.@{fa-css-prefix}-home:before { content: @fa-var-home; } +.@{fa-css-prefix}-file-o:before { content: @fa-var-file-o; } +.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock-o; } +.@{fa-css-prefix}-road:before { content: @fa-var-road; } +.@{fa-css-prefix}-download:before { content: @fa-var-download; } +.@{fa-css-prefix}-arrow-circle-o-down:before { content: @fa-var-arrow-circle-o-down; } +.@{fa-css-prefix}-arrow-circle-o-up:before { content: @fa-var-arrow-circle-o-up; } +.@{fa-css-prefix}-inbox:before { content: @fa-var-inbox; } +.@{fa-css-prefix}-play-circle-o:before { content: @fa-var-play-circle-o; } +.@{fa-css-prefix}-rotate-right:before, +.@{fa-css-prefix}-repeat:before { content: @fa-var-repeat; } +.@{fa-css-prefix}-refresh:before { content: @fa-var-refresh; } +.@{fa-css-prefix}-list-alt:before { content: @fa-var-list-alt; } +.@{fa-css-prefix}-lock:before { content: @fa-var-lock; } +.@{fa-css-prefix}-flag:before { content: @fa-var-flag; } +.@{fa-css-prefix}-headphones:before { content: @fa-var-headphones; } +.@{fa-css-prefix}-volume-off:before { content: @fa-var-volume-off; } +.@{fa-css-prefix}-volume-down:before { content: @fa-var-volume-down; } +.@{fa-css-prefix}-volume-up:before { content: @fa-var-volume-up; } +.@{fa-css-prefix}-qrcode:before { content: @fa-var-qrcode; } +.@{fa-css-prefix}-barcode:before { content: @fa-var-barcode; } +.@{fa-css-prefix}-tag:before { content: @fa-var-tag; } +.@{fa-css-prefix}-tags:before { content: @fa-var-tags; } +.@{fa-css-prefix}-book:before { content: @fa-var-book; } +.@{fa-css-prefix}-bookmark:before { content: @fa-var-bookmark; } +.@{fa-css-prefix}-print:before { content: @fa-var-print; } +.@{fa-css-prefix}-camera:before { content: @fa-var-camera; } +.@{fa-css-prefix}-font:before { content: @fa-var-font; } +.@{fa-css-prefix}-bold:before { content: @fa-var-bold; } +.@{fa-css-prefix}-italic:before { content: @fa-var-italic; } +.@{fa-css-prefix}-text-height:before { content: @fa-var-text-height; } +.@{fa-css-prefix}-text-width:before { content: @fa-var-text-width; } +.@{fa-css-prefix}-align-left:before { content: @fa-var-align-left; } +.@{fa-css-prefix}-align-center:before { content: @fa-var-align-center; } +.@{fa-css-prefix}-align-right:before { content: @fa-var-align-right; } +.@{fa-css-prefix}-align-justify:before { content: @fa-var-align-justify; } +.@{fa-css-prefix}-list:before { content: @fa-var-list; } +.@{fa-css-prefix}-dedent:before, +.@{fa-css-prefix}-outdent:before { content: @fa-var-outdent; } +.@{fa-css-prefix}-indent:before { content: @fa-var-indent; } +.@{fa-css-prefix}-video-camera:before { content: @fa-var-video-camera; } +.@{fa-css-prefix}-photo:before, +.@{fa-css-prefix}-image:before, +.@{fa-css-prefix}-picture-o:before { content: @fa-var-picture-o; } +.@{fa-css-prefix}-pencil:before { content: @fa-var-pencil; } +.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker; } +.@{fa-css-prefix}-adjust:before { content: @fa-var-adjust; } +.@{fa-css-prefix}-tint:before { content: @fa-var-tint; } +.@{fa-css-prefix}-edit:before, +.@{fa-css-prefix}-pencil-square-o:before { content: @fa-var-pencil-square-o; } +.@{fa-css-prefix}-share-square-o:before { content: @fa-var-share-square-o; } +.@{fa-css-prefix}-check-square-o:before { content: @fa-var-check-square-o; } +.@{fa-css-prefix}-arrows:before { content: @fa-var-arrows; } +.@{fa-css-prefix}-step-backward:before { content: @fa-var-step-backward; } +.@{fa-css-prefix}-fast-backward:before { content: @fa-var-fast-backward; } +.@{fa-css-prefix}-backward:before { content: @fa-var-backward; } +.@{fa-css-prefix}-play:before { content: @fa-var-play; } +.@{fa-css-prefix}-pause:before { content: @fa-var-pause; } +.@{fa-css-prefix}-stop:before { content: @fa-var-stop; } +.@{fa-css-prefix}-forward:before { content: @fa-var-forward; } +.@{fa-css-prefix}-fast-forward:before { content: @fa-var-fast-forward; } +.@{fa-css-prefix}-step-forward:before { content: @fa-var-step-forward; } +.@{fa-css-prefix}-eject:before { content: @fa-var-eject; } +.@{fa-css-prefix}-chevron-left:before { content: @fa-var-chevron-left; } +.@{fa-css-prefix}-chevron-right:before { content: @fa-var-chevron-right; } +.@{fa-css-prefix}-plus-circle:before { content: @fa-var-plus-circle; } +.@{fa-css-prefix}-minus-circle:before { content: @fa-var-minus-circle; } +.@{fa-css-prefix}-times-circle:before { content: @fa-var-times-circle; } +.@{fa-css-prefix}-check-circle:before { content: @fa-var-check-circle; } +.@{fa-css-prefix}-question-circle:before { content: @fa-var-question-circle; } +.@{fa-css-prefix}-info-circle:before { content: @fa-var-info-circle; } +.@{fa-css-prefix}-crosshairs:before { content: @fa-var-crosshairs; } +.@{fa-css-prefix}-times-circle-o:before { content: @fa-var-times-circle-o; } +.@{fa-css-prefix}-check-circle-o:before { content: @fa-var-check-circle-o; } +.@{fa-css-prefix}-ban:before { content: @fa-var-ban; } +.@{fa-css-prefix}-arrow-left:before { content: @fa-var-arrow-left; } +.@{fa-css-prefix}-arrow-right:before { content: @fa-var-arrow-right; } +.@{fa-css-prefix}-arrow-up:before { content: @fa-var-arrow-up; } +.@{fa-css-prefix}-arrow-down:before { content: @fa-var-arrow-down; } +.@{fa-css-prefix}-mail-forward:before, +.@{fa-css-prefix}-share:before { content: @fa-var-share; } +.@{fa-css-prefix}-expand:before { content: @fa-var-expand; } +.@{fa-css-prefix}-compress:before { content: @fa-var-compress; } +.@{fa-css-prefix}-plus:before { content: @fa-var-plus; } +.@{fa-css-prefix}-minus:before { content: @fa-var-minus; } +.@{fa-css-prefix}-asterisk:before { content: @fa-var-asterisk; } +.@{fa-css-prefix}-exclamation-circle:before { content: @fa-var-exclamation-circle; } +.@{fa-css-prefix}-gift:before { content: @fa-var-gift; } +.@{fa-css-prefix}-leaf:before { content: @fa-var-leaf; } +.@{fa-css-prefix}-fire:before { content: @fa-var-fire; } +.@{fa-css-prefix}-eye:before { content: @fa-var-eye; } +.@{fa-css-prefix}-eye-slash:before { content: @fa-var-eye-slash; } +.@{fa-css-prefix}-warning:before, +.@{fa-css-prefix}-exclamation-triangle:before { content: @fa-var-exclamation-triangle; } +.@{fa-css-prefix}-plane:before { content: @fa-var-plane; } +.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar; } +.@{fa-css-prefix}-random:before { content: @fa-var-random; } +.@{fa-css-prefix}-comment:before { content: @fa-var-comment; } +.@{fa-css-prefix}-magnet:before { content: @fa-var-magnet; } +.@{fa-css-prefix}-chevron-up:before { content: @fa-var-chevron-up; } +.@{fa-css-prefix}-chevron-down:before { content: @fa-var-chevron-down; } +.@{fa-css-prefix}-retweet:before { content: @fa-var-retweet; } +.@{fa-css-prefix}-shopping-cart:before { content: @fa-var-shopping-cart; } +.@{fa-css-prefix}-folder:before { content: @fa-var-folder; } +.@{fa-css-prefix}-folder-open:before { content: @fa-var-folder-open; } +.@{fa-css-prefix}-arrows-v:before { content: @fa-var-arrows-v; } +.@{fa-css-prefix}-arrows-h:before { content: @fa-var-arrows-h; } +.@{fa-css-prefix}-bar-chart-o:before, +.@{fa-css-prefix}-bar-chart:before { content: @fa-var-bar-chart; } +.@{fa-css-prefix}-twitter-square:before { content: @fa-var-twitter-square; } +.@{fa-css-prefix}-facebook-square:before { content: @fa-var-facebook-square; } +.@{fa-css-prefix}-camera-retro:before { content: @fa-var-camera-retro; } +.@{fa-css-prefix}-key:before { content: @fa-var-key; } +.@{fa-css-prefix}-gears:before, +.@{fa-css-prefix}-cogs:before { content: @fa-var-cogs; } +.@{fa-css-prefix}-comments:before { content: @fa-var-comments; } +.@{fa-css-prefix}-thumbs-o-up:before { content: @fa-var-thumbs-o-up; } +.@{fa-css-prefix}-thumbs-o-down:before { content: @fa-var-thumbs-o-down; } +.@{fa-css-prefix}-star-half:before { content: @fa-var-star-half; } +.@{fa-css-prefix}-heart-o:before { content: @fa-var-heart-o; } +.@{fa-css-prefix}-sign-out:before { content: @fa-var-sign-out; } +.@{fa-css-prefix}-linkedin-square:before { content: @fa-var-linkedin-square; } +.@{fa-css-prefix}-thumb-tack:before { content: @fa-var-thumb-tack; } +.@{fa-css-prefix}-external-link:before { content: @fa-var-external-link; } +.@{fa-css-prefix}-sign-in:before { content: @fa-var-sign-in; } +.@{fa-css-prefix}-trophy:before { content: @fa-var-trophy; } +.@{fa-css-prefix}-github-square:before { content: @fa-var-github-square; } +.@{fa-css-prefix}-upload:before { content: @fa-var-upload; } +.@{fa-css-prefix}-lemon-o:before { content: @fa-var-lemon-o; } +.@{fa-css-prefix}-phone:before { content: @fa-var-phone; } +.@{fa-css-prefix}-square-o:before { content: @fa-var-square-o; } +.@{fa-css-prefix}-bookmark-o:before { content: @fa-var-bookmark-o; } +.@{fa-css-prefix}-phone-square:before { content: @fa-var-phone-square; } +.@{fa-css-prefix}-twitter:before { content: @fa-var-twitter; } +.@{fa-css-prefix}-facebook-f:before, +.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook; } +.@{fa-css-prefix}-github:before { content: @fa-var-github; } +.@{fa-css-prefix}-unlock:before { content: @fa-var-unlock; } +.@{fa-css-prefix}-credit-card:before { content: @fa-var-credit-card; } +.@{fa-css-prefix}-feed:before, +.@{fa-css-prefix}-rss:before { content: @fa-var-rss; } +.@{fa-css-prefix}-hdd-o:before { content: @fa-var-hdd-o; } +.@{fa-css-prefix}-bullhorn:before { content: @fa-var-bullhorn; } +.@{fa-css-prefix}-bell:before { content: @fa-var-bell; } +.@{fa-css-prefix}-certificate:before { content: @fa-var-certificate; } +.@{fa-css-prefix}-hand-o-right:before { content: @fa-var-hand-o-right; } +.@{fa-css-prefix}-hand-o-left:before { content: @fa-var-hand-o-left; } +.@{fa-css-prefix}-hand-o-up:before { content: @fa-var-hand-o-up; } +.@{fa-css-prefix}-hand-o-down:before { content: @fa-var-hand-o-down; } +.@{fa-css-prefix}-arrow-circle-left:before { content: @fa-var-arrow-circle-left; } +.@{fa-css-prefix}-arrow-circle-right:before { content: @fa-var-arrow-circle-right; } +.@{fa-css-prefix}-arrow-circle-up:before { content: @fa-var-arrow-circle-up; } +.@{fa-css-prefix}-arrow-circle-down:before { content: @fa-var-arrow-circle-down; } +.@{fa-css-prefix}-globe:before { content: @fa-var-globe; } +.@{fa-css-prefix}-wrench:before { content: @fa-var-wrench; } +.@{fa-css-prefix}-tasks:before { content: @fa-var-tasks; } +.@{fa-css-prefix}-filter:before { content: @fa-var-filter; } +.@{fa-css-prefix}-briefcase:before { content: @fa-var-briefcase; } +.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-arrows-alt; } +.@{fa-css-prefix}-group:before, +.@{fa-css-prefix}-users:before { content: @fa-var-users; } +.@{fa-css-prefix}-chain:before, +.@{fa-css-prefix}-link:before { content: @fa-var-link; } +.@{fa-css-prefix}-cloud:before { content: @fa-var-cloud; } +.@{fa-css-prefix}-flask:before { content: @fa-var-flask; } +.@{fa-css-prefix}-cut:before, +.@{fa-css-prefix}-scissors:before { content: @fa-var-scissors; } +.@{fa-css-prefix}-copy:before, +.@{fa-css-prefix}-files-o:before { content: @fa-var-files-o; } +.@{fa-css-prefix}-paperclip:before { content: @fa-var-paperclip; } +.@{fa-css-prefix}-save:before, +.@{fa-css-prefix}-floppy-o:before { content: @fa-var-floppy-o; } +.@{fa-css-prefix}-square:before { content: @fa-var-square; } +.@{fa-css-prefix}-navicon:before, +.@{fa-css-prefix}-reorder:before, +.@{fa-css-prefix}-bars:before { content: @fa-var-bars; } +.@{fa-css-prefix}-list-ul:before { content: @fa-var-list-ul; } +.@{fa-css-prefix}-list-ol:before { content: @fa-var-list-ol; } +.@{fa-css-prefix}-strikethrough:before { content: @fa-var-strikethrough; } +.@{fa-css-prefix}-underline:before { content: @fa-var-underline; } +.@{fa-css-prefix}-table:before { content: @fa-var-table; } +.@{fa-css-prefix}-magic:before { content: @fa-var-magic; } +.@{fa-css-prefix}-truck:before { content: @fa-var-truck; } +.@{fa-css-prefix}-pinterest:before { content: @fa-var-pinterest; } +.@{fa-css-prefix}-pinterest-square:before { content: @fa-var-pinterest-square; } +.@{fa-css-prefix}-google-plus-square:before { content: @fa-var-google-plus-square; } +.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus; } +.@{fa-css-prefix}-money:before { content: @fa-var-money; } +.@{fa-css-prefix}-caret-down:before { content: @fa-var-caret-down; } +.@{fa-css-prefix}-caret-up:before { content: @fa-var-caret-up; } +.@{fa-css-prefix}-caret-left:before { content: @fa-var-caret-left; } +.@{fa-css-prefix}-caret-right:before { content: @fa-var-caret-right; } +.@{fa-css-prefix}-columns:before { content: @fa-var-columns; } +.@{fa-css-prefix}-unsorted:before, +.@{fa-css-prefix}-sort:before { content: @fa-var-sort; } +.@{fa-css-prefix}-sort-down:before, +.@{fa-css-prefix}-sort-desc:before { content: @fa-var-sort-desc; } +.@{fa-css-prefix}-sort-up:before, +.@{fa-css-prefix}-sort-asc:before { content: @fa-var-sort-asc; } +.@{fa-css-prefix}-envelope:before { content: @fa-var-envelope; } +.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin; } +.@{fa-css-prefix}-rotate-left:before, +.@{fa-css-prefix}-undo:before { content: @fa-var-undo; } +.@{fa-css-prefix}-legal:before, +.@{fa-css-prefix}-gavel:before { content: @fa-var-gavel; } +.@{fa-css-prefix}-dashboard:before, +.@{fa-css-prefix}-tachometer:before { content: @fa-var-tachometer; } +.@{fa-css-prefix}-comment-o:before { content: @fa-var-comment-o; } +.@{fa-css-prefix}-comments-o:before { content: @fa-var-comments-o; } +.@{fa-css-prefix}-flash:before, +.@{fa-css-prefix}-bolt:before { content: @fa-var-bolt; } +.@{fa-css-prefix}-sitemap:before { content: @fa-var-sitemap; } +.@{fa-css-prefix}-umbrella:before { content: @fa-var-umbrella; } +.@{fa-css-prefix}-paste:before, +.@{fa-css-prefix}-clipboard:before { content: @fa-var-clipboard; } +.@{fa-css-prefix}-lightbulb-o:before { content: @fa-var-lightbulb-o; } +.@{fa-css-prefix}-exchange:before { content: @fa-var-exchange; } +.@{fa-css-prefix}-cloud-download:before { content: @fa-var-cloud-download; } +.@{fa-css-prefix}-cloud-upload:before { content: @fa-var-cloud-upload; } +.@{fa-css-prefix}-user-md:before { content: @fa-var-user-md; } +.@{fa-css-prefix}-stethoscope:before { content: @fa-var-stethoscope; } +.@{fa-css-prefix}-suitcase:before { content: @fa-var-suitcase; } +.@{fa-css-prefix}-bell-o:before { content: @fa-var-bell-o; } +.@{fa-css-prefix}-coffee:before { content: @fa-var-coffee; } +.@{fa-css-prefix}-cutlery:before { content: @fa-var-cutlery; } +.@{fa-css-prefix}-file-text-o:before { content: @fa-var-file-text-o; } +.@{fa-css-prefix}-building-o:before { content: @fa-var-building-o; } +.@{fa-css-prefix}-hospital-o:before { content: @fa-var-hospital-o; } +.@{fa-css-prefix}-ambulance:before { content: @fa-var-ambulance; } +.@{fa-css-prefix}-medkit:before { content: @fa-var-medkit; } +.@{fa-css-prefix}-fighter-jet:before { content: @fa-var-fighter-jet; } +.@{fa-css-prefix}-beer:before { content: @fa-var-beer; } +.@{fa-css-prefix}-h-square:before { content: @fa-var-h-square; } +.@{fa-css-prefix}-plus-square:before { content: @fa-var-plus-square; } +.@{fa-css-prefix}-angle-double-left:before { content: @fa-var-angle-double-left; } +.@{fa-css-prefix}-angle-double-right:before { content: @fa-var-angle-double-right; } +.@{fa-css-prefix}-angle-double-up:before { content: @fa-var-angle-double-up; } +.@{fa-css-prefix}-angle-double-down:before { content: @fa-var-angle-double-down; } +.@{fa-css-prefix}-angle-left:before { content: @fa-var-angle-left; } +.@{fa-css-prefix}-angle-right:before { content: @fa-var-angle-right; } +.@{fa-css-prefix}-angle-up:before { content: @fa-var-angle-up; } +.@{fa-css-prefix}-angle-down:before { content: @fa-var-angle-down; } +.@{fa-css-prefix}-desktop:before { content: @fa-var-desktop; } +.@{fa-css-prefix}-laptop:before { content: @fa-var-laptop; } +.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet; } +.@{fa-css-prefix}-mobile-phone:before, +.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile; } +.@{fa-css-prefix}-circle-o:before { content: @fa-var-circle-o; } +.@{fa-css-prefix}-quote-left:before { content: @fa-var-quote-left; } +.@{fa-css-prefix}-quote-right:before { content: @fa-var-quote-right; } +.@{fa-css-prefix}-spinner:before { content: @fa-var-spinner; } +.@{fa-css-prefix}-circle:before { content: @fa-var-circle; } +.@{fa-css-prefix}-mail-reply:before, +.@{fa-css-prefix}-reply:before { content: @fa-var-reply; } +.@{fa-css-prefix}-github-alt:before { content: @fa-var-github-alt; } +.@{fa-css-prefix}-folder-o:before { content: @fa-var-folder-o; } +.@{fa-css-prefix}-folder-open-o:before { content: @fa-var-folder-open-o; } +.@{fa-css-prefix}-smile-o:before { content: @fa-var-smile-o; } +.@{fa-css-prefix}-frown-o:before { content: @fa-var-frown-o; } +.@{fa-css-prefix}-meh-o:before { content: @fa-var-meh-o; } +.@{fa-css-prefix}-gamepad:before { content: @fa-var-gamepad; } +.@{fa-css-prefix}-keyboard-o:before { content: @fa-var-keyboard-o; } +.@{fa-css-prefix}-flag-o:before { content: @fa-var-flag-o; } +.@{fa-css-prefix}-flag-checkered:before { content: @fa-var-flag-checkered; } +.@{fa-css-prefix}-terminal:before { content: @fa-var-terminal; } +.@{fa-css-prefix}-code:before { content: @fa-var-code; } +.@{fa-css-prefix}-mail-reply-all:before, +.@{fa-css-prefix}-reply-all:before { content: @fa-var-reply-all; } +.@{fa-css-prefix}-star-half-empty:before, +.@{fa-css-prefix}-star-half-full:before, +.@{fa-css-prefix}-star-half-o:before { content: @fa-var-star-half-o; } +.@{fa-css-prefix}-location-arrow:before { content: @fa-var-location-arrow; } +.@{fa-css-prefix}-crop:before { content: @fa-var-crop; } +.@{fa-css-prefix}-code-fork:before { content: @fa-var-code-fork; } +.@{fa-css-prefix}-unlink:before, +.@{fa-css-prefix}-chain-broken:before { content: @fa-var-chain-broken; } +.@{fa-css-prefix}-question:before { content: @fa-var-question; } +.@{fa-css-prefix}-info:before { content: @fa-var-info; } +.@{fa-css-prefix}-exclamation:before { content: @fa-var-exclamation; } +.@{fa-css-prefix}-superscript:before { content: @fa-var-superscript; } +.@{fa-css-prefix}-subscript:before { content: @fa-var-subscript; } +.@{fa-css-prefix}-eraser:before { content: @fa-var-eraser; } +.@{fa-css-prefix}-puzzle-piece:before { content: @fa-var-puzzle-piece; } +.@{fa-css-prefix}-microphone:before { content: @fa-var-microphone; } +.@{fa-css-prefix}-microphone-slash:before { content: @fa-var-microphone-slash; } +.@{fa-css-prefix}-shield:before { content: @fa-var-shield; } +.@{fa-css-prefix}-calendar-o:before { content: @fa-var-calendar-o; } +.@{fa-css-prefix}-fire-extinguisher:before { content: @fa-var-fire-extinguisher; } +.@{fa-css-prefix}-rocket:before { content: @fa-var-rocket; } +.@{fa-css-prefix}-maxcdn:before { content: @fa-var-maxcdn; } +.@{fa-css-prefix}-chevron-circle-left:before { content: @fa-var-chevron-circle-left; } +.@{fa-css-prefix}-chevron-circle-right:before { content: @fa-var-chevron-circle-right; } +.@{fa-css-prefix}-chevron-circle-up:before { content: @fa-var-chevron-circle-up; } +.@{fa-css-prefix}-chevron-circle-down:before { content: @fa-var-chevron-circle-down; } +.@{fa-css-prefix}-html5:before { content: @fa-var-html5; } +.@{fa-css-prefix}-css3:before { content: @fa-var-css3; } +.@{fa-css-prefix}-anchor:before { content: @fa-var-anchor; } +.@{fa-css-prefix}-unlock-alt:before { content: @fa-var-unlock-alt; } +.@{fa-css-prefix}-bullseye:before { content: @fa-var-bullseye; } +.@{fa-css-prefix}-ellipsis-h:before { content: @fa-var-ellipsis-h; } +.@{fa-css-prefix}-ellipsis-v:before { content: @fa-var-ellipsis-v; } +.@{fa-css-prefix}-rss-square:before { content: @fa-var-rss-square; } +.@{fa-css-prefix}-play-circle:before { content: @fa-var-play-circle; } +.@{fa-css-prefix}-ticket:before { content: @fa-var-ticket; } +.@{fa-css-prefix}-minus-square:before { content: @fa-var-minus-square; } +.@{fa-css-prefix}-minus-square-o:before { content: @fa-var-minus-square-o; } +.@{fa-css-prefix}-level-up:before { content: @fa-var-level-up; } +.@{fa-css-prefix}-level-down:before { content: @fa-var-level-down; } +.@{fa-css-prefix}-check-square:before { content: @fa-var-check-square; } +.@{fa-css-prefix}-pencil-square:before { content: @fa-var-pencil-square; } +.@{fa-css-prefix}-external-link-square:before { content: @fa-var-external-link-square; } +.@{fa-css-prefix}-share-square:before { content: @fa-var-share-square; } +.@{fa-css-prefix}-compass:before { content: @fa-var-compass; } +.@{fa-css-prefix}-toggle-down:before, +.@{fa-css-prefix}-caret-square-o-down:before { content: @fa-var-caret-square-o-down; } +.@{fa-css-prefix}-toggle-up:before, +.@{fa-css-prefix}-caret-square-o-up:before { content: @fa-var-caret-square-o-up; } +.@{fa-css-prefix}-toggle-right:before, +.@{fa-css-prefix}-caret-square-o-right:before { content: @fa-var-caret-square-o-right; } +.@{fa-css-prefix}-euro:before, +.@{fa-css-prefix}-eur:before { content: @fa-var-eur; } +.@{fa-css-prefix}-gbp:before { content: @fa-var-gbp; } +.@{fa-css-prefix}-dollar:before, +.@{fa-css-prefix}-usd:before { content: @fa-var-usd; } +.@{fa-css-prefix}-rupee:before, +.@{fa-css-prefix}-inr:before { content: @fa-var-inr; } +.@{fa-css-prefix}-cny:before, +.@{fa-css-prefix}-rmb:before, +.@{fa-css-prefix}-yen:before, +.@{fa-css-prefix}-jpy:before { content: @fa-var-jpy; } +.@{fa-css-prefix}-ruble:before, +.@{fa-css-prefix}-rouble:before, +.@{fa-css-prefix}-rub:before { content: @fa-var-rub; } +.@{fa-css-prefix}-won:before, +.@{fa-css-prefix}-krw:before { content: @fa-var-krw; } +.@{fa-css-prefix}-bitcoin:before, +.@{fa-css-prefix}-btc:before { content: @fa-var-btc; } +.@{fa-css-prefix}-file:before { content: @fa-var-file; } +.@{fa-css-prefix}-file-text:before { content: @fa-var-file-text; } +.@{fa-css-prefix}-sort-alpha-asc:before { content: @fa-var-sort-alpha-asc; } +.@{fa-css-prefix}-sort-alpha-desc:before { content: @fa-var-sort-alpha-desc; } +.@{fa-css-prefix}-sort-amount-asc:before { content: @fa-var-sort-amount-asc; } +.@{fa-css-prefix}-sort-amount-desc:before { content: @fa-var-sort-amount-desc; } +.@{fa-css-prefix}-sort-numeric-asc:before { content: @fa-var-sort-numeric-asc; } +.@{fa-css-prefix}-sort-numeric-desc:before { content: @fa-var-sort-numeric-desc; } +.@{fa-css-prefix}-thumbs-up:before { content: @fa-var-thumbs-up; } +.@{fa-css-prefix}-thumbs-down:before { content: @fa-var-thumbs-down; } +.@{fa-css-prefix}-youtube-square:before { content: @fa-var-youtube-square; } +.@{fa-css-prefix}-youtube:before { content: @fa-var-youtube; } +.@{fa-css-prefix}-xing:before { content: @fa-var-xing; } +.@{fa-css-prefix}-xing-square:before { content: @fa-var-xing-square; } +.@{fa-css-prefix}-youtube-play:before { content: @fa-var-youtube-play; } +.@{fa-css-prefix}-dropbox:before { content: @fa-var-dropbox; } +.@{fa-css-prefix}-stack-overflow:before { content: @fa-var-stack-overflow; } +.@{fa-css-prefix}-instagram:before { content: @fa-var-instagram; } +.@{fa-css-prefix}-flickr:before { content: @fa-var-flickr; } +.@{fa-css-prefix}-adn:before { content: @fa-var-adn; } +.@{fa-css-prefix}-bitbucket:before { content: @fa-var-bitbucket; } +.@{fa-css-prefix}-bitbucket-square:before { content: @fa-var-bitbucket-square; } +.@{fa-css-prefix}-tumblr:before { content: @fa-var-tumblr; } +.@{fa-css-prefix}-tumblr-square:before { content: @fa-var-tumblr-square; } +.@{fa-css-prefix}-long-arrow-down:before { content: @fa-var-long-arrow-down; } +.@{fa-css-prefix}-long-arrow-up:before { content: @fa-var-long-arrow-up; } +.@{fa-css-prefix}-long-arrow-left:before { content: @fa-var-long-arrow-left; } +.@{fa-css-prefix}-long-arrow-right:before { content: @fa-var-long-arrow-right; } +.@{fa-css-prefix}-apple:before { content: @fa-var-apple; } +.@{fa-css-prefix}-windows:before { content: @fa-var-windows; } +.@{fa-css-prefix}-android:before { content: @fa-var-android; } +.@{fa-css-prefix}-linux:before { content: @fa-var-linux; } +.@{fa-css-prefix}-dribbble:before { content: @fa-var-dribbble; } +.@{fa-css-prefix}-skype:before { content: @fa-var-skype; } +.@{fa-css-prefix}-foursquare:before { content: @fa-var-foursquare; } +.@{fa-css-prefix}-trello:before { content: @fa-var-trello; } +.@{fa-css-prefix}-female:before { content: @fa-var-female; } +.@{fa-css-prefix}-male:before { content: @fa-var-male; } +.@{fa-css-prefix}-gittip:before, +.@{fa-css-prefix}-gratipay:before { content: @fa-var-gratipay; } +.@{fa-css-prefix}-sun-o:before { content: @fa-var-sun-o; } +.@{fa-css-prefix}-moon-o:before { content: @fa-var-moon-o; } +.@{fa-css-prefix}-archive:before { content: @fa-var-archive; } +.@{fa-css-prefix}-bug:before { content: @fa-var-bug; } +.@{fa-css-prefix}-vk:before { content: @fa-var-vk; } +.@{fa-css-prefix}-weibo:before { content: @fa-var-weibo; } +.@{fa-css-prefix}-renren:before { content: @fa-var-renren; } +.@{fa-css-prefix}-pagelines:before { content: @fa-var-pagelines; } +.@{fa-css-prefix}-stack-exchange:before { content: @fa-var-stack-exchange; } +.@{fa-css-prefix}-arrow-circle-o-right:before { content: @fa-var-arrow-circle-o-right; } +.@{fa-css-prefix}-arrow-circle-o-left:before { content: @fa-var-arrow-circle-o-left; } +.@{fa-css-prefix}-toggle-left:before, +.@{fa-css-prefix}-caret-square-o-left:before { content: @fa-var-caret-square-o-left; } +.@{fa-css-prefix}-dot-circle-o:before { content: @fa-var-dot-circle-o; } +.@{fa-css-prefix}-wheelchair:before { content: @fa-var-wheelchair; } +.@{fa-css-prefix}-vimeo-square:before { content: @fa-var-vimeo-square; } +.@{fa-css-prefix}-turkish-lira:before, +.@{fa-css-prefix}-try:before { content: @fa-var-try; } +.@{fa-css-prefix}-plus-square-o:before { content: @fa-var-plus-square-o; } +.@{fa-css-prefix}-space-shuttle:before { content: @fa-var-space-shuttle; } +.@{fa-css-prefix}-slack:before { content: @fa-var-slack; } +.@{fa-css-prefix}-envelope-square:before { content: @fa-var-envelope-square; } +.@{fa-css-prefix}-wordpress:before { content: @fa-var-wordpress; } +.@{fa-css-prefix}-openid:before { content: @fa-var-openid; } +.@{fa-css-prefix}-institution:before, +.@{fa-css-prefix}-bank:before, +.@{fa-css-prefix}-university:before { content: @fa-var-university; } +.@{fa-css-prefix}-mortar-board:before, +.@{fa-css-prefix}-graduation-cap:before { content: @fa-var-graduation-cap; } +.@{fa-css-prefix}-yahoo:before { content: @fa-var-yahoo; } +.@{fa-css-prefix}-google:before { content: @fa-var-google; } +.@{fa-css-prefix}-reddit:before { content: @fa-var-reddit; } +.@{fa-css-prefix}-reddit-square:before { content: @fa-var-reddit-square; } +.@{fa-css-prefix}-stumbleupon-circle:before { content: @fa-var-stumbleupon-circle; } +.@{fa-css-prefix}-stumbleupon:before { content: @fa-var-stumbleupon; } +.@{fa-css-prefix}-delicious:before { content: @fa-var-delicious; } +.@{fa-css-prefix}-digg:before { content: @fa-var-digg; } +.@{fa-css-prefix}-pied-piper-pp:before { content: @fa-var-pied-piper-pp; } +.@{fa-css-prefix}-pied-piper-alt:before { content: @fa-var-pied-piper-alt; } +.@{fa-css-prefix}-drupal:before { content: @fa-var-drupal; } +.@{fa-css-prefix}-joomla:before { content: @fa-var-joomla; } +.@{fa-css-prefix}-language:before { content: @fa-var-language; } +.@{fa-css-prefix}-fax:before { content: @fa-var-fax; } +.@{fa-css-prefix}-building:before { content: @fa-var-building; } +.@{fa-css-prefix}-child:before { content: @fa-var-child; } +.@{fa-css-prefix}-paw:before { content: @fa-var-paw; } +.@{fa-css-prefix}-spoon:before { content: @fa-var-spoon; } +.@{fa-css-prefix}-cube:before { content: @fa-var-cube; } +.@{fa-css-prefix}-cubes:before { content: @fa-var-cubes; } +.@{fa-css-prefix}-behance:before { content: @fa-var-behance; } +.@{fa-css-prefix}-behance-square:before { content: @fa-var-behance-square; } +.@{fa-css-prefix}-steam:before { content: @fa-var-steam; } +.@{fa-css-prefix}-steam-square:before { content: @fa-var-steam-square; } +.@{fa-css-prefix}-recycle:before { content: @fa-var-recycle; } +.@{fa-css-prefix}-automobile:before, +.@{fa-css-prefix}-car:before { content: @fa-var-car; } +.@{fa-css-prefix}-cab:before, +.@{fa-css-prefix}-taxi:before { content: @fa-var-taxi; } +.@{fa-css-prefix}-tree:before { content: @fa-var-tree; } +.@{fa-css-prefix}-spotify:before { content: @fa-var-spotify; } +.@{fa-css-prefix}-deviantart:before { content: @fa-var-deviantart; } +.@{fa-css-prefix}-soundcloud:before { content: @fa-var-soundcloud; } +.@{fa-css-prefix}-database:before { content: @fa-var-database; } +.@{fa-css-prefix}-file-pdf-o:before { content: @fa-var-file-pdf-o; } +.@{fa-css-prefix}-file-word-o:before { content: @fa-var-file-word-o; } +.@{fa-css-prefix}-file-excel-o:before { content: @fa-var-file-excel-o; } +.@{fa-css-prefix}-file-powerpoint-o:before { content: @fa-var-file-powerpoint-o; } +.@{fa-css-prefix}-file-photo-o:before, +.@{fa-css-prefix}-file-picture-o:before, +.@{fa-css-prefix}-file-image-o:before { content: @fa-var-file-image-o; } +.@{fa-css-prefix}-file-zip-o:before, +.@{fa-css-prefix}-file-archive-o:before { content: @fa-var-file-archive-o; } +.@{fa-css-prefix}-file-sound-o:before, +.@{fa-css-prefix}-file-audio-o:before { content: @fa-var-file-audio-o; } +.@{fa-css-prefix}-file-movie-o:before, +.@{fa-css-prefix}-file-video-o:before { content: @fa-var-file-video-o; } +.@{fa-css-prefix}-file-code-o:before { content: @fa-var-file-code-o; } +.@{fa-css-prefix}-vine:before { content: @fa-var-vine; } +.@{fa-css-prefix}-codepen:before { content: @fa-var-codepen; } +.@{fa-css-prefix}-jsfiddle:before { content: @fa-var-jsfiddle; } +.@{fa-css-prefix}-life-bouy:before, +.@{fa-css-prefix}-life-buoy:before, +.@{fa-css-prefix}-life-saver:before, +.@{fa-css-prefix}-support:before, +.@{fa-css-prefix}-life-ring:before { content: @fa-var-life-ring; } +.@{fa-css-prefix}-circle-o-notch:before { content: @fa-var-circle-o-notch; } +.@{fa-css-prefix}-ra:before, +.@{fa-css-prefix}-resistance:before, +.@{fa-css-prefix}-rebel:before { content: @fa-var-rebel; } +.@{fa-css-prefix}-ge:before, +.@{fa-css-prefix}-empire:before { content: @fa-var-empire; } +.@{fa-css-prefix}-git-square:before { content: @fa-var-git-square; } +.@{fa-css-prefix}-git:before { content: @fa-var-git; } +.@{fa-css-prefix}-y-combinator-square:before, +.@{fa-css-prefix}-yc-square:before, +.@{fa-css-prefix}-hacker-news:before { content: @fa-var-hacker-news; } +.@{fa-css-prefix}-tencent-weibo:before { content: @fa-var-tencent-weibo; } +.@{fa-css-prefix}-qq:before { content: @fa-var-qq; } +.@{fa-css-prefix}-wechat:before, +.@{fa-css-prefix}-weixin:before { content: @fa-var-weixin; } +.@{fa-css-prefix}-send:before, +.@{fa-css-prefix}-paper-plane:before { content: @fa-var-paper-plane; } +.@{fa-css-prefix}-send-o:before, +.@{fa-css-prefix}-paper-plane-o:before { content: @fa-var-paper-plane-o; } +.@{fa-css-prefix}-history:before { content: @fa-var-history; } +.@{fa-css-prefix}-circle-thin:before { content: @fa-var-circle-thin; } +.@{fa-css-prefix}-header:before { content: @fa-var-header; } +.@{fa-css-prefix}-paragraph:before { content: @fa-var-paragraph; } +.@{fa-css-prefix}-sliders:before { content: @fa-var-sliders; } +.@{fa-css-prefix}-share-alt:before { content: @fa-var-share-alt; } +.@{fa-css-prefix}-share-alt-square:before { content: @fa-var-share-alt-square; } +.@{fa-css-prefix}-bomb:before { content: @fa-var-bomb; } +.@{fa-css-prefix}-soccer-ball-o:before, +.@{fa-css-prefix}-futbol-o:before { content: @fa-var-futbol-o; } +.@{fa-css-prefix}-tty:before { content: @fa-var-tty; } +.@{fa-css-prefix}-binoculars:before { content: @fa-var-binoculars; } +.@{fa-css-prefix}-plug:before { content: @fa-var-plug; } +.@{fa-css-prefix}-slideshare:before { content: @fa-var-slideshare; } +.@{fa-css-prefix}-twitch:before { content: @fa-var-twitch; } +.@{fa-css-prefix}-yelp:before { content: @fa-var-yelp; } +.@{fa-css-prefix}-newspaper-o:before { content: @fa-var-newspaper-o; } +.@{fa-css-prefix}-wifi:before { content: @fa-var-wifi; } +.@{fa-css-prefix}-calculator:before { content: @fa-var-calculator; } +.@{fa-css-prefix}-paypal:before { content: @fa-var-paypal; } +.@{fa-css-prefix}-google-wallet:before { content: @fa-var-google-wallet; } +.@{fa-css-prefix}-cc-visa:before { content: @fa-var-cc-visa; } +.@{fa-css-prefix}-cc-mastercard:before { content: @fa-var-cc-mastercard; } +.@{fa-css-prefix}-cc-discover:before { content: @fa-var-cc-discover; } +.@{fa-css-prefix}-cc-amex:before { content: @fa-var-cc-amex; } +.@{fa-css-prefix}-cc-paypal:before { content: @fa-var-cc-paypal; } +.@{fa-css-prefix}-cc-stripe:before { content: @fa-var-cc-stripe; } +.@{fa-css-prefix}-bell-slash:before { content: @fa-var-bell-slash; } +.@{fa-css-prefix}-bell-slash-o:before { content: @fa-var-bell-slash-o; } +.@{fa-css-prefix}-trash:before { content: @fa-var-trash; } +.@{fa-css-prefix}-copyright:before { content: @fa-var-copyright; } +.@{fa-css-prefix}-at:before { content: @fa-var-at; } +.@{fa-css-prefix}-eyedropper:before { content: @fa-var-eyedropper; } +.@{fa-css-prefix}-paint-brush:before { content: @fa-var-paint-brush; } +.@{fa-css-prefix}-birthday-cake:before { content: @fa-var-birthday-cake; } +.@{fa-css-prefix}-area-chart:before { content: @fa-var-area-chart; } +.@{fa-css-prefix}-pie-chart:before { content: @fa-var-pie-chart; } +.@{fa-css-prefix}-line-chart:before { content: @fa-var-line-chart; } +.@{fa-css-prefix}-lastfm:before { content: @fa-var-lastfm; } +.@{fa-css-prefix}-lastfm-square:before { content: @fa-var-lastfm-square; } +.@{fa-css-prefix}-toggle-off:before { content: @fa-var-toggle-off; } +.@{fa-css-prefix}-toggle-on:before { content: @fa-var-toggle-on; } +.@{fa-css-prefix}-bicycle:before { content: @fa-var-bicycle; } +.@{fa-css-prefix}-bus:before { content: @fa-var-bus; } +.@{fa-css-prefix}-ioxhost:before { content: @fa-var-ioxhost; } +.@{fa-css-prefix}-angellist:before { content: @fa-var-angellist; } +.@{fa-css-prefix}-cc:before { content: @fa-var-cc; } +.@{fa-css-prefix}-shekel:before, +.@{fa-css-prefix}-sheqel:before, +.@{fa-css-prefix}-ils:before { content: @fa-var-ils; } +.@{fa-css-prefix}-meanpath:before { content: @fa-var-meanpath; } +.@{fa-css-prefix}-buysellads:before { content: @fa-var-buysellads; } +.@{fa-css-prefix}-connectdevelop:before { content: @fa-var-connectdevelop; } +.@{fa-css-prefix}-dashcube:before { content: @fa-var-dashcube; } +.@{fa-css-prefix}-forumbee:before { content: @fa-var-forumbee; } +.@{fa-css-prefix}-leanpub:before { content: @fa-var-leanpub; } +.@{fa-css-prefix}-sellsy:before { content: @fa-var-sellsy; } +.@{fa-css-prefix}-shirtsinbulk:before { content: @fa-var-shirtsinbulk; } +.@{fa-css-prefix}-simplybuilt:before { content: @fa-var-simplybuilt; } +.@{fa-css-prefix}-skyatlas:before { content: @fa-var-skyatlas; } +.@{fa-css-prefix}-cart-plus:before { content: @fa-var-cart-plus; } +.@{fa-css-prefix}-cart-arrow-down:before { content: @fa-var-cart-arrow-down; } +.@{fa-css-prefix}-diamond:before { content: @fa-var-diamond; } +.@{fa-css-prefix}-ship:before { content: @fa-var-ship; } +.@{fa-css-prefix}-user-secret:before { content: @fa-var-user-secret; } +.@{fa-css-prefix}-motorcycle:before { content: @fa-var-motorcycle; } +.@{fa-css-prefix}-street-view:before { content: @fa-var-street-view; } +.@{fa-css-prefix}-heartbeat:before { content: @fa-var-heartbeat; } +.@{fa-css-prefix}-venus:before { content: @fa-var-venus; } +.@{fa-css-prefix}-mars:before { content: @fa-var-mars; } +.@{fa-css-prefix}-mercury:before { content: @fa-var-mercury; } +.@{fa-css-prefix}-intersex:before, +.@{fa-css-prefix}-transgender:before { content: @fa-var-transgender; } +.@{fa-css-prefix}-transgender-alt:before { content: @fa-var-transgender-alt; } +.@{fa-css-prefix}-venus-double:before { content: @fa-var-venus-double; } +.@{fa-css-prefix}-mars-double:before { content: @fa-var-mars-double; } +.@{fa-css-prefix}-venus-mars:before { content: @fa-var-venus-mars; } +.@{fa-css-prefix}-mars-stroke:before { content: @fa-var-mars-stroke; } +.@{fa-css-prefix}-mars-stroke-v:before { content: @fa-var-mars-stroke-v; } +.@{fa-css-prefix}-mars-stroke-h:before { content: @fa-var-mars-stroke-h; } +.@{fa-css-prefix}-neuter:before { content: @fa-var-neuter; } +.@{fa-css-prefix}-genderless:before { content: @fa-var-genderless; } +.@{fa-css-prefix}-facebook-official:before { content: @fa-var-facebook-official; } +.@{fa-css-prefix}-pinterest-p:before { content: @fa-var-pinterest-p; } +.@{fa-css-prefix}-whatsapp:before { content: @fa-var-whatsapp; } +.@{fa-css-prefix}-server:before { content: @fa-var-server; } +.@{fa-css-prefix}-user-plus:before { content: @fa-var-user-plus; } +.@{fa-css-prefix}-user-times:before { content: @fa-var-user-times; } +.@{fa-css-prefix}-hotel:before, +.@{fa-css-prefix}-bed:before { content: @fa-var-bed; } +.@{fa-css-prefix}-viacoin:before { content: @fa-var-viacoin; } +.@{fa-css-prefix}-train:before { content: @fa-var-train; } +.@{fa-css-prefix}-subway:before { content: @fa-var-subway; } +.@{fa-css-prefix}-medium:before { content: @fa-var-medium; } +.@{fa-css-prefix}-yc:before, +.@{fa-css-prefix}-y-combinator:before { content: @fa-var-y-combinator; } +.@{fa-css-prefix}-optin-monster:before { content: @fa-var-optin-monster; } +.@{fa-css-prefix}-opencart:before { content: @fa-var-opencart; } +.@{fa-css-prefix}-expeditedssl:before { content: @fa-var-expeditedssl; } +.@{fa-css-prefix}-battery-4:before, +.@{fa-css-prefix}-battery:before, +.@{fa-css-prefix}-battery-full:before { content: @fa-var-battery-full; } +.@{fa-css-prefix}-battery-3:before, +.@{fa-css-prefix}-battery-three-quarters:before { content: @fa-var-battery-three-quarters; } +.@{fa-css-prefix}-battery-2:before, +.@{fa-css-prefix}-battery-half:before { content: @fa-var-battery-half; } +.@{fa-css-prefix}-battery-1:before, +.@{fa-css-prefix}-battery-quarter:before { content: @fa-var-battery-quarter; } +.@{fa-css-prefix}-battery-0:before, +.@{fa-css-prefix}-battery-empty:before { content: @fa-var-battery-empty; } +.@{fa-css-prefix}-mouse-pointer:before { content: @fa-var-mouse-pointer; } +.@{fa-css-prefix}-i-cursor:before { content: @fa-var-i-cursor; } +.@{fa-css-prefix}-object-group:before { content: @fa-var-object-group; } +.@{fa-css-prefix}-object-ungroup:before { content: @fa-var-object-ungroup; } +.@{fa-css-prefix}-sticky-note:before { content: @fa-var-sticky-note; } +.@{fa-css-prefix}-sticky-note-o:before { content: @fa-var-sticky-note-o; } +.@{fa-css-prefix}-cc-jcb:before { content: @fa-var-cc-jcb; } +.@{fa-css-prefix}-cc-diners-club:before { content: @fa-var-cc-diners-club; } +.@{fa-css-prefix}-clone:before { content: @fa-var-clone; } +.@{fa-css-prefix}-balance-scale:before { content: @fa-var-balance-scale; } +.@{fa-css-prefix}-hourglass-o:before { content: @fa-var-hourglass-o; } +.@{fa-css-prefix}-hourglass-1:before, +.@{fa-css-prefix}-hourglass-start:before { content: @fa-var-hourglass-start; } +.@{fa-css-prefix}-hourglass-2:before, +.@{fa-css-prefix}-hourglass-half:before { content: @fa-var-hourglass-half; } +.@{fa-css-prefix}-hourglass-3:before, +.@{fa-css-prefix}-hourglass-end:before { content: @fa-var-hourglass-end; } +.@{fa-css-prefix}-hourglass:before { content: @fa-var-hourglass; } +.@{fa-css-prefix}-hand-grab-o:before, +.@{fa-css-prefix}-hand-rock-o:before { content: @fa-var-hand-rock-o; } +.@{fa-css-prefix}-hand-stop-o:before, +.@{fa-css-prefix}-hand-paper-o:before { content: @fa-var-hand-paper-o; } +.@{fa-css-prefix}-hand-scissors-o:before { content: @fa-var-hand-scissors-o; } +.@{fa-css-prefix}-hand-lizard-o:before { content: @fa-var-hand-lizard-o; } +.@{fa-css-prefix}-hand-spock-o:before { content: @fa-var-hand-spock-o; } +.@{fa-css-prefix}-hand-pointer-o:before { content: @fa-var-hand-pointer-o; } +.@{fa-css-prefix}-hand-peace-o:before { content: @fa-var-hand-peace-o; } +.@{fa-css-prefix}-trademark:before { content: @fa-var-trademark; } +.@{fa-css-prefix}-registered:before { content: @fa-var-registered; } +.@{fa-css-prefix}-creative-commons:before { content: @fa-var-creative-commons; } +.@{fa-css-prefix}-gg:before { content: @fa-var-gg; } +.@{fa-css-prefix}-gg-circle:before { content: @fa-var-gg-circle; } +.@{fa-css-prefix}-tripadvisor:before { content: @fa-var-tripadvisor; } +.@{fa-css-prefix}-odnoklassniki:before { content: @fa-var-odnoklassniki; } +.@{fa-css-prefix}-odnoklassniki-square:before { content: @fa-var-odnoklassniki-square; } +.@{fa-css-prefix}-get-pocket:before { content: @fa-var-get-pocket; } +.@{fa-css-prefix}-wikipedia-w:before { content: @fa-var-wikipedia-w; } +.@{fa-css-prefix}-safari:before { content: @fa-var-safari; } +.@{fa-css-prefix}-chrome:before { content: @fa-var-chrome; } +.@{fa-css-prefix}-firefox:before { content: @fa-var-firefox; } +.@{fa-css-prefix}-opera:before { content: @fa-var-opera; } +.@{fa-css-prefix}-internet-explorer:before { content: @fa-var-internet-explorer; } +.@{fa-css-prefix}-tv:before, +.@{fa-css-prefix}-television:before { content: @fa-var-television; } +.@{fa-css-prefix}-contao:before { content: @fa-var-contao; } +.@{fa-css-prefix}-500px:before { content: @fa-var-500px; } +.@{fa-css-prefix}-amazon:before { content: @fa-var-amazon; } +.@{fa-css-prefix}-calendar-plus-o:before { content: @fa-var-calendar-plus-o; } +.@{fa-css-prefix}-calendar-minus-o:before { content: @fa-var-calendar-minus-o; } +.@{fa-css-prefix}-calendar-times-o:before { content: @fa-var-calendar-times-o; } +.@{fa-css-prefix}-calendar-check-o:before { content: @fa-var-calendar-check-o; } +.@{fa-css-prefix}-industry:before { content: @fa-var-industry; } +.@{fa-css-prefix}-map-pin:before { content: @fa-var-map-pin; } +.@{fa-css-prefix}-map-signs:before { content: @fa-var-map-signs; } +.@{fa-css-prefix}-map-o:before { content: @fa-var-map-o; } +.@{fa-css-prefix}-map:before { content: @fa-var-map; } +.@{fa-css-prefix}-commenting:before { content: @fa-var-commenting; } +.@{fa-css-prefix}-commenting-o:before { content: @fa-var-commenting-o; } +.@{fa-css-prefix}-houzz:before { content: @fa-var-houzz; } +.@{fa-css-prefix}-vimeo:before { content: @fa-var-vimeo; } +.@{fa-css-prefix}-black-tie:before { content: @fa-var-black-tie; } +.@{fa-css-prefix}-fonticons:before { content: @fa-var-fonticons; } +.@{fa-css-prefix}-reddit-alien:before { content: @fa-var-reddit-alien; } +.@{fa-css-prefix}-edge:before { content: @fa-var-edge; } +.@{fa-css-prefix}-credit-card-alt:before { content: @fa-var-credit-card-alt; } +.@{fa-css-prefix}-codiepie:before { content: @fa-var-codiepie; } +.@{fa-css-prefix}-modx:before { content: @fa-var-modx; } +.@{fa-css-prefix}-fort-awesome:before { content: @fa-var-fort-awesome; } +.@{fa-css-prefix}-usb:before { content: @fa-var-usb; } +.@{fa-css-prefix}-product-hunt:before { content: @fa-var-product-hunt; } +.@{fa-css-prefix}-mixcloud:before { content: @fa-var-mixcloud; } +.@{fa-css-prefix}-scribd:before { content: @fa-var-scribd; } +.@{fa-css-prefix}-pause-circle:before { content: @fa-var-pause-circle; } +.@{fa-css-prefix}-pause-circle-o:before { content: @fa-var-pause-circle-o; } +.@{fa-css-prefix}-stop-circle:before { content: @fa-var-stop-circle; } +.@{fa-css-prefix}-stop-circle-o:before { content: @fa-var-stop-circle-o; } +.@{fa-css-prefix}-shopping-bag:before { content: @fa-var-shopping-bag; } +.@{fa-css-prefix}-shopping-basket:before { content: @fa-var-shopping-basket; } +.@{fa-css-prefix}-hashtag:before { content: @fa-var-hashtag; } +.@{fa-css-prefix}-bluetooth:before { content: @fa-var-bluetooth; } +.@{fa-css-prefix}-bluetooth-b:before { content: @fa-var-bluetooth-b; } +.@{fa-css-prefix}-percent:before { content: @fa-var-percent; } +.@{fa-css-prefix}-gitlab:before { content: @fa-var-gitlab; } +.@{fa-css-prefix}-wpbeginner:before { content: @fa-var-wpbeginner; } +.@{fa-css-prefix}-wpforms:before { content: @fa-var-wpforms; } +.@{fa-css-prefix}-envira:before { content: @fa-var-envira; } +.@{fa-css-prefix}-universal-access:before { content: @fa-var-universal-access; } +.@{fa-css-prefix}-wheelchair-alt:before { content: @fa-var-wheelchair-alt; } +.@{fa-css-prefix}-question-circle-o:before { content: @fa-var-question-circle-o; } +.@{fa-css-prefix}-blind:before { content: @fa-var-blind; } +.@{fa-css-prefix}-audio-description:before { content: @fa-var-audio-description; } +.@{fa-css-prefix}-volume-control-phone:before { content: @fa-var-volume-control-phone; } +.@{fa-css-prefix}-braille:before { content: @fa-var-braille; } +.@{fa-css-prefix}-assistive-listening-systems:before { content: @fa-var-assistive-listening-systems; } +.@{fa-css-prefix}-asl-interpreting:before, +.@{fa-css-prefix}-american-sign-language-interpreting:before { content: @fa-var-american-sign-language-interpreting; } +.@{fa-css-prefix}-deafness:before, +.@{fa-css-prefix}-hard-of-hearing:before, +.@{fa-css-prefix}-deaf:before { content: @fa-var-deaf; } +.@{fa-css-prefix}-glide:before { content: @fa-var-glide; } +.@{fa-css-prefix}-glide-g:before { content: @fa-var-glide-g; } +.@{fa-css-prefix}-signing:before, +.@{fa-css-prefix}-sign-language:before { content: @fa-var-sign-language; } +.@{fa-css-prefix}-low-vision:before { content: @fa-var-low-vision; } +.@{fa-css-prefix}-viadeo:before { content: @fa-var-viadeo; } +.@{fa-css-prefix}-viadeo-square:before { content: @fa-var-viadeo-square; } +.@{fa-css-prefix}-snapchat:before { content: @fa-var-snapchat; } +.@{fa-css-prefix}-snapchat-ghost:before { content: @fa-var-snapchat-ghost; } +.@{fa-css-prefix}-snapchat-square:before { content: @fa-var-snapchat-square; } +.@{fa-css-prefix}-pied-piper:before { content: @fa-var-pied-piper; } +.@{fa-css-prefix}-first-order:before { content: @fa-var-first-order; } +.@{fa-css-prefix}-yoast:before { content: @fa-var-yoast; } +.@{fa-css-prefix}-themeisle:before { content: @fa-var-themeisle; } +.@{fa-css-prefix}-google-plus-circle:before, +.@{fa-css-prefix}-google-plus-official:before { content: @fa-var-google-plus-official; } +.@{fa-css-prefix}-fa:before, +.@{fa-css-prefix}-font-awesome:before { content: @fa-var-font-awesome; } +.@{fa-css-prefix}-handshake-o:before { content: @fa-var-handshake-o; } +.@{fa-css-prefix}-envelope-open:before { content: @fa-var-envelope-open; } +.@{fa-css-prefix}-envelope-open-o:before { content: @fa-var-envelope-open-o; } +.@{fa-css-prefix}-linode:before { content: @fa-var-linode; } +.@{fa-css-prefix}-address-book:before { content: @fa-var-address-book; } +.@{fa-css-prefix}-address-book-o:before { content: @fa-var-address-book-o; } +.@{fa-css-prefix}-vcard:before, +.@{fa-css-prefix}-address-card:before { content: @fa-var-address-card; } +.@{fa-css-prefix}-vcard-o:before, +.@{fa-css-prefix}-address-card-o:before { content: @fa-var-address-card-o; } +.@{fa-css-prefix}-user-circle:before { content: @fa-var-user-circle; } +.@{fa-css-prefix}-user-circle-o:before { content: @fa-var-user-circle-o; } +.@{fa-css-prefix}-user-o:before { content: @fa-var-user-o; } +.@{fa-css-prefix}-id-badge:before { content: @fa-var-id-badge; } +.@{fa-css-prefix}-drivers-license:before, +.@{fa-css-prefix}-id-card:before { content: @fa-var-id-card; } +.@{fa-css-prefix}-drivers-license-o:before, +.@{fa-css-prefix}-id-card-o:before { content: @fa-var-id-card-o; } +.@{fa-css-prefix}-quora:before { content: @fa-var-quora; } +.@{fa-css-prefix}-free-code-camp:before { content: @fa-var-free-code-camp; } +.@{fa-css-prefix}-telegram:before { content: @fa-var-telegram; } +.@{fa-css-prefix}-thermometer-4:before, +.@{fa-css-prefix}-thermometer:before, +.@{fa-css-prefix}-thermometer-full:before { content: @fa-var-thermometer-full; } +.@{fa-css-prefix}-thermometer-3:before, +.@{fa-css-prefix}-thermometer-three-quarters:before { content: @fa-var-thermometer-three-quarters; } +.@{fa-css-prefix}-thermometer-2:before, +.@{fa-css-prefix}-thermometer-half:before { content: @fa-var-thermometer-half; } +.@{fa-css-prefix}-thermometer-1:before, +.@{fa-css-prefix}-thermometer-quarter:before { content: @fa-var-thermometer-quarter; } +.@{fa-css-prefix}-thermometer-0:before, +.@{fa-css-prefix}-thermometer-empty:before { content: @fa-var-thermometer-empty; } +.@{fa-css-prefix}-shower:before { content: @fa-var-shower; } +.@{fa-css-prefix}-bathtub:before, +.@{fa-css-prefix}-s15:before, +.@{fa-css-prefix}-bath:before { content: @fa-var-bath; } +.@{fa-css-prefix}-podcast:before { content: @fa-var-podcast; } +.@{fa-css-prefix}-window-maximize:before { content: @fa-var-window-maximize; } +.@{fa-css-prefix}-window-minimize:before { content: @fa-var-window-minimize; } +.@{fa-css-prefix}-window-restore:before { content: @fa-var-window-restore; } +.@{fa-css-prefix}-times-rectangle:before, +.@{fa-css-prefix}-window-close:before { content: @fa-var-window-close; } +.@{fa-css-prefix}-times-rectangle-o:before, +.@{fa-css-prefix}-window-close-o:before { content: @fa-var-window-close-o; } +.@{fa-css-prefix}-bandcamp:before { content: @fa-var-bandcamp; } +.@{fa-css-prefix}-grav:before { content: @fa-var-grav; } +.@{fa-css-prefix}-etsy:before { content: @fa-var-etsy; } +.@{fa-css-prefix}-imdb:before { content: @fa-var-imdb; } +.@{fa-css-prefix}-ravelry:before { content: @fa-var-ravelry; } +.@{fa-css-prefix}-eercast:before { content: @fa-var-eercast; } +.@{fa-css-prefix}-microchip:before { content: @fa-var-microchip; } +.@{fa-css-prefix}-snowflake-o:before { content: @fa-var-snowflake-o; } +.@{fa-css-prefix}-superpowers:before { content: @fa-var-superpowers; } +.@{fa-css-prefix}-wpexplorer:before { content: @fa-var-wpexplorer; } +.@{fa-css-prefix}-meetup:before { content: @fa-var-meetup; } diff --git a/modules/fontawesome/larger.less b/modules/fontawesome/larger.less new file mode 100644 index 0000000..c9d6467 --- /dev/null +++ b/modules/fontawesome/larger.less @@ -0,0 +1,13 @@ +// Icon Sizes +// ------------------------- + +/* makes the font 33% larger relative to the icon container */ +.@{fa-css-prefix}-lg { + font-size: (4em / 3); + line-height: (3em / 4); + vertical-align: -15%; +} +.@{fa-css-prefix}-2x { font-size: 2em; } +.@{fa-css-prefix}-3x { font-size: 3em; } +.@{fa-css-prefix}-4x { font-size: 4em; } +.@{fa-css-prefix}-5x { font-size: 5em; } diff --git a/modules/fontawesome/list.less b/modules/fontawesome/list.less new file mode 100644 index 0000000..0b44038 --- /dev/null +++ b/modules/fontawesome/list.less @@ -0,0 +1,19 @@ +// List Icons +// ------------------------- + +.@{fa-css-prefix}-ul { + padding-left: 0; + margin-left: @fa-li-width; + list-style-type: none; + > li { position: relative; } +} +.@{fa-css-prefix}-li { + position: absolute; + left: -@fa-li-width; + width: @fa-li-width; + top: (2em / 14); + text-align: center; + &.@{fa-css-prefix}-lg { + left: (-@fa-li-width + (4em / 14)); + } +} diff --git a/modules/fontawesome/mixins.less b/modules/fontawesome/mixins.less new file mode 100644 index 0000000..beef231 --- /dev/null +++ b/modules/fontawesome/mixins.less @@ -0,0 +1,60 @@ +// Mixins +// -------------------------- + +.fa-icon() { + display: inline-block; + font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration + font-size: inherit; // can't have font-size inherit on line above, so need to override + text-rendering: auto; // optimizelegibility throws things off #1094 + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + +} + +.fa-icon-rotate(@degrees, @rotation) { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; + -webkit-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); + transform: rotate(@degrees); +} + +.fa-icon-flip(@horiz, @vert, @rotation) { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; + -webkit-transform: scale(@horiz, @vert); + -ms-transform: scale(@horiz, @vert); + transform: scale(@horiz, @vert); +} + + +// Only display content to screen readers. A la Bootstrap 4. +// +// See: http://a11yproject.com/posts/how-to-hide-content/ + +.sr-only() { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0,0,0,0); + border: 0; +} + +// Use in conjunction with .sr-only to only display content when it's focused. +// +// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 +// +// Credit: HTML5 Boilerplate + +.sr-only-focusable() { + &:active, + &:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; + } +} diff --git a/modules/fontawesome/path.less b/modules/fontawesome/path.less new file mode 100644 index 0000000..835be41 --- /dev/null +++ b/modules/fontawesome/path.less @@ -0,0 +1,15 @@ +/* FONT PATH + * -------------------------- */ + +@font-face { + font-family: 'FontAwesome'; + src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); + src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), + url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), + url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), + url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), + url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); + // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts + font-weight: normal; + font-style: normal; +} diff --git a/modules/fontawesome/rotated-flipped.less b/modules/fontawesome/rotated-flipped.less new file mode 100644 index 0000000..f6ba814 --- /dev/null +++ b/modules/fontawesome/rotated-flipped.less @@ -0,0 +1,20 @@ +// Rotated & Flipped Icons +// ------------------------- + +.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } +.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } +.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } + +.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } +.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } + +// Hook for IE8-9 +// ------------------------- + +:root .@{fa-css-prefix}-rotate-90, +:root .@{fa-css-prefix}-rotate-180, +:root .@{fa-css-prefix}-rotate-270, +:root .@{fa-css-prefix}-flip-horizontal, +:root .@{fa-css-prefix}-flip-vertical { + filter: none; +} diff --git a/modules/fontawesome/screen-reader.less b/modules/fontawesome/screen-reader.less new file mode 100644 index 0000000..11c1881 --- /dev/null +++ b/modules/fontawesome/screen-reader.less @@ -0,0 +1,5 @@ +// Screen Readers +// ------------------------- + +.sr-only { .sr-only(); } +.sr-only-focusable { .sr-only-focusable(); } diff --git a/modules/fontawesome/stacked.less b/modules/fontawesome/stacked.less new file mode 100644 index 0000000..fc53fb0 --- /dev/null +++ b/modules/fontawesome/stacked.less @@ -0,0 +1,20 @@ +// Stacked Icons +// ------------------------- + +.@{fa-css-prefix}-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.@{fa-css-prefix}-stack-1x { line-height: inherit; } +.@{fa-css-prefix}-stack-2x { font-size: 2em; } +.@{fa-css-prefix}-inverse { color: @fa-inverse; } diff --git a/modules/fontawesome/variables.less b/modules/fontawesome/variables.less new file mode 100644 index 0000000..f73e844 --- /dev/null +++ b/modules/fontawesome/variables.less @@ -0,0 +1,800 @@ +// Variables +// -------------------------- + +@fa-font-path: "fonts"; +@fa-font-size-base: 14px; +@fa-line-height-base: 1; +//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts"; // for referencing Bootstrap CDN font files directly +@fa-css-prefix: fa; +@fa-version: "4.7.0"; +@fa-border-color: #eee; +@fa-inverse: #fff; +@fa-li-width: (30em / 14); + +@fa-var-500px: "\f26e"; +@fa-var-address-book: "\f2b9"; +@fa-var-address-book-o: "\f2ba"; +@fa-var-address-card: "\f2bb"; +@fa-var-address-card-o: "\f2bc"; +@fa-var-adjust: "\f042"; +@fa-var-adn: "\f170"; +@fa-var-align-center: "\f037"; +@fa-var-align-justify: "\f039"; +@fa-var-align-left: "\f036"; +@fa-var-align-right: "\f038"; +@fa-var-amazon: "\f270"; +@fa-var-ambulance: "\f0f9"; +@fa-var-american-sign-language-interpreting: "\f2a3"; +@fa-var-anchor: "\f13d"; +@fa-var-android: "\f17b"; +@fa-var-angellist: "\f209"; +@fa-var-angle-double-down: "\f103"; +@fa-var-angle-double-left: "\f100"; +@fa-var-angle-double-right: "\f101"; +@fa-var-angle-double-up: "\f102"; +@fa-var-angle-down: "\f107"; +@fa-var-angle-left: "\f104"; +@fa-var-angle-right: "\f105"; +@fa-var-angle-up: "\f106"; +@fa-var-apple: "\f179"; +@fa-var-archive: "\f187"; +@fa-var-area-chart: "\f1fe"; +@fa-var-arrow-circle-down: "\f0ab"; +@fa-var-arrow-circle-left: "\f0a8"; +@fa-var-arrow-circle-o-down: "\f01a"; +@fa-var-arrow-circle-o-left: "\f190"; +@fa-var-arrow-circle-o-right: "\f18e"; +@fa-var-arrow-circle-o-up: "\f01b"; +@fa-var-arrow-circle-right: "\f0a9"; +@fa-var-arrow-circle-up: "\f0aa"; +@fa-var-arrow-down: "\f063"; +@fa-var-arrow-left: "\f060"; +@fa-var-arrow-right: "\f061"; +@fa-var-arrow-up: "\f062"; +@fa-var-arrows: "\f047"; +@fa-var-arrows-alt: "\f0b2"; +@fa-var-arrows-h: "\f07e"; +@fa-var-arrows-v: "\f07d"; +@fa-var-asl-interpreting: "\f2a3"; +@fa-var-assistive-listening-systems: "\f2a2"; +@fa-var-asterisk: "\f069"; +@fa-var-at: "\f1fa"; +@fa-var-audio-description: "\f29e"; +@fa-var-automobile: "\f1b9"; +@fa-var-backward: "\f04a"; +@fa-var-balance-scale: "\f24e"; +@fa-var-ban: "\f05e"; +@fa-var-bandcamp: "\f2d5"; +@fa-var-bank: "\f19c"; +@fa-var-bar-chart: "\f080"; +@fa-var-bar-chart-o: "\f080"; +@fa-var-barcode: "\f02a"; +@fa-var-bars: "\f0c9"; +@fa-var-bath: "\f2cd"; +@fa-var-bathtub: "\f2cd"; +@fa-var-battery: "\f240"; +@fa-var-battery-0: "\f244"; +@fa-var-battery-1: "\f243"; +@fa-var-battery-2: "\f242"; +@fa-var-battery-3: "\f241"; +@fa-var-battery-4: "\f240"; +@fa-var-battery-empty: "\f244"; +@fa-var-battery-full: "\f240"; +@fa-var-battery-half: "\f242"; +@fa-var-battery-quarter: "\f243"; +@fa-var-battery-three-quarters: "\f241"; +@fa-var-bed: "\f236"; +@fa-var-beer: "\f0fc"; +@fa-var-behance: "\f1b4"; +@fa-var-behance-square: "\f1b5"; +@fa-var-bell: "\f0f3"; +@fa-var-bell-o: "\f0a2"; +@fa-var-bell-slash: "\f1f6"; +@fa-var-bell-slash-o: "\f1f7"; +@fa-var-bicycle: "\f206"; +@fa-var-binoculars: "\f1e5"; +@fa-var-birthday-cake: "\f1fd"; +@fa-var-bitbucket: "\f171"; +@fa-var-bitbucket-square: "\f172"; +@fa-var-bitcoin: "\f15a"; +@fa-var-black-tie: "\f27e"; +@fa-var-blind: "\f29d"; +@fa-var-bluetooth: "\f293"; +@fa-var-bluetooth-b: "\f294"; +@fa-var-bold: "\f032"; +@fa-var-bolt: "\f0e7"; +@fa-var-bomb: "\f1e2"; +@fa-var-book: "\f02d"; +@fa-var-bookmark: "\f02e"; +@fa-var-bookmark-o: "\f097"; +@fa-var-braille: "\f2a1"; +@fa-var-briefcase: "\f0b1"; +@fa-var-btc: "\f15a"; +@fa-var-bug: "\f188"; +@fa-var-building: "\f1ad"; +@fa-var-building-o: "\f0f7"; +@fa-var-bullhorn: "\f0a1"; +@fa-var-bullseye: "\f140"; +@fa-var-bus: "\f207"; +@fa-var-buysellads: "\f20d"; +@fa-var-cab: "\f1ba"; +@fa-var-calculator: "\f1ec"; +@fa-var-calendar: "\f073"; +@fa-var-calendar-check-o: "\f274"; +@fa-var-calendar-minus-o: "\f272"; +@fa-var-calendar-o: "\f133"; +@fa-var-calendar-plus-o: "\f271"; +@fa-var-calendar-times-o: "\f273"; +@fa-var-camera: "\f030"; +@fa-var-camera-retro: "\f083"; +@fa-var-car: "\f1b9"; +@fa-var-caret-down: "\f0d7"; +@fa-var-caret-left: "\f0d9"; +@fa-var-caret-right: "\f0da"; +@fa-var-caret-square-o-down: "\f150"; +@fa-var-caret-square-o-left: "\f191"; +@fa-var-caret-square-o-right: "\f152"; +@fa-var-caret-square-o-up: "\f151"; +@fa-var-caret-up: "\f0d8"; +@fa-var-cart-arrow-down: "\f218"; +@fa-var-cart-plus: "\f217"; +@fa-var-cc: "\f20a"; +@fa-var-cc-amex: "\f1f3"; +@fa-var-cc-diners-club: "\f24c"; +@fa-var-cc-discover: "\f1f2"; +@fa-var-cc-jcb: "\f24b"; +@fa-var-cc-mastercard: "\f1f1"; +@fa-var-cc-paypal: "\f1f4"; +@fa-var-cc-stripe: "\f1f5"; +@fa-var-cc-visa: "\f1f0"; +@fa-var-certificate: "\f0a3"; +@fa-var-chain: "\f0c1"; +@fa-var-chain-broken: "\f127"; +@fa-var-check: "\f00c"; +@fa-var-check-circle: "\f058"; +@fa-var-check-circle-o: "\f05d"; +@fa-var-check-square: "\f14a"; +@fa-var-check-square-o: "\f046"; +@fa-var-chevron-circle-down: "\f13a"; +@fa-var-chevron-circle-left: "\f137"; +@fa-var-chevron-circle-right: "\f138"; +@fa-var-chevron-circle-up: "\f139"; +@fa-var-chevron-down: "\f078"; +@fa-var-chevron-left: "\f053"; +@fa-var-chevron-right: "\f054"; +@fa-var-chevron-up: "\f077"; +@fa-var-child: "\f1ae"; +@fa-var-chrome: "\f268"; +@fa-var-circle: "\f111"; +@fa-var-circle-o: "\f10c"; +@fa-var-circle-o-notch: "\f1ce"; +@fa-var-circle-thin: "\f1db"; +@fa-var-clipboard: "\f0ea"; +@fa-var-clock-o: "\f017"; +@fa-var-clone: "\f24d"; +@fa-var-close: "\f00d"; +@fa-var-cloud: "\f0c2"; +@fa-var-cloud-download: "\f0ed"; +@fa-var-cloud-upload: "\f0ee"; +@fa-var-cny: "\f157"; +@fa-var-code: "\f121"; +@fa-var-code-fork: "\f126"; +@fa-var-codepen: "\f1cb"; +@fa-var-codiepie: "\f284"; +@fa-var-coffee: "\f0f4"; +@fa-var-cog: "\f013"; +@fa-var-cogs: "\f085"; +@fa-var-columns: "\f0db"; +@fa-var-comment: "\f075"; +@fa-var-comment-o: "\f0e5"; +@fa-var-commenting: "\f27a"; +@fa-var-commenting-o: "\f27b"; +@fa-var-comments: "\f086"; +@fa-var-comments-o: "\f0e6"; +@fa-var-compass: "\f14e"; +@fa-var-compress: "\f066"; +@fa-var-connectdevelop: "\f20e"; +@fa-var-contao: "\f26d"; +@fa-var-copy: "\f0c5"; +@fa-var-copyright: "\f1f9"; +@fa-var-creative-commons: "\f25e"; +@fa-var-credit-card: "\f09d"; +@fa-var-credit-card-alt: "\f283"; +@fa-var-crop: "\f125"; +@fa-var-crosshairs: "\f05b"; +@fa-var-css3: "\f13c"; +@fa-var-cube: "\f1b2"; +@fa-var-cubes: "\f1b3"; +@fa-var-cut: "\f0c4"; +@fa-var-cutlery: "\f0f5"; +@fa-var-dashboard: "\f0e4"; +@fa-var-dashcube: "\f210"; +@fa-var-database: "\f1c0"; +@fa-var-deaf: "\f2a4"; +@fa-var-deafness: "\f2a4"; +@fa-var-dedent: "\f03b"; +@fa-var-delicious: "\f1a5"; +@fa-var-desktop: "\f108"; +@fa-var-deviantart: "\f1bd"; +@fa-var-diamond: "\f219"; +@fa-var-digg: "\f1a6"; +@fa-var-dollar: "\f155"; +@fa-var-dot-circle-o: "\f192"; +@fa-var-download: "\f019"; +@fa-var-dribbble: "\f17d"; +@fa-var-drivers-license: "\f2c2"; +@fa-var-drivers-license-o: "\f2c3"; +@fa-var-dropbox: "\f16b"; +@fa-var-drupal: "\f1a9"; +@fa-var-edge: "\f282"; +@fa-var-edit: "\f044"; +@fa-var-eercast: "\f2da"; +@fa-var-eject: "\f052"; +@fa-var-ellipsis-h: "\f141"; +@fa-var-ellipsis-v: "\f142"; +@fa-var-empire: "\f1d1"; +@fa-var-envelope: "\f0e0"; +@fa-var-envelope-o: "\f003"; +@fa-var-envelope-open: "\f2b6"; +@fa-var-envelope-open-o: "\f2b7"; +@fa-var-envelope-square: "\f199"; +@fa-var-envira: "\f299"; +@fa-var-eraser: "\f12d"; +@fa-var-etsy: "\f2d7"; +@fa-var-eur: "\f153"; +@fa-var-euro: "\f153"; +@fa-var-exchange: "\f0ec"; +@fa-var-exclamation: "\f12a"; +@fa-var-exclamation-circle: "\f06a"; +@fa-var-exclamation-triangle: "\f071"; +@fa-var-expand: "\f065"; +@fa-var-expeditedssl: "\f23e"; +@fa-var-external-link: "\f08e"; +@fa-var-external-link-square: "\f14c"; +@fa-var-eye: "\f06e"; +@fa-var-eye-slash: "\f070"; +@fa-var-eyedropper: "\f1fb"; +@fa-var-fa: "\f2b4"; +@fa-var-facebook: "\f09a"; +@fa-var-facebook-f: "\f09a"; +@fa-var-facebook-official: "\f230"; +@fa-var-facebook-square: "\f082"; +@fa-var-fast-backward: "\f049"; +@fa-var-fast-forward: "\f050"; +@fa-var-fax: "\f1ac"; +@fa-var-feed: "\f09e"; +@fa-var-female: "\f182"; +@fa-var-fighter-jet: "\f0fb"; +@fa-var-file: "\f15b"; +@fa-var-file-archive-o: "\f1c6"; +@fa-var-file-audio-o: "\f1c7"; +@fa-var-file-code-o: "\f1c9"; +@fa-var-file-excel-o: "\f1c3"; +@fa-var-file-image-o: "\f1c5"; +@fa-var-file-movie-o: "\f1c8"; +@fa-var-file-o: "\f016"; +@fa-var-file-pdf-o: "\f1c1"; +@fa-var-file-photo-o: "\f1c5"; +@fa-var-file-picture-o: "\f1c5"; +@fa-var-file-powerpoint-o: "\f1c4"; +@fa-var-file-sound-o: "\f1c7"; +@fa-var-file-text: "\f15c"; +@fa-var-file-text-o: "\f0f6"; +@fa-var-file-video-o: "\f1c8"; +@fa-var-file-word-o: "\f1c2"; +@fa-var-file-zip-o: "\f1c6"; +@fa-var-files-o: "\f0c5"; +@fa-var-film: "\f008"; +@fa-var-filter: "\f0b0"; +@fa-var-fire: "\f06d"; +@fa-var-fire-extinguisher: "\f134"; +@fa-var-firefox: "\f269"; +@fa-var-first-order: "\f2b0"; +@fa-var-flag: "\f024"; +@fa-var-flag-checkered: "\f11e"; +@fa-var-flag-o: "\f11d"; +@fa-var-flash: "\f0e7"; +@fa-var-flask: "\f0c3"; +@fa-var-flickr: "\f16e"; +@fa-var-floppy-o: "\f0c7"; +@fa-var-folder: "\f07b"; +@fa-var-folder-o: "\f114"; +@fa-var-folder-open: "\f07c"; +@fa-var-folder-open-o: "\f115"; +@fa-var-font: "\f031"; +@fa-var-font-awesome: "\f2b4"; +@fa-var-fonticons: "\f280"; +@fa-var-fort-awesome: "\f286"; +@fa-var-forumbee: "\f211"; +@fa-var-forward: "\f04e"; +@fa-var-foursquare: "\f180"; +@fa-var-free-code-camp: "\f2c5"; +@fa-var-frown-o: "\f119"; +@fa-var-futbol-o: "\f1e3"; +@fa-var-gamepad: "\f11b"; +@fa-var-gavel: "\f0e3"; +@fa-var-gbp: "\f154"; +@fa-var-ge: "\f1d1"; +@fa-var-gear: "\f013"; +@fa-var-gears: "\f085"; +@fa-var-genderless: "\f22d"; +@fa-var-get-pocket: "\f265"; +@fa-var-gg: "\f260"; +@fa-var-gg-circle: "\f261"; +@fa-var-gift: "\f06b"; +@fa-var-git: "\f1d3"; +@fa-var-git-square: "\f1d2"; +@fa-var-github: "\f09b"; +@fa-var-github-alt: "\f113"; +@fa-var-github-square: "\f092"; +@fa-var-gitlab: "\f296"; +@fa-var-gittip: "\f184"; +@fa-var-glass: "\f000"; +@fa-var-glide: "\f2a5"; +@fa-var-glide-g: "\f2a6"; +@fa-var-globe: "\f0ac"; +@fa-var-google: "\f1a0"; +@fa-var-google-plus: "\f0d5"; +@fa-var-google-plus-circle: "\f2b3"; +@fa-var-google-plus-official: "\f2b3"; +@fa-var-google-plus-square: "\f0d4"; +@fa-var-google-wallet: "\f1ee"; +@fa-var-graduation-cap: "\f19d"; +@fa-var-gratipay: "\f184"; +@fa-var-grav: "\f2d6"; +@fa-var-group: "\f0c0"; +@fa-var-h-square: "\f0fd"; +@fa-var-hacker-news: "\f1d4"; +@fa-var-hand-grab-o: "\f255"; +@fa-var-hand-lizard-o: "\f258"; +@fa-var-hand-o-down: "\f0a7"; +@fa-var-hand-o-left: "\f0a5"; +@fa-var-hand-o-right: "\f0a4"; +@fa-var-hand-o-up: "\f0a6"; +@fa-var-hand-paper-o: "\f256"; +@fa-var-hand-peace-o: "\f25b"; +@fa-var-hand-pointer-o: "\f25a"; +@fa-var-hand-rock-o: "\f255"; +@fa-var-hand-scissors-o: "\f257"; +@fa-var-hand-spock-o: "\f259"; +@fa-var-hand-stop-o: "\f256"; +@fa-var-handshake-o: "\f2b5"; +@fa-var-hard-of-hearing: "\f2a4"; +@fa-var-hashtag: "\f292"; +@fa-var-hdd-o: "\f0a0"; +@fa-var-header: "\f1dc"; +@fa-var-headphones: "\f025"; +@fa-var-heart: "\f004"; +@fa-var-heart-o: "\f08a"; +@fa-var-heartbeat: "\f21e"; +@fa-var-history: "\f1da"; +@fa-var-home: "\f015"; +@fa-var-hospital-o: "\f0f8"; +@fa-var-hotel: "\f236"; +@fa-var-hourglass: "\f254"; +@fa-var-hourglass-1: "\f251"; +@fa-var-hourglass-2: "\f252"; +@fa-var-hourglass-3: "\f253"; +@fa-var-hourglass-end: "\f253"; +@fa-var-hourglass-half: "\f252"; +@fa-var-hourglass-o: "\f250"; +@fa-var-hourglass-start: "\f251"; +@fa-var-houzz: "\f27c"; +@fa-var-html5: "\f13b"; +@fa-var-i-cursor: "\f246"; +@fa-var-id-badge: "\f2c1"; +@fa-var-id-card: "\f2c2"; +@fa-var-id-card-o: "\f2c3"; +@fa-var-ils: "\f20b"; +@fa-var-image: "\f03e"; +@fa-var-imdb: "\f2d8"; +@fa-var-inbox: "\f01c"; +@fa-var-indent: "\f03c"; +@fa-var-industry: "\f275"; +@fa-var-info: "\f129"; +@fa-var-info-circle: "\f05a"; +@fa-var-inr: "\f156"; +@fa-var-instagram: "\f16d"; +@fa-var-institution: "\f19c"; +@fa-var-internet-explorer: "\f26b"; +@fa-var-intersex: "\f224"; +@fa-var-ioxhost: "\f208"; +@fa-var-italic: "\f033"; +@fa-var-joomla: "\f1aa"; +@fa-var-jpy: "\f157"; +@fa-var-jsfiddle: "\f1cc"; +@fa-var-key: "\f084"; +@fa-var-keyboard-o: "\f11c"; +@fa-var-krw: "\f159"; +@fa-var-language: "\f1ab"; +@fa-var-laptop: "\f109"; +@fa-var-lastfm: "\f202"; +@fa-var-lastfm-square: "\f203"; +@fa-var-leaf: "\f06c"; +@fa-var-leanpub: "\f212"; +@fa-var-legal: "\f0e3"; +@fa-var-lemon-o: "\f094"; +@fa-var-level-down: "\f149"; +@fa-var-level-up: "\f148"; +@fa-var-life-bouy: "\f1cd"; +@fa-var-life-buoy: "\f1cd"; +@fa-var-life-ring: "\f1cd"; +@fa-var-life-saver: "\f1cd"; +@fa-var-lightbulb-o: "\f0eb"; +@fa-var-line-chart: "\f201"; +@fa-var-link: "\f0c1"; +@fa-var-linkedin: "\f0e1"; +@fa-var-linkedin-square: "\f08c"; +@fa-var-linode: "\f2b8"; +@fa-var-linux: "\f17c"; +@fa-var-list: "\f03a"; +@fa-var-list-alt: "\f022"; +@fa-var-list-ol: "\f0cb"; +@fa-var-list-ul: "\f0ca"; +@fa-var-location-arrow: "\f124"; +@fa-var-lock: "\f023"; +@fa-var-long-arrow-down: "\f175"; +@fa-var-long-arrow-left: "\f177"; +@fa-var-long-arrow-right: "\f178"; +@fa-var-long-arrow-up: "\f176"; +@fa-var-low-vision: "\f2a8"; +@fa-var-magic: "\f0d0"; +@fa-var-magnet: "\f076"; +@fa-var-mail-forward: "\f064"; +@fa-var-mail-reply: "\f112"; +@fa-var-mail-reply-all: "\f122"; +@fa-var-male: "\f183"; +@fa-var-map: "\f279"; +@fa-var-map-marker: "\f041"; +@fa-var-map-o: "\f278"; +@fa-var-map-pin: "\f276"; +@fa-var-map-signs: "\f277"; +@fa-var-mars: "\f222"; +@fa-var-mars-double: "\f227"; +@fa-var-mars-stroke: "\f229"; +@fa-var-mars-stroke-h: "\f22b"; +@fa-var-mars-stroke-v: "\f22a"; +@fa-var-maxcdn: "\f136"; +@fa-var-meanpath: "\f20c"; +@fa-var-medium: "\f23a"; +@fa-var-medkit: "\f0fa"; +@fa-var-meetup: "\f2e0"; +@fa-var-meh-o: "\f11a"; +@fa-var-mercury: "\f223"; +@fa-var-microchip: "\f2db"; +@fa-var-microphone: "\f130"; +@fa-var-microphone-slash: "\f131"; +@fa-var-minus: "\f068"; +@fa-var-minus-circle: "\f056"; +@fa-var-minus-square: "\f146"; +@fa-var-minus-square-o: "\f147"; +@fa-var-mixcloud: "\f289"; +@fa-var-mobile: "\f10b"; +@fa-var-mobile-phone: "\f10b"; +@fa-var-modx: "\f285"; +@fa-var-money: "\f0d6"; +@fa-var-moon-o: "\f186"; +@fa-var-mortar-board: "\f19d"; +@fa-var-motorcycle: "\f21c"; +@fa-var-mouse-pointer: "\f245"; +@fa-var-music: "\f001"; +@fa-var-navicon: "\f0c9"; +@fa-var-neuter: "\f22c"; +@fa-var-newspaper-o: "\f1ea"; +@fa-var-object-group: "\f247"; +@fa-var-object-ungroup: "\f248"; +@fa-var-odnoklassniki: "\f263"; +@fa-var-odnoklassniki-square: "\f264"; +@fa-var-opencart: "\f23d"; +@fa-var-openid: "\f19b"; +@fa-var-opera: "\f26a"; +@fa-var-optin-monster: "\f23c"; +@fa-var-outdent: "\f03b"; +@fa-var-pagelines: "\f18c"; +@fa-var-paint-brush: "\f1fc"; +@fa-var-paper-plane: "\f1d8"; +@fa-var-paper-plane-o: "\f1d9"; +@fa-var-paperclip: "\f0c6"; +@fa-var-paragraph: "\f1dd"; +@fa-var-paste: "\f0ea"; +@fa-var-pause: "\f04c"; +@fa-var-pause-circle: "\f28b"; +@fa-var-pause-circle-o: "\f28c"; +@fa-var-paw: "\f1b0"; +@fa-var-paypal: "\f1ed"; +@fa-var-pencil: "\f040"; +@fa-var-pencil-square: "\f14b"; +@fa-var-pencil-square-o: "\f044"; +@fa-var-percent: "\f295"; +@fa-var-phone: "\f095"; +@fa-var-phone-square: "\f098"; +@fa-var-photo: "\f03e"; +@fa-var-picture-o: "\f03e"; +@fa-var-pie-chart: "\f200"; +@fa-var-pied-piper: "\f2ae"; +@fa-var-pied-piper-alt: "\f1a8"; +@fa-var-pied-piper-pp: "\f1a7"; +@fa-var-pinterest: "\f0d2"; +@fa-var-pinterest-p: "\f231"; +@fa-var-pinterest-square: "\f0d3"; +@fa-var-plane: "\f072"; +@fa-var-play: "\f04b"; +@fa-var-play-circle: "\f144"; +@fa-var-play-circle-o: "\f01d"; +@fa-var-plug: "\f1e6"; +@fa-var-plus: "\f067"; +@fa-var-plus-circle: "\f055"; +@fa-var-plus-square: "\f0fe"; +@fa-var-plus-square-o: "\f196"; +@fa-var-podcast: "\f2ce"; +@fa-var-power-off: "\f011"; +@fa-var-print: "\f02f"; +@fa-var-product-hunt: "\f288"; +@fa-var-puzzle-piece: "\f12e"; +@fa-var-qq: "\f1d6"; +@fa-var-qrcode: "\f029"; +@fa-var-question: "\f128"; +@fa-var-question-circle: "\f059"; +@fa-var-question-circle-o: "\f29c"; +@fa-var-quora: "\f2c4"; +@fa-var-quote-left: "\f10d"; +@fa-var-quote-right: "\f10e"; +@fa-var-ra: "\f1d0"; +@fa-var-random: "\f074"; +@fa-var-ravelry: "\f2d9"; +@fa-var-rebel: "\f1d0"; +@fa-var-recycle: "\f1b8"; +@fa-var-reddit: "\f1a1"; +@fa-var-reddit-alien: "\f281"; +@fa-var-reddit-square: "\f1a2"; +@fa-var-refresh: "\f021"; +@fa-var-registered: "\f25d"; +@fa-var-remove: "\f00d"; +@fa-var-renren: "\f18b"; +@fa-var-reorder: "\f0c9"; +@fa-var-repeat: "\f01e"; +@fa-var-reply: "\f112"; +@fa-var-reply-all: "\f122"; +@fa-var-resistance: "\f1d0"; +@fa-var-retweet: "\f079"; +@fa-var-rmb: "\f157"; +@fa-var-road: "\f018"; +@fa-var-rocket: "\f135"; +@fa-var-rotate-left: "\f0e2"; +@fa-var-rotate-right: "\f01e"; +@fa-var-rouble: "\f158"; +@fa-var-rss: "\f09e"; +@fa-var-rss-square: "\f143"; +@fa-var-rub: "\f158"; +@fa-var-ruble: "\f158"; +@fa-var-rupee: "\f156"; +@fa-var-s15: "\f2cd"; +@fa-var-safari: "\f267"; +@fa-var-save: "\f0c7"; +@fa-var-scissors: "\f0c4"; +@fa-var-scribd: "\f28a"; +@fa-var-search: "\f002"; +@fa-var-search-minus: "\f010"; +@fa-var-search-plus: "\f00e"; +@fa-var-sellsy: "\f213"; +@fa-var-send: "\f1d8"; +@fa-var-send-o: "\f1d9"; +@fa-var-server: "\f233"; +@fa-var-share: "\f064"; +@fa-var-share-alt: "\f1e0"; +@fa-var-share-alt-square: "\f1e1"; +@fa-var-share-square: "\f14d"; +@fa-var-share-square-o: "\f045"; +@fa-var-shekel: "\f20b"; +@fa-var-sheqel: "\f20b"; +@fa-var-shield: "\f132"; +@fa-var-ship: "\f21a"; +@fa-var-shirtsinbulk: "\f214"; +@fa-var-shopping-bag: "\f290"; +@fa-var-shopping-basket: "\f291"; +@fa-var-shopping-cart: "\f07a"; +@fa-var-shower: "\f2cc"; +@fa-var-sign-in: "\f090"; +@fa-var-sign-language: "\f2a7"; +@fa-var-sign-out: "\f08b"; +@fa-var-signal: "\f012"; +@fa-var-signing: "\f2a7"; +@fa-var-simplybuilt: "\f215"; +@fa-var-sitemap: "\f0e8"; +@fa-var-skyatlas: "\f216"; +@fa-var-skype: "\f17e"; +@fa-var-slack: "\f198"; +@fa-var-sliders: "\f1de"; +@fa-var-slideshare: "\f1e7"; +@fa-var-smile-o: "\f118"; +@fa-var-snapchat: "\f2ab"; +@fa-var-snapchat-ghost: "\f2ac"; +@fa-var-snapchat-square: "\f2ad"; +@fa-var-snowflake-o: "\f2dc"; +@fa-var-soccer-ball-o: "\f1e3"; +@fa-var-sort: "\f0dc"; +@fa-var-sort-alpha-asc: "\f15d"; +@fa-var-sort-alpha-desc: "\f15e"; +@fa-var-sort-amount-asc: "\f160"; +@fa-var-sort-amount-desc: "\f161"; +@fa-var-sort-asc: "\f0de"; +@fa-var-sort-desc: "\f0dd"; +@fa-var-sort-down: "\f0dd"; +@fa-var-sort-numeric-asc: "\f162"; +@fa-var-sort-numeric-desc: "\f163"; +@fa-var-sort-up: "\f0de"; +@fa-var-soundcloud: "\f1be"; +@fa-var-space-shuttle: "\f197"; +@fa-var-spinner: "\f110"; +@fa-var-spoon: "\f1b1"; +@fa-var-spotify: "\f1bc"; +@fa-var-square: "\f0c8"; +@fa-var-square-o: "\f096"; +@fa-var-stack-exchange: "\f18d"; +@fa-var-stack-overflow: "\f16c"; +@fa-var-star: "\f005"; +@fa-var-star-half: "\f089"; +@fa-var-star-half-empty: "\f123"; +@fa-var-star-half-full: "\f123"; +@fa-var-star-half-o: "\f123"; +@fa-var-star-o: "\f006"; +@fa-var-steam: "\f1b6"; +@fa-var-steam-square: "\f1b7"; +@fa-var-step-backward: "\f048"; +@fa-var-step-forward: "\f051"; +@fa-var-stethoscope: "\f0f1"; +@fa-var-sticky-note: "\f249"; +@fa-var-sticky-note-o: "\f24a"; +@fa-var-stop: "\f04d"; +@fa-var-stop-circle: "\f28d"; +@fa-var-stop-circle-o: "\f28e"; +@fa-var-street-view: "\f21d"; +@fa-var-strikethrough: "\f0cc"; +@fa-var-stumbleupon: "\f1a4"; +@fa-var-stumbleupon-circle: "\f1a3"; +@fa-var-subscript: "\f12c"; +@fa-var-subway: "\f239"; +@fa-var-suitcase: "\f0f2"; +@fa-var-sun-o: "\f185"; +@fa-var-superpowers: "\f2dd"; +@fa-var-superscript: "\f12b"; +@fa-var-support: "\f1cd"; +@fa-var-table: "\f0ce"; +@fa-var-tablet: "\f10a"; +@fa-var-tachometer: "\f0e4"; +@fa-var-tag: "\f02b"; +@fa-var-tags: "\f02c"; +@fa-var-tasks: "\f0ae"; +@fa-var-taxi: "\f1ba"; +@fa-var-telegram: "\f2c6"; +@fa-var-television: "\f26c"; +@fa-var-tencent-weibo: "\f1d5"; +@fa-var-terminal: "\f120"; +@fa-var-text-height: "\f034"; +@fa-var-text-width: "\f035"; +@fa-var-th: "\f00a"; +@fa-var-th-large: "\f009"; +@fa-var-th-list: "\f00b"; +@fa-var-themeisle: "\f2b2"; +@fa-var-thermometer: "\f2c7"; +@fa-var-thermometer-0: "\f2cb"; +@fa-var-thermometer-1: "\f2ca"; +@fa-var-thermometer-2: "\f2c9"; +@fa-var-thermometer-3: "\f2c8"; +@fa-var-thermometer-4: "\f2c7"; +@fa-var-thermometer-empty: "\f2cb"; +@fa-var-thermometer-full: "\f2c7"; +@fa-var-thermometer-half: "\f2c9"; +@fa-var-thermometer-quarter: "\f2ca"; +@fa-var-thermometer-three-quarters: "\f2c8"; +@fa-var-thumb-tack: "\f08d"; +@fa-var-thumbs-down: "\f165"; +@fa-var-thumbs-o-down: "\f088"; +@fa-var-thumbs-o-up: "\f087"; +@fa-var-thumbs-up: "\f164"; +@fa-var-ticket: "\f145"; +@fa-var-times: "\f00d"; +@fa-var-times-circle: "\f057"; +@fa-var-times-circle-o: "\f05c"; +@fa-var-times-rectangle: "\f2d3"; +@fa-var-times-rectangle-o: "\f2d4"; +@fa-var-tint: "\f043"; +@fa-var-toggle-down: "\f150"; +@fa-var-toggle-left: "\f191"; +@fa-var-toggle-off: "\f204"; +@fa-var-toggle-on: "\f205"; +@fa-var-toggle-right: "\f152"; +@fa-var-toggle-up: "\f151"; +@fa-var-trademark: "\f25c"; +@fa-var-train: "\f238"; +@fa-var-transgender: "\f224"; +@fa-var-transgender-alt: "\f225"; +@fa-var-trash: "\f1f8"; +@fa-var-trash-o: "\f014"; +@fa-var-tree: "\f1bb"; +@fa-var-trello: "\f181"; +@fa-var-tripadvisor: "\f262"; +@fa-var-trophy: "\f091"; +@fa-var-truck: "\f0d1"; +@fa-var-try: "\f195"; +@fa-var-tty: "\f1e4"; +@fa-var-tumblr: "\f173"; +@fa-var-tumblr-square: "\f174"; +@fa-var-turkish-lira: "\f195"; +@fa-var-tv: "\f26c"; +@fa-var-twitch: "\f1e8"; +@fa-var-twitter: "\f099"; +@fa-var-twitter-square: "\f081"; +@fa-var-umbrella: "\f0e9"; +@fa-var-underline: "\f0cd"; +@fa-var-undo: "\f0e2"; +@fa-var-universal-access: "\f29a"; +@fa-var-university: "\f19c"; +@fa-var-unlink: "\f127"; +@fa-var-unlock: "\f09c"; +@fa-var-unlock-alt: "\f13e"; +@fa-var-unsorted: "\f0dc"; +@fa-var-upload: "\f093"; +@fa-var-usb: "\f287"; +@fa-var-usd: "\f155"; +@fa-var-user: "\f007"; +@fa-var-user-circle: "\f2bd"; +@fa-var-user-circle-o: "\f2be"; +@fa-var-user-md: "\f0f0"; +@fa-var-user-o: "\f2c0"; +@fa-var-user-plus: "\f234"; +@fa-var-user-secret: "\f21b"; +@fa-var-user-times: "\f235"; +@fa-var-users: "\f0c0"; +@fa-var-vcard: "\f2bb"; +@fa-var-vcard-o: "\f2bc"; +@fa-var-venus: "\f221"; +@fa-var-venus-double: "\f226"; +@fa-var-venus-mars: "\f228"; +@fa-var-viacoin: "\f237"; +@fa-var-viadeo: "\f2a9"; +@fa-var-viadeo-square: "\f2aa"; +@fa-var-video-camera: "\f03d"; +@fa-var-vimeo: "\f27d"; +@fa-var-vimeo-square: "\f194"; +@fa-var-vine: "\f1ca"; +@fa-var-vk: "\f189"; +@fa-var-volume-control-phone: "\f2a0"; +@fa-var-volume-down: "\f027"; +@fa-var-volume-off: "\f026"; +@fa-var-volume-up: "\f028"; +@fa-var-warning: "\f071"; +@fa-var-wechat: "\f1d7"; +@fa-var-weibo: "\f18a"; +@fa-var-weixin: "\f1d7"; +@fa-var-whatsapp: "\f232"; +@fa-var-wheelchair: "\f193"; +@fa-var-wheelchair-alt: "\f29b"; +@fa-var-wifi: "\f1eb"; +@fa-var-wikipedia-w: "\f266"; +@fa-var-window-close: "\f2d3"; +@fa-var-window-close-o: "\f2d4"; +@fa-var-window-maximize: "\f2d0"; +@fa-var-window-minimize: "\f2d1"; +@fa-var-window-restore: "\f2d2"; +@fa-var-windows: "\f17a"; +@fa-var-won: "\f159"; +@fa-var-wordpress: "\f19a"; +@fa-var-wpbeginner: "\f297"; +@fa-var-wpexplorer: "\f2de"; +@fa-var-wpforms: "\f298"; +@fa-var-wrench: "\f0ad"; +@fa-var-xing: "\f168"; +@fa-var-xing-square: "\f169"; +@fa-var-y-combinator: "\f23b"; +@fa-var-y-combinator-square: "\f1d4"; +@fa-var-yahoo: "\f19e"; +@fa-var-yc: "\f23b"; +@fa-var-yc-square: "\f1d4"; +@fa-var-yelp: "\f1e9"; +@fa-var-yen: "\f157"; +@fa-var-yoast: "\f2b1"; +@fa-var-youtube: "\f167"; +@fa-var-youtube-play: "\f16a"; +@fa-var-youtube-square: "\f166"; + diff --git a/modules/fonts/FontAwesome.otf b/modules/fonts/FontAwesome.otf new file mode 100644 index 0000000..401ec0f Binary files /dev/null and b/modules/fonts/FontAwesome.otf differ diff --git a/modules/fonts/fontawesome-webfont.eot b/modules/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/modules/fonts/fontawesome-webfont.eot differ diff --git a/modules/fonts/fontawesome-webfont.svg b/modules/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/modules/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/fonts/fontawesome-webfont.ttf b/modules/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/modules/fonts/fontawesome-webfont.ttf differ diff --git a/modules/fonts/fontawesome-webfont.woff b/modules/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/modules/fonts/fontawesome-webfont.woff differ diff --git a/modules/fonts/fontawesome-webfont.woff2 b/modules/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/modules/fonts/fontawesome-webfont.woff2 differ diff --git a/modules/index.html b/modules/index.html new file mode 100644 index 0000000..e764264 --- /dev/null +++ b/modules/index.html @@ -0,0 +1,9 @@ + + + + + Webpack App + + + + \ No newline at end of file diff --git a/modules/isekai.apihack.js b/modules/isekai.apihack.js new file mode 100644 index 0000000..abe533b --- /dev/null +++ b/modules/isekai.apihack.js @@ -0,0 +1,11 @@ +(function () { + var oldWikiScriptFunc = mw.util.wikiScript; + mw.util.wikiScript = function(name){ + switch (name) { + case 'api': + return '{{BASE}}/api.php'; + default: + return oldWikiScriptFunc(name); + } + }; +})(); \ No newline at end of file diff --git a/modules/isekai.apihack.min.js b/modules/isekai.apihack.min.js new file mode 100644 index 0000000..da67ba3 --- /dev/null +++ b/modules/isekai.apihack.min.js @@ -0,0 +1 @@ +(function(){var b=mw.util.wikiScript;mw.util.wikiScript=function(a){switch(a){case "api":return"{{BASE}}/api.php";default:return b(a)}}})(); \ No newline at end of file diff --git a/modules/jquery.animate.js b/modules/jquery.animate.js new file mode 100644 index 0000000..0a7ac59 --- /dev/null +++ b/modules/jquery.animate.js @@ -0,0 +1,1945 @@ +/*! + * jQuery Animate v1.8.9 - By CSS3 transition + * (c) 2014-2017 BaiJunjie + * MIT Licensed. + * + * https://github.com/baijunjie/jquery.animate + */ + +(function(root, factory) { + 'use strict'; + + if (typeof module === 'object' && typeof exports === 'object') { + module.exports = factory(require('jquery')); + } else if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else { + factory(root.jQuery); + } + +}(this, function($) { + 'use strict'; + + // jQuery 3.0.0 以及之后的版本已经兼容 requestAnimationFrame API + if (compareVersion('3.0.0', $.fn.jquery) > 0) { + // Integration jQuery requestAnimationFrame - v0.1.3pre + // - https://github.com/gnarf37/jquery-requestAnimationFrame + (function(jQuery) { + + var animating, + lastTime = 0, + vendors = ['webkit', 'moz'], + requestAnimationFrame = window.requestAnimationFrame, + cancelAnimationFrame = window.cancelAnimationFrame; + + for(; lastTime < vendors.length && !requestAnimationFrame; lastTime++) { + requestAnimationFrame = window[ vendors[lastTime] + "RequestAnimationFrame" ]; + cancelAnimationFrame = cancelAnimationFrame || + window[ vendors[lastTime] + "CancelAnimationFrame" ] || + window[ vendors[lastTime] + "CancelRequestAnimationFrame" ]; + } + + function raf() { + if ( animating ) { + requestAnimationFrame( raf ); + jQuery.fx.tick(); + } + } + + if ( requestAnimationFrame ) { + // use rAF + window.requestAnimationFrame = requestAnimationFrame; + window.cancelAnimationFrame = cancelAnimationFrame; + jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) && !animating ) { + animating = true; + raf(); + } + }; + + jQuery.fx.stop = function() { + animating = false; + }; + } + + }($)); + } + + // Integration jQuery Easing v1.3 + // - http://gsgd.co.uk/sandbox/jquery/easing/ + $.easing['jswing'] = $.easing['swing']; + $.extend( $.easing, { + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + return $.easing[$.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } + }); + + // 当浏览器不支持 transition 时,如果设置了以下的 Easing,可以使 animate 不至于报错,达到向下兼容的目的 + $.extend( $.easing, { + ease: function (x, t, b, c, d) { + return $.easing.easeInOutCubic(x, t, b, c, d); + }, + easeIn: function (x, t, b, c, d) { + return $.easing.easeInSine(x, t, b, c, d); + }, + easeOut: function (x, t, b, c, d) { + return $.easing.easeOutSine(x, t, b, c, d); + }, + easeInOut: function (x, t, b, c, d) { + return $.easing.easeInOutSine(x, t, b, c, d); + } + }); + + var testElem = document.createElement('div'), + $testElem = $(testElem); + // 返回支持的属性名 + function getSupportPropertyName(prop) { + if (prop in testElem.style) return prop; + + var testProp = prop.charAt(0).toUpperCase() + prop.substr(1), + prefixs = [ 'Webkit', 'Moz', 'ms', 'O' ]; + + for (var i = 0, l = prefixs.length; i < l; i++) { + var prefixProp = prefixs[i] + testProp; + if (prefixProp in testElem.style) { + return prefixProp; + } + } + } + + // 检查是否支持3D + function checkTransform3dSupport() { + testElem.style[support.transform] = ''; + testElem.style[support.transform] = 'rotateY(90deg)'; + return testElem.style[support.transform] !== ''; + } + + // 检查浏览器的 transition 支持 + var support = {}; + support.transform = getSupportPropertyName('transform'); + + if (!support.transform) return $; + + support.transformOrigin = getSupportPropertyName('transformOrigin'); + support.transformStyle = getSupportPropertyName('transformStyle'); + support.perspective = getSupportPropertyName('perspective'); + support.perspectiveOrigin = getSupportPropertyName('perspectiveOrigin'); + support.backfaceVisibility = getSupportPropertyName('backfaceVisibility'); + support.filter = getSupportPropertyName('filter'); + support.transition = getSupportPropertyName('transition'); + support.transform3d = checkTransform3dSupport(); + + // 将检测到的支持结果写入 $.support + for (var key in support) { + if (typeof $.support[key] === 'undefined') { + $.support[key] = support[key]; + } + } + + // 缓动列表 + $.cssEase = { + '_default' : 'swing', + 'swing' : 'easeOutQuad', // 和 jQuery Easing 相同,查看详情 https://github.com/gdsmith/jquery.easing + 'linear' : 'cubic-bezier(0,0,1,1)', + 'ease' : 'cubic-bezier(.25,.1,.25,1)', + 'easeIn' : 'cubic-bezier(.42,0,1,1)', + 'easeOut' : 'cubic-bezier(0,0,.58,1)', + 'easeInOut' : 'cubic-bezier(.42,0,.58,1)', + + 'easeInCubic' : 'cubic-bezier(.550,.055,.675,.190)', + 'easeOutCubic' : 'cubic-bezier(.215,.61,.355,1)', + 'easeInOutCubic' : 'cubic-bezier(.645,.045,.355,1)', + 'easeInCirc' : 'cubic-bezier(.6,.04,.98,.335)', + 'easeOutCirc' : 'cubic-bezier(.075,.82,.165,1)', + 'easeInOutCirc' : 'cubic-bezier(.785,.135,.15,.86)', + 'easeInExpo' : 'cubic-bezier(.95,.05,.795,.035)', + 'easeOutExpo' : 'cubic-bezier(.19,1,.22,1)', + 'easeInOutExpo' : 'cubic-bezier(1,0,0,1)', + 'easeInQuad' : 'cubic-bezier(.55,.085,.68,.53)', + 'easeOutQuad' : 'cubic-bezier(.25,.46,.45,.94)', + 'easeInOutQuad' : 'cubic-bezier(.455,.03,.515,.955)', + 'easeInQuart' : 'cubic-bezier(.895,.03,.685,.22)', + 'easeOutQuart' : 'cubic-bezier(.165,.84,.44,1)', + 'easeInOutQuart' : 'cubic-bezier(.77,0,.175,1)', + 'easeInQuint' : 'cubic-bezier(.755,.05,.855,.06)', + 'easeOutQuint' : 'cubic-bezier(.23,1,.32,1)', + 'easeInOutQuint' : 'cubic-bezier(.86,0,.07,1)', + 'easeInSine' : 'cubic-bezier(.47,0,.745,.715)', + 'easeOutSine' : 'cubic-bezier(.39,.575,.565,1)', + 'easeInOutSine' : 'cubic-bezier(.445,.05,.55,.95)', + 'easeInBack' : 'cubic-bezier(.6,-.28,.735,.045)', + 'easeOutBack' : 'cubic-bezier(.175, .885,.32,1.275)', + 'easeInOutBack' : 'cubic-bezier(.68,-.55,.265,1.55)' + }; + + // 转换easing为贝塞尔函数 + // + // 'swing' => 'cubic-bezier(.25,.46,.45,.94)' + // + function convertEase(easing) { + if (typeof easing !== 'string') return; + if (easing.indexOf('cubic-bezier') !== 0) { + easing = $.cssEase[easing]; + return convertEase(easing); + } + return easing; + } + + // ## 'transform' CSS hook + // + // $('div').css({ transform: 'rotate(90deg)' }); + // $('div').css('transform'); => { rotate: '90deg' } + // + $.cssHooks.transform = { + get: function(elem) { + return $.data(elem, 'bjj-transform') || new Transform(); + }, + set: function(elem, v) { + var value = v; + + if (!(value instanceof Transform)) { + value = new Transform(value); + } + + elem.style[support.transform] = value.toString(); + + $.data(elem, 'bjj-transform', value); + } + }; + + // jQuery 1.8- 不支持这些属性的前缀转换 + if (compareVersion('1.8', $.fn.jquery) > 0) { + + // ## 'transformOrigin' CSS hook + // + // $('div').css({ transformOrigin: '0 0' }); + // + $.cssHooks.transformOrigin = { + get: function(elem) { + return elem.style[support.transformOrigin]; + }, + set: function(elem, value) { + elem.style[support.transformOrigin] = value; + } + }; + + // ## 'transformStyle' CSS hook + // + // $('div').css({ transformStyle: 'preserve-3d' }); + // + $.cssHooks.transformStyle = { + get: function(elem) { + return elem.style[support.transformStyle]; + }, + set: function(elem, value) { + elem.style[support.transformStyle] = value; + } + }; + + // ## 'perspective' CSS hook + // + // $('div').css({ perspective: '1000px' }); + // + $.cssHooks.perspective = { + get: function(elem) { + return elem.style[support.perspective]; + }, + set: function(elem, value) { + elem.style[support.perspective] = value; + } + }; + + // ## 'perspectiveOrigin' CSS hook + // + // $('div').css({ perspectiveOrigin: '100px 100px' }); + // + $.cssHooks.perspectiveOrigin = { + get: function(elem) { + return elem.style[support.perspectiveOrigin]; + }, + set: function(elem, value) { + elem.style[support.perspectiveOrigin] = value; + } + }; + + // ## 'backfaceVisibility' CSS hook + // + // $('div').css({ backfaceVisibility: 'hidden' }); + // + $.cssHooks.backfaceVisibility = { + get: function(elem) { + return elem.style[support.backfaceVisibility]; + }, + set: function(elem, value) { + elem.style[support.backfaceVisibility] = value; + } + }; + + // ## 'transition' CSS hook + // + // $('div').css({ transition: 'all 0 ease 0' }); + // + $.cssHooks.transition = { + get: function(elem) { + return elem.style[support.transition]; + }, + set: function(elem, value) { + elem.style[support.transition] = value; + } + }; + + // ## 'filter' CSS hook + // + // $('div').css({ filter: 'blur(10px)' }); + // + $.cssHooks.filter = { + get: function(elem) { + return elem.style[support.filter]; + }, + set: function(elem, value) { + elem.style[support.filter] = value; + } + }; + } + + // ## compare version + // + // a = '1.11.1', b = '1.8.2' + // a > b return 1 + // a < b return -1 + // a = b return 0 + // + function compareVersion(a, b) { + var aa = a.split('.'), + bb = b.split('.'), + al = aa.length, + bl = bb.length, + len = Math.max(al, bl), + aInt, bInt; + for (; len > 0; len--) { + aInt = parseInt(aa.shift()) || 0; + bInt = parseInt(bb.shift()) || 0; + if (aInt > bInt) return 1; + else if (aInt < bInt) return -1; + } + return 0; + } + + // 定义所有变换属性的 transition-property + var propertyMap = {}; + + // Register other CSS hooks + registerCssHook('x'); + registerCssHook('y'); + registerCssHook('z'); + registerCssHook('translateX'); + registerCssHook('translateY'); + registerCssHook('translateZ'); + registerCssHook('translate'); + registerCssHook('translate3d'); + registerCssHook('scale'); + registerCssHook('scaleX'); + registerCssHook('scaleY'); + registerCssHook('scaleZ'); + registerCssHook('scale3d'); + registerCssHook('rotate'); + registerCssHook('rotateX'); + registerCssHook('rotateY'); + registerCssHook('rotateZ'); + registerCssHook('rotate3d'); + registerCssHook('skew'); + registerCssHook('skewX'); + registerCssHook('skewY'); + registerCssHook('pers'); + + function registerCssHook(prop, isPixels) { + // 所有属性都不应该被强制添加px单位,即使是 translate,因为它也可能是百分比 + if (!isPixels) { + $.cssNumber[prop] = true; + } + + propertyMap[prop] = support.transform; + + $.cssHooks[prop] = { + get: function(elem) { + var t = $.css(elem, 'transform'); + return t.get(prop); + }, + + set: function(elem, value) { + var t = $.css(elem, 'transform'); + t.setFromString(prop, value); + $.style(elem, 'transform', t); + } + }; + } + + // ## Transform class + // + // var t = new Transform('rotate(90) scale(4)'); + // + // Set properties + // + // t.set('rotate', 40) + // + // Get properties + // + // t.rotate => '40deg' + // t.scale => '4' + // + // The output string + // + // t.toString() => 'rotate(40deg) scale(4)' + // + function Transform(str) { + if (typeof str === 'string') { + this.parse(str); + } + } + + Transform.prototype = { + // ### setFromString() + // + // t.setFromString('scale', '2,4'); => ['scale', '2', '4'] + // t.setFromString('scale', [,4]); => ['scale', null, '4'] + // + setFromString: function(prop, val) { + var args; + + if ($.isArray(val)) { + for (var i = 0; i < 3; i++) { + if (val[i] === undefined) val[i] = null; + } + args = val; + } else { + args = (typeof val === 'string') ? val.split(',') : [val]; + } + + args.unshift(prop); + + Transform.prototype.set.apply(this, args); + }, + + set: function(prop) { + var args = Array.prototype.slice.call(arguments, 1); + if (this.setter[prop]) { + this.setter[prop].apply(this, args); + } else { + this[prop] = args.join(','); + } + }, + + get: function(prop) { + if (this.getter[prop]) { + return this.getter[prop].call(this); + } else { + return this[prop]; + } + }, + + setter: { + // ### x / y / z + // + // .css({ x: 4 }) => 'translate(4px, 0)' + // .css({ y: 10 }) => 'translate(4px, 10px)' + // .css({ z: 5 }) => 'translate(4px, 10px) translateZ(5px)' + // + x: function(x) { + this.set('translate', x, null); + }, + + y: function(y) { + this.set('translate', null, y); + }, + + z: function(z) { + this.setProp('translateZ', z, 'px'); + }, + + translateX: function(x) { + this.set('x', x); + }, + translateY: function(y) { + this.set('y', y); + }, + translateZ: function(z) { + this.set('z', z); + }, + + // ### translate + // + // .css({ translate: '2, 5' }) => 'translate(2px, 5px)' + // .css({ translate: '' }) => remove 'translate(2px, 5px)' + // + translate: function(x, y) { + if (y === undefined) { + y = x; + } + this.setDoubleProp('translate', x, y, 'px'); + }, + // ### translate3d + // + // .css('translate3d', [100,200,300]); => 'translate(100px, 200px) translateZ(300px)' + // + translate3d: function(x, y, z) { + if (y === undefined && z === undefined) { + z = y = x; + } + this.set('translate', x, y); + this.set('z', z); + }, + + // ### scale + // + // .css({ scale: 3 }) => 'scale(3)' + // .css({ scale: '3,2' }) => 'scale(3,2)' + // + scale: function(x, y) { + if (y === undefined) { + y = x; + } + this.setDoubleProp('scale', x, y, ''); + }, + // ### scale3d + // + // .css('scale3d', [1,2,3]); => 'scale(1, 2) scaleZ(3)' + // + scale3d: function(x, y, z) { + if (y === undefined && z === undefined) { + z = y = x; + } + this.set('scale', x, y); + this.set('scaleZ', z); + }, + + scaleX: function(x) { + this.set('scale', x, null); + }, + + scaleY: function(y) { + this.set('scale', null, y); + }, + + scaleZ: function(z) { + this.setProp('scaleZ', z, ''); + }, + + // ### rotate + // + // .css({ rotate: 30 }) + // .css({ rotate: '30' }) + // .css({ rotate: '30deg' }) + // + rotate: function(angle) { + this.setProp('rotate', angle, 'deg'); + }, + + rotateX: function(angle) { + this.setProp('rotateX', angle, 'deg'); + }, + + rotateY: function(angle) { + this.setProp('rotateY', angle, 'deg'); + }, + + rotateZ: function(angle) { + this.set('rotate', angle); + }, + + rotate3d: function(x, y, z) { + if (y === undefined && z === undefined) { + z = y = x; + } + this.set('rotateX', x); + this.set('rotateY', y); + this.set('rotate', z); + }, + + skew: function(x, y) { + if (y === undefined) { + y = x; + } + this.set('skewX', x); + this.set('skewY', y); + }, + + skewX: function(x) { + this.setProp('skewX', x, 'deg'); + }, + + skewY: function(y) { + this.setProp('skewY', y, 'deg'); + }, + + // {pers: 100} => transform: perspective(100px); + pers: function(pers) { + this.setProp('perspective', pers, 'px'); + } + }, + + getter: { + x: function() { + return this._translateX || '0'; + }, + + y: function() { + return this._translateY || '0'; + }, + + z: function() { + return this.translateZ || '0'; + }, + + translateX: function() { + return this.get('x'); + }, + translateY: function() { + return this.get('y'); + }, + translateZ: function() { + return this.get('z'); + }, + + translate: function() { + return [this.get('x'), this.get('y')]; + }, + + translate3d: function() { + return [this.get('x'), this.get('y'), this.get('z')]; + }, + + scale: function() { + var x = this.get('scaleX'), + y = this.get('scaleY'), + s = [x, y]; + + // '2,2' => '2' + // '2,1' => ['2','1'] + return (s[0] === s[1]) ? s[0] : s; + }, + + scale3d: function() { + var x = this.get('scaleX'), + y = this.get('scaleY'), + z = this.get('scaleZ'), + s = [x, y, z]; + + // '2,1,2' => ['2','1','2'] + return s; + }, + + scaleX: function() { + return this._scaleX || '1'; + }, + + scaleY: function() { + return this._scaleY || '1'; + }, + + scaleZ: function() { + return this.scaleZ || '1'; + }, + + rotate: function(theta) { + return this.rotate || '0'; + }, + + rotateX: function(theta) { + return this.rotateX || '0'; + }, + + rotateY: function(theta) { + return this.rotateY || '0'; + }, + + rotateZ: function(theta) { + return this.get('rotate'); + }, + + rotate3d: function() { + return [this.get('rotateX'), this.get('rotateY'), this.get('rotate')]; + }, + + skew: function() { + return [this.get('skewX'), this.get('skewY')]; + }, + + skewX: function() { + return this.skewX || 0; + }, + + skewY: function() { + return this.skewY || 0; + }, + + // .css('pers', 100).css('pers') => 100px + pers: function() { + return this.perspective || 0; + } + }, + + // ### setProp() + // If the property value is an empty string, the attributes are removed + // If the attribute values are not legal, ignore Settings + // + // .css({'rotate': 30}).css({'rotate': ''}) => remove 'rotate(30deg)' + // .css({'rotate': 30}).css({'rotate': null}) => 'rotate(30deg)' + // + setProp: function(prop, value, u) { + if (value !== undefined && value !== '') { + if (isNaN(parseFloat(value))) { + value = undefined; + } + } + if (value === '') { + delete this[prop]; + } else if (value !== undefined) { + this[prop] = unit(value, u); + } + }, + + // ### setDoubleProp() + // If both the attribute value is empty string, the attributes are removed + // If one of the attribute value is empty string, is set to the default value + // If the attribute values are not legal, ignore Settings + // + // .css({'scaleX': 3}).css({'scale': ''}) => remove 'scale(3, 1)' + // .css({'scaleX': 3}).css({'scale': ['',4]}) => 'scale(1, 4)' + // .css({'scaleX': 3}).css({'scale': [null,4]}) => 'scale(3, 4)' + // + // Note + // .css({'translate3d': '2,,'}) === .css({'translate3d': [2, '', '']}) + // .css({'translate3d': [2,,,]}) === .css({'translate3d': '2, null, null'}) + // + setDoubleProp: function(prop, value1, value2, u) { + if (this['_' + prop + 'X'] === undefined) { + this['_' + prop + 'X'] = this.get(prop + 'X'); + } + if (this['_' + prop + 'Y'] === undefined) { + this['_' + prop + 'Y'] = this.get(prop + 'Y'); + } + + if (value1 !== undefined && value1 !== '') { + if (isNaN(parseFloat(value1))) { + value1 = undefined; + } + } + if (value2 !== undefined && value2 !== '') { + if (isNaN(parseFloat(value2))) { + value2 = undefined; + } + } + + if (value1 === '' && value2 === '') { + delete this['_' + prop + 'X']; + delete this['_' + prop + 'Y']; + delete this[prop]; + } else { + if (value1 === '') { + delete this['_' + prop + 'X']; + value1 = this.get(prop + 'X'); + } else if (value2 === '') { + delete this['_' + prop + 'Y']; + value2 = this.get(prop + 'Y'); + } + + if (value1 !== undefined) { + this['_' + prop + 'X'] = unit(value1, u); + } + if (value2 !== undefined) { + this['_' + prop + 'Y'] = unit(value2, u); + } + + if (prop === 'scale') { + this[prop] = this['_' + prop + 'X'] === this['_' + prop + 'Y'] ? + this['_' + prop + 'X'] : + this['_' + prop + 'X'] + ',' + this['_' + prop + 'Y']; + } else { + this[prop] = this['_' + prop + 'X'] + ',' + this['_' + prop + 'Y']; + } + } + }, + + // ### parse() + // + // 'rotate(90) scale(4)' => self.setFromString('rotate', 90); self.setFromString('scale', 4); + // + parse: function(str) { + var self = this; + str.replace(/([a-zA-Z0-9]+)\((.*?)\)/g, function(x, prop, val) { + self.setFromString(prop, val); + }); + }, + + toString: function() { + var re = []; + + for (var i in this) { + if (this.hasOwnProperty(i)) { + if ((!support.transform3d) && ( + (i === 'rotateX') || + (i === 'rotateY') || + (i === 'translateZ') || + (i === 'scaleZ') || + (i === 'perspective'))) { + continue; + } + + if (i[0] !== '_') { + re.push(i + '(' + this[i] + ')'); + } + } + } + + return re.join(' '); + } + }; + + + // ### getTransition() + // Returns the transition string to be used for the `transition` CSS property. + // + // getTransition({ opacity: 1, rotate: 30 }, 500, 'ease'); + // => 'opacity 500ms ease, -webkit-transform 500ms ease' + // + function getTransition(properties, duration, easing, specialEasing) { + + // 获取属性对应的 transition-property 和 transition-timing-function + // {marginTop: 100, paddingLeft: 200} => {'margin-top': 'swing', 'padding-left': 'swing'} + var props = {}; + for (var p in properties) { + var key = $.camelCase(p); // Convert 'text-align' => 'textAlign' + key = propertyMap[key] || $.cssProps[key] || key; + + // Get vendor specify propertie + // For example 'transform-origin' 'perspective' + if (support[key]) { + key = support[key]; + } + + if (!(key in props)) { + props[key] = specialEasing[p]; + } + } + + var MS = toMS(duration); + + // For more properties, add them this way: + // 'margin 200ms ease, padding 200ms ease, ...' + var transitions = []; + for (var p in props) { + transitions.push(uncamel(p) + ' ' + MS + ' ' + (props[p])); + } + + return transitions.join(','); + } + + // ### disposeSpecialValue() + // + // .css({left: auto}).animate({left: '100'}) => .css({left: 0}).animate({left: 100}); + // .animate({opacity: 'show'}) => .css({opacity: 0}).show().animate({opacity: 1}); + // .animate({opacity: 'hide'}) => .css({opacity: 1}).animate({opacity: 0}, function() { $(this).hide() }); + // + function disposeSpecialValue($self, endProps, startProps, callback) { + var clearStyles = {}, + hidden = $self.css('display') === 'none', + toggle = $self.data('bjj-toggle'), + show; + + // Height/width overflow pass + if ('height' in endProps || 'width' in endProps) { + if ($self.css('display') === 'inline' && $self.css('float') === 'none') { + $self.css('display', 'inline-block'); + } + } + + for (var p in endProps) { + var startValue = $self.css(p), + endValue = endProps[p], + isToggle = endValue === 'toggle'; + + if (endValue === 'show' || isToggle && (show === true || show === undefined && (hidden || toggle === false))) { + clearStyles[p] = ''; + if (isToggle) $self.data('bjj-toggle', true); + + // jQuery 在获取 display: none 元素的宽高等属性时,会先让元素显示出来,但是又会为元素添加 position: absolute。 + // 因此,当元素的宽高为百分比时,其基于的父元素会改变为最近的定位父元素,这就导致获取的宽高不正确 + // 这里只好手动让元素显示出来后,再获取它的宽高。 + if (hidden) $self.show(); + + var inlineStyleValue = $self[0].style[p], + originalValue = $self.css(p, '').css(p); + $self.css(p, inlineStyleValue); + + if (hidden) $self.hide(); + + if (hidden || toggle === false || startValue != originalValue) { + if (show === undefined) show = true; + endValue = originalValue; + if (hidden) startValue = 0; + } else { + endValue = undefined; + } + + } else if (endValue === 'hide' || isToggle && (show === false || show === undefined && (!hidden || toggle === true))) { + clearStyles[p] = ''; + if (isToggle) $self.data('bjj-toggle', false); + + if (!hidden || toggle === true) { + if (show === undefined) show = false; + endValue = 0; + } else { + endValue = undefined; + } + } + + var startUnit = getUnit(startValue), + endUnit = getUnit(endValue), + startColor, + endColor; + + if (isComplex(startValue)) { // 检查复合值是否为阴影 + startValue = checkShadow(p, startValue); + } else if (startColor = isColor(startValue)) { // 是否是颜色 + } else if (isKeyword(startValue)) { // 处理关键字 + // 如果是阴影属性,则返回一个复合属性 + startValue = checkShadow(p, startValue, (endValue + '').indexOf('inset') >= 0); + if (!isComplex(startValue)) { + startValue = 0; // 主要针对定位属性,如:left默认为auto + } + } else if (!startUnit && endUnit) { + startValue += endUnit; + } + + if (isComplex(endValue)) { + endValue = checkShadow(p, endValue); + } else if (endColor = isColor(endValue)) { + } else if (isKeyword(endValue)) { + endValue = checkShadow(p, endValue, startValue.indexOf('inset') >= 0); // 如果是阴影属性,则返回一个复合属性 + if (!isComplex(endValue) && endValue.match(/^[+-]=/)) { // 主要针对递增或递减值,例如:left: '+=30%' + endValue = calculateValue($self, p, startValue, endValue, 1); + } + } else if (endValue !== undefined && !endUnit && startUnit) { + endValue += startUnit; + } + + if ((endValue === undefined) + //|| (startValue == endValue) + || (!!endColor ^ !!startColor)) { + delete endProps[p]; + continue; + } + + endProps[p] = endValue; + startProps[p] = startValue; + } + + var fn = callback; + + if (show === true) { + if ('width' in clearStyles || 'height' in clearStyles) { + if($self.data('bjj-overflow') === undefined) { + $self.data('bjj-overflow', $self[0].style.overflow); + } + clearStyles['overflow'] = $self.data('bjj-overflow'); + $self.css('overflow', 'hidden'); + } + $self.show(); + } else if (show === false) { + if ('width' in clearStyles || 'height' in clearStyles) { + if($self.data('bjj-overflow') === undefined) { + $self.data('bjj-overflow', $self[0].style.overflow); + } + clearStyles['overflow'] = ''; + $self.css('overflow', 'hidden'); + } + clearStyles['display'] = 'none'; + } + + if (show !== undefined) { + fn = function() { + if(show) $self.removeData('bjj-overflow'); + $self.css(clearStyles); + if (typeof callback === 'function') callback.call(this); + }; + } + + return fn; + } + + + // 调用队列 + function callOrQueue(self, queue, callback) { + if (queue === true) { + self.queue(callback); + } else if (queue) { + self.queue(queue, callback); + } else { + self.each(function() { + callback.call(this); + }); + } + } + + function finishCall(self, callback, next) { + if (typeof callback === 'function') { + callback.call(self); + } + if (typeof next === 'function') { + next(); + } + } + + function delayRun(next) { + var self = this, + $self = $(self), + transitionDelayRunParams = $self.data('bjj-transitionDelayRunParams'); + + if (!transitionDelayRunParams) return; + + var transitionValueList = transitionDelayRunParams.transitionValueList, + params = transitionDelayRunParams.queueParams.shift(), + startProps = {}, + endProps = params.endProps, + duration = params.duration, + easing = params.easing, + queue = params.queue, + specialEasing = params.specialEasing, + callback = params.callback = disposeSpecialValue($self, endProps, startProps, params.callback), + empty = $.isEmptyObject(endProps); + + // If there's nothing to do... + if (duration === 0 || empty) { + if (!empty) $self.css(endProps); + finishCall(self, callback, next); + return; + } + + $self.css(startProps); + self.offsetWidth; // 强制刷新 + + // Prepare the callback. + var cb = function(e) { + + var i = $.inArray(timer, $.timers); + if (i >= 0) $.timers.splice(i, 1); + + i = $.inArray(transitionValue, transitionValueList); + if (i >= 0) transitionValueList.splice(i, 1); + self.style[support.transition] = transitionValueList.join(','); + + finishCall(self, callback, next); + }; + + var stop = function(gotoEnd) { + window.clearTimeout(timerID); + + var i = $.inArray(transitionValue, transitionValueList); + if (i >= 0) transitionValueList.splice(i, 1); + self.style[support.transition] = transitionValueList.join(','); + + if (gotoEnd) { + finishCall(self, callback, next); + } else { + var curProp = {}; + for (var p in endProps) { + var startValue = startProps[p], + endValue = endProps[p], + endColor = isColor(endValue), + dv; + + setCubicBezier(specialEasing[p]); + var bezierY = cubicBezier.getY(($.now() - startTime) / duration); + + if (endColor) { // 如果是颜色 + dv = calculateColor(startValue, endColor, bezierY); + } else { + dv = calculateValue($self, p, startValue, endValue, bezierY); + } + + curProp[p] = dv; + } + + $self.css(curProp); + } + }; + + // 模拟 .stop() 所需要的对象 + var timer = function() { + // 在 animate 动画完成后,且下一个队列函数已经执行,timer 被加入到 $.timers 队列中后,此时 jQuery 又会执行一次 jQuery.fx.tick + // 在 jQuery.fx.tick 中 $.timers 会将返回值为 false 的 timer 全部清空,这样会导致当前的动画无法执行 stop() + // 注释:animate 的动画中 timer() 的返回值为当前动画的剩余时间 + return true; + }; + timer.elem = self; + timer.queue = queue; + timer.anim = { stop: stop }; + $.timers.push(timer); + + // Build the `transition` property. + var transitionValue = getTransition(endProps, duration, easing, specialEasing); + transitionValueList.push(transitionValue); + + var startTime = $.now(); + self.style[support.transition] = transitionValueList.join(','); + $self.css(endProps); + + // transitionend 事件还是存在多个 bug + // 例如,多个 transition-property 并行时,先结束的动画会将触发其它属性动画的 transitionend 事件 + // 再例如,元素动画途中 display: none 后,将不会再触发 transitionend 事件 + // 因此只好弃用它,使用 setTimeout 代替它 + var timerID = window.setTimeout(cb, duration); + } + + // 模拟 .finish() 所需要的方法 + // 当执行 finish() 时 + // 如果动画队列中只有一个动画,那么这里的 finish 不会执行,只会执行 stop() + // 如果动画队列中有多个动画,那么除第一个动画以外,剩余多少动画,这里的 finish 就会被执行多少次。 + delayRun.finish = function() { + var $self = $(this), + transitionDelayRunParams = $self.data('bjj-transitionDelayRunParams'); + + if (!transitionDelayRunParams) return; + + var params = transitionDelayRunParams.queueParams.shift(); + + // 能够执行 finish 的动画,将不会执行 delayRun + params.callback = disposeSpecialValue($self, params.endProps, {}, params.callback); + + $self.css(params.endProps); + finishCall(this, params.callback); + }; + + // ## transition() + function transition(properties, duration, easing, callback, queue, specialEasing) { + + duration = parseInt(toMS(duration), 10); + + this.each(function() { + var $self = $(this), + transitionDelayRunParams = $self.data('bjj-transitionDelayRunParams'); + + if (!transitionDelayRunParams) { + transitionDelayRunParams = { + transitionValueList: [], // 用于分别保存每一个对象的 transition 属性值列表 + queueParams: [] // 用于保存动画队列中各个动画的参数 + } + } + + transitionDelayRunParams.queueParams.push({ + endProps: $.extend(true, {}, properties), + duration: duration, + easing: easing, + callback: callback, + queue: queue, + specialEasing: specialEasing + }); + + $self.data('bjj-transitionDelayRunParams', transitionDelayRunParams); + }); + + // Use jQuery's fx queue. + callOrQueue(this, queue, delayRun); + + return this; + } + + + // ### propFilter() + // jQuery 源码使用该方法来过滤出属性和缓动 + // + // props = {left: [200, 'easeInBack'], width: [100, 'linear'], height: 200} + // specialEasing = {height: 'swing'}; + // + // propFilter(props, specialEasing); + // + // => props == {left: 200, width: 100, height: 200} + // specialEasing == {left: 'easeInBack', width: 'linear', height: 'swing'} + // + function propFilter(props, specialEasing) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for (index in props) { + name = $.camelCase(index); + easing = specialEasing[name]; + value = props[index]; + if ($.isArray(value)) { + easing = value[1]; + value = props[index] = value[0]; + } + + if (index !== name) { + props[name] = value; + delete props[index]; + } + + hooks = $.cssHooks[name]; + if (hooks && 'expand' in hooks) { + value = hooks.expand(value); + delete props[name]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct 'name' + for (index in value) { + if (!(index in props)) { + props[index] = value[index]; + specialEasing[index] = easing; + } + } + } else { + specialEasing[name] = easing; + } + } + } + + + // ### Compatible with the following written + // Example: + // .animate.({'translate3d': [100, 200, 300]}); + // .animate.({'scale': [1, 2]}); + // .animate.({'scale': '1,2'}); + var _animate = $.fn._animate = $.fn.animate; + $.fn.animate = function(properties, duration, easing, callback) { + var queue = true, + specialEasing = {}, + originalProperties = $.extend({}, properties), + originalDuration = duration, + originalEasing = easing, + originalCallback = callback; + + if (typeof duration === 'function') { // Account for `.transition(properties, callback)`. + callback = duration; + duration = undefined; + } else if ($.isPlainObject(duration)) { // Account for `.transition(properties, options)`. + originalDuration = $.extend({}, duration); + easing = duration.easing; + queue = typeof duration.queue === 'undefined' ? true : duration.queue; + specialEasing = duration.specialEasing || specialEasing; + callback = duration.complete; + duration = duration.duration; + } else if (typeof easing === 'function') { // Account for `.transition(properties, duration, callback)`. + callback = easing; + easing = undefined; + } + // Set defaults. (`400` duration, `ease` easing) + if (!duration && duration !== 0) { + duration = $.fx.speeds._default; + } + if (!easing) { + easing = $.cssEase._default; + } + + // 拆分属性 + resolveProp(properties); + + var useTransition = support.transition; + if (useTransition && ('scrollLeft' in properties || 'scrollTop' in properties)) { + useTransition = false; + } + if (useTransition) { + // 将属性名与对应的缓动过滤出来 + propFilter(properties, specialEasing); + var transformEasing; + for (var p in specialEasing) { + // 将缓动转换为贝塞尔函数 + var e = specialEasing[p] = convertEase(specialEasing[p] || easing); + if (typeof e === 'undefined') { + useTransition = false; + break; + } else if (propertyMap[p] === support.transform) { + // 判断transform是否设置了不同的easing + if (transformEasing && transformEasing !== e) { + useTransition = false; + break; + } else { + transformEasing = e; + } + } + } + } + + // 如果不支持 transition 动画,或者不支持该缓动类型,再或者动画属性中包含不支持的属性,则使用 animate 实现 + if (!useTransition) { + + // 修复一个 动画的 bug,该 bug 仅在 animate() 动画中才会出现 + // + // jQuery 源码 6987 行 + // if ( tween.elem[ tween.prop ] != null && + // (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + // return tween.elem[ tween.prop ]; + // } + // + // 这段代码检查元素是否定义了该属性,如果定义了,并且元素的style属性中未定义该属性,则直接返回该属性值 + // 由于 自身拥有 x,y 这两个属性,因此最终导致了 元素的 x,y 动画起始位置不正确 + this.each(function() { + try { + // 在window平台下的safari浏览器下,删除属性会导致程序报错 + // 不过在该环境下即使不删除这两个属性,动画也不会出现问题 + if (this.x != null) delete this.x; + if (this.y != null) delete this.y; + } catch(e) {} + }); + + return _animate.call(this, originalProperties, originalDuration, originalEasing, originalCallback); + } + + // normalize opt.queue - true/undefined/null -> 'fx' + if (queue == null || queue === true) { + queue = 'fx'; + } + + return transition.call(this, properties, duration, easing, callback, queue, specialEasing); + } + + // ### resolveProp(props) + // + // {scale: '3,2'} => {scaleX: 3, scaleY: 2} + // + var xyz = ['X', 'Y', 'Z'], + checkProp = [ + 'translate', + 'translate3d', + 'scale', + 'scale3d', + 'rotate3d', + 'skew' + ]; + function resolveProp(props) { + for (var i = 0, l = checkProp.length; i < l; i++) { + var p = checkProp[i]; + if (p in props) { + var val = props[p]; + delete props[p]; + + // 区分 [[1,2], 'easeOutBack'] 和 [1,2] + var easeing; + if ($.isArray(val)) { + var val0 = val[0], + val1 = val[1]; + + if ($.isArray(val0) + || (typeof val0 === 'string' && val0.split(',').length > 1) + || (val1 && isNaN(parseFloat(val1)))) { + val = val0; + easeing = val1; + } + } + + var is3d = p.indexOf('3d') !== -1, + arr; + + if ($.isArray(val)) { + arr = val; + } else { + arr = (typeof val === 'string') ? val.split(',') : [val]; + // {scale: [3]} => {scale: [3, 3]} + if (arr.length < 2) { + if (is3d) { + arr[2] = arr[1] = arr[0]; + } else { + arr[1] = arr[0]; + } + } + } + + if (is3d) p = p.slice(0, -2); + var def = p === 'scale' ? 1 : 0; + // {scale: [2, 3]} => {scaleX: 2, scaleY: 3} + for (var j = 0; j < 3; j++) { + val = arr[j]; + if (val || val === 0) { + props[p + xyz[j]] = easeing ? [val, easeing] : val; + } else if (val === '') { + props[p + xyz[j]] = easeing ? [def, easeing] : def; + } + } + } + } + } + + + // ### uncamel(str) + // Converts a camelcase string to a dasherized string. + // + // 'marginLeft' => 'margin-left' + // 'webkitTransformOrigin' => '-webkit-transform-origin' + // + function uncamel(str) { + if (!str.indexOf('webkit')) str = 'W' + str.substr(1); + if (!str.indexOf('moz') || !str.indexOf('ms')) str = 'M' + str.substr(1); + return str.replace(/([A-Z])/g, '-$1').toLowerCase(); + } + + // ### unit(number, unit) + // + // unit(30, 'px') => '30px' + // unit('30%', 'px') => '30%' + // + function unit(i, units) { + if ((typeof i === 'string') && (!i.match(/^[\-0-9\.]+$/))) { + return i; + } else { + return '' + i + units; + } + } + + // ### getUnit(str) + // + // getUnit('30px') => 'px' + // getUnit('30%') => '%' + // getUnit('30') => '' + // + function getUnit(value) { + if (typeof value !== 'string') return ''; + var s = value.match(/^(?:\-=|\+=)?[\-0-9\.]+/); + if (!s) return ''; + return value.substr(s[0].length) || ''; + } + + + // ### getBaseValue($self, prop, index) + // 根据属性获取百分比时基于的值 + // @param index 参数表示需要获取的子属性在该符合属性值组中的索引位置,例如 ('margin', 0) == 'margin-top' + // + // getBaseValue($self, 'width') => $self.parent().width() + // getBaseValue($self, 'x') => $self.outerWidth() + // + // getBaseValue($self, 'margin', 2) => $self.parent().height() + // getBaseValue($self, 'background-position', 0) => $self.outerWidth() + // + function getBaseValue($self, prop, index) { + var baseSelfKeyword = [ + 'x', + 'y', + 'position', + 'origin', + 'radius' + ], + horDirKeyword = [ + 'x', + 'width', + 'padding', + 'margin', + 'left', + 'right' + ], + baseSelf = false, + dir = 0, // 表示方向,1表示水平,-1表示垂直 + baseValue = 0, + p = prop.toLowerCase(), + i = 0, + l = baseSelfKeyword.length; + + for (; i < l; i++) { + var k = baseSelfKeyword[i]; + if (p.indexOf(k) >= 0) { + baseSelf = true; + } + } + + i = 0; + l = horDirKeyword.length; + for (; i < l; i++) { + if (p.indexOf(horDirKeyword[i]) >= 0) { + dir = 1; + } + } + + if (!dir) { + if (p.indexOf('position') >= 0 + || p.indexOf('size') >= 0 + || p.indexOf('origin') >= 0) { + if (index === 1) { + dir = -1; + } else { + dir = 1; + } + } else { + if (index === 1 || index === 3) { + dir = 1; + } else { + dir = -1; + } + } + } + + if (dir === 1) { + baseValue = baseSelf ? $self.outerWidth() : $self.parent().width(); + } else if (dir === -1) { + baseValue = baseSelf ? $self.outerHeight() : $self.parent().height(); + } + + return baseValue; + } + + // ### convertUnit() + // 将属性值转换为指定单位的新值 + // @param index 参数表示需要获取的子属性在该符合属性值组中的索引位置,例如 ('margin', 0) == 'margin-top' + // + // convertUnit($self, 'margin', 1, 100px, %) => (100 / $self.parent().width()) * 100 + '%' + // + function convertUnit($self, prop, index, value, newUnit) { + var px = 'px', + em = 'em', + pe = '%', + oldUnit = getUnit(value), + newValue = value; + + if (oldUnit != newUnit) { + var oldValue = parseFloat(value); + if (newUnit === px) { + if (oldUnit === pe) { + newValue = oldValue / 100 * getBaseValue($self, prop, index) + px; + } else if (oldUnit === em) { + newValue = oldValue * parseFloat($self.css('font-size')) + px; + } + } else if (newUnit === pe) { + var baseValue = getBaseValue($self, prop, index); + if (!baseValue) { + newValue = 0; + } else if (oldUnit === px) { + newValue = (oldValue / baseValue) * 100 + pe; + } else if (oldUnit === em) { + newValue = (oldValue * parseFloat($self.css('font-size')) / baseValue) * 100 + pe; + } + } else if (newUnit === em) { + if (oldUnit === px) { + newValue = oldValue / parseFloat($self.css('font-size')) + em; + } else if (oldUnit === pe) { + newValue = oldValue / 100 * getBaseValue($self, prop, index) / parseFloat($self.css('font-size')) + em; + } + } + } + + return newValue; + } + + + // ### calculateValue($self, begin, end, pos) + // 根据 0-1 之间的位置比,计算两个属性值在该位置上的中间值 + // + // calculateValue($self, 'left', 0, 10, .5); => 5 + // calculateValue($self, 'left', '50px', '100%', .5); => (100 - 50 / $self.parent().width() * 100) * .5 + 50 / $self.parent().width() * 100 + '%' + // calculateValue($self, 'left', '50px', '+=100%', .5); => $self.parent().width() * 100% * .5 + 50 + 'px' + // + var rfxnum = new RegExp('^(?:([+-])=|)([+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|))([a-z%]*)$', 'i'); + function calculateValue($self, prop, begin, end, pos) { + begin = (begin + '').split(' '); + end = (end + '').split(' '); + + var value = [], + i = 0, + l = end.length; + + for (; i < l; i++) { + var startValue = begin[i] || 0, + endValue = end[i], + startUnit = getUnit(startValue), + endUnit = getUnit(endValue) || startUnit, + endColor = isColor(endValue); + + if (endColor) { + value[i] = calculateColor(startValue, endColor, pos); + + } else if (isNaN(parseFloat(endValue))) { // 可能是一些关键字或者特殊值 + var ret = rfxnum.exec(end[i]); + if (ret) { // 如果结束值为 '+=' 或者 '-=' + var v = (ret[1] + 1) * ret[2] + ret[3]; + endUnit = startUnit || endUnit; // 单位改用起始值的单位 + v = convertUnit($self, prop, i, v, endUnit); + startValue = parseFloat(startValue); + endValue = startValue + parseFloat(v); + + value[i] = (endValue - startValue) * pos + startValue + endUnit; + } else { // 如果是关键字,就保留原值 + value[i] = endValue; + } + } else { + endValue = parseFloat(endValue); + startValue = convertUnit($self, prop, i, startValue, endUnit); + startValue = parseFloat(startValue); + + value[i] = (endValue - startValue) * pos + startValue + endUnit; + } + } + + l = begin.length; + for (; i < l; i++) { + value.push(begin[i]); + } + + value = value.join(' '); + + var numberValue = parseFloat(value); + + return value == numberValue ? numberValue : value; + } + + + // ### toMS(duration) + // Converts given `duration` to a millisecond string. + // + // toMS('fast') => $.fx.speeds[i] => '200ms' + // toMS('normal') => $.fx.speeds._default => '400ms' + // toMS(10) => '10ms' + // toMS('100ms') => '100ms' + // + function toMS(duration) { + var i = duration; + + // Allow string durations like 'fast' and 'slow', without overriding numeric values. + if (typeof i === 'string' && (!i.match(/^[\-0-9\.]+/))) { + i = $.fx.speeds[i] || $.fx.speeds._default; + } + + return unit(i, 'ms'); + } + + // ### isKeyword(value) + // 判断一个值是否为关键字 + // + // isKeyword('auto'); => true + // isKeyword('50px 50px 1px #000'); => false + // + function isKeyword(value) { + return typeof value === 'string' && isNaN(parseFloat(value)) && value.split(' ').length === 1; + } + + // ### isComplex(value) + // 判断一个值是否为复合值 + // + // isComplex('50px'); => false + // isComplex('rgb(0, 0, 0)'); => false + // isComplex('50px 50px 1px #000'); => true + // + function isComplex(value) { + var str = value + ''; + return str.split(',').length === 1 && str.split(' ').length > 1; + } + + // ### isColor(value) + // 判断一个值是否为颜色,如果是颜色则返回该颜色的 rgb 形式 + // + // isColor('white'); => 'rgb(255,255,255)' + // isColor('auto'); => false + // + function isColor(value) { + if (typeof value === 'string') { + if (!value.indexOf('rgb') && value.split(' ').length === 1) return value; + return getCorrectValue('color', value); + } + return false; + } + + // ### checkShadow(prop, value, inset) + // 检查一个属性是否为阴影 + // 如果不是阴影,则返回原值 + // 如果阴影值不合法,则返回默认阴影。 + // 如果是阴影则返回该阴影的正确形式,同时去掉参数中的多余空格。 + // 第三个参数表示 boxShadow 的默认阴影是否为内阴影 + // + // checkShadow('boxShadow', '50px 50px 1px #000'); => rgb(0,0,0) 50px 50px 1px 0px + // checkShadow('boxShadow', 'none'); => rgba(0,0,0,0) 0px 0px 0px 0px + // checkShadow('left', '50px'); => '50px' + // + function checkShadow(prop, value, inset) { + if (prop.indexOf('hadow') < 0) return value; + value = getCorrectValue(prop, value); + if (!value) { + var def = inset && !prop.indexOf('box') ? 'inset 0 0 0 transparent' : '0 0 0 transparent'; + value = getCorrectValue(prop, def); + } + value = value.replace(/,\s/g, ','); + return value; + } + + // ### getCorrectValue(prop, value) + // 返回该值的正确形式 + // + // getCorrectValue('color', 'white'); => 'rgb(255,255,255)' + // getCorrectValue('boxShadow', '50px 50px 1px #000'); => rgb(0, 0, 0) 50px 50px 1px 0px + // + function getCorrectValue(prop, value) { + testElem.style[prop] = ''; + testElem.style[prop] = value; + $testElem.appendTo('body'); + value = testElem.style[prop] !== '' && testElem.style[prop] !== 'none' && $testElem.css(prop); + $testElem.detach(); + return value; + } + + // ### calculateColor(begin, end, pos) + // 根据 0-1 之间的位置比,计算两个颜色在该位置上的过渡色 + // + // calculateColor([255,255,255,1], [0,0,0,1], .5); => 'rgba(127,127,127,1)' + // calculateColor([255,255,255], [0,0,0], .5); => 'rgb(127,127,127)' + // + function calculateColor(begin, end, pos) { + // 如果传入的是颜色值,将其先解析为数组 + if (!$.isArray(begin)) begin = parseColor(begin); + if (!$.isArray(end)) end = parseColor(end); + + var len = Math.min(begin.length, end.length), + color = 'rgb', + dr = pos * (end[0] - begin[0]), + dg = pos * (end[1] - begin[1]), + db = pos * (end[2] - begin[2]), + r = begin[0] + dr, + g = begin[1] + dg, + b = begin[2] + db, + a = 1; + if (len > 3) { + color += 'a'; + a = parseFloat(begin[3] + pos * (end[3] - begin[3]), 10); + r = begin[0] + dr / a * end[3]; + g = begin[1] + dg / a * end[3]; + b = begin[2] + db / a * end[3]; + } + r = parseInt(r, 10); + g = parseInt(g, 10); + b = parseInt(b, 10); + color += '(' + r + ',' + g + ',' + b ; + if (len > 3) { color += ',' + a; } + color += ')'; + return color; + } + + // ### parseColor(color) + // 将一个颜色值转化为数组形式 + // + // 'rgba(127,127,127,1)' => [127, 127, 127, 1] + // 'rgb(127,127,127)' => [127, 127, 127, 1] + // '#000000' => [ 0, 0, 0, 1] + // '#fff' => [255, 255, 255, 1] + // + function parseColor(color) { + var match, triplet; + + // Match #aabbcc + if (match = /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(color)) { + triplet = [parseInt(match[1], 16), parseInt(match[2], 16), parseInt(match[3], 16), 1]; + + // Match #abc + } else if (match = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(color)) { + triplet = [parseInt(match[1], 16) * 17, parseInt(match[2], 16) * 17, parseInt(match[3], 16) * 17, 1]; + + // Match rgb(n, n, n) + } else if (match = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) { + triplet = [parseInt(match[1]), parseInt(match[2]), parseInt(match[3]), 1]; + + } else if (match = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(color)) { + triplet = [parseInt(match[1], 10), parseInt(match[2], 10), parseInt(match[3], 10),parseFloat(match[4])]; + + // No browser returns rgb(n%, n%, n%), so little reason to support this format. + } + return triplet; + } + + // ### getArg(str) + // 获取字符串表达式中括号内的参数数组 + // + // 'cubic-bezier(0,0,1,1)' => [0,0,1,1] + // + function getArg(str) { + var s = str.match(/\(.*\)$/); + if (s) { + var args = s[0].slice(1, -1).split(','); + for (var i = 0, l = args.length; i < l; i++) { + var arg = parseFloat(args[i]); + args[i] = isNaN(arg) ? undefined : arg; + } + return args; + } + return null; + } + + /** + * 创建一个三次贝塞尔对象 + * @exception 每一个参数为一个表示点的数组[x,y] + * @param {array} c1 表示起始点的控制点 + * @param {array} c2 表示结束点的控制点 + * @param {array} begin 表示起始点,默认为[0,0] + * @param {array} end 表示结束点,默认为[1,1] + */ + function CubicBezier() { + this.set.apply(this, arguments); + } + + CubicBezier.prototype = { + _bezierFunc: function(p, t, targ) { + return this.begin[p] * Math.pow(1 - t, 3) + + this.c1[p] * 3 * t * Math.pow(1 - t, 2) + + this.c2[p] * 3 * (1 - t) * Math.pow(t, 2) + + this.end[p] * Math.pow(t, 3) - + targ; + }, + + _deltaBezierFunc: function(p, t, targ) { + var dt = 1e-8; + return (this._bezierFunc(p, t, targ) - this._bezierFunc(p, t - dt, targ)) / dt; + }, + + set: function(c1, c2, begin, end) { + this.c1 = c1 ? new Point(c1[0], c1[1]) : new Point(0, 0); + this.c2 = c2 ? new Point(c2[0], c2[1]) : new Point(1, 1); + this.begin = begin ? new Point(begin[0], begin[1]) : new Point(0, 0); + this.end = end ? new Point(end[0], end[1]) : new Point(1, 1); + }, + + /** + * 已知x,求y + * @param {number} x 参数表示一个在贝塞尔曲线上X轴方向的向量,取值在 0.0 - 1.0 之间 + * @return 返回x在贝塞尔曲线上对应的y + */ + getY: function(x) { + var t = .5; //设置t的初值 + for (var i = 0; i < 1000; i++) { + t = t - this._bezierFunc('x', t, x) / this._deltaBezierFunc('x', t, x); + if (this._bezierFunc('x', t, x) === 0) break; + } + return this._bezierFunc('y', t, 0); + } + + } + + // ## Point class + function Point(x, y) { + this.x = x || 0; + this.y = y || 0; + } + + // 根据缓动函数,创建三次贝塞尔对象 + var cubicBezier = new CubicBezier(); + function setCubicBezier(easing) { + var args = getArg(easing); + cubicBezier.set([args[0], args[1]], [args[2], args[3]]); + } + + return $; +})); \ No newline at end of file diff --git a/modules/jquery.fancytree-all-deps.min.js b/modules/jquery.fancytree-all-deps.min.js new file mode 100644 index 0000000..6a0e0ac --- /dev/null +++ b/modules/jquery.fancytree-all-deps.min.js @@ -0,0 +1,2 @@ +!function(e){e.ui=e.ui||{};e.ui.version="1.12.1";var t=0,n=Array.prototype.slice;e.cleanData=function(t){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{(i=e._data(r,"events"))&&i.remove&&e(r).triggerHandler("remove")}catch(e){}t(n)}}(e.cleanData),e.widget=function(t,n,i){var r,o,s,a={},l=t.split(".")[0],d=l+"-"+(t=t.split(".")[1]);return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][d.toLowerCase()]=function(t){return!!e.data(t,d)},e[l]=e[l]||{},r=e[l][t],o=e[l][t]=function(e,t){if(!this._createWidget)return new o(e,t);arguments.length&&this._createWidget(e,t)},e.extend(o,r,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),s=new n,s.options=e.widget.extend({},s.options),e.each(i,function(t,i){e.isFunction(i)?a[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=r,t=i.apply(this,arguments),this._super=n,this._superApply=o,t}}():a[t]=i}),o.prototype=e.widget.extend(s,{widgetEventPrefix:r?s.widgetEventPrefix||t:t},a,{constructor:o,namespace:l,widgetName:t,widgetFullName:d}),r?(e.each(r._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,o,n._proto)}),delete r._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,r,o=n.call(arguments,1),s=0,a=o.length;s",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,r,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},i=t.split("."),t=i.shift(),i.length){for(r=s[t]=e.widget.extend({},this.options[t]),o=0;o
"),o=r.children()[0];return e("body").append(r),t=o.offsetWidth,r.css("overflow","scroll"),n=o.offsetWidth,t===n&&(n=r[0].clientWidth),r.remove(),i=t-n},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),r="scroll"===n||"auto"===n&&t.width0?"right":"center",vertical:a<0?"top":s>0?"bottom":"middle"};hr(o(s),o(a))?c.important="horizontal":c.important="vertical",i.using.call(this,e,c)}),l.offset(e.extend(N,{using:a}))})},e.ui.position={fit:{left:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollLeft:i.offset.left,s=i.width,a=e.left-t.collisionPosition.marginLeft,l=o-a,d=a+t.collisionWidth-s-o;t.collisionWidth>s?l>0&&d<=0?(n=e.left+l+t.collisionWidth-s-o,e.left+=l-n):e.left=d>0&&l<=0?o:l>d?o+s-t.collisionWidth:o:l>0?e.left+=l:d>0?e.left-=d:e.left=r(e.left-a,e.left)},top:function(e,t){var n,i=t.within,o=i.isWindow?i.scrollTop:i.offset.top,s=t.within.height,a=e.top-t.collisionPosition.marginTop,l=o-a,d=a+t.collisionHeight-s-o;t.collisionHeight>s?l>0&&d<=0?(n=e.top+l+t.collisionHeight-s-o,e.top+=l-n):e.top=d>0&&l<=0?o:l>d?o+s-t.collisionHeight:o:l>0?e.top+=l:d>0?e.top-=d:e.top=r(e.top-a,e.top)}},flip:{left:function(e,t){var n,i,r=t.within,s=r.offset.left+r.scrollLeft,a=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,d=e.left-t.collisionPosition.marginLeft,c=d-l,u=d+t.collisionWidth-a-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];c<0?((n=e.left+h+f+p+t.collisionWidth-a-s)<0||n0&&((i=e.left-t.collisionPosition.marginLeft+h+f+p-l)>0||o(i)0&&((n=e.top-t.collisionPosition.marginTop+h+f+p-l)>0||o(n)=0}}function h(n,i){var r,o,s,a;for(this.parent=n,this.tree=n.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},r=0,o=A.length;rul.fancytree-container").remove();var n,i={tree:this};this.rootNode=new h(i,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=e("
    ",{class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=y.debugLevel)}{if(!e.ui||!e.ui.fancytree){var p,g,y=null,v=new RegExp(/\.|\//),m=/[&<>"'\/]/g,x=/[<>"'\/]/g,b="$recursive_request",C={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},_={16:!0,17:!0,18:!0},k={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},w={16:"shift",17:"ctrl",18:"alt",91:"meta",93:"meta"},N={0:"",1:"left",2:"middle",3:"right"},S="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),E={},T="columns types".split(" "),A="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),O={},F={},P={active:!0,children:!0,data:!0,focus:!0};for(p=0;p=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[s,0].concat(c))),a&&!i){for(r=0,o=c.length;r=0;i--)"paging"===(r=this.children[i]).statusNodeType&&this.removeChild(r);this.partload=!1}},appendSibling:function(e){return this.addNode(e,"after")},applyPatch:function(t){if(null===t)return this.remove(),s(this);var n,i,r={children:!0,expanded:!0,parent:!0};for(n in t)i=t[n],r[n]||e.isFunction(i)||(O[n]?this[n]=i:this.data[n]=i);return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):s(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,n){return e.addNode(this.toDict(!0,n),t)},countChildren:function(e){var t,n,i,r=this.children;if(!r)return 0;if(i=r.length,!1!==e)for(t=0,n=i;t=4&&(Array.prototype.unshift.call(arguments,this.toString()),n("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),n("error",arguments))},findAll:function(t){t=e.isFunction(t)?t:u(t);var n=[];return this.visit(function(e){t(e)&&n.push(e)}),n},findFirst:function(t){t=e.isFunction(t)?t:u(t);var n=null;return this.visit(function(e){if(t(e))return n=e,!1}),n},_changeSelectStatusAttrs:function(e){var n=!1,i=this.tree.options,r=y.evalOption("unselectable",this,this,i,!1),o=y.evalOption("unselectableStatus",this,this,i,void 0);switch(r&&null!=o&&(e=o),e){case!1:n=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:n=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:n=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:t(!1,"invalid state: "+e)}return n&&this.renderStatus(),n},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit(function(e){e._changeSelectStatusAttrs(t)}),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){function n(e){var t,r,o,s,a,l,d,c,u=e.children;if(u&&u.length){for(l=!0,d=!1,t=0,r=u.length;t=3&&(Array.prototype.unshift.call(arguments,this.toString()),n("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===t)return!0;n===n.parent&&e.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,n=this.getParentList(!1,!1);for(e=0,t=n.length;e=0;n--)r.push(s[n].setExpanded(!0,t));return e.when.apply(e,r).done(function(){d?i.scrollIntoView(l).done(function(){o.resolve()}):o.resolve()}),o.promise()},moveTo:function(n,i,r){void 0===i||"over"===i?i="child":"firstChild"===i&&(n.children&&n.children.length?(i="before",n=n.children[0]):i="child");var o,s=this.parent,a="child"===i?n:n.parent;if(this!==n){if(this.parent?a.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),a!==s&&s.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===a)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else t((o=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(o,1);if(this.parent=a,a.hasChildren())switch(i){case"child":a.children.push(this);break;case"before":t((o=e.inArray(n,a.children))>=0,"invalid target parent"),a.children.splice(o,0,this);break;case"after":t((o=e.inArray(n,a.children))>=0,"invalid target parent"),a.children.splice(o+1,0,this);break;default:e.error("Invalid mode "+i)}else a.children=[this];r&&n.visit(r,!0),a===s?a.triggerModifyChild("move",this):a.triggerModifyChild("add",this),this.tree!==n.tree&&(this.warn("Cross-tree moveTo is experimantal!"),this.visit(function(e){e.tree=n.tree},!0)),s.isDescendantOf(a)||s.render(),a.isDescendantOf(s)||a===s||a.render()}},navigate:function(t,n){function i(i){if(i){try{i.makeVisible({scrollIntoView:!1})}catch(e){}return e(i.span).is(":visible")?!1===n?i.setFocus():i.setActive():(i.debug("Navigate: skipping hidden node"),void i.navigate(t,n))}}var r,o,a,l=e.ui.keyCode,d=null;switch(t){case l.BACKSPACE:this.parent&&this.parent.parent&&(a=i(this.parent));break;case l.HOME:this.tree.visit(function(t){if(e(t.span).is(":visible"))return a=i(t),!1});break;case l.END:this.tree.visit(function(t){e(t.span).is(":visible")&&(a=t)}),a&&(a=i(a));break;case l.LEFT:this.expanded?(this.setExpanded(!1),a=i(this)):this.parent&&this.parent.parent&&(a=i(this.parent));break;case l.RIGHT:this.expanded||!this.children&&!this.lazy?this.children&&this.children.length&&(a=i(this.children[0])):(this.setExpanded(),a=i(this));break;case l.UP:for(d=this.getPrevSibling();d&&!e(d.span).is(":visible");)d=d.getPrevSibling();for(;d&&d.expanded&&d.children&&d.children.length;)d=d.children[d.children.length-1];!d&&this.parent&&this.parent.parent&&(d=this.parent),a=i(d);break;case l.DOWN:if(this.expanded&&this.children&&this.children.length)d=this.children[0];else for(r=(o=this.getParentList(!1,!0)).length-1;r>=0;r--){for(d=o[r].getNextSibling();d&&!e(d.span).is(":visible");)d=d.getNextSibling();if(d)break}a=i(d);break;default:!1}return a||s()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var i,r=this.parent,o=e.inArray(this,r.children),s=this;return t(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(i=this.tree._callHook("nodeLoadChildren",this,n)).done(function(e){var t=s.children;for(p=0;pm+v-y&&(_=c+p-v+y,C&&(t(C.isRootNode()||e(C.span).is(":visible"),"topNode must be visible"),d<_&&(_=d-g))),null!==_?r.effects?(r.effects.complete=function(){h.resolveWith(f)},x.stop(!0).animate({scrollTop:_},r.effects)):(x[0].scrollTop=_,h.resolveWith(this)):h.resolveWith(this),h.promise()):(this.warn("scrollIntoView(): node is invisible."),s())},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e,t){return this.tree._callHook("nodeSetSelected",this,e,t)},setStatus:function(e,t,n){return this.tree._callHook("nodeSetStatus",this,e,t,n)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var n,i,r=this.children;if(r){if(e=e||function(e,t){var n=e.title.toLowerCase(),i=t.title.toLowerCase();return n===i?0:n>i?1:-1},r.sort(e),t)for(n=0,i=r.length;n=0,n=void 0===n?!r:!!n)r||(d+=i+" ",a=!0);else for(;d.indexOf(" "+i+" ")>-1;)d=d.replace(" "+i+" "," ");return this.extraClasses=e.trim(d),a},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,n,i){var r,o=this.tree.options.modifyChild;o&&(n&&n.parent!==this&&e.error("childNode "+n+" is not a child of "+this),r={node:this,tree:this.tree,operation:t,childNode:n||null},i&&e.extend(r,i),o({type:"modifyChild"},r))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var n,i,r=!0,o=this.children;if(!0===t&&(!1===(r=e(this))||"skip"===r))return r;if(o)for(n=0,i=o.length;n=2&&(Array.prototype.unshift.call(arguments,this.toString()),n("warn",arguments))}},f.prototype={_makeHookContext:function(t,n,i){var r,o;return void 0!==t.node?(n&&t.originalEvent!==n&&e.error("invalid args"),r=t):t.tree?r={node:t,tree:o=t.tree,widget:o.widget,options:o.widget.options,originalEvent:n,typeInfo:o.types[t.type]||{}}:t.widget?r={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:n}:e.error("invalid args"),i&&e.extend(r,i),r},_callHook:function(t,n,i){var r=this._makeHookContext(n),o=this[t],s=Array.prototype.slice.call(arguments,2);return e.isFunction(o)||e.error("_callHook('"+t+"') is not a function"),s.unshift(r),o.apply(this,s)},_setExpiringValue:function(e,t,n){this._tempCache[e]={value:t,expire:Date.now()+(+n||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_requireExtension:function(n,i,r,o){null!=r&&(r=!!r);var s=this._local.name,a=this.options.extensions,l=e.inArray(n,a)=4&&(Array.prototype.unshift.call(arguments,this.toString()),n("log",arguments))},enable:function(e){!1===e?this.widget.disable():this.widget.enable()},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this.render()):this.debug("enableUpdate(false)..."),!e)},expandAll:function(e,t){e=!1!==e,this.visit(function(n){!1!==n.hasChildren()&&n.isExpanded()!==e&&n.setExpanded(e,t)})},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(t,n,i){t="string"==typeof t?function(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}(t):t;var r=null,o=(n=n||this.getFirstChild()).parent.children,s=null,a=function(e,t,n){var i,r,o=e.children,s=o.length,l=o[t];if(l&&!1===n(l))return!1;if(l&&l.children&&l.expanded&&!1===a(l,0,n))return!1;for(i=t+1;i