mirror of
https://github.com/gnu4cn/ts-learnings.git
synced 2024-12-26 21:00:10 +08:00
Change to git.xfoss.com
This commit is contained in:
parent
84fc612215
commit
aadff4deb9
20
SUMMARY.md
20
SUMMARY.md
@ -1,6 +1,6 @@
|
||||
# Summary
|
||||
# 目录
|
||||
|
||||
* [Introduction](README.md)
|
||||
* [简介](README.md)
|
||||
* [基本数据类型](01_basic_data_types.md)
|
||||
* [变量声明](02_variables_declaration.md)
|
||||
* [类](03_classes.md)
|
||||
@ -9,4 +9,18 @@
|
||||
* [泛型](06_generics.md)
|
||||
* [枚举](07_enums.md)
|
||||
* [类型推导](08_type_inference.md)
|
||||
|
||||
* [类型兼容性](09_type_compatibility.md)
|
||||
* [高级类型](10_advanced_types.md)
|
||||
* [符号](11_symbols.md)
|
||||
* [迭代]()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
* []()
|
||||
|
61
_book/.gitignore
vendored
Normal file
61
_book/.gitignore
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
dist/*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Typescript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
214
_book/00_tsconfig-json.md
Normal file
214
_book/00_tsconfig-json.md
Normal file
@ -0,0 +1,214 @@
|
||||
# tsconfig.json
|
||||
|
||||
|
||||
[原文](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html): https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
||||
|
||||
|
||||
## 概述
|
||||
|
||||
某个目录下存在文件`tsconfig.json`,那么就表明该目录是某个TypeScript项目的根目录。`tsconfig.json`文件指定了有哪些根文件,以及需要哪些编译器选项来对该项目进行编译。项目是以以下方式之一进行编译的:
|
||||
|
||||
|
||||
## `tsconfig.json`的运用
|
||||
|
||||
+ 通过不带有文件的方式调用 `tsc`命令,此时编译器从当前目录开始,进而沿父目录链往上搜索`tsconfig.json`文件(by invoking `tsc` with no input files, in which case the compiler searches for the `tsconfig.json` file starting in the current directory and continuing up the parent directory chain)。
|
||||
|
||||
+ 通过不带有文件,但提供用于指定包含了`tsconfig.json`文件的目录路径,或指向某个包含了配置的有效的`.json`文件的`--project`(或仅`-p`)的命令行选项方式,来调用`tsc`命令。
|
||||
|
||||
当有在命令行上指定了文件时,`tsconfig.json`文件就会被忽略。
|
||||
|
||||
## 示例
|
||||
|
||||
`tsconfig.json`的一些示例文件:
|
||||
|
||||
+ 使用`files`属性
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"noImplicitAny": true,
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"files": [
|
||||
"core.ts",
|
||||
"sys.ts",
|
||||
"types.ts",
|
||||
"scanner.ts",
|
||||
"parser.ts",
|
||||
"utilities.ts",
|
||||
"binder.ts",
|
||||
"checker.ts",
|
||||
"emitter.ts",
|
||||
"program.ts",
|
||||
"commandLineParser.ts",
|
||||
"tsc.ts",
|
||||
"diagnosticInformationMap.generated.ts"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
+ 使用`include`与`exclude`属性
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"noImplicitAny": true,
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"outFile": "../../built/local/tsc.js",
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 详解(Details)
|
||||
|
||||
属性`compilerOptions`是可以省略的,在省略了该属性时,编辑器将使用默认选项。请参考完整的[编译器选项](#compiler-options)清单。
|
||||
|
||||
`files`属性取的是一个相对或绝对文件路径的清单。而`include`与`exclude`属性,则取的是类似于glob的文件模式清单(请参考 [Glob_(programming), Wikipedia](https://en.wikipedia.org/wiki/Glob_(programming)),[glob介绍](https://www.jianshu.com/p/ce7cf53274bb))。支持以下glob通配符:
|
||||
|
||||
+ `*` 匹配零个或更多字符(不包含目录分隔符,`*` matches zero or more characters(excluding directory separators))
|
||||
|
||||
+ `?` 匹配任意的一个字符(不包含目录分隔符,`?` matches any one character(excluding directory separators))
|
||||
|
||||
+ `**/` 递归地匹配所有子目录(`**/` recursively matches any subdirectory)
|
||||
|
||||
在某个glob模式片段中仅包含了 `*` 或 `.*` 时,那么只有那些扩展被支持的文件才被包含进来(也就是`.ts`、`.tsx`与`.d.ts`,而在`allowJs`被设置为`true`的情况下,也包含`.js`与`.jsx`)。
|
||||
|
||||
而在`files`与`include`都没有指定时,编译器将默认包含其所在目录及子目录下的所有TypeScript文件(`.ts`、`.d.ts`与`tsx`),除了那些使用`exclude`属性所排除的文件。同时若`allowJS`被设置为`true`,那么JavaScript文集(`.js`与`.jsx`)也将包含进来。若有指定`files`与`include`属性,则编译器将包含由这两个属性所包含的文件联合(the union of the files included by those two properties)。在未指定`exclude`属性时,使用编译器选项`outDir`所指定的目录中的文件是排除在外的(Files in the directory specified using the `outDir` compiler option are excluded as long as `exclude` property is not specified)。
|
||||
|
||||
使用`include`所包含的文件,可使用`exclude`属性对其进行过滤。但使用`files`属性显式包含的文件,则不会受到`exclude`的影响而总是会包含进来。在莫有指定`exclude`属性时,就默认排除了`node_modules`、`bower_components`、`jspm_packages`以及`<outDir>`这些目录。
|
||||
|
||||
那些被`files`或`include`属性包含进来的文件引用到的文件,也将被包含进来。同样,如某个文件`B.ts`被另一个文件`A.ts`引用了,那么除非文件`A.ts`在`exclude`清单中有指明,否则文件`B.ts`也不能被排除在外。
|
||||
|
||||
请注意编译器不会将那些可能是输出的文件包含进去;比如在输入中包含了`index.ts`时,那么`index.d.ts`与`index.js`就会被排除在外。总体来说,让多个文件只是在扩展名上有所不同,是不好的做法。
|
||||
|
||||
`tsconfig.json`文件可以是空的,那将对默认包含的所有文件,以默认的编译器选项进行编译(跟前面讲到的一样)。
|
||||
|
||||
在命令行指定的编译器选项,将覆盖在`tsconfig.json`文件中所指定的那些选项。
|
||||
|
||||
## `@types`、`typeRoots`与`types`
|
||||
|
||||
默认所有 *可见* 的 `@types` 包在编译中都被包含进去了。任何闭合文件夹的 `node_modules/@types` 里的包,都被视为 *可见* 的(Packages in `node_modules/@types` of any enclosing folder are considered *visible*); 具体来说,那意味着在 `./node_modules/@types/`、`../node/modules/@types/`及`../../node_modules/@types/`等处的包。
|
||||
|
||||
若指定了 `typeRoots`,那么就 *只有* `typeRoots`下的包将被包含进来了。比如:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"typeRoots": ["./typings"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
此配置文件将包含在 `./typings` 下的 *所有* 包,而不会包含那些 `./node_modules/@types` 下的包了。
|
||||
|
||||
在指定了 `types` 属性时,那么就只有所列出的那些包被包含进来。比如:
|
||||
|
||||
```typescript
|
||||
{
|
||||
"compilerOptions": {
|
||||
"types" : ["node", "lodash", "express"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
此`tsconfig.json`文件将 *只* 包含 `./node_modules/@types/node`、`./node_modules/@types/lodash`与`./node_modules/@types/express`。其他位处 `./node_modules/@types/*` 的包不会被包含进来。
|
||||
|
||||
类型包(a types package)指的是某个带有名为`index.d.ts`文件的文件夹,或某个有着包含了`types`字段的`package.json`文件的文件夹。
|
||||
|
||||
在`tsconfig.json`中指定`types: []`字段,就关闭了`@types`包的自动包含。
|
||||
|
||||
请记住只有在使用那些带有全局声明的文件(与将文件声明为模块相反)时,自动包含才是重要的(keep in mind that automatic inclusion is only important if you're using files with global declarations(as opposed to files declared as modules))。比如在使用一条`import "foo"`语句时,TypeScript将在`node_modules`与`node_modules/@types`文件夹中进行查找,以找到`foo`包。
|
||||
|
||||
## 使用`extends`配置继承
|
||||
|
||||
**Configuration inheritence with `extends`**
|
||||
|
||||
通过使用`extends`属性,`tsconfig.json`文件可从其他文件继承到配置。
|
||||
|
||||
在`tsconfig.json`中,`extends`属性是一项顶层属性(与`compilerOptions`、`files`、`include`与`exclude`一起)。`extends`的值是一个包含了到要继承的其他文件的路径的字符串。
|
||||
|
||||
来自基础文件的配置,将首先载入,随后被继承的配置文件覆盖。如发生了循环继承,编译器将报告错误。
|
||||
|
||||
继承配置文件中的`files`、`include`与`exclude`将 *覆盖* 基础配置文件中的对应属性(`files`, `include` and `exclude` from the inheriting config file *overwrite* those from the base config file)。
|
||||
|
||||
在配置文件中找到的所有相对路径,将解析为相对于配置文件原本的位置。
|
||||
|
||||
比如:
|
||||
|
||||
`configs/base.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`tsconfig.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"extends": "./config/base",
|
||||
"files": [
|
||||
"main.ts",
|
||||
"supplemental.ts"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`tsconfig.nostrictnull.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"extends": "./tsconfig",
|
||||
"compilerOptions": {
|
||||
"strictNullChecks": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 关于 `compileOnSave` 属性
|
||||
|
||||
加入一个顶层的`compileOnSave`,告诉IDE在保存时生成给定`tsconfig.json`的所有文件。
|
||||
|
||||
```json
|
||||
{
|
||||
"compileOnSave": true,
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
此特性当前已在 Visual Studio 2015 与 TypeScript 1.8.4 以上版本,以及[atom-typescript](https://github.com/TypeStrong/atom-typescript#compile-on-save)插件中得到支持。
|
||||
|
||||
## 关于`tsconfig.json`文件的完整结构
|
||||
|
||||
**Schema**
|
||||
|
||||
可以从 http://json.schemastore.org/tsconfig 查看到。
|
||||
|
||||
<a name="compiler-options"></a>
|
||||
## 编译器选项
|
||||
|
||||
| 选项 | 值类型 | 默认值 | 简介 |
|
||||
| :--- | :----: | :--- | :--- |
|
||||
| `--allowJs` | `boolean` | `false` | 允许编译JavaScript文件。 |
|
||||
| `--allowSyntheticDefaultImports` | `boolean` | `module === "system"` 或 `--esModuleInterop` | 允许从那些没有默认导出的模块默认导入。此选项不会影响生成的代码,只做类型检查。|
|
||||
|
||||
更多编译器选项请参考 https://www.typescriptlang.org/docs/handbook/compiler-options.html
|
497
_book/01_basic_data_types.html
Normal file
497
_book/01_basic_data_types.html
Normal file
@ -0,0 +1,497 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>基本数据类型 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="02_variables_declaration.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="./" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >基本数据类型</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="typescript基础数据类型">TypeScript基础数据类型</h1>
|
||||
<p><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank">原文</a></p>
|
||||
<p>为令到程序有用,那么就需要能够处理一些最简单的数据单元:数字、字符串、数据结构、布尔值等等。TypeScript支持那些在JavaScript所期望的同样类型,并额外带有一种可将数值与字符串联系起来的枚举类型(For programs to be useful, we need to be able to work with some of the simplest units of data: numbers, strings, structures, boolean values, and the like. In TypeScript, we support much the same types as you would expect in JavaScript, with a convenient enumeration type thrown in to help things along)。</p>
|
||||
<h2 id="布尔值">布尔值</h2>
|
||||
<p>最基本的数据类型就是简单的<code>true/false</code>, 在JavaScript与TypeScript中都叫做<code>boolean</code>(其它语言也一样)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> isDone: <span class="hljs-built_in">boolean</span> = <span class="hljs-literal">false</span>;
|
||||
</code></pre>
|
||||
<h2 id="数字">数字</h2>
|
||||
<p>与JavaScript一样,TypeScript中的 <strong>所有数字,都是浮点数</strong> ,类型为<code>number</code>。TypeScript支持十进制、十六进制字面量(literal),还有ECMAScript 2015中引入的二进制与八进制字面量。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> decLiteral: <span class="hljs-built_in">number</span> = <span class="hljs-number">6</span>;
|
||||
<span class="hljs-keyword">let</span> hexLiteral: <span class="hljs-built_in">number</span> = <span class="hljs-number">0xf00d</span>;
|
||||
<span class="hljs-keyword">let</span> binaryLiteral: <span class="hljs-built_in">number</span> = <span class="hljs-number">0b1010</span>;
|
||||
<span class="hljs-keyword">let</span> octalLiteral: <span class="hljs-built_in">number</span> = <span class="hljs-number">0o744</span>;
|
||||
</code></pre>
|
||||
<h2 id="字符串">字符串</h2>
|
||||
<p>基于NodeJS的JavaScript服务端框架,或者众多的客户端框架,它们能够可处理客户端或服务器端的文本数据。与其它语言一样,TypeScript使用<code>string</code>来表示文本数据类型。与JavaScript一样,可使用<code>"</code>(双引号)或<code>'</code>(单引号)来将字符串包围起来。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> name: <span class="hljs-built_in">string</span> = <span class="hljs-string">'Bob'</span>;
|
||||
name = <span class="hljs-string">"Smith"</span>;
|
||||
</code></pre>
|
||||
<p>此外,TypeScript或ES6中,还可以使用 <em>模板字符串(template string)</em> ,它可以 <strong>定义多行文本</strong> 与 <strong>内嵌表达式</strong> 这些字符串是用反引号字符(<code>\``)括起来,同时内嵌表达式的形式为</code>${ expr }`。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> name: <span class="hljs-built_in">string</span> = <span class="hljs-string">`Gene`</span>;
|
||||
<span class="hljs-keyword">let</span> age: <span class="hljs-built_in">number</span> = <span class="hljs-number">37</span>;
|
||||
<span class="hljs-keyword">let</span> sentence: <span class="hljs-built_in">string</span> = <span class="hljs-string">`Hello, my name is <span class="hljs-subst">${ name }</span>.
|
||||
|
||||
I'll be <span class="hljs-subst">${ age+1 }</span> years old next month`</span>;
|
||||
</code></pre>
|
||||
<p>这与下面定义<code>sentence</code>的方式,有相同效果:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> sentence: string = <span class="hljs-string">"Hello, my name is "</span> + name + <span class="hljs-string">".\n\n"</span> +
|
||||
<span class="hljs-string">"I'll be "</span> + ( age+<span class="hljs-number">1</span> ) + <span class="hljs-string">"years old next month."</span>;
|
||||
</code></pre>
|
||||
<h2 id="数组">数组</h2>
|
||||
<p>和JavaScript一样,TypeScript可以操作数组元素。定义数组的方式有两种,一是可以在类型后面接上<code>[]</code>,表示由此类型元素所组成的一个数组:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> list: <span class="hljs-built_in">number</span>[] = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
|
||||
</code></pre>
|
||||
<p>第二种方式,是使用 <strong>数组泛型(Array Generic)</strong> (通用数组类型, a generic array type) ,<code>Array<type></code>:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> list: <span class="hljs-built_in">Array</span><<span class="hljs-built_in">number</span>> = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>与Python中清单的比较: Python清单中的元素,不要求类型一致,且因此认为Python在数据结构上更具灵活性。Python清单有<code>pop()</code>、<code>append()</code>等方法,TypeScript要求数组元素类型一致(比如强行将不一致的元素push到数组上,其编译器就会报错),则有<code>push()</code>与<code>pop()</code>方法。它们都是使用<code>[]</code>符号。</p>
|
||||
</blockquote>
|
||||
<h2 id="元组(tuple)">元组(Tuple)</h2>
|
||||
<p>TypeScript中的元组,允许表示一个 <strong>已知元素数量与类型</strong> 的数组,这些元素的类型不要求一致。比如,可定义一对值分别为<code>string</code>与<code>number</code>类型的元组。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-comment">// 声明一个元组类型</span>
|
||||
<span class="hljs-keyword">let</span> x: [<span class="hljs-built_in">string</span>, <span class="hljs-built_in">number</span>];
|
||||
|
||||
<span class="hljs-comment">// 对其进行初始化</span>
|
||||
x = [<span class="hljs-string">'weight'</span>, <span class="hljs-number">181</span>];
|
||||
|
||||
<span class="hljs-comment">// 错误的初始化</span>
|
||||
x = [<span class="hljs-number">181</span>, <span class="hljs-string">'weight'</span>];
|
||||
</code></pre>
|
||||
<p>在访问某个索引已知的元素时,将得到正确的类型:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-built_in">console</span>.log(x[<span class="hljs-number">0</span>].substr(<span class="hljs-number">1</span>)); <span class="hljs-comment">// 没有问题</span>
|
||||
<span class="hljs-built_in">console</span>.log(x[<span class="hljs-number">1</span>].substr(<span class="hljs-number">1</span>)); <span class="hljs-comment">// 报错,'number' does not have 'substr'</span>
|
||||
</code></pre>
|
||||
<p>在访问元组的越界元素时,将使用 <strong>联合类型</strong> (Union Types,属于高级类型(Advanced Types)的一种)进行替代:</p>
|
||||
<pre><code class="lang-typescript">x[<span class="hljs-number">3</span>] = <span class="hljs-string">'fat'</span>; <span class="hljs-comment">// 没有问题,字符串可以赋值给(`string` | `number`)类型</span>
|
||||
|
||||
<span class="hljs-built_in">console</span>.log(x[<span class="hljs-number">5</span>].toString()); <span class="hljs-comment">// 没有问题,`string` 与 `number` 都有 toString 方法</span>
|
||||
|
||||
x[<span class="hljs-number">6</span>] = <span class="hljs-literal">true</span>; <span class="hljs-comment">// 报错,布尔值不是(`string` | `number`)类型 (error TS2322: Type 'true' is not assignable to type 'string | number'.)</span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>与Python元组的比较:Python元组是不可修改的,访问速度较快。Python元组与Python清单一样可以包含不同类型的元素。Python元组使用<code>()</code>符号。</p>
|
||||
</blockquote>
|
||||
<h2 id="枚举(enum)">枚举(<code>enum</code>)</h2>
|
||||
<p>对JavaScript标准数据类型集的一个有帮助的补充,<code>enum</code>是TypeScript引入的新特性,作为JavaScript标准数据类型的补充。与像C#等其它语言一样,枚举类型是一种可以为某组数值带来更加友好名字的方式。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Color {Red, Green, Blue};
|
||||
<span class="hljs-keyword">let</span> c: Color = Color.Green;
|
||||
</code></pre>
|
||||
<p>枚举中的元素编号默认从<code>0</code>开始。也可手动指定元素编号数值。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Color {Red=<span class="hljs-number">1</span>, Green, Blue};
|
||||
<span class="hljs-keyword">let</span> c: Color = Color.Green;
|
||||
</code></pre>
|
||||
<p>或者全部采用手动的编号:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Color {Red = <span class="hljs-number">1</span>, Green = <span class="hljs-number">2</span>, Blue = <span class="hljs-number">4</span>};
|
||||
<span class="hljs-keyword">let</span> c: Color = Color.Green;
|
||||
</code></pre>
|
||||
<p>枚举的一个方便特性,在于还可以从数值,获取到枚举中其对应的名字。比如这里有个数值<code>2</code>,却不确定它是映射到上面枚举中的何种颜色,那么就可以查找那个相应的名称:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Color {Red = <span class="hljs-number">1</span>, Green, Blue}
|
||||
<span class="hljs-keyword">let</span> colorName: <span class="hljs-built_in">string</span> = Color[<span class="hljs-number">2</span>];
|
||||
|
||||
<span class="hljs-built_in">console</span>.log(colorName); <span class="hljs-comment">// 将输出`Green`,因为上面的代码中`Green`的值为2</span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>枚举的深入理解:通过使用枚举特性,可以创建出定制的名称(字符串)-值(整数)映射的类型,随后就可以利用创建出的定制类型,来声明变量,从而加以使用。</p>
|
||||
</blockquote>
|
||||
<h2 id="任意值-(any)">任意值 (<code>any</code>)</h2>
|
||||
<p>可能会在编写应用时,为那些尚不知道类型的变量,进行类型描述。这些值可能来自用户、第三方库等动态内容。在这些情况下,就不希望TypeScript的类型检查器,对这些值进行检查,而是让它们直接通过编译阶段的检查。那么,就可以使用<code>any</code>类型来标记这些变量:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> notSure: <span class="hljs-built_in">any</span> = <span class="hljs-number">4</span>;
|
||||
notSure = <span class="hljs-string">'Maybe a string instead'</span>;
|
||||
notSure = <span class="hljs-literal">false</span>; <span class="hljs-comment">// 布尔值也没有问题</span>
|
||||
</code></pre>
|
||||
<p>在对既有代码进行改写的时候,<code>any</code>类型就十分有用。<code>any</code>类型的使用,令到在编译时选择性的通过或跳过类型检查。你可能会认为与其它语言中也一样,<code>Object</code>类型也具有同样的作用。但<code>Object</code>类型的变量只是允许被赋予任意值,却不能在上面调用任意的方法,即使其真的有着这些方法:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> notSure: <span class="hljs-built_in">any</span> = <span class="hljs-number">4</span>;
|
||||
notSure.ifItExists(); <span class="hljs-comment">// 没有问题,因为在运行时可能存在这个一个`ifItExists`方法</span>
|
||||
notSure.toFixed(); <span class="hljs-comment">// 没有问题,因为`toFixed`方法确实存在(但编译器是不会加以检查的)</span>
|
||||
|
||||
<span class="hljs-keyword">let</span> prettySure: <span class="hljs-built_in">Object</span> = <span class="hljs-number">4</span>;
|
||||
prettySure.toFixed(); <span class="hljs-comment">// 报错,类型`Object`上没有`toFixed`属性 (error TS2339: Property 'toFixed' does not exist on type 'Object'.)</span>
|
||||
</code></pre>
|
||||
<p>就算只知道一部分数据的类型,<code>any</code>类型也是有用的。比如,有这么一个元组(数组?),其包含了不同类型的数据:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> list: <span class="hljs-built_in">any</span>[] = [<span class="hljs-number">1</span>, <span class="hljs-literal">true</span>, <span class="hljs-string">"free"</span>];
|
||||
list[<span class="hljs-number">1</span>] = <span class="hljs-number">100</span>;
|
||||
</code></pre>
|
||||
<h2 id="空值(void)">空值(<code>void</code>)</h2>
|
||||
<p><code>void</code>有点像是<code>any</code>的反面,它表示没有任何类型。当某个函数没有返回值时,通常会看到其返回值类型为<code>void</code>:</p>
|
||||
<pre><code>function warnUser(): void {
|
||||
alert('This is my warning message!');
|
||||
}
|
||||
</code></pre><p>仅仅声明一个<code>void</code>类型的变量是毫无意义的,因为只能为其赋予<code>undefined</code>和<code>null</code>值:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> unusable: <span class="hljs-built_in">void</span> = <span class="hljs-literal">undefined</span>;
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>那么<code>void</code> 类型,也就仅作为函数返回值类型了。</p>
|
||||
</blockquote>
|
||||
<h2 id="null-与-undefined"><code>null</code> 与 <code>undefined</code></h2>
|
||||
<p>TypeScript中的值<code>undefined</code>与<code>null</code>都有各自的类型,分别叫<code>undefined</code>与<code>null</code>。它们与<code>void</code>类似,各自用处都不大:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> u: <span class="hljs-literal">undefined</span> = <span class="hljs-literal">undefined</span>;
|
||||
<span class="hljs-keyword">let</span> n: <span class="hljs-literal">null</span> = <span class="hljs-literal">null</span>;
|
||||
</code></pre>
|
||||
<p>默认所有其它类型,都用着子类型<code>undefined</code>与<code>null</code>。也就是说,可将<code>null</code>与<code>undefined</code>赋值给<code>number</code>、<code>string</code>、<code>list</code>、<code>tuple</code>、<code>void</code>等类型。</p>
|
||||
<p>但在指定了编译器(tsc, typescript compiler)选项<code>--strictNullChecks</code>时,<code>null</code>与<code>undefined</code>就只能赋值给<code>void</code>以及它们自己了。这能避免 <strong>很多</strong> 常见的问题。比如在某处计划传入一个<code>string</code>或<code>null</code>或<code>undefined</code>的参数,那么就可使用<code>string | null | undefined</code>的 <strong>联合类型</strong> 。</p>
|
||||
<blockquote>
|
||||
<p>注意:TypeScript最佳实践是开启<code>--strictNullChecks</code>选项,但现阶段假设此选项是关闭的。</p>
|
||||
</blockquote>
|
||||
<h2 id="never类型"><code>never</code>类型</h2>
|
||||
<p>类型<code>never</code>表示一些永不存在的值的类型。比如,可将那些总是会抛出异常,或根本不会有返回值的函数表达式、箭头函数表达式的返回值设置为<code>never</code>类型;一些变量也可以是<code>never</code>类型,仅当它们受永不为真的 <strong>类型保护</strong> 约束时。</p>
|
||||
<p>以下是一些返回<code>never</code>类型的函数:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-comment">// 返回`never`的函数,必须存在无法到达的终点(return?)</span>
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">error</span>(<span class="hljs-params">message: <span class="hljs-built_in">string</span></span>): <span class="hljs-title">never</span> </span>{
|
||||
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span> (message);
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// 推断的返回值类型为never</span>
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">fail</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">return</span> error(<span class="hljs-string">'Somthing failed'</span>)
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// 返回`never`的函数,必须存在无法到达的终点</span>
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">infiniteLoop</span> (<span class="hljs-params"></span>): <span class="hljs-title">never</span> </span>{
|
||||
<span class="hljs-keyword">while</span>(<span class="hljs-literal">true</span>) {
|
||||
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<h2 id="类型的断言(type-assertion)">类型的断言(Type Assertion)</h2>
|
||||
<p>可能会遇到这样的情况,相比TypeScript(编译器),Coder更有把握了解某个值的类型。也就是说Coder清楚地了解某个实体(entity, 与变量名称所对应的内存单元)有着比它现有类型(<code>any</code>/<code>undefined</code>/<code>null</code>等)更具体的类型。</p>
|
||||
<p>那么此时就可以通过 <strong>类型断言</strong> ,告诉编译器“相信我,我知道自己在干什么”,从而对编译进行干预。类型断言相当于其它语言中的类型转换,只是不进行特殊的数据检查与结构(destructure)。其对运行时没有影响,尽在编译阶段起作用。TypeScript会假设Coder已进行了必要的检查。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> someValue: <span class="hljs-built_in">any</span> = <span class="hljs-string">"This is a string"</span>;
|
||||
<span class="hljs-keyword">let</span> strLength: <span class="hljs-built_in">number</span> = (<<span class="hljs-built_in">string</span>>someValue).length;
|
||||
</code></pre>
|
||||
<p>类型断言的另一个<code>as</code>的写法:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> someValue: <span class="hljs-built_in">any</span> = <span class="hljs-string">"This is a string"</span>;
|
||||
<span class="hljs-keyword">let</span> strLength: <span class="hljs-built_in">number</span> = (someValue as <span class="hljs-built_in">string</span>).length;
|
||||
</code></pre>
|
||||
<p>这两种形式是等价的。使用何种写法,仅凭个人喜好;但在结合JSX( <a href="https://jsx.github.io/" target="_blank">jsx.github.io</a> )使用TypeScript时,就只能用<code>as</code>的写法。</p>
|
||||
<h2 id="深入理解let">深入理解<code>let</code></h2>
|
||||
<p>在上面的示例中,TypeScript的<code>let</code>关键字取代了JavaScript中的<code>var</code>关键字。JavaScript版本ES6(ECMAScript 2015)带来了新的<code>let</code>关键字,TypeScript进行了实现。Javascript原来的很多问题,都可以通过使用<code>let</code>加以解决,所以尽可能的使用<code>let</code>来代替<code>var</code>了。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="./" class="navigation navigation-prev " aria-label="Previous page: Introduction">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="02_variables_declaration.html" class="navigation navigation-next " aria-label="Next page: 变量声明">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"基本数据类型","level":"1.2","depth":1,"next":{"title":"变量声明","level":"1.3","depth":1,"path":"02_variables_declaration.md","ref":"02_variables_declaration.md","articles":[]},"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"01_basic_data_types.md","mtime":"2019-04-03T06:43:16.304Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
774
_book/02_variables_declaration.html
Normal file
774
_book/02_variables_declaration.html
Normal file
@ -0,0 +1,774 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>变量声明 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="03_classes.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="01_basic_data_types.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >变量声明</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="变量的声明,variables-declaration">变量的声明,Variables Declaration</h1>
|
||||
<p><code>let</code>与<code>const</code>是较新一版JavaScript(ES6)中变量声明的方式。前一部分提到,<code>let</code>在很多方面与<code>var</code>是相似的,但<code>let</code>却可以帮助大家解决JavaScript中的一些常见问题。<code>const</code>是对<code>let</code>的一个增强,可阻止对经其修饰的变量的再次赋值。</p>
|
||||
<p>因为TypeScript是JavaScript的超集(super-set),所以自然有对JavaScript所有特性的支持,<code>let</code>与<code>const</code>关键字也不例外。以下将详细讨论这些全新的声明方式,以及为何要用它们来取代<code>var</code>的原因。</p>
|
||||
<p>如果你还没有发现JavaScript中使用<code>var</code>所带来的问题,那么下面的内容将唤起你的记忆。</p>
|
||||
<h2 id="关于var式变量声明">关于<code>var</code>式变量声明</h2>
|
||||
<p>JavaScript使用<code>var</code>关键字来声明变量,有着悠久的历史:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> a = <span class="hljs-number">10</span>;
|
||||
</code></pre>
|
||||
<p>显而易见,这里定义出一个名为<code>a</code>的值为<code>10</code>的变量(指向某个内存单元地址)。</p>
|
||||
<p>在函数内部,也可以进行变量的定义:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span>(<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">var</span> msg = <span class="hljs-string">"Hello, World!"</span>
|
||||
|
||||
<span class="hljs-keyword">return</span> msg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>在其它函数内部,也可以访问相同变量:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span>(<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">var</span> a = <span class="hljs-number">10</span>;
|
||||
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">g</span>(<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">var</span> b = a+<span class="hljs-number">1</span>;
|
||||
<span class="hljs-keyword">return</span> b;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">var</span> g = f();
|
||||
g();
|
||||
</code></pre>
|
||||
<p>在上面的例子中,<code>g</code> 可以获取到函数<code>f</code>里定义的变量<code>a</code>。在<code>g</code>被调用时,它都可以访问到<code>f</code>里的变量<code>a</code>。 <em>即使<code>g</code>在<code>f</code>已经执行完毕后才被调用,其任可以访问并对<code>a</code>进行修改</em> 。</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">var</span> a = <span class="hljs-number">1</span>;
|
||||
|
||||
a = <span class="hljs-number">2</span>;
|
||||
|
||||
<span class="hljs-keyword">var</span> b = g();
|
||||
|
||||
a = <span class="hljs-number">3</span>;
|
||||
|
||||
<span class="hljs-keyword">return</span> b;
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">g</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">return</span> a;
|
||||
}
|
||||
}
|
||||
|
||||
f(); <span class="hljs-comment">// 返回的是 2</span>
|
||||
</code></pre>
|
||||
<h2 id="作用域规则(scope-rules)">作用域规则(Scope Rules)</h2>
|
||||
<p>加入对其它严格的编程语言比较熟悉,那么对于JavaScript中<code>var</code>声明的作用域规则,将感到奇怪。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span>(<span class="hljs-params">shouldInitialize: <span class="hljs-built_in">boolean</span></span>) </span>{
|
||||
<span class="hljs-keyword">if</span> ( shouldInitialize ) {
|
||||
<span class="hljs-keyword">var</span> x = <span class="hljs-number">10</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">return</span> x;
|
||||
}
|
||||
|
||||
f(<span class="hljs-literal">true</span>); <span class="hljs-comment">// 返回的是 `10`</span>
|
||||
f(<span class="hljs-literal">false</span>); <span class="hljs-comment">// 返回 `undefined`</span>
|
||||
</code></pre>
|
||||
<p>多看几遍这段代码就会发现,这里的变量<code>x</code>是定义在<code>if</code>语句里的,但却可以在该语句外面访问到它。究其原因,在于<code>var</code>声明可以在包含它的函数、模块、命名空间或全局作用域内的任何位置被访问到(后面将详细讨论这个问题),而所包含其的代码块却没什么影响。有人就直接叫这种作用域为 <strong>var作用域</strong> ,或 <strong>函数作用域</strong> 。对于函数参数,也适用函数作用域(函数参数也相当于<code>var</code>声明)。</p>
|
||||
<p>此规则所涵盖到的作用域,将引发一些错误。比如多次声明同一个变量不会报错,就是其中之一:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sumMatrix</span> (<span class="hljs-params">matrix: <span class="hljs-built_in">number</span>[][]</span>) </span>{
|
||||
<span class="hljs-keyword">var</span> sum = <span class="hljs-number">0</span>;
|
||||
|
||||
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i < matrix.length; i++){
|
||||
<span class="hljs-keyword">var</span> currentRow = matrix[i];
|
||||
|
||||
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i < currentRow.length; i++){
|
||||
sum += currentRow[i];
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">return</span> sum;
|
||||
}
|
||||
</code></pre>
|
||||
<p>显然,内层的<code>for</code>循环会覆盖变量<code>i</code>,因为所有<code>i</code>都引用相同的函数作用域内的变量。稍微有经验的Coder都知道,这些问题可能在代码审查时遗漏,从而引发麻烦。</p>
|
||||
<h2 id="捕获变量怪异之处">捕获变量怪异之处</h2>
|
||||
<p>看看下面的代码,将有什么样的输出:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i < <span class="hljs-number">10</span>; i++){
|
||||
setTimeout(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>)</span>{
|
||||
<span class="hljs-built_in">console</span>.log(i);
|
||||
}, <span class="hljs-number">100</span> * i);
|
||||
}
|
||||
</code></pre>
|
||||
<p>对于那些尚不熟悉的Coder,要知道这里的<code>setTimeout</code>会在若干毫秒的延时后尝试执行一个函数(因此要等待其它所有代码执行停止)。</p>
|
||||
<p>结果就是:</p>
|
||||
<pre><code class="lang-sh">10
|
||||
10
|
||||
10
|
||||
10
|
||||
10
|
||||
10
|
||||
10
|
||||
10
|
||||
10
|
||||
10
|
||||
</code></pre>
|
||||
<p>很多有经验的JavaScript程序员对此已经很熟悉了,但如被输出吓到了,也不是你一个人。大多数人都期望得到这样的结果:</p>
|
||||
<pre><code class="lang-bash">0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
</code></pre>
|
||||
<p>参考上面提到的捕获变量(Capturing Variables),传递给<code>setTimeout</code>的每一个函数表达式,实际上都引用了相同作用域中的同一个<code>i</code>。</p>
|
||||
<p>这里有必要花个一分钟来思考一下那意味着什么。<code>setTimeout</code>将在若干毫秒后运行一个函数, <em>但只是</em> 在<code>for</code>循环已停止执行后。随着<code>for</code>循环的停止执行,<code>i</code>的值就成为<code>10</code>。这就是作为<code>setTimeout</code>的第一个参数的函数在调用时,每次都输出<code>10</code>的原因。</p>
|
||||
<p>作为解决此问题的一种方法,就是使用立即执行的函数表达式(Immediately Invoked Function Expression, IIFE, <a href="https://segmentfault.com/a/1190000003985390" target="_blank">参考链接</a>)。</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i < <span class="hljs-number">10</span>; i++){
|
||||
<span class="hljs-comment">// 这里要捕获到变量`i`的当前状态</span>
|
||||
<span class="hljs-comment">// 是通过触发带有其当前值的一个函数实现的</span>
|
||||
(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">i</span>)</span>{
|
||||
setTimeout(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>)</span>{
|
||||
<span class="hljs-built_in">console</span>.log(i);
|
||||
}, <span class="hljs-number">100</span> * i)
|
||||
})(i);
|
||||
}
|
||||
</code></pre>
|
||||
<p>其实对于这种奇怪的形式,我们都已司空见惯了。立即执行函数中的参数<code>i</code>,会覆盖<code>for</code>循环中的<code>i</code>,但因为使用相同的名称<code>i</code>,所以都不用怎么修改<code>for</code>循环体内部的代码。</p>
|
||||
<h2 id="关于全新的let声明方式">关于全新的<code>let</code>声明方式</h2>
|
||||
<p>现在已经知道使用<code>var</code>存在诸多问题,这也是要使用<code>let</code>的理由。除了拼写不一样外,<code>let</code>与<code>var</code>的写法一致。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> hello = <span class="hljs-string">'Hello!'</span>;
|
||||
</code></pre>
|
||||
<p>二者主要的区别,不在于语法上,而是语义的不同,下面会深入研究。</p>
|
||||
<h3 id="块作用域(block-scoping)">块作用域(Block Scoping)</h3>
|
||||
<p>在使用<code>let</code>来声明某个变量时,使用了 <em>词法作用域(Lexical Scope)</em> ,或 <em>块作用域(Block Scope)</em> 。与使用<code>var</code>声明的变量可在所包含的函数外部访问到不同,块作用域的变量在包含它们的块或<code>for</code>循环之外,是不能访问的。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span> (<span class="hljs-params">input: <span class="hljs-built_in">boolean</span></span>) </span>{
|
||||
<span class="hljs-keyword">let</span> a = <span class="hljs-number">100</span>;
|
||||
|
||||
<span class="hljs-keyword">if</span> (input) {
|
||||
<span class="hljs-comment">// 这里仍然可以对`a`进行引用</span>
|
||||
<span class="hljs-keyword">let</span> b = a + <span class="hljs-number">1</span>;
|
||||
<span class="hljs-keyword">return</span> b;
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// 这样写就会报错:`b` 在这里不存在(error TS2304: Cannot find name 'b'.)</span>
|
||||
<span class="hljs-keyword">return</span> b;
|
||||
}
|
||||
</code></pre>
|
||||
<p>上面的代码中定义了两个变量<code>a</code>和<code>b</code>。<code>a</code>的作用域是函数体<code>f</code>内部。而<code>b</code>的作用域为<code>if</code>语句块里。</p>
|
||||
<p>在<code>catch</code>语句里声明的变量也具有同样的作用域规则。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">try</span> {
|
||||
<span class="hljs-keyword">throw</span> <span class="hljs-string">"oh no!"</span>
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">catch</span> (e) {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Oh well."</span>)
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// 下面这样会报错:这里不存在`e`</span>
|
||||
<span class="hljs-built_in">console</span>.log(e);
|
||||
</code></pre>
|
||||
<p>块级作用域变量的另一个特点,就是在其被声明之前,是不能访问的(尚未分配内存?)。虽然它们始终“存在”与它们所属的作用域里,但在声明它们的代码之前的部分,被成为 <em>暂时性死区(Temporal Dead Zone, TDZ)</em> (<a href="https://github.com/luqin/exploring-es6-cn/blob/master/md/9.4.md" target="_blank">参考链接</a>)。暂时性死区只是用来说明不能在变量的<code>let</code>语句之前,访问该变量,而TypeScript编译器可以给出这些信息。</p>
|
||||
<pre><code class="lang-typescript">a++; <span class="hljs-comment">// error TS2448: Block-scoped variable 'a' used before its declaration. error TS2532: Object is possibly 'undefined'.</span>
|
||||
<span class="hljs-keyword">let</span> a;
|
||||
</code></pre>
|
||||
<p>这里需要注意一点,在一个拥有块作用域的变量被声明之前,仍然可以 <em>获取(capture)</em> 到它。但要在变量被声明前就去调用那个其所属的函数,是不可行的。如编译目标代码是ECMAScript 2015(ES6),那么较新的运行时将抛出一个错误;不过目前的TypeScript编译器尚不能就此进行报错。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">foo</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-comment">// 这里要获取到`a`没有问题(okay to capture `a`)</span>
|
||||
|
||||
<span class="hljs-keyword">return</span> a;
|
||||
}
|
||||
|
||||
|
||||
<span class="hljs-comment">// 但不能在`a`被声明前调用函数`foo`</span>
|
||||
<span class="hljs-comment">// 运行时(runtime)应该抛出错误</span>
|
||||
|
||||
foo();
|
||||
|
||||
<span class="hljs-keyword">let</span> a;
|
||||
</code></pre>
|
||||
<p>关于 <em>暂时性死区</em> 的更多信息,请参考<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone_and_errors_with_let" target="_blank">Mozilla开发者网络</a>。</p>
|
||||
<h2 id="重定义与屏蔽(re-decalration-and-shadowing)">重定义与屏蔽(Re-decalration and Shadowing)</h2>
|
||||
<p>在使用<code>var</code>进行变量声明时,注意到对变量进行多少次声明都没有关系;得到的变量仅有一个。</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span> (<span class="hljs-params">x</span>) </span>{
|
||||
<span class="hljs-keyword">var</span> x;
|
||||
<span class="hljs-keyword">var</span> x;
|
||||
|
||||
<span class="hljs-keyword">if</span> (<span class="hljs-literal">true</span>) {
|
||||
<span class="hljs-keyword">var</span> x;
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>在上面的示例中,对<code>x</code>的所有声明,都是对同一个<code>x</code>的引用,且这样做也毫无问题。但这种做法通常将导致很多bug。<code>let</code>式的声明,终于不会这样任性了。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> x = <span class="hljs-number">10</span>;
|
||||
<span class="hljs-keyword">let</span> x = <span class="hljs-number">20</span>; <span class="hljs-comment">// error TS2451: Cannot redeclare block-scoped variable 'x'.</span>
|
||||
</code></pre>
|
||||
<p>并不是要重复声明的变量,都是块作用域,TypeScript编译器才会给出存在问题的信息。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span> (<span class="hljs-params">x</span>) </span>{
|
||||
<span class="hljs-keyword">let</span> x = <span class="hljs-number">100</span>; <span class="hljs-comment">// error TS2300: Duplicate identifier 'x'.</span>
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">g</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">let</span> x = <span class="hljs-number">100</span>;
|
||||
<span class="hljs-keyword">var</span> x = <span class="hljs-number">100</span>; <span class="hljs-comment">// error TS2451: Cannot redeclare block-scoped variable 'x'.</span>
|
||||
}
|
||||
</code></pre>
|
||||
<p>这并非是说块作用域的变量决不能以某个函数作用域变量加以声明。而是说块作用域变量,只需要在某个明显不同的块中,加以声明。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span>(<span class="hljs-params">condition, x</span>) </span>{
|
||||
<span class="hljs-keyword">if</span> (condition) {
|
||||
<span class="hljs-keyword">let</span> x = <span class="hljs-number">100</span>;
|
||||
<span class="hljs-keyword">return</span> x;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">return</span> x;
|
||||
}
|
||||
|
||||
f(<span class="hljs-literal">false</span>, <span class="hljs-number">0</span>); <span class="hljs-comment">// 返回 `0`</span>
|
||||
f(<span class="hljs-literal">true</span>, <span class="hljs-number">0</span>); <span class="hljs-comment">// 返回 `100`</span>
|
||||
</code></pre>
|
||||
<p>这种在某个更深的嵌套块中引入新变量名的做法,就叫 <em>屏蔽(shadowing)</em> 。这样做看起来像是双刃剑,因为无意的屏蔽可能引入某些程序漏洞,同时也可能防止某些漏洞。比如,设想用现在的<code>let</code>变量来重写之前的<code>sumMatrix</code>。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">sumMatrix</span>(<span class="hljs-params">matrix: <span class="hljs-built_in">number</span>[][]</span>) </span>{
|
||||
<span class="hljs-keyword">let</span> sum = <span class="hljs-number">0</span>;
|
||||
|
||||
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i < matrix.length; i++){
|
||||
<span class="hljs-keyword">var</span> currentRow = matrix[i];
|
||||
|
||||
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i < currentRow.length; i++){
|
||||
sum += currentRow[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>此版本的循环无疑将正确进行求和了,因为内层循环的<code>i</code>屏蔽了外层循环的<code>i</code>。</p>
|
||||
<p>通常为了顾及编写出清爽的代码,应避免使用屏蔽(shadowing)。但在某些情况下使用屏蔽又能带来好处,因此用不用此特性就取决于你的判断了。</p>
|
||||
<h3 id="捕获块作用域变量(block-scoped-variable-capturing)">捕获块作用域变量(Block-scoped Variable Capturing)</h3>
|
||||
<p>前面在<code>var</code>式声明上,初次接触到 <strong>变量捕获(variable capturing)</strong> 这一概念,主要对所捕获到的变量的行为,有所了解。为了对此有更直观的认识,那么就说在某个作用域运行时,该作用域就创建出一个变量的“环境”。此环境及其所捕获到的变量,就算其作用域中的所有语句执行完毕,也仍将持续存在。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">theCityThatAlwaysSleeps</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">let</span> getCity;
|
||||
|
||||
<span class="hljs-keyword">if</span> (<span class="hljs-literal">true</span>) {
|
||||
<span class="hljs-keyword">let</span> city = <span class="hljs-string">"Seattle"</span>;
|
||||
|
||||
getCity = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">return</span> city;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">return</span> getCity;
|
||||
}
|
||||
</code></pre>
|
||||
<p>上面的代码中,因为在<code>city</code>所在的环境中对其进行了捕获,所以尽管<code>if</code>块完成了执行,却仍可以访问到它。</p>
|
||||
<p>回顾之前的<code>setTimeout</code>示例,那里为了捕获<code>for</code>循环的每次迭代下某个变量的状态,而最终使用了一个IIFE。实际上为了所捕获的变量,而是建立了一个新的变量环境。那样做有点痛苦,但幸运的是,在TypeScript中再也无须那样做了。</p>
|
||||
<p>在作为某个循环一部分使用<code>let</code>进行变量声明时,这些<code>let</code>声明有着显著不同的行为。与仅仅将一个新的环境引入到该循环相比,这些声明在某种程度上于每次遍历,都创建出一个新的作用域。因此这就跟使用IIFE有着异曲同工的效果,那么就可以仅使用<code>let</code>来改写旧版的<code>setTimeout</code>示例了。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>; i < <span class="hljs-number">10</span>; i++) {
|
||||
setTimeout(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{ <span class="hljs-built_in">console</span>.log(i); }, <span class="hljs-number">100</span> * i);
|
||||
}
|
||||
</code></pre>
|
||||
<p>将如预期的那样,输出以下结果:</p>
|
||||
<pre><code class="lang-bash">0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
</code></pre>
|
||||
<h2 id="关于const式的声明">关于<code>const</code>式的声明</h2>
|
||||
<p><code>const</code>式声明是声明变量的另一种方式。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">const</span> numLivesForCat = <span class="hljs-number">9</span>;
|
||||
</code></pre>
|
||||
<p>此类声明与<code>let</code>声明相似,但如同它们的名称一样,经由<code>const</code>修饰的变量的值,一旦被绑定,就不能加以改变了。也就是说,这些变量与<code>let</code>式声明有着相同的作用域,但不能对其进行再度赋值。</p>
|
||||
<p>注意不要与所谓某些所引用的值 <em>不可修改(immutable)</em> 之概念搞混(经<code>const</code>修饰变量与那些不可修改值并不是一个东西)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">const</span> numLivesForCat = <span class="hljs-number">9</span>;
|
||||
|
||||
<span class="hljs-keyword">const</span> kitty = {
|
||||
name: <span class="hljs-string">"Aurora"</span>,
|
||||
numLives: numLivesForCat
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// 下面的代码将报错</span>
|
||||
|
||||
kitty = {
|
||||
name: <span class="hljs-string">"Danielle"</span>,
|
||||
numLives: numLivesForCat
|
||||
};
|
||||
|
||||
<span class="hljs-comment">// 但这些代码都没有问题</span>
|
||||
kitty.name = <span class="hljs-string">"Rory"</span>;
|
||||
kitty.name = <span class="hljs-string">"Kitty"</span>;
|
||||
kitty.name = <span class="hljs-string">"Cat"</span>;
|
||||
kitty.numLives--;
|
||||
</code></pre>
|
||||
<p>上面的示例表明,除非采取了特别措施加以避免,某个<code>const</code>变量的内部状态仍然是可改变的。不过恰好TypeScript提供了将对象成员指定为<code>readonly</code>的方法。<a href="">接口</a>那一章对此进行了讨论。</p>
|
||||
<h2 id="let与const的比较"><code>let</code>与<code>const</code>的比较</h2>
|
||||
<p>现在有了两种在作用域语义上类似的变量声明方式,那自然就要发出到底要使用哪种方式的疑问。与那些最为宽泛的问题一样,答案就是看具体情况。</p>
|
||||
<p>适用<a href="https://en.wikipedia.org/wiki/Principle_of_least_privilege" target="_blank">最小权限原则</a>,除开那些将进行修改的变量,所有变量都应使用<code>const</code>加以声明。这么做的理论基础就是,在某个变量无需写入时,在同一代码基础上工作的其他人就不应自动地被赋予对该对象写的权力,同时将需要考虑他们是否真的需要对该变量进行重新赋值。使用<code>const</code>还可以在对数据流进行推演时,令到代码更可预测。</p>
|
||||
<p>总之需要三思而后行,同时在可行的情况下,应就此与团队的其它人共商此事。</p>
|
||||
<p>本手册主要使用<code>let</code>声明。</p>
|
||||
<h2 id="解构(destructuring)及新语法">解构(Destructuring)及新语法<code>...</code></h2>
|
||||
<p>TypeScript从ECMAScript 2015(ES6)那里借鉴的另一特性,就是 <strong>解构</strong> 。可从<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment" target="_blank">Mozilla开发者网络</a>对结构这一全新特性做完整了解。此小节将做简短的概览。</p>
|
||||
<h3 id="数组的解构">数组的解构</h3>
|
||||
<p>解构的最简单形式,就是数组结构式赋值(array destructuring assignment)了:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> input: <span class="hljs-built_in">number</span>[] = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>];
|
||||
<span class="hljs-keyword">let</span> [first, second] = input;
|
||||
|
||||
<span class="hljs-built_in">console</span>.log(first); <span class="hljs-comment">// 输出 1</span>
|
||||
<span class="hljs-built_in">console</span>.log(second); <span class="hljs-comment">// 输出 2</span>
|
||||
</code></pre>
|
||||
<p>上面的代码,创建了两个分别名为<code>first</code>及<code>second</code>的变量。这与使用索引效果一样,却更为方便:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> [first, second];
|
||||
first = input[<span class="hljs-number">0</span>];
|
||||
second = input[<span class="hljs-number">1</span>];
|
||||
</code></pre>
|
||||
<p>对于那些已经声明的变量,解构也工作:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-comment">// 对变量的交换操作</span>
|
||||
[first, second] = [second, first];
|
||||
</code></pre>
|
||||
<p>以及对某个函数参数的解构:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span> (<span class="hljs-params"> [first, second]: [<span class="hljs-built_in">number</span>, <span class="hljs-built_in">number</span>] </span>) </span>{
|
||||
<span class="hljs-built_in">console</span>.log(first);
|
||||
<span class="hljs-built_in">console</span>.log(second);
|
||||
}
|
||||
|
||||
f([<span class="hljs-number">1</span>, <span class="hljs-number">2</span>]);
|
||||
</code></pre>
|
||||
<p>使用 <strong>语法<code>...</code></strong> ,可为某个清单(list, 也就是数组)中剩下的条目创建一个变量:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> [first, ...remain] = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
|
||||
|
||||
<span class="hljs-built_in">console</span>.log(first);
|
||||
<span class="hljs-built_in">console</span>.log(remain);
|
||||
</code></pre>
|
||||
<p>因为这是JavaScript, 所以当然可以将那些不在乎的后续元素,简单地忽视掉:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> [first] = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
|
||||
<span class="hljs-built_in">console</span>.log(first); <span class="hljs-comment">// 输出 1</span>
|
||||
</code></pre>
|
||||
<p>或仅结构其它元素:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> [, second, , fourth] = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
|
||||
</code></pre>
|
||||
<h3 id="对象的解构(object-destructuring)">对象的解构(Object destructuring)</h3>
|
||||
<p>还可以解构对象:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> o = {
|
||||
a: <span class="hljs-string">"foo"</span>,
|
||||
b: <span class="hljs-number">12</span>,
|
||||
c: <span class="hljs-string">"bar"</span>
|
||||
};
|
||||
|
||||
<span class="hljs-keyword">let</span> {a, b} = <span class="hljs-number">0</span>;
|
||||
</code></pre>
|
||||
<p>这段代码将从<code>o.a</code>与<code>o.b</code>创建出两个新变量<code>a</code>与<code>b</code>。请注意在不需要<code>c</code>时可跳过它。</p>
|
||||
<p>与数组解构一样,可不加声明地进行赋值:</p>
|
||||
<pre><code class="lang-typescript">({a, b} = {a: <span class="hljs-string">"baz"</span>, b: <span class="hljs-number">101</span>});
|
||||
</code></pre>
|
||||
<p>请注意这里必须将该语句用括号(<code>()</code>)括起来。因为 <strong>JavaScript会将<code>{</code>解析为代码块的开始</strong> 。</p>
|
||||
<p>使用<code>...</code>语法,可为某个对象中的剩余条目,创建一个变量:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> {a, ...passthrough} = o;
|
||||
<span class="hljs-keyword">let</span> total = passthrough.length + passthrough.c.length;
|
||||
</code></pre>
|
||||
<h3 id="属性的重命名(新语法)">属性的重命名(新语法)</h3>
|
||||
<p>给属性赋予不同的名称,也是可以的:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> {a: newName1, b: newName2} = o;
|
||||
</code></pre>
|
||||
<p>从这里开始,此新语法就有点令人迷惑了。建议将<code>a: newName1</code>读作<code>a</code>作为<code>newName1</code>("<code>a</code> as <code>newName1</code>")。其方向是左到右(left-to-right)的, 就如同以前写的:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> newName1 = o.a;
|
||||
<span class="hljs-keyword">let</span> newName2 = o.b;
|
||||
</code></pre>
|
||||
<p>此外,这里的冒号(<code>:</code>)也不是指的类型。如果要指定类型,仍然需要写道整个解构的后面:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> {a, b} : {a: <span class="hljs-built_in">string</span>, b: <span class="hljs-built_in">number</span>} = o;
|
||||
</code></pre>
|
||||
<h3 id="对象解构的默认值(default-values-新语法)">对象解构的默认值(Default values, 新语法)</h3>
|
||||
<p>默认值令到在某属性未被定义时,为其指派一个默认值成为可能:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">keepWholeObject</span> (<span class="hljs-params"> wholeObject: {a: <span class="hljs-built_in">string</span>, b?: <span class="hljs-built_in">number</span>} </span>) </span>{
|
||||
<span class="hljs-keyword">let</span> {a, b = <span class="hljs-number">1001</span>} = wholeObject;
|
||||
|
||||
<span class="hljs-comment">// do some stuff</span>
|
||||
}
|
||||
</code></pre>
|
||||
<p>就算<code>b</code>未被定义,上面的<code>keepWholeObject</code>函数也会有着一个<code>wholeObject</code>变量,以及属性<code>a</code>与<code>b</code>。</p>
|
||||
<h3 id="对象解构下的函数声明(function-declarations)">对象解构下的函数声明(Function declarations)</h3>
|
||||
<p>在函数声明中,解构也可运作。在简单场合,这是很明了的:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">type</span> C = { a: <span class="hljs-built_in">string</span>, b?: <span class="hljs-built_in">number</span> };
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span>(<span class="hljs-params"> {a, b}: C </span>) <span class="hljs-title">void</span> </span>{
|
||||
<span class="hljs-comment">// do some stuffs</span>
|
||||
}
|
||||
</code></pre>
|
||||
<p>给参数指定默认值,是更为通常的做法,而通过解构来获取默认值,却可能是难以掌握的。首先需要记住在默认值前加上模式(<code>C</code>?):</p>
|
||||
<pre><code class="lang-typescript">function f ({a, b} = {a: "", b: 0}): avoid {
|
||||
// do some stuffs
|
||||
}
|
||||
|
||||
f(); // 编译通过, 默认值为: {a: "", b: 0}
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>上面这段代码是类型推理(type inference)的一个示例,本手册后面后讲到。</p>
|
||||
</blockquote>
|
||||
<p>此时,就要记住是要在被解构的属性上,而不是主初始化器上,给可选属性赋予一个默认值(Then, you need to remember to give a default for optional properties on the destructured property instead of the main initializer)。记住<code>C</code>的定义带有可选的<code>b</code>:</p>
|
||||
<pre><code class="lang-typescript">function f ({ a, b = 0 } = { a: "" }): void {
|
||||
//...
|
||||
}
|
||||
|
||||
f ({a: "yes"}); // 可通过编译,默认 b = 0
|
||||
f (); // 可通过编译,默认 {a: ""}, 此时默认这里b = 0
|
||||
f({}); // 报错,在提供了一个参数时,就需要提供`a`
|
||||
</code></pre>
|
||||
<p>请小心谨慎地使用解构。如前面的示例所演示的那样,就算是最简单的解构表达式也不是那么容易理解。而在有着较深的嵌套解构时,即便不带有重命名、默认值及类型注释等操作,也难于掌握,那么就尤其容易搞混了。请尽量保持解构表达式在较小及简单的状态。可一致只写那些可以自己生成的赋值解构。</p>
|
||||
<h2 id="扩展(spread-新语法)">扩展(Spread, 新语法)</h2>
|
||||
<p>扩展操作符(The spread operator)与解构相反。经由扩展运算符,就可以将一个数组,展开到另一个中去,或者将一个对象展开到另一对象中去。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> first = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>],
|
||||
second = [<span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
|
||||
|
||||
<span class="hljs-keyword">let</span> bothPlus = [<span class="hljs-number">0</span>, ...first, ...second, <span class="hljs-number">5</span>];
|
||||
</code></pre>
|
||||
<p>这段代码赋予<code>bothPlus</code>值<code>[0, 1, 2, 3, 4, 5]</code>。展开(spreading)创建出<code>first</code>与<code>second</code>变量的影子拷贝(a shadow copy)。而两个变量则并不会被展开操作所改变。</p>
|
||||
<p>对于对象,也可以对其展开:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> defaults = { food: <span class="hljs-string">"spicy"</span>, price: <span class="hljs-string">"$$"</span>, ambiance: <span class="hljs-string">"noisy"</span> };
|
||||
|
||||
<span class="hljs-keyword">let</span> search = { ...defaults, food: <span class="hljs-string">"rich"</span> };
|
||||
</code></pre>
|
||||
<p>现在<code>search</code>就成了<code>{ food: "rich", price: "$$", ambiance: "noisy" }</code>。比起数组展开,对象展开 <strong>要复杂一些</strong> 。与数组展开一样,对象展开将从左到右进行处理(proceeds from left-to-right),但结果仍是一个对象。这就是说在展开对象中后来的属性,将覆盖先来的属性。所以加入将上面的示例修改为在末尾才进行展开:</p>
|
||||
<pre><code>let defaults = { food: "spicy", price: "$$", ambiance: "noisy" };
|
||||
|
||||
let search = { food: "rich", ...defaults };
|
||||
</code></pre><p>此时<code>defaults</code>中的<code>food</code>属性就将覆盖<code>food: "rich"</code>,然而这并不是我们想要的。</p>
|
||||
<p>对象的展开还有其它一些令人惊讶的限制。首先,它仅包含某对象<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties" target="_blank">自己的、可枚举属性(own, enumerable properties)</a>。简单地说,这就意味着在展开某对象实例时,将丢失它的那些方法(Basically, that means you lose methods when you spread instances of an object):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> C {
|
||||
p = <span class="hljs-number">12</span>;
|
||||
m () {
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> c = <span class="hljs-keyword">new</span> C();
|
||||
<span class="hljs-keyword">let</span> clone = { ...c };
|
||||
|
||||
clone.p; <span class="hljs-comment">// 没有问题</span>
|
||||
clone.m(); <span class="hljs-comment">// 报错!error TS2339: Property 'm' does not exist on type '{ p: number; }'.</span>
|
||||
</code></pre>
|
||||
<p>此外,TypeScript编译器不支持一般函数的类型参数(the TypeScript compiler doesn't allow spreads of type parameters from generic functions)。此特性有望在该语言的后期发布中受到支持。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="01_basic_data_types.html" class="navigation navigation-prev " aria-label="Previous page: 基本数据类型">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="03_classes.html" class="navigation navigation-next " aria-label="Next page: 类">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"变量声明","level":"1.3","depth":1,"next":{"title":"类","level":"1.4","depth":1,"path":"03_classes.md","ref":"03_classes.md","articles":[]},"previous":{"title":"基本数据类型","level":"1.2","depth":1,"path":"01_basic_data_types.md","ref":"01_basic_data_types.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"02_variables_declaration.md","mtime":"2019-04-03T06:43:16.304Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
716
_book/03_classes.html
Normal file
716
_book/03_classes.html
Normal file
@ -0,0 +1,716 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>类 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="04_interfaces.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="02_variables_declaration.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >类</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h2 id="类(classes)">类(Classes)</h2>
|
||||
<h2 id="简介">简介</h2>
|
||||
<p>传统的JavaScript使用函数与基于原型的继承(prototype-based inheritance),来建立可重用的组件。但这种处理会令到那些习惯于面向对象方法的程序员不自在,面向对象方法有着功能继承、对象建立自类等特性。从ECMAScript 2015, 也就是ES6开始,JavaScript程序员就可以使用面向对象的、基于类的方法,来构建他们的应用了。在TypeScript中,现在就可以用上这些技术,并将其向下编译到可工作于所有主流浏览器与平台的JavaScript,而无需等待下一版的JavaScript。</p>
|
||||
<h2 id="关于类">关于类</h2>
|
||||
<p>让我们来看一个简单的基于类的实例吧:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Greeter {
|
||||
greeting: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> ( message: string ) {
|
||||
<span class="hljs-keyword">this</span>.greeting = message;
|
||||
}
|
||||
|
||||
greet () {
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-string">"Hello, "</span> + <span class="hljs-keyword">this</span>.greeting;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> greeter = <span class="hljs-keyword">new</span> Greeter (<span class="hljs-string">"world"</span>);
|
||||
</code></pre>
|
||||
<p>如你之前曾使用过C#或Java, 那么就应该对这段代码的语法比较熟悉了。这里声明了一个新的类<code>Greeter</code>(declare a new class <code>Greeter</code>)。此类有三个成员:一个名为<code>greeting</code>的属性,一个构建器,以及一个方法<code>greet</code>。</p>
|
||||
<p>在类中,将注意到当对该类的某个成员进行引用时,在该成员前加上了<code>this.</code>。这就表名那是一个成员访问(a member access)。</p>
|
||||
<p>上面代码的最后一行使用<code>new</code>关键字构建出该<code>Greeter</code>类的一个实例(construct an instance of the <code>Greeter</code> class by using <code>new</code>)。这调用了先前所定义的构建函数(constructor, 构建器),从而以该<code>Greeter</code>为外形(shape),进行新对象的创建,并运行该构造函数对其进行初始化。</p>
|
||||
<h2 id="继承(inheritance">继承(Inheritance)</h2>
|
||||
<p>在TypeScript中可使用通常的面向对象模式(common object-oriented patterns)。而基于类编程的最为基础模式之一,就是具备运用继承,对既有类加以扩展,从而创建出新类的能力了。</p>
|
||||
<p>看看这个示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Animal {
|
||||
move ( distanceInMeters: <span class="hljs-built_in">number</span> = <span class="hljs-number">0</span> ) {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Animal moved <span class="hljs-subst">${distanceInMeters}</span>m.`</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Dog extends Animal {
|
||||
bark () {
|
||||
<span class="hljs-built_in">console</span>.log (<span class="hljs-string">'Woof! Woof!'</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">const</span> dog = <span class="hljs-keyword">new</span> Dog ();
|
||||
|
||||
dog.bark();
|
||||
dog.move(<span class="hljs-number">10</span>);
|
||||
dog.bark();
|
||||
</code></pre>
|
||||
<p>此实例给出了最基本的继承特性:类自基类继承属性及方法(classes inherit properties and methods from base classes)。这里的<code>Dog</code>类是一个使用<code>extends</code>关键字,派生自<code>Animal</code>这个 <em>基类(base class)</em> 的 <em>派生(derived)</em> 类。派生类(derived classes)通常被称作 <em>子类(subclass)</em> ,同时基类又通常被叫做 <em>超类(superclass)</em> 。</p>
|
||||
<p>因为<code>Dog</code>扩展了来自<code>Animal</code>的功能,所以这里就能创建一个可同时<code>bark()</code>及<code>move()</code>的<code>Dog</code>的实例。</p>
|
||||
<p>再来看一个更复杂的示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Animal {
|
||||
name: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> (theName: string) { <span class="hljs-keyword">this</span>.name = theName; }
|
||||
|
||||
move ( distanceInMeters: <span class="hljs-built_in">number</span> = <span class="hljs-number">0</span> ) {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`<span class="hljs-subst">${this.name}</span> moved <span class="hljs-subst">${distanceInMeters}</span>m.`</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Snake extends Animal {
|
||||
<span class="hljs-keyword">constructor</span> (name: string) { <span class="hljs-keyword">super</span>(name); }
|
||||
|
||||
move ( distanceInMeters = <span class="hljs-number">5</span> ) {
|
||||
<span class="hljs-built_in">console</span>.log( <span class="hljs-string">"Slithering..."</span> );
|
||||
<span class="hljs-keyword">super</span>.move(distanceInMeters);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Horse extends Animal {
|
||||
<span class="hljs-keyword">constructor</span> (name: string) { <span class="hljs-keyword">super</span>(name); }
|
||||
|
||||
move (distanceInMeters = <span class="hljs-number">45</span>) {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Galloping..."</span>);
|
||||
<span class="hljs-keyword">super</span>.move(distanceInMeters);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> sam = <span class="hljs-keyword">new</span> Snake(<span class="hljs-string">"Sammy the Python"</span>);
|
||||
<span class="hljs-keyword">let</span> tom: Animal = <span class="hljs-keyword">new</span> Horse(<span class="hljs-string">"Tommy the Palomino"</span>);
|
||||
|
||||
sam.move();
|
||||
tom.move(<span class="hljs-number">34</span>);
|
||||
</code></pre>
|
||||
<p>这个示例涵盖了一些前面没有提到的其它特性。再度看到使用了<code>extends</code>关键字建立了<code>Animal</code>的两个新子类:<code>Horse</code>与<code>Snake</code>。</p>
|
||||
<p>与前一示例的一点不同,就是每个含有构建器的派生类,都 <strong>必须</strong> 调用<code>super()</code>这个方法,以执行到基类的构造函数,否则编译器将报错(<code>error TS2377: Constructors for derived classes must contain a 'super' call.</code>, 及<code>error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class</code>)。此外,在构造函数体中,于访问<code>this</code>上的某个属性之前, <strong>必须</strong> 先调用<code>super()</code>方法。TypeScript编译器将强制执行此一规则。</p>
|
||||
<p>该示例还展示了怎样以特定于子类的方法,覆写基类中方法。这里的<code>Snake</code>与<code>Horse</code>都创建了一个覆写<code>Animal</code>中的<code>move()</code>方法的<code>move()</code>方法,从而赋予其针对不同类的特定功能。请注意就算<code>tom</code>是作为一个<code>Animal</code>加以声明的,其值还是一个<code>Horse</code>, 对<code>tom.move(34)</code>的调用,将调用到<code>Horse</code>中所覆写的方法:</p>
|
||||
<pre><code class="lang-bash">Slithering...
|
||||
Sammy the Python moved 5m.
|
||||
Galloping...
|
||||
Tommy the Palomino moved 34m.
|
||||
</code></pre>
|
||||
<h2 id="公共属性、私有属性与受保护的修改器(public-private-and-protected-modifiers)">公共属性、私有属性与受保护的修改器(Public, Private and protected modifiers)</h2>
|
||||
<h3 id="属性默认是公共的(public-by-default)">属性默认是公共的(Public by default)</h3>
|
||||
<p>在上面这些示例中,可在整个程序中自由地访问到所声明的那些成员。如你熟悉其它语言中的类,那么就可能已经注意到上面的示例中,不必使用<code>public</code>关键字来达到此目的;比如,C#就要求显式地给成员打上<code>public</code>标签,以令到其对外部可见。而在TypeScript中,默认各成员都是公共的。</p>
|
||||
<p>当然也可以将某个成员显式地标记为<code>public</code>。可以下面的形式编写上一小节中的<code>Animal</code>类:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Animal {
|
||||
<span class="hljs-keyword">public</span> name: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">public</span> <span class="hljs-keyword">constructor</span> ( theName: string ) { <span class="hljs-keyword">this</span>.name = theName; }
|
||||
|
||||
<span class="hljs-keyword">public</span> move ( distanceInMeters: <span class="hljs-built_in">number</span> ) {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`<span class="hljs-subst">${this.name}</span> moved <span class="hljs-subst">${distanceInMeters}</span>m.`</span>);
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="掌握private">掌握<code>private</code></h3>
|
||||
<p>当某个成员被标记为<code>private</code>时,其就不能从包含它的类的外部访问到了。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Animal {
|
||||
<span class="hljs-keyword">private</span> name: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> ( theName: string ) { <span class="hljs-keyword">this</span>.name = theName; }
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">new</span> Animal(<span class="hljs-string">"Cat"</span>).name(); <span class="hljs-comment">// 报错:`name` 是私有的, error TS2341: Property 'name' is private and only accessible within class 'Creature'.</span>
|
||||
</code></pre>
|
||||
<p>TypeScript是一个结构化的类型系统。在比较两个不同的类型时,无论它们来自何处,自要所有成员是相容的,那么就说两个类型本身也是相容的(TypeScript is a structural type system. When we compare two different types, regardless of where they come from, if the types of all members are compatible, then we say the types themselves are compatible)。</p>
|
||||
<p>但在比较两个有着<code>private</code>及<code>protected</code>成员的类型时,将加以不同的对待。对于两个被认为是相容的类型,如其中之一有一个<code>private</code>成员,那么另一个就必须要有一个源自同样声明的<code>private</code>成员。同样的规则也适用于那些<code>protected</code>成员(For two types to be considered compatible, if one of them has a <code>private</code> member, then the other must have a <code>private</code> member that originated in the same declaration. The same applies to <code>protected</code> members)。</p>
|
||||
<p>为搞清楚这一规则在实践中如何发挥作用,让我们看看下面的示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Animal {
|
||||
<span class="hljs-keyword">private</span> name: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> ( theName: string ) { <span class="hljs-keyword">this</span>.name = theName; }
|
||||
}
|
||||
|
||||
Class Rhino extends Animal {
|
||||
<span class="hljs-keyword">constructor</span> () { <span class="hljs-keyword">super</span> (<span class="hljs-string">'Rhino'</span>); }
|
||||
}
|
||||
|
||||
Class Employee {
|
||||
<span class="hljs-keyword">private</span> name: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> ( theName: string ) { <span class="hljs-keyword">this</span>.name = theName; }
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> animal = <span class="hljs-keyword">new</span> Animal (<span class="hljs-string">"Goat"</span>);
|
||||
<span class="hljs-keyword">let</span> rhino = <span class="hljs-keyword">new</span> Rhino();
|
||||
<span class="hljs-keyword">let</span> employee = <span class="hljs-keyword">new</span> Employee(<span class="hljs-string">'Bob'</span>);
|
||||
|
||||
animal = rhino;
|
||||
animal = employee; <span class="hljs-comment">// 报错: `Animal` 与 `Employee` 并不相容, error TS2322: Type 'Employee' is not assignable to type 'Creature'. Types have separate declarations of a private property 'name'.</span>
|
||||
</code></pre>
|
||||
<p>此示例有着一个<code>Animal</code>与<code>Rhino</code>, 其中<code>Rhino</code>是<code>Animal</code>的一个子类。同时还有一个新的<code>Employee</code>类,它在形状上看起来与<code>Animal</code>一致。示例中又创建了几个这些类的实例,并尝试进行相互之间的赋值,以看看会发生什么。因为<code>Animal</code>与<code>Rhino</code>共享了来自<code>Animal</code>中的同一声明<code>private name: string</code>的它们形状的<code>private</code>侧,因此它们是相容的(Because <code>Animal</code> and <code>Rhino</code> share the <code>private</code> side of their shape from the same declaration of <code>private name: string</code> in <code>Animal</code>, they are compatible)。但对于<code>Employee</code>却不是这样了。在尝试将一个<code>Employee</code>赋值给<code>Animal</code>时,就得到一个这些类型不相容的错误。就算<code>Employee</code>也有着一个名为<code>name</code>的<code>private</code>成员,但该成员也并不是那个在<code>Animal</code>中所声明的。</p>
|
||||
<h3 id="掌握protected">掌握<code>protected</code></h3>
|
||||
<p>除了经由<code>protected</code>关键字声明的成员仍可以被派生类的实例所访问外,<code>protected</code>修改器(the <code>protected</code> modifier)与<code>private</code>修改器有着相似的行为。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Person {
|
||||
<span class="hljs-keyword">protected</span> name: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> ( name: string ) { <span class="hljs-keyword">this</span>.name = name; }
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Employee extends Person {
|
||||
<span class="hljs-keyword">private</span> department: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> ( name: string, department: string ) {
|
||||
<span class="hljs-keyword">super</span>(name);
|
||||
<span class="hljs-keyword">this</span>.department = department;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">public</span> getElevatorPitch () {
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-string">`Hello, my name is <span class="hljs-subst">${this.name}</span> and I work in <span class="hljs-subst">${this.department}</span>.`</span>;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> howard = <span class="hljs-keyword">new</span> Employee (<span class="hljs-string">"Howard"</span>, <span class="hljs-string">"Sales"</span>);
|
||||
<span class="hljs-built_in">console</span>.log(howard.getElevatorPitch());
|
||||
<span class="hljs-built_in">console</span>.log(howard.name); <span class="hljs-comment">// 报错: error TS2445: Property 'name' is protected and only accessible within class 'Person' and its subclasses.</span>
|
||||
</code></pre>
|
||||
<h2 id="关于只读修改器(readonly-modifier)">关于只读修改器(Readonly modifier)</h2>
|
||||
<p>使用<code>readonly</code>关键字,可令到属性只读。只读的属性 <strong>必须在其声明处或构造函数里进行初始化</strong> 。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Octopus {
|
||||
readonly name: <span class="hljs-built_in">string</span>;
|
||||
readonly numberOfLegs = <span class="hljs-number">8</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> (theName: string) {
|
||||
<span class="hljs-keyword">this</span>.name = theName;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> dad = <span class="hljs-keyword">new</span> Octopus (<span class="hljs-string">"Man with the 8 strong legs"</span>);
|
||||
dad.name = <span class="hljs-string">"Man with the 3-piece suit"</span>; <span class="hljs-comment">// 报错,`name` 是只读的。error TS2540: Cannot assign to 'name' because it is a constant or a read-only property.</span>
|
||||
</code></pre>
|
||||
<h3 id="参数式属性(parameter-properties)">参数式属性(Parameter properties)</h3>
|
||||
<p>上一个示例不得不在<code>Octopus</code>这个类中,声明一个只读成员<code>name</code>,以及一个构建器参数<code>theName</code>,且随后要立即将<code>name</code>设置为<code>theName</code>。这种做法被证明是一种十分常见的做法。通过 <em>参数式属性(parameter properties)</em> 可在一处就完成成员的创建与初始化。下面是使用参数式属性方法,对上一个<code>Octopus</code>类的更进一步修订:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Octopus {
|
||||
readonly numberOfLegs: <span class="hljs-built_in">number</span> = <span class="hljs-number">8</span>;
|
||||
|
||||
<span class="hljs-keyword">constructor</span> (readonly: name: string) {}
|
||||
}
|
||||
</code></pre>
|
||||
<p>请注意这里完全丢弃了<code>theName</code>,而仅使用构建器上简化的<code>readonly name: string</code>参数,进行<code>name</code>成员的创建与初始化。从而实现了将声明与赋值强固到一个地方。</p>
|
||||
<p>参数式属性是通过在构造函数参数前,加上可访问性修改器(<code>public/private/protected</code>)或<code>readonly</code>,抑或同时加上可访问性修改器与<code>readonly</code>,得以声明的。对于一个声明并初始化私有成员的参数化属性,就使用<code>private</code>做前缀;对于<code>public</code>、<code>protected</code>及<code>readonly</code>亦然。</p>
|
||||
<h2 id="访问器(accessors)">访问器(Accessors)</h2>
|
||||
<p>TypeScript支持以<code>getters/setters</code>方式,来拦截对某对象成员的访问。此特性赋予对各个对象成员的访问以一种更为精良的控制(TypeScript supports getters/setters as a way of intercepting accesses to a member of an object. This gives you a way of having finer-grained control over how a member is accessed on each object)。</p>
|
||||
<p>下面将一个简单的类,转换成使用<code>get</code>及<code>set</code>的形式。首先,从没有获取器与设置器(getter and setter)开始:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Employee {
|
||||
fullName: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> employee = <span class="hljs-keyword">new</span> Employee ();
|
||||
|
||||
employee.fullName = <span class="hljs-string">"Bob Smith"</span>;
|
||||
|
||||
<span class="hljs-keyword">if</span> (employee.fullName) {
|
||||
<span class="hljs-built_in">console</span>.log(employee.fullName);
|
||||
}
|
||||
</code></pre>
|
||||
<p>尽管允许人为随机对<code>fullName</code>进行直接设置相当方便,但如果某人可以突发奇想地修改名字,那么这样做就可能带来麻烦(while allowing people to randomly set <code>fullName</code> directly is pretty handy, this might get us in trouble if people can change names on a whim)。</p>
|
||||
<p>下面一版中,将在允许用户修改<code>employee</code>对象之前,先检查用户是否有一个可用的密码。这是通过把对<code>fullName</code>的直接访问,替换为一个将检查密码的<code>set</code>方法来实现的。同时还加入了一个相应的<code>get</code>方法,以允许这个示例可以无缝地继续工作。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> passcode = <span class="hljs-string">"secret passcode"</span>;
|
||||
|
||||
<span class="hljs-keyword">class</span> Employer {
|
||||
<span class="hljs-keyword">private</span> _fullName: <span class="hljs-built_in">string</span>;
|
||||
|
||||
<span class="hljs-keyword">get</span> fullName(): <span class="hljs-built_in">string</span> {
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-keyword">this</span>._fullName;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">set</span> fullName(newName: <span class="hljs-built_in">string</span>) {
|
||||
<span class="hljs-keyword">if</span> (passcode && passcode === <span class="hljs-string">"secret passcode"</span>) {
|
||||
<span class="hljs-keyword">this</span>._fullName = newName;
|
||||
}
|
||||
<span class="hljs-keyword">else</span> {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Error: Unauthenticated update of employer!"</span>)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> employer = <span class="hljs-keyword">new</span> Employer ();
|
||||
|
||||
employer.fullName = <span class="hljs-string">"Bob Smith"</span>;
|
||||
|
||||
<span class="hljs-keyword">if</span> (employer.fullName) {
|
||||
<span class="hljs-built_in">console</span>.log(employer.fullName);
|
||||
}
|
||||
</code></pre>
|
||||
<p>为了证实这里的访问器有对密码进行检查,可修改一下那个密码,看看在其不匹配时,将得到警告没有更新<code>employer</code>权限的消息。</p>
|
||||
<p>有关访问器需要注意以下几点:</p>
|
||||
<p>首先,访问器特性要求将TypeScript编译器设置到输出为ECMAScript 5或更高版本。降级到ECMAScript 3是不支持的。其次,带有<code>get</code>却没有<code>set</code>的访问器,将自动推理到是<code>readonly</code>成员。这样做在从代码生成到<code>.d.ts</code>文件时是有帮助的,因为用到该属性的人可以明白他们不能修改该属性。</p>
|
||||
<h2 id="关于静态属性(static-properties)">关于静态属性(Static Properties)</h2>
|
||||
<p>到目前为止,都讨论的是类的 <em>实例(instance)</em> 成员,这些成员都是在对象被实例化了后才出现在对象上的(Up to this point, we've only talked about the <em>instance</em> members of the class, those that show up on the object when it's instantiated)。其实还可以给类创建 <em>静态(static)</em> 成员,所谓静态成员,就是在类本身,而不是示例上可见的成员。下面的示例在<code>origin</code>上使用了<code>static</code>关键字,因为<code>origin</code>是所有<code>Grid</code>的通用值。各个实例通过在<code>origin</code>前加上该类的名字,来访问此值。与在访问实例时在前面加上<code>this.</code>类似,在访问静态成员时,前面加的是<code>Grid.</code>。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Grid {
|
||||
<span class="hljs-keyword">static</span> origin = { x: <span class="hljs-number">0</span>, y: <span class="hljs-number">0</span> };
|
||||
|
||||
calculateDistanceFromOrigin ( point: { x: <span class="hljs-built_in">number</span>, y: <span class="hljs-built_in">number</span> } ) {
|
||||
<span class="hljs-keyword">let</span> xDist = (point.x - Grid.origin.x);
|
||||
<span class="hljs-keyword">let</span> yDist = (point.y - Grid.origin.y);
|
||||
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-built_in">Math</span>.sqrt( xDist * xDist + yDist * yDist ) / <span class="hljs-keyword">this</span>.scale;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">constructor</span> ( public scale: number ) {};
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> grid1 = <span class="hljs-keyword">new</span> Grid(<span class="hljs-number">1.0</span>);
|
||||
<span class="hljs-keyword">let</span> grid2 = <span class="hljs-keyword">new</span> Grid(<span class="hljs-number">2.0</span>);
|
||||
|
||||
<span class="hljs-built_in">console</span>.log(grid1.calculateDistanceFromOrigin({x: <span class="hljs-number">10</span>, y: <span class="hljs-number">10</span>}));
|
||||
<span class="hljs-built_in">console</span>.log(grid2.calculateDistanceFromOrigin({x: <span class="hljs-number">10</span>, y: <span class="hljs-number">10</span>}));
|
||||
</code></pre>
|
||||
<h2 id="关于抽象类(abstract-classes)">关于抽象类(Abstract Classes)</h2>
|
||||
<p>抽象类是一些可以派生出其它类的基类。抽象类不可以被直接实例化。与接口的不同之处在于,某个抽象类可以包含其成员实现的细节。抽象类及某个抽象类中的抽象方法的定义,是使用<code>abstract</code>关键字完成的(Unlike an interface, an abstract class may contain implementation details for its members. The <code>abstract</code> keyword is used to define abstract classes as well as abstract methods within an abstract class)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">abstract</span> <span class="hljs-keyword">class</span> Animal {
|
||||
<span class="hljs-keyword">abstract</span> makeSound(): <span class="hljs-built_in">void</span>;
|
||||
|
||||
move(): <span class="hljs-built_in">void</span> {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"roaming the earth..."</span>);
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>抽象类中被标记为<code>abstract</code>的方法,不包含其具体实现,而必须要在派生类中加以实现。抽象方法与接口方法有着类似的语法。二者都定义了不带有方法体的某个方法的签名。但抽象方法必须带有<code>abstract</code>关键字,同时可以包含访问修改器(Abstract methods share a similar syntax to interface methods. Both define the signature of a method without including a method body. However, abstract methods must include the <code>abstract</code> keyword and may optionally include access modifiers)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">abstract</span> <span class="hljs-keyword">class</span> Department {
|
||||
<span class="hljs-keyword">constructor</span> ( public name: string ) {}
|
||||
|
||||
printName (): <span class="hljs-built_in">void</span> {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Department name: "</span> + <span class="hljs-keyword">this</span>.name);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">abstract</span> printMeeting (): <span class="hljs-built_in">void</span>; <span class="hljs-comment">// 在派生类中必须实现此方法</span>
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> AccountingDepartment extends Department {
|
||||
<span class="hljs-keyword">constructor</span> () {
|
||||
<span class="hljs-keyword">super</span> (<span class="hljs-string">"Accounting and Auditing"</span>); <span class="hljs-comment">// 派生类中的构建器必须调用 `super()` 方法</span>
|
||||
}
|
||||
|
||||
printMeeting (): <span class="hljs-built_in">void</span> {
|
||||
<span class="hljs-built_in">console</span>.log (<span class="hljs-string">"The Accounting Department meets each Monday @10am."</span>);
|
||||
}
|
||||
|
||||
generateReports (): <span class="hljs-built_in">void</span> {
|
||||
<span class="hljs-built_in">console</span>.log (<span class="hljs-string">"Generating accounting reports..."</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> department: Department; <span class="hljs-comment">// 创建一个到抽象类型的引用是没有问题的 </span>
|
||||
department = <span class="hljs-keyword">new</span> Department (); <span class="hljs-comment">// 报错: 无法创建某个抽象类的实例 error TS2511: Cannot create an instance of the abstract class 'Department'.</span>
|
||||
department = <span class="hljs-keyword">new</span> AccountingDepartment(); <span class="hljs-comment">// 创建非抽象子类的实例并为其赋值,没有问题</span>
|
||||
department.printName();
|
||||
department.printMeeting();
|
||||
department.generateReports(); <span class="hljs-comment">// 报错:该方法并不存在与所声明的抽象类型上 error TS2339: Property 'generateReports' does not exist on type 'Department'.</span>
|
||||
</code></pre>
|
||||
<h2 id="一些高级技巧(advanced-techniques)">一些高级技巧(Advanced Techniques)</h2>
|
||||
<h3 id="关于构建器函数">关于构建器函数</h3>
|
||||
<p>当在TypeScript中声明类的时候,实际上就是同时创建出了多个的声明。首先是该类的 <em>实例(instance)</em> 的类型。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Greeter {
|
||||
greeting: <span class="hljs-built_in">string</span>;
|
||||
|
||||
construtor (msg: <span class="hljs-built_in">string</span>) {
|
||||
<span class="hljs-keyword">this</span>.greeting = msg;
|
||||
}
|
||||
|
||||
greet () {
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-string">`Hello, <span class="hljs-subst">${this.greeting}</span>`</span>;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> greeter: Greeter;
|
||||
|
||||
greeter = <span class="hljs-keyword">new</span> Greeter(<span class="hljs-string">"World"</span>);
|
||||
<span class="hljs-built_in">console</span>.log(greeter.greet());
|
||||
</code></pre>
|
||||
<p>这里在说到<code>let greeter: Greeter</code>时,就使用了<code>Greeter</code>作为类<code>Greeter</code>的实例的类型。这对于那些其它面向对象语言的程序员来说,几乎是第二天性了(This is almost second nature to programmers from other object-oriented languages)。</p>
|
||||
<p>同时还创建出名为<code>构造函数(construtor function)</code>的另一个值。这就是在使用<code>new</code>关键字,建立该类的实例时,所调用的那个函数。为搞清楚该函数实际面貌,请看看下面由以上示例所生成的JavaScript(ES6):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> Greeter = (<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>)</span>{
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Greeter</span> (<span class="hljs-params">msg</span>) </span>{
|
||||
<span class="hljs-keyword">this</span>.greeting = msg;
|
||||
}
|
||||
|
||||
Greeter.prototype.greet = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-string">`Hello, <span class="hljs-subst">${this.greeting}</span>`</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">return</span> Greeter;
|
||||
})();
|
||||
|
||||
<span class="hljs-keyword">let</span> greeter;
|
||||
|
||||
greeter = <span class="hljs-keyword">new</span> Greeter(<span class="hljs-string">"World"</span>)!
|
||||
<span class="hljs-built_in">console</span>.log(greeter.greet());
|
||||
</code></pre>
|
||||
<p>这里的<code>let Greeter</code> <strong>即将</strong> 被该构造函数赋值(Here, <code>let Greeter</code> is going to be assigned (by) the construtor function)。在调用<code>new</code>并允许此函数时,就得到一个该类的实例。构造函数还包含了该类的所有静态成员(<code>greet()</code>)。还可以把各个类想成是有着一个 <em>实例</em> 端与 <em>静态</em> 端(Another way to think of each class is that there is an <em>instance</em> side and <em>static</em> side)。</p>
|
||||
<p>下面对该示例稍加修改,来展示这种区别:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Greeter {
|
||||
<span class="hljs-keyword">static</span> standardGreeting = <span class="hljs-string">"Hello, there"</span>;
|
||||
|
||||
greeting: <span class="hljs-built_in">string</span>;
|
||||
|
||||
greet () {
|
||||
<span class="hljs-keyword">if</span> (<span class="hljs-keyword">this</span>.greeting) {
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-string">`Hello, <span class="hljs-subst">${this.greeting}</span>`</span>;
|
||||
}
|
||||
<span class="hljs-keyword">else</span> {
|
||||
<span class="hljs-keyword">return</span> Greeter.standardGreeting;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> greeter1 : Greeter;
|
||||
greeter1 = <span class="hljs-keyword">new</span> Greeter();
|
||||
<span class="hljs-built_in">console</span>.log (greeter1.greet());
|
||||
|
||||
<span class="hljs-keyword">let</span> greeterMaker: <span class="hljs-keyword">typeof</span> Greeter = Greeter;
|
||||
greeterMaker.standardGreeting = <span class="hljs-string">"Hey there!"</span>;
|
||||
|
||||
<span class="hljs-keyword">let</span> greeter2: Greeter = <span class="hljs-keyword">new</span> greeterMaker();
|
||||
<span class="hljs-built_in">console</span>.log(greeter2.greet());
|
||||
</code></pre>
|
||||
<p>本示例中,<code>greeter1</code>的运作与上面类似。对<code>Greeter</code>类进行了初始化,得到并使用了对象<code>greeter1</code>。这样所在前面有见过。</p>
|
||||
<p>接下来就直接使用了类<code>Greeter</code>。于此创建了一个名为<code>greeterMaker</code>的新变量。此变量(注:实际上对应的内存单元)将保有类<code>Greeter</code>自身,换种说法就是类<code>Greeter</code>的构造函数(类实际上是构造函数?)。这里使用了<code>typeof Greeter</code>,从而达到“给我类<code>Greeter</code>本身的类型”,而非类示例类型的目的。或者更准确地说,“给我那个名叫<code>Greeter</code>符号的类型”,那就是<code>Greeter</code>类的构造函数的类型了。此类型将包含<code>Greeter</code>的所有静态成员,以及建立<code>Greeter</code>类实例的构造函数。后面通过在<code>greeterMaker</code>上使用<code>new</code>关键字,创建<code>Greeter</code>的新实例,并如之前那样运行它们,就就证实了这一点。</p>
|
||||
<h3 id="将类用作接口(using-a-class-as-an-interface)">将类用作接口(Using a class as an interface)</h3>
|
||||
<p>正如上一小节所说,一个类的声明,创建出两个东西:该类实例的类型,以及构造函数(a class declaration creates two things: a type representing instances of the class and a constructor function)。因为类创建了类型,所以就可以在那些可使用接口地方使用类。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Point {
|
||||
x: <span class="hljs-built_in">number</span>;
|
||||
y: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> Point3d <span class="hljs-keyword">extends</span> Point {
|
||||
z: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> point3d: Point3d = { x: <span class="hljs-number">1</span>, y: <span class="hljs-number">2</span>, z: <span class="hljs-number">3</span> };
|
||||
</code></pre>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="02_variables_declaration.html" class="navigation navigation-prev " aria-label="Previous page: 变量声明">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="04_interfaces.html" class="navigation navigation-next " aria-label="Next page: 接口">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"类","level":"1.4","depth":1,"next":{"title":"接口","level":"1.5","depth":1,"path":"04_interfaces.md","ref":"04_interfaces.md","articles":[]},"previous":{"title":"变量声明","level":"1.3","depth":1,"path":"02_variables_declaration.md","ref":"02_variables_declaration.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"03_classes.md","mtime":"2019-04-03T06:43:16.308Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
698
_book/04_interfaces.html
Normal file
698
_book/04_interfaces.html
Normal file
@ -0,0 +1,698 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>接口 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="05_functions.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="03_classes.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >接口</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="接口(interfaces)">接口(Interfaces)</h1>
|
||||
<h2 id="简介">简介</h2>
|
||||
<p>TypeScript语言的核心原则之一,就是类型检查着重于值所具有的 <em>形(shape)</em>(One of TypeScript's core principles is that type-checking focuses on the <em>shape</em> that values have)。这有时候被称为“<a href="https://zh.wikipedia.org/wiki/%E9%B8%AD%E5%AD%90%E7%B1%BB%E5%9E%8B" target="_blank">鸭子类型(duck typing)</a>” 或 “<a href="https://openhome.cc/Gossip/Scala/StructuralTyping.html" target="_blank">结构化子类型(structural subtyping)</a>”。在TypeScript中,接口充当了这些类型名义上的角色,且是一种定义代码内的合约(约定),以及与项目外部代码的合约约定的强大方式(In TypeScript, interfaces fill the role of naming these types, and are a powerfull way of defining contracts within your code as well as contracts with code outside of your project)。</p>
|
||||
<h2 id="接口初步(our-first-interface)">接口初步(Our First Interface)</h2>
|
||||
<p>理解接口的最容易方式,就是从一个简单的示例开始:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">printLable</span> (<span class="hljs-params">labelledObj: { label: <span class="hljs-built_in">string</span> }</span>) </span>{
|
||||
<span class="hljs-built_in">console</span>.log(labelledObj.label);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myObj = {size: <span class="hljs-number">10</span>, label: <span class="hljs-string">"Size 10 Object"</span>};
|
||||
|
||||
printLable(myObj);
|
||||
</code></pre>
|
||||
<p>类型检查器对<code>printLable</code>的调用进行检查。函数<code>printLable</code>有着一个单独参数,该参数要求所传入的对象要有一个名为<code>label</code>、类型为字符串的属性。请注意这里的<code>myObj</code>实际上有着更多的属性,但编译器对传入的参数只检查其 <em>至少</em> 有着列出的属性,且要匹配要求的类型。当然也存在TypeScript编译器不那么宽容的情形,这一点在后面会讲到。</p>
|
||||
<p>可以再次编写此示例,这次使用接口来描述需要具备<code>label</code>属性这一要求:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> LabelledValue {
|
||||
label: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">printLable</span> (<span class="hljs-params"> labelledObj: LabelledValue </span>) </span>{
|
||||
<span class="hljs-built_in">console</span>.log(labelledObj.label);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myObj = { size: <span class="hljs-number">10</span>, label: <span class="hljs-string">"Size 10 Object"</span> };
|
||||
printLable (myObj);
|
||||
</code></pre>
|
||||
<p>这里的<code>LabelledValue</code>接口,是一个立即可用于描述前一示例中的要求的名称。它仍然表示有着一个名为<code>label</code>、类型为字符串的属性。请注意这里并没有像在其它语言中一样,必须显式地说传递给<code>printLable</code>的对象应用该接口。这里只是那个 <em>形(shape)</em> 才是关键的。如果传递给该函数的对象满足了列出的要求,那么就是允许的。</p>
|
||||
<p>这里需要指出的是,类型检查器不要求这些属性以何种顺序进入,只要有接口所要求的属性及类型即可。</p>
|
||||
<h2 id="可选属性(optional-properties)">可选属性(Optional Properties)</h2>
|
||||
<p>接口可以包含并不需要的属性。在特定条件下某些属性存在,或根本不存在(Not all properties of an interface may be required. Some exist under certain conditions or may not be there at all)。在建立像是那种将某个仅有少数属性的对象,传递给某个函数的“选项包(option bags)”的模式时,这些可选属性用得比较普遍。</p>
|
||||
<p>下面是此种模式的一个示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> SquareConfig {
|
||||
color?: <span class="hljs-built_in">string</span>;
|
||||
width?: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">createSquare</span> (<span class="hljs-params"> config: SquareConfig </span>): </span>{color: <span class="hljs-built_in">string</span>; area: <span class="hljs-built_in">number</span>} {
|
||||
<span class="hljs-keyword">let</span> newSquare = {color: <span class="hljs-string">"white"</span>, area: <span class="hljs-number">100</span>};
|
||||
|
||||
<span class="hljs-keyword">if</span> (config.color) {
|
||||
newSquare.area = config.with * config.width;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">return</span> newSquare;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> mySquare = createSquare({color: <span class="hljs-string">"black"</span>});
|
||||
</code></pre>
|
||||
<p>带有可选属性的接口,其写法与其它接口相似,只需在各个可选属性的声明中,在属性名字的末尾,以<code>?</code>加以表示即可。</p>
|
||||
<p>使用可选属性的优势在于,在对可能存在的属性进行描述的同时,仍然可以阻止那些不是该接口组成部分的属性的使用。比如在将<code>createSquare</code>中的<code>color</code>属性错误拼写的情况下,就会收到提醒的错误消息:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> SquareConfig {
|
||||
color?: <span class="hljs-built_in">string</span>;
|
||||
width?: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">createSquare</span> (<span class="hljs-params"> config: SquareConfig </span>): </span>{ color: <span class="hljs-built_in">string</span>; area: <span class="hljs-built_in">number</span> } {
|
||||
<span class="hljs-keyword">let</span> newSquare = { color: <span class="hljs-string">"white"</span>, area: <span class="hljs-number">100</span> };
|
||||
<span class="hljs-comment">//Property 'clor' does not exist on type 'SquareConfig'. Did you mean 'color'? (2551) </span>
|
||||
<span class="hljs-keyword">if</span> (config.color) {
|
||||
newSquare.color = config.clor;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">if</span> ( config.width ) {
|
||||
newSquare.area = config.width * config.width;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">return</span> newSquare;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> mySquare = createSquare({color: <span class="hljs-string">"black"</span>});
|
||||
</code></pre>
|
||||
<h2 id="只读属性(readonly-properties)">只读属性(Readonly properties)</h2>
|
||||
<p>一些属性只应在对象刚被创建时是可修改的。那么可通过将<code>readonly</code>关键字放在该属性名称前,对这些属性加以指定。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Point {
|
||||
readonly x: <span class="hljs-built_in">number</span>;
|
||||
readonly y: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<p>就可以通过指派一个对象文字(an object literal),构建出一个<code>Point</code>出来。在赋值过后,<code>x</code>与<code>y</code>就再也不能修改了。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> p1: Point = { x: <span class="hljs-number">10</span>, y: <span class="hljs-number">20</span> };
|
||||
p1.x = <span class="hljs-number">5</span>; <span class="hljs-comment">//Cannot assign to 'x' because it is a constant or a read-only property. (2540)</span>
|
||||
</code></pre>
|
||||
<p>TypeScript 有着一个<code>ReadonlyArray<T></code>类型,该类型与<code>Array<T></code>一致,只是移除了所有变异方法(with all mutating methods removed),因此向下面这样就可以确保在某个数组创建出后,不会被修改:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> a: <span class="hljs-built_in">number</span>[] = [<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>];
|
||||
<span class="hljs-keyword">let</span> ro: ReadonlyArray<<span class="hljs-built_in">number</span>> = a;
|
||||
ro[<span class="hljs-number">0</span>] = <span class="hljs-number">12</span>; <span class="hljs-comment">//Index signature in type 'ReadonlyArray<number>' only permits reading. (2542)</span>
|
||||
ro.push(<span class="hljs-number">5</span>); <span class="hljs-comment">//Property 'push' does not exist on type 'ReadonlyArray<number>'. (2339) </span>
|
||||
ro.length = <span class="hljs-number">100</span>;<span class="hljs-comment">//Cannot assign to 'length' because it is a constant or a read-only property. (2540)</span>
|
||||
a = ro;<span class="hljs-comment">//Type 'ReadonlyArray<number>' is not assignable to type 'number[]'</span>
|
||||
</code></pre>
|
||||
<p>上面这段代码中最后一行可以看出,将整个<code>ReadonlyArray</code>往回赋值给正常数组,也是非法的。但仍然可以使用一个类型断言(a type assertion),以消除此错误:</p>
|
||||
<pre><code class="lang-typescript">a = ro as <span class="hljs-built_in">number</span>[];
|
||||
</code></pre>
|
||||
<h3 id="readonly-与-const的区别"><code>readonly</code> 与 <code>const</code>的区别</h3>
|
||||
<p>对于要使用<code>readonly</code>或<code>const</code>,最简单的办法就是区分是要在变量上,还是属性上使用。对于变量,当然就用<code>const</code>,属性则用<code>readonly</code>。</p>
|
||||
<h2 id="关于多余属性检查(excess-property-checks)">关于多余属性检查(Excess Property Checks)</h2>
|
||||
<p>在采用了接口的第一个示例中,TypeScript令到可将<code>{size: number; label: string;}</code>传递给某些仅期望一个<code>{label: string;}</code>的地方。后面还介绍了关于可选属性,以及可选属性在名为“选项包(option bags)”的地方如何发挥作用。</p>
|
||||
<p>但是,如像在JavaScript中那样,将这两个特性单纯地结合在一起,就足以杀死你自己,下面就用最后一个示例使用<code>createSquare</code>来说明一下:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> SquareConfig {
|
||||
color?: <span class="hljs-built_in">string</span>;
|
||||
width?: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">createSquare</span> (<span class="hljs-params"> config: SquareConfig </span>): </span>{ color: <span class="hljs-built_in">string</span>; area: <span class="hljs-built_in">number</span> } {
|
||||
<span class="hljs-comment">// ...</span>
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> mySquare = createSquare ({ colour: <span class="hljs-string">"red"</span>, width: <span class="hljs-number">100</span> });
|
||||
</code></pre>
|
||||
<p>注意这里给予<code>createSquare</code>的参数被写成了<code>colour</code>,而不是<code>color</code>。在普通的JavaScript中,这类错误将不会报错。</p>
|
||||
<p>对于这个诚实,你可能会说没有错误拼写,因为<code>width</code>属性是兼容的,没有<code>color</code>属性出现,同时这里额外的<code>colour</code>属性是不重要的。</p>
|
||||
<p>不过,TypeScript会认为在这段代码中存在问题。对象字面值会受到特别对待,同时在将对象字面值赋予给其它变量,或者将它们作为参数加以传递时,而收到 <em>多余属性检查</em>。如某个对象字面值有着任何目标对象不具有的属性时,就会报出错误。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-comment">// Argument of type '{ colour: string; width: number; }' is not assignable to parameter of type 'SquareConfig'.</span>
|
||||
<span class="hljs-comment">// Object literal may only specify known properties, but 'colour' does not exist in type 'SquareConfig'. Did you mean to write 'color'? (2345)</span>
|
||||
<span class="hljs-keyword">let</span> mySquare = createSquare({colour: <span class="hljs-string">"red"</span>, width: <span class="hljs-number">100</span>});
|
||||
</code></pre>
|
||||
<p>绕过此类检查实际上相当简单。最容易的做法就是使用一个类型断言(a type assertion):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> mySquare = createSquare({width: <span class="hljs-number">100</span>, opacity: <span class="hljs-number">0.5</span>} as SquareConfig);
|
||||
</code></pre>
|
||||
<p>不过,在确定对象可能有某些在特别情况下会用到额外属性时,一种更好的方式就是为其添加一个字符串的索引签名(a string index signature)。比如在这里的<code>SquareConfig</code>们就可以有着上面<code>color</code>与<code>width</code>属性,但也可以具有任意数量的其它属性,那么就可以将其定义成下面这样:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> SquareConfig {
|
||||
color?: <span class="hljs-built_in">string</span>;
|
||||
width?: <span class="hljs-built_in">number</span>;
|
||||
[propName: <span class="hljs-built_in">string</span>]: <span class="hljs-built_in">any</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<p>索引签名这个概念在后面会涉及,这里说的是<code>SquareConfig</code>可以有着任意数量的属性,而只要这些属性不是<code>color</code>或<code>width</code>就可以,它们的类型并不重要。</p>
|
||||
<p>绕过这些检查的一种终极方式,可能有点意外,就是将该对象赋值给另一变量:因为<code>squareConfig</code>不会受多余属性检查,因此编译器也就不会给出错误。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> squareConfig = { colour: <span class="hljs-string">"red"</span>, width: <span class="hljs-number">100</span> };
|
||||
<span class="hljs-keyword">let</span> mySquare = createSquare(squareConfig);
|
||||
</code></pre>
|
||||
<p>请记住对于像是上面的简单代码,一般不必尝试“绕过”这些检查。而对于更为复杂的、有着方法并存有状态的对象字面值(complex object literals that have methods and hold state),可能就要牢记这些技巧了,但大多数的多余属性错误,都是真实存在的bugs。那就意味着在使用诸如选项包(option bags)这类的特性,而出现多余属性检查类问题时,就应该对类型定义加以审视。在此实例中,如果允许将某个有着<code>color</code>或<code>colour</code>属性的对象传递给<code>createSquare</code>方法,那么就要修改<code>SquareConfig</code>的定义,来反应出这一点。</p>
|
||||
<h2 id="函数的类型(function-types)">函数的类型(Function Types)</h2>
|
||||
<p>对于描述JavaScript的对象所能接受的范围宽广的形,接口都是可行的(Interfaces are capable of describing the wide range of shapes that JavaScript objects can take)。除了用于描述带有属性的对象,接口还可以描述函数类型。</p>
|
||||
<p>要用接口来描述函数,就要给予该接口一个调用签名(a call signature)。这就像是一个仅有着参数清单与返回值类型的函数声明。参数清单中的各参数,都要求名称与类型。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> SearchFunc {
|
||||
(source: <span class="hljs-built_in">string</span>, subString: <span class="hljs-built_in">string</span>): <span class="hljs-built_in">boolean</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<p>一旦定义好,就可以像使用其它接口一样,对此函数类型接口(this function type interface)进行使用了。这里展示了创建一个某种函数类型的变量,并把同一类型的函数值赋予给它的过程(create <em>a variable of a function type</em> and assign it <em>a function value</em> of the same type)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> mySearch: SearchFunc;
|
||||
mySearch = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">source: <span class="hljs-built_in">string</span>; subString: <span class="hljs-built_in">string</span></span>) </span>{
|
||||
<span class="hljs-keyword">let</span> result = source.search(subString);
|
||||
<span class="hljs-keyword">return</span> result > <span class="hljs-number">-1</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<p>参数名称无需匹配,就可以对函数类型进行正确的类型检查。比如这里可以像下面这样编写上面的示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> mySearch: SearchFunc;
|
||||
mySearch = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">src: <span class="hljs-built_in">string</span>, sub: <span class="hljs-built_in">string</span></span>): <span class="hljs-title">boolean</span> </span>{
|
||||
<span class="hljs-keyword">let</span> result = src.search(sub);
|
||||
<span class="hljs-keyword">return</span> result > <span class="hljs-number">-1</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<p>函数参数会逐一检查,以每个相应参数位置的类型,与对应的类型进行检查的方式进行(Function parameters are checked one at a time, with the type in each corresponding parameter position checked against each other)。如完全不打算指定类型,那么TypeScript的上下文类型系统就可以推断出参数类型,因为该函数值是直接赋予给<code>SearchFunc</code>类型的变量的。同时,这里函数表达式的返回值类型,是由其返回值(也就是<code>false</code>或<code>true</code>)隐式给出的。加入让该函数返回数字或字符串,那么类型检查器(the type-checker)就会发出返回值类型与<code>SearchFunc</code>接口中描述的返回值类型不符的警告。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> mySearch: SearchFunc;
|
||||
mySearch = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">src, sub</span>) </span>{
|
||||
<span class="hljs-keyword">let</span> result = src.search(sub);
|
||||
<span class="hljs-keyword">return</span> result > <span class="hljs-number">-1</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<h2 id="可索引的类型(indexable-types)">可索引的类型(Indexable Types)</h2>
|
||||
<p>与使用接口来描述函数类型类似,还可以使用接口类描述那些可以索引的类型(types that we can "index into"),比如<code>a[10]</code>,抑或<code>ageMap["daniel"]</code>这样的。可索引类型有着一个描述用于在该对象内部进行索引的类型的 <em>索引签名(index signature)</em>,以及在索引时返回值的类型。来看看这个示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> StringArray {
|
||||
[index: <span class="hljs-built_in">number</span>]: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myArray: StringArray;
|
||||
myArray = [<span class="hljs-string">"Bob"</span>, <span class="hljs-string">"Fred"</span>];
|
||||
|
||||
<span class="hljs-keyword">let</span> myStr: <span class="hljs-built_in">string</span> = myArray[<span class="hljs-number">0</span>];
|
||||
</code></pre>
|
||||
<p>在上面的代码中,有着一个带有索引签名的<code>StringArray</code>接口。此索引签名指出在某个<code>StringArray</code>以某个<code>number</code>加以索引时,它将返回一个<code>string</code>。</p>
|
||||
<p>TypeScript支持的索引签名有两种类型:字符串及数字。同时支持这两种类型的索引器是可能的,但从某个数字的索引器所返回的类型,则必须是从字符串索引器所返回类型的子类型(It is possible to support both types of indexers, but the type returned from a numeric indexer must be a subtype of the type returned from the string indexer)。这是因为在以某个<code>number</code>进行索引时,JavaScript实际上会在对某个对象进行索引前,将其转换成<code>string</code>。也就是说,在使用<code>100</code>(<code>number</code>)来进行索引时,实际上与使用<code>"100"</code>(<code>string</code>)效果是一样的,因此二者就需要一致(That means that indexing with <code>100</code> (a <code>number</code>) is the same thing as indexing with <code>"100"</code> (a <code>stirng</code>), so the two need to be consistent)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Animal {
|
||||
name: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Dog extends Animal {
|
||||
breed: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// Numeric index type 'Animal' is not assignable to string index type 'Dog'. (2413)</span>
|
||||
<span class="hljs-keyword">interface</span> NotOkay {
|
||||
[x: <span class="hljs-built_in">number</span>]: Animal;
|
||||
[x: <span class="hljs-built_in">string</span>]: Dog;
|
||||
}
|
||||
</code></pre>
|
||||
<p>尽管字符串的索引签名是描述“字典”模式的一种强大方式,但它们同时强制了与它们的返回值类型匹配的属性值(While string index signatures are a powerful way to describe the "dictionary" pattern, they also enforce that all properties match their return type)。这是因为字符串的索引申明了<code>obj.property</code>同时与<code>obj["property"]</code>可用。在下面的示例中,<code>name</code>的类型与该字符串索引器的类型并不匹配,那么类型检查器就会给出一个错误:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-comment">//Property 'name' of type 'string' is not assignable to string index type 'number'. (2411)</span>
|
||||
<span class="hljs-keyword">interface</span> NumberDictionary {
|
||||
[index: <span class="hljs-built_in">string</span>]: <span class="hljs-built_in">number</span>;
|
||||
length: <span class="hljs-built_in">number</span>;
|
||||
name: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<p>最后,为了阻止对指数的赋值,就可以将这些索引签名置为只读(Finally, you can make index signatures readonly in order to prevent assignment to their indices):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> ReadonlyStringArray {
|
||||
readonly [index: <span class="hljs-built_in">number</span>]: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myArray: ReadonlyStringArray = [<span class="hljs-string">"Alice"</span>, <span class="hljs-string">"Bob"</span>];
|
||||
<span class="hljs-comment">//Index signature in type 'ReadonlyStringArray' only permits reading. (2542)</span>
|
||||
myArray[<span class="hljs-number">2</span>] = <span class="hljs-string">"Mallory"</span>;
|
||||
</code></pre>
|
||||
<p>因为此处的索引签名是只读的,因此这里就不能设置<code>myArray[2]</code>了。</p>
|
||||
<h2 id="类的类型(class-types)">类的类型(Class Types)</h2>
|
||||
<h3 id="应用某个接口(implementing-an-interface)">应用某个接口(Implementing an interface)</h3>
|
||||
<p>在诸如C#及Java这样的语言中,接口的一种最常用方式,就是显式地强调某个类满足一种特定的合约,那么在TypeScript中,这样做也是可能的。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> ClockInterface {
|
||||
currentTime: <span class="hljs-built_in">Date</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Clock <span class="hljs-keyword">implements</span> ClockInterface {
|
||||
currentTime: <span class="hljs-built_in">Date</span>;
|
||||
<span class="hljs-keyword">constructor</span> (h: number, m: number) {}
|
||||
}
|
||||
</code></pre>
|
||||
<p>在接口中还可以对将在类中应用到的方法进行描述,就像下面示例中对<code>setTime</code>所做的那样:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> ClockInterface {
|
||||
currentTime: <span class="hljs-built_in">Date</span>;
|
||||
setTime (d: <span class="hljs-built_in">Date</span>);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Clock <span class="hljs-keyword">implements</span> ClockInterface {
|
||||
currentTime: <span class="hljs-built_in">Date</span>;
|
||||
|
||||
setTime (d: <span class="hljs-built_in">Date</span>) {
|
||||
<span class="hljs-keyword">this</span>.currentTime = d;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">constructor</span> (h: number, m: number) {}
|
||||
}
|
||||
</code></pre>
|
||||
<p>接口对类的公共侧进行了描述,而不是同时描述公共及私有侧。这就禁止对使用接口来对同时有着特定类型的该类实例的私有面的类,进行检查(Interfaces describe the public side of the class, rather than both the public and private side. This prohibits you from using them to check that a class also has particular types for the private side of the class instance)。</p>
|
||||
<h3 id="类的静态与实例侧(difference-between-the-static-and-instance-sides-of-classes)">类的静态与实例侧(Difference between the static and instance sides of classes)</h3>
|
||||
<p>在与类一同使用接口是时,记住类有着两种类型:静态侧的类型与示例侧的类型(the type of the static side and the type of the instance side),是有帮助的。或许已经注意到在使用构建签名来建立一个接口,并尝试应用此接口来建立类的时候,将报出一个错误:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> ClockInterface {
|
||||
<span class="hljs-keyword">new</span> (hour: <span class="hljs-built_in">number</span>, minute: <span class="hljs-built_in">number</span>);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Clock <span class="hljs-keyword">implements</span> ClockInterface {
|
||||
currentTime: <span class="hljs-built_in">Date</span>;
|
||||
<span class="hljs-keyword">constructor</span> (h: number, m: number) {}
|
||||
}
|
||||
</code></pre>
|
||||
<p>这是因为在某个类应用某个接口时,仅有该类的实例侧被检查了。因为该构建器位处静态侧,所以其并不包含在此检查中。</p>
|
||||
<p>那么就需要直接在该类的静态侧上动手了。在此实例中,定义了两个接口:用于构建器的<code>ClockConstrutor</code>与用于实例方法的<code>ClockInterface</code>。随后为便利起见,这里定义了一个构建器函数<code>createClock</code>,以创建出传递给它的该类型的实例。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> ClockConstrutor {
|
||||
<span class="hljs-keyword">new</span> (hour: <span class="hljs-built_in">number</span>, minute: <span class="hljs-built_in">number</span>): ClockInterface;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> ClockInterface {
|
||||
tick();
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">createClock</span> (<span class="hljs-params">ctor: ClockConstrutor, hour: <span class="hljs-built_in">number</span>, minute: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">ClockInterface</span> </span>{
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> ctor (hour, minute);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> DigitalClock <span class="hljs-keyword">implements</span> ClockInterface {
|
||||
<span class="hljs-keyword">constructor</span> (h: number, m: number) {}
|
||||
|
||||
tick () {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"beep beep"</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> AnalogClock <span class="hljs-keyword">implements</span> ClockInterface {
|
||||
<span class="hljs-keyword">constructor</span> (h: number, m: number) {}
|
||||
|
||||
tick () {
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"tick tock"</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> digital = createClock (DigitalClock, <span class="hljs-number">12</span>, <span class="hljs-number">17</span>);
|
||||
<span class="hljs-keyword">let</span> analog = createClock (AnalogClock, <span class="hljs-number">7</span>, <span class="hljs-number">32</span>);
|
||||
</code></pre>
|
||||
<p>因为<code>createClock</code>第一个参数是<code>ClockConstrutor</code>, 那么在<code>createClock(AnalogClock, 7, 32)</code>中,它就对<code>AnalogClock</code>有着正确的构建签名进行检查。</p>
|
||||
<h2 id="扩展接口(extending-interfaces)">扩展接口(Extending Interfaces)</h2>
|
||||
<p>与类一样,接口也可以相互扩展。此特性令到将某接口的成员拷贝到另一接口可行,这就在将接口分离为可重用组件时,提供更多的灵活性。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Shape {
|
||||
color: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> Square <span class="hljs-keyword">extends</span> Shape {
|
||||
sideLength: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> square = <Square> {};
|
||||
square.color = <span class="hljs-string">"blue"</span>;
|
||||
square.sideLength = <span class="hljs-number">10</span>;
|
||||
</code></pre>
|
||||
<p>一个接口还可以对多个接口进行扩展,从而创建出所有接口的一个联合(a combination of all of the interfaces):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Shape {
|
||||
color: <span class="hljs-built_in">string</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> PenStroke {
|
||||
penWidth: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
|
||||
<span class="hljs-keyword">interface</span> Square <span class="hljs-keyword">extends</span> Shape, PenStroke {
|
||||
sideLength: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> square = <Square> {};
|
||||
square.color = <span class="hljs-string">"blue"</span>;
|
||||
square.sideLength = <span class="hljs-number">10</span>;
|
||||
square.penWidth = <span class="hljs-number">5.0</span>;
|
||||
</code></pre>
|
||||
<h2 id="混合类型(hybrid-types)">混合类型(Hybrid Types)</h2>
|
||||
<p>正如早先所提到的那样,接口具备描述存在于真实世界JavaScript中的丰富类型(As we mentioned earlier, interfaces can describe the rich types present in real world JavaScript)。由于JavaScript的动态且灵活的天性,因此偶尔会遇到某个对象将以结合上述各种类型的方式运作的情况。</p>
|
||||
<p>这类实例之一,就是某个对象同时以函数与对象,并带有一些属性方式行事:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Counter {
|
||||
(start: <span class="hljs-built_in">number</span>): <span class="hljs-built_in">string</span>;
|
||||
interval: <span class="hljs-built_in">number</span>;
|
||||
reset(): <span class="hljs-built_in">void</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getCounter</span> (<span class="hljs-params"></span>): <span class="hljs-title">Counter</span> </span>{
|
||||
<span class="hljs-keyword">let</span> counter = <Counter> <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">start: <span class="hljs-built_in">number</span></span>) </span>{};
|
||||
counter.interval = <span class="hljs-number">123</span>;
|
||||
counter.reset = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{};
|
||||
<span class="hljs-keyword">return</span> counter;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> c = getCounter();
|
||||
c(<span class="hljs-number">10</span>);
|
||||
c.reset();
|
||||
c.interval = <span class="hljs-number">5.0</span>;
|
||||
</code></pre>
|
||||
<p>在与第三方JavaScript(注:TypeScript, 你,别人的程序)交互时,就需要使用上面这样的模式,来充分描述类型的形状(When interacting with 3rd-party JavaScript, you may need to use patterns like the above to fully describe the shape of the type)。</p>
|
||||
<h2 id="对类进行扩展的接口(interface-extending-classes)">对类进行扩展的接口(Interface Extending Classes)</h2>
|
||||
<p>当某个接口对类类型进行扩展时,它将继承该类的成员,却不继承这些成员的实现(When an interface type extends a class type, it inherits the members of the class but not their implementations)。这就如同接口已经对该类的所有成员进行了声明,而没有提供到其具体实现。接口甚至会继承到某个基类的私有及受保护成员。那就意味着在创建某个对带有私有及保护成员的类进行扩展的接口时,所建立的接口类型,就只能被被扩展的类所其子类所应用(实现,It is as if the interface had declared all of the members of the class without providing an implementation. Interfaces inherit even the private and protected members of a base class. This means that when you create an interface that extends a class with private or protected members, that interface type can only be implemented by that class or a subclass of it)。</p>
|
||||
<p>在有着大的继承层次时,此特性是有用的,但需要指出的是,这只在代码中有着仅带有确定属性的子类时才有用(This is useful when you have a large inheritance hierarchy, but want to specify that your code works with only subclass that have certain properties)。这些子类除了继承自基类外,不必是有关联的。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Control {
|
||||
<span class="hljs-keyword">private</span> state: <span class="hljs-built_in">any</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> SelectableControl <span class="hljs-keyword">extends</span> Control {
|
||||
select (): <span class="hljs-built_in">void</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Button extends Control <span class="hljs-keyword">implements</span> SelectableControl {
|
||||
select () {}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> TextBox extends Control {}
|
||||
|
||||
<span class="hljs-comment">//Class 'Image' incorrectly implements interface 'SelectableControl'.</span>
|
||||
<span class="hljs-comment">//Property 'state' is missing in type 'Image'. (2420)</span>
|
||||
<span class="hljs-keyword">class</span> Image <span class="hljs-keyword">implements</span> SelectableControl {
|
||||
select () {}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">class</span> Location {}
|
||||
</code></pre>
|
||||
<p>在上面的示例中,<code>SelectableControl</code>包含了所有<code>Control</code>的成员,包括私有的<code>state</code>属性。因为<code>state</code>是一个私有成员,因此对于<code>Control</code>的后代,就只可能去应用<code>SelectableControl</code>这个接口了。这是因为只有<code>Control</code>的后代,才会有着这个源自同一声明的<code>state</code>私有成员,这也是私有成员可用的一个要求(Since <code>state</code> is a private member it is only possible for descendants of <code>Control</code> to implement <code>SelectableControl</code>. This is because only descendants of <code>Control</code> will have a <code>state</code> private member that originates in the same declaration, which is a requirement for private members to be compatible)。</p>
|
||||
<p>在<code>Control</code>这个类中,通过<code>SelectableControl</code>的某个实例去访问<code>state</code>这个私有成员,是可能的。同时,某个<code>SelectableControl</code>也会与一个已知有着<code>select</code>方法的<code>Control</code>那样行事(Effectively, a <code>SelectableControl</code> acts like a <code>Control</code> that is known to have a <code>select</code> method)。这里的<code>Button</code>与<code>TextBox</code>都是<code>SelectableControl</code>的子类型(因为它们都是继承自<code>Control</code>,并有着<code>select</code>方法), 但<code>Image</code>与<code>Location</code>就不是了。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="03_classes.html" class="navigation navigation-prev " aria-label="Previous page: 类">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="05_functions.html" class="navigation navigation-next " aria-label="Next page: 函数">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"接口","level":"1.5","depth":1,"next":{"title":"函数","level":"1.6","depth":1,"path":"05_functions.md","ref":"05_functions.md","articles":[]},"previous":{"title":"类","level":"1.4","depth":1,"path":"03_classes.md","ref":"03_classes.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"04_interfaces.md","mtime":"2019-04-03T06:43:16.308Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
643
_book/05_functions.html
Normal file
643
_book/05_functions.html
Normal file
@ -0,0 +1,643 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>函数 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="06_generics.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="04_interfaces.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >函数</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="函数(functions)">函数(Functions)</h1>
|
||||
<h2 id="简介">简介</h2>
|
||||
<p>在JavaScript中,函数是所有应用的基石。正是使用它们来构建出抽象层、模仿类、信息的隐藏,以及模块(Functions are the fundamental building block of any application in JavaScript. They're how you build up layers of abstraction, mimicking classes, information hiding, and modules)。在TypeScript中,尽管有着类、命名空间及模块特性,在描述怎么完成某些事情上,函数仍然扮演了重要角色。为更易于使用函数,TypeScript还为标准的JavaScript函数,加入了一些新的功能。</p>
|
||||
<h2 id="关于函数">关于函数</h2>
|
||||
<p>如同在JavaScript中那样,一开始呢,TypeScript的函数可以命名函数,或匿名函数的形式予以创建。这就令到可选择对于应用最为适当的方式,无论是在构建API中的一个函数清单,或者构建一个传递给另一函数的一次性函数都行。</p>
|
||||
<p>下面就用示例来快速地概括JavaScript中这两种方式的样子:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-comment">// 命名函数</span>
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add</span> (<span class="hljs-params">x, y</span>)</span>{
|
||||
<span class="hljs-keyword">return</span> x+y;
|
||||
}
|
||||
|
||||
<span class="hljs-comment">//匿名函数</span>
|
||||
<span class="hljs-keyword">let</span> myAdd = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x, y</span>) </span>{ <span class="hljs-keyword">return</span> x+y; };
|
||||
</code></pre>
|
||||
<p>与在JavaScript中一样,函数可对函数体外部的变量进行引用。在这样做的时候,它们就被叫做对这些变量进行捕获(Just as in JavaScript, functions can refer to variable outside of <strong>the function body</strong>. When they do so, they're said <strong>to <code>capture</code> these variables</strong>)。尽管对捕获的原理的掌握,及使用此技巧时所做的权衡超出了本文的范围,对此机制的扎实理解,仍然是熟练运用JavaScript与TypeScript的重要方面。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> z = <span class="hljs-number">100</span>;
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">addToZ</span> (<span class="hljs-params">x, y</span>) </span>{
|
||||
<span class="hljs-keyword">return</span> x + y + z;
|
||||
}
|
||||
</code></pre>
|
||||
<h2 id="函数类型(function-types)">函数类型(Function Types)</h2>
|
||||
<h3 id="给函数赋予类型(typing-the-function)">给函数赋予类型(Typing the function)</h3>
|
||||
<p>下面就给上一个简单的示例加上类型:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add</span> (<span class="hljs-params">x: <span class="hljs-built_in">number</span>, y: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">number</span> </span>{
|
||||
<span class="hljs-keyword">return</span> x + y;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myAdd = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x: <span class="hljs-built_in">number</span>, y: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">number</span> </span>{ <span class="hljs-keyword">return</span> x + y; };
|
||||
</code></pre>
|
||||
<p>可将类型添加到各个参数,并于随后以添加类型的方式,为函数本身加上类型。TypeScript可通过查看<code>return</code>语句,来推断出返回值的类型,因此在很多情况下就可以省略返回值的类型。</p>
|
||||
<h3 id="函数类型的编写(writing-the-function-type)">函数类型的编写(Writing the function type)</h3>
|
||||
<p>既然已经输入了函数,那么就来通过查看函数类型的各个部分,从而写出该函数的完整类型吧(Now that we've typed the function, let's write the full type of the function out by looking at the each piece of the function type)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-comment">// 注意,这里的 myAdd 就是一个函数类型</span>
|
||||
<span class="hljs-keyword">let</span> myAdd: (x: <span class="hljs-built_in">number</span>, y: <span class="hljs-built_in">number</span>) => <span class="hljs-built_in">number</span> = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x: <span class="hljs-built_in">number</span>, y: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">number</span> </span>{<span class="hljs-keyword">return</span> x+y;};
|
||||
</code></pre>
|
||||
<p>某个函数的类型,有着同样的两个部分:参数的类型以及返回值类型。在写出整个函数类型时,两个部分都是必须的。参数部分的编写与参数列表一样,给出各个参数名称与类型就可以了。此名称仅对程序的易读性有帮助。因此我们也可以像下面这样编写:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> myAdd: (baseValue: <span class="hljs-built_in">number</span>, increment: <span class="hljs-built_in">number</span>) => <span class="hljs-built_in">number</span> =
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x: <span class="hljs-built_in">number</span>, y: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">number</span> </span>{ <span class="hljs-keyword">return</span> x + y; };
|
||||
</code></pre>
|
||||
<p>一旦有了参数类型这一行,它就会被认为是该函数的有效类型,而不管在函数类型中所给予参数的名称。</p>
|
||||
<p>第二部分就是返回值类型了。这里是通过在参数与返回值之间使用胖箭头(a fat arrow, <code>=></code>),来表明哪一个是返回值类型的。正如前面所提到的, <strong>返回值类型正是函数类型所必要的部分,因此即使函数没有返回值,也要使用<code>void</code>来表示返回值类型,而不是省略掉</strong>。</p>
|
||||
<p>值得一提的是,函数类型的组成,仅是参数类型与返回值类型。捕获的变量在类型中并未体现出来。实际上,捕获的变量是所有函数的“隐藏状态”的部分,且不构成其API(Captured variables are not reflected in the type. In effect, captured variables are part of the "hidden state" of any function and do not make up its API)。</p>
|
||||
<h3 id="类型推理(inferring-the-types)">类型推理(Inferring the types)</h3>
|
||||
<p>在上面的示例中,你可能已经注意到,就算只在等号的一侧有类型,TypeScript编译器也能推断出类型:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-comment">// 这里的 myAdd 有着完整的函数类型</span>
|
||||
<span class="hljs-keyword">let</span> myAdd = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x: <span class="hljs-built_in">number</span>, y: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">number</span> </span>{ <span class="hljs-keyword">return</span> x+y; };
|
||||
|
||||
<span class="hljs-comment">// 此处 'x' 与 'y' 仍然有着数字类型</span>
|
||||
<span class="hljs-keyword">let</span> myAdd: (baseValue: <span class="hljs-built_in">number</span>, increment: <span class="hljs-built_in">number</span>) => <span class="hljs-built_in">number</span> =
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x, y</span>) </span>{<span class="hljs-keyword">return</span> x+y;};
|
||||
</code></pre>
|
||||
<p>这就叫做“上下文赋型(contextual typing)”,是类型推理的一种形式。此特性有助于降低为维护程序类型化所做的努力(This is called "contextual typing", a form of type inference. This helps cut down on the amount of effort to keep your program typed)。</p>
|
||||
<h2 id="可选参数与默认参数(optional-and-default-parameters)">可选参数与默认参数(Optional and Default Parameters)</h2>
|
||||
<p>在TypeScript中,所有参数都假定为是函数所要求的。但这并不意味着参数不可以被给予<code>null</code>或<code>undefined</code>,相反,在函数被调用时,编译器会对用户是否为各个参数提供了值进行检查。编译器同时也假定这些参数就仅是需要传递给函数的参数。简单的说,给予函数的参数个数,必须与函数所期望的参数个数一致。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">buildName</span> (<span class="hljs-params"> firstName: <span class="hljs-built_in">string</span>, lastName: <span class="hljs-built_in">string</span> </span>) </span>{
|
||||
<span class="hljs-keyword">return</span> firstName + <span class="hljs-string">""</span> + lastName;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> result1 = buildName ( <span class="hljs-string">"Bob"</span> );
|
||||
<span class="hljs-keyword">let</span> result2 = buildName (<span class="hljs-string">"Bob"</span>, <span class="hljs-string">"Adams"</span>, <span class="hljs-string">"Sr."</span>);
|
||||
<span class="hljs-keyword">let</span> result3 = buildName (<span class="hljs-string">"Bob"</span>, <span class="hljs-string">"Adams"</span>);
|
||||
</code></pre>
|
||||
<p>而在JavaScript中,所有参数都是可选的,同时用户可以在适当的时候省略这些参数。在省略参数时,这些参数就是<code>undefined</code>。通过在参数上添加<code>?</code>,也能在TypeScript中获得此功能。比如在上一个示例中要令到姓这个参数(the last name parameter)是可选的:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">buildName</span> (<span class="hljs-params">firstname: <span class="hljs-built_in">string</span>, lastname?: <span class="hljs-built_in">string</span></span>) </span>{
|
||||
<span class="hljs-keyword">if</span> (lastname)
|
||||
<span class="hljs-keyword">return</span> firstName + <span class="hljs-string">""</span> lastName;
|
||||
<span class="hljs-keyword">else</span>
|
||||
<span class="hljs-keyword">return</span> firstName;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> result1 = buildName ( <span class="hljs-string">"Bob"</span> );
|
||||
<span class="hljs-keyword">let</span> result2 = buildName (<span class="hljs-string">"Bob"</span>, <span class="hljs-string">"Adams"</span>, <span class="hljs-string">"Sr."</span>);
|
||||
<span class="hljs-keyword">let</span> result3 = buildName (<span class="hljs-string">"Bob"</span>, <span class="hljs-string">"Adams"</span>);
|
||||
</code></pre>
|
||||
<p>所有可选参数都应放在必需参数之后。比如这里打算令到名(the first name)可选,而不是姓可选,那么就需要调整函数中参数的顺序,将名放在姓的后面。</p>
|
||||
<p>在TypeScript中,还可以为参数设置一个默认值,以便在用户没有提供该参数值,或者用户在该参数位置提供了<code>undefined</code>时,赋值给那个参数。这类参数叫做已默认初始化了的参数(default-initialized parameters)。这里同样用上一个示例,将姓默认设置为<code>Smith</code>。</p>
|
||||
<pre><code class="lang-typescript">function buildName (firstName: string, lastName = "Smith") {
|
||||
return firstName + " " + lastName;
|
||||
}
|
||||
|
||||
let result1 = buildName ("Bob");
|
||||
let result2 = buildName ("Bob", undefined);
|
||||
let result3 = buildName ("Bob", "Adams", "Sr. ");
|
||||
let result4 = buildName ("Bob", "Adams");
|
||||
</code></pre>
|
||||
<p>位于所有必需参数之后的已默认初始化的参数,是作为可选参数加以处理的,同时与可选参数一样,在对其相应函数进行调用时可以省略。这就意味着可选参数与随后的默认参数,在其类型上有着共性,因此这两个函数:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">buildName</span> (<span class="hljs-params">firstName: <span class="hljs-built_in">string</span>, lastName?: <span class="hljs-built_in">string</span></span>) </span>{
|
||||
<span class="hljs-comment">// ...</span>
|
||||
}
|
||||
</code></pre>
|
||||
<p>与</p>
|
||||
<pre><code class="lang-typescript">function buildName (firstName: string, lastName = "Smith") {
|
||||
// ...
|
||||
}
|
||||
</code></pre>
|
||||
<p>共用了同样的类型 <code>(firstName: string, lastName?: string) => string</code>。在类型中,<code>lastName</code>的默认值已然消失了,而只剩下该参数是可选参数的事实。</p>
|
||||
<p>与普通可选参数不同,已默认初始化的参数,并不需要出现在必需参数后面。在某个已默认初始化参数位处某个必需参数之前时,用户就需要显式地传递<code>undefined</code>,以取得默认值。比如,这里可将上一个示例编写为仅在<code>firstName</code>上有一个默认初始参数(a default initializer):</p>
|
||||
<pre><code class="lang-typescript">function buildName (firstName = "Will", lastName: string) {
|
||||
return firstName + " " + lastName;
|
||||
}
|
||||
|
||||
let result1 = buildName ("Bob"); // 将报错,参数太少
|
||||
let result2 = buildName ("Bob", "Adams", "Sr. "); // 报错,参数太多
|
||||
let result3 = buildName ("Bob", "Adams");
|
||||
let result4 = buildName (undefined, "Adams");
|
||||
</code></pre>
|
||||
<h2 id="其余参数(rest-parameters)">其余参数(Rest Parameters)</h2>
|
||||
<p>必需参数、可选参数与默认参数,它们都有着一个相同点:它们同时都只能与一个参数交谈。某些情况下,需要处理作为一组的多个参数的情况,或者可能不知道函数最终会取多少个参数。在JavaScript中,可以直接使用每个函数体中都可见的<code>arguments</code>变量,来处理此类问题。</p>
|
||||
<p>在TypeScript中,可将这些参数聚集到一个变量中:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">buildName</span> (<span class="hljs-params">firstName: <span class="hljs-built_in">string</span>, ...restOfName: <span class="hljs-built_in">string</span>[]</span>) </span>{
|
||||
<span class="hljs-keyword">return</span> firstName + <span class="hljs-string">" "</span> + restOfName.join(<span class="hljs-string">" "</span>);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> employeeName = buildName (<span class="hljs-string">"Joseph"</span>, <span class="hljs-string">"Sameul"</span>, <span class="hljs-string">"Lucas"</span>, <span class="hljs-string">"MacKinzie"</span>);
|
||||
</code></pre>
|
||||
<p><em>其余参数</em> 是以数量不限的可选参数加以处理的( <em>Rest parameters</em> are treated as a boundless number of optional parameters)。在将参数传递给某个其余参数时,可传递任意所需数目的参数;一个也不传也是可以的。编译器将构建一个使用位处省略号(the ellipsis, <code>...</code>)之后的名称,而传递的那些参数的数组,从而允许在函数中使用到这些参数。</p>
|
||||
<p>在带有其余参数的函数类型中,也有使用省略号:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">buildName</span> (<span class="hljs-params">firstName: <span class="hljs-built_in">string</span>, ...restOfName: <span class="hljs-built_in">string</span>[]</span>) </span>{
|
||||
<span class="hljs-keyword">return</span> firstName + <span class="hljs-string">" "</span> + restOfName.join(<span class="hljs-string">" "</span>);
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> buildNameFun: (fname: <span class="hljs-built_in">string</span>, ...rest: <span class="hljs-built_in">string</span>[]) => <span class="hljs-built_in">string</span> = buildName;
|
||||
</code></pre>
|
||||
<h2 id="关于this">关于<code>this</code></h2>
|
||||
<p>在JavaScript中,学会如何使用<code>this</code>,就相当于是一个成人仪式(Learning how to use <code>this</code> in JavaScript is something of a rite of passage)。因为TypeScript是JavaScript的一个超集,那么TypeScript的开发者同样需要掌握怎样使用<code>this</code>,以及怎样发现其未被正确使用。</p>
|
||||
<p>幸运的是,TypeScript提供了几种捕获不正确使用<code>this</code>的技巧。如想要了解JavaScript中<code>this</code>的运作原理,请移步 Yehuda Katz 的 <a href="http://yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/" target="_blank">Understanding JavaScript Function Invocation and "this"</a>一文。Yehuda的文章对<code>this</code>的内部运作讲得很好,因此这里就只涉及一些基础知识。</p>
|
||||
<h3 id="this与箭头函数(arrow-functions)"><code>this</code>与箭头函数(arrow functions)</h3>
|
||||
<p>在JavaScript中,<code>this</code>是于某个函数被调用时,设置的一个变量。这就令到其成为一项非常强大且灵活的特性,不过其代价就是务必要知悉函数执行所在的上下文。这是非常容易搞混的,尤其是在返回值是个函数,或将函数作为参数加以传递时(注:也就是回调函数,callback。In JavaScript, <code>this</code> is a variable that's set when a function is called. This makes it a very powerful and flexible feature, but it comes at the cost of always having to know about the context that a function is executing in. This is notoriously confusing, especially when returning a function or passing a function as an argument)。</p>
|
||||
<p>请看一个示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> deck = {
|
||||
suits: [<span class="hljs-string">"hearts"</span>, <span class="hljs-string">"spades"</span>, <span class="hljs-string">"clubs"</span>, <span class="hljs-string">"diamonds"</span>],
|
||||
cards: <span class="hljs-built_in">Array</span>(<span class="hljs-number">52</span>),
|
||||
createCardPicker: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-keyword">let</span> pickedCard = <span class="hljs-built_in">Math</span>.floor(<span class="hljs-built_in">Math</span>.random() * <span class="hljs-number">52</span>);
|
||||
<span class="hljs-keyword">let</span> pickedSuit = <span class="hljs-built_in">Math</span>.floor(pickedCard / <span class="hljs-number">13</span>);
|
||||
|
||||
<span class="hljs-keyword">return</span> {suit: <span class="hljs-keyword">this</span>.suits[pickedSuit], card: pickedCard % <span class="hljs-number">13</span>};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> cardPicker = deck.createCardPicker ();
|
||||
<span class="hljs-keyword">let</span> pickedCard = cardPicker ();
|
||||
|
||||
alert (<span class="hljs-string">"card: "</span> + pickedCard.card + <span class="hljs-string">" of"</span> + pickedCard.suit);
|
||||
</code></pre>
|
||||
<p>请注意<code>createCardPicker</code>是一个本身返回函数的函数。如果运行此示例,将得到一个错误(<code>Uncaught TypeError: Cannot read property 'suits' of undefined</code>),而不是期望的警告框。这是因为在有<code>createCardPicker</code>所创建的函数中所使用的<code>this</code>,将被设置为<code>window</code>而不是<code>deck</code>对象。那是因为这里是在<code>cardPicker</code>本身上对其进行调用的。像这样的 <strong>顶级非方法(对象的方法)语法调用</strong>,将使用<code>window</code>作为<code>this</code>(注意:严格模式下,<code>this</code>将是<code>undefined</code>而不是<code>window</code>。Notice that <code>createCardPicker</code> is a function that itself returns a function. If we tried to run the example, we would get an error instead of the expected alert box. This is because the <code>this</code> being used in the function created by <code>createCardPicker</code> will be set to <code>window</code> instead of our <code>deck</code> object. That's because we call <code>cardPicker</code> on its own. <strong>A top-level non-method syntax call</strong> like this will use <code>window</code> for <code>this</code>. (Note: under strict mode, <code>this</code> will be <code>undefined</code> rather than <code>window</code>))。</p>
|
||||
<p>要解决此问题,只需要在返回该函数以便后续使用之前,确保该函数是绑定到正确的<code>this</code>就可以了。这样的话,无论后续如何被使用该函数,它都能够参考最初的<code>deck</code>对象了。为实现此目的,这里就要将该函数表达式,修改为使用ECMAScript 6的箭头语法。箭头函数实在函数被创建时捕获<code>this</code>,而不是在函数被调用时。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> deck = {
|
||||
suits: [<span class="hljs-string">"hearts"</span>, <span class="hljs-string">"spades"</span>, <span class="hljs-string">"clubs"</span>, <span class="hljs-string">"diamonds"</span>],
|
||||
cards: <span class="hljs-built_in">Array</span>(<span class="hljs-number">52</span>),
|
||||
createCardPicker: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"></span>) </span>{
|
||||
<span class="hljs-comment">// 注意:现在下面这行是一个箭头函数,令到可以立即对`this`进行捕获</span>
|
||||
<span class="hljs-keyword">return</span> () => {
|
||||
<span class="hljs-keyword">let</span> pickedCard = <span class="hljs-built_in">Math</span>.floor(<span class="hljs-built_in">Math</span>.random() * <span class="hljs-number">52</span>);
|
||||
<span class="hljs-keyword">let</span> pickedSuit = <span class="hljs-built_in">Math</span>.floor(pickedCard / <span class="hljs-number">13</span>);
|
||||
|
||||
<span class="hljs-keyword">return</span> {suit: <span class="hljs-keyword">this</span>.suits[pickedSuit], card: pickedCard % <span class="hljs-number">13</span>};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> cardPicker = deck.createCardPicker ();
|
||||
<span class="hljs-keyword">let</span> pickedCard = cardPicker ();
|
||||
|
||||
alert (<span class="hljs-string">"card: "</span> + pickedCard.card + <span class="hljs-string">" of"</span> + pickedCard.suit);
|
||||
</code></pre>
|
||||
<p>更甚者,如将<code>--noImplicitThis</code>编译指令传递给编译器,那么TypeScript就会在代码中有着此类错误时,给出警告。编译器将指出<code>this.suits[pickedSuit]</code>中的<code>this</code>的类型为<code>any</code>。</p>
|
||||
<h3 id="this-参数(this-parameters)"><code>this</code> 参数(<code>this</code> parameters)</h3>
|
||||
<p>不幸的是,<code>this.suits[pickedSuit]</code>的类型,仍然是<code>any</code>。这是因为<code>this</code>来自于该对象字面值内部的函数表达式。要解决这个问题,就可以提供到一个显式的<code>this</code>参数。<code>this</code>参数都是位于函数参数清单的第一个位置,是假参数(Unfortunately, the type of <code>this.suits[pickedCard]</code> is still <code>any</code>. That's because <code>this</code> comes from the function expression inside the object literal. To fix this, you can provide an explicit <code>this</code> parameter. <code>this</code> parameters are fake parameters that come first in the parameter list of a function):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span>(<span class="hljs-params"><span class="hljs-keyword">this</span>: <span class="hljs-built_in">void</span></span>) </span>{
|
||||
<span class="hljs-comment">// 确保`this`在此对立函数中是不可用的的(make sure `this` is unusable in this standalone function)</span>
|
||||
}
|
||||
</code></pre>
|
||||
<p>来给上面的示例加入接口 <code>Card</code> 与 <code>Deck</code>,从而使得类型更为清晰明了而更易于重用:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Card {
|
||||
suit: <span class="hljs-built_in">string</span>;
|
||||
card: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> Deck {
|
||||
suits: <span class="hljs-built_in">string</span> [];
|
||||
cards: <span class="hljs-built_in">number</span> [];
|
||||
createCardPicker (<span class="hljs-keyword">this</span>: Deck): () => Card;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> deck: Deck = {
|
||||
suits: [<span class="hljs-string">"hearts"</span>, <span class="hljs-string">"spades"</span>, <span class="hljs-string">"clubs"</span>, <span class="hljs-string">"diamonds"</span>],
|
||||
cards: <span class="hljs-built_in">Array</span>(<span class="hljs-number">52</span>),
|
||||
<span class="hljs-comment">// 注意:此函数现在显式地指明了其被调必须是类型`Deck`(<span class="hljs-doctag">NOTE:</span> The function now explicitly specifies </span>
|
||||
<span class="hljs-comment">// that its callee must be of type Deck)</span>
|
||||
|
||||
createCardPicker: <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"><span class="hljs-keyword">this</span>: Deck</span>) </span>{
|
||||
<span class="hljs-keyword">return</span> () => {
|
||||
<span class="hljs-keyword">let</span> pickedCard = <span class="hljs-built_in">Math</span>.floor (<span class="hljs-built_in">Math</span>.random() * <span class="hljs-number">52</span>);
|
||||
<span class="hljs-keyword">let</span> pickedSuit = <span class="hljs-built_in">Math</span>.floor (pickedCard / <span class="hljs-number">13</span>);
|
||||
|
||||
<span class="hljs-keyword">return</span> {suit: <span class="hljs-keyword">this</span>.suits[pickedSuit], card: pickedCard % <span class="hljs-number">13</span>};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> cardPicker = deck.createCardPicker ();
|
||||
<span class="hljs-keyword">let</span> pickedCard = cardPicker ();
|
||||
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Card: "</span> + pickedCard.card + <span class="hljs-string">" of "</span> + pickedCard.suit);
|
||||
</code></pre>
|
||||
<p>现在TypeScript就知道了<code>createCardPicker</code>期望是在<code>Deck</code>对象上被调用了。那就意味着现在的<code>this</code>是<code>Deck</code>类型,而不再是<code>any</code>类型了,由此<code>--noImplicitThis</code>编译指令也不会再引起任何的错误了。</p>
|
||||
<h3 id="回调函数中的this">回调函数中的<code>this</code></h3>
|
||||
<p>在将函数传递给将随后掉用到这些函数的某个库时,对于回调函数中的<code>this</code>,也是非常容易出错的地方。因为调用回调函数的库,将像调用普通函数那样调用回调函数,所以<code>this</code>将是<code>undefined</code>。同样,作出一些努力后,也可以使用<code>this</code>参数,来防止回调中错误的发生。首先,编写库的同志们,你们要使用<code>this</code>来对回调类型加以注释:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> UIElement {
|
||||
addClickListener (onclick: (<span class="hljs-keyword">this</span>: <span class="hljs-built_in">void</span>, e: Event) => <span class="hljs-built_in">void</span>): <span class="hljs-built_in">void</span>;
|
||||
}
|
||||
</code></pre>
|
||||
<p><code>this: void</code> 指的是<code>addClickListener</code>期望<code>onclick</code>是一个不要求<code>this</code>类型的函数(<code>this: void</code> means that <code>addClickListener</code> expects <code>onclick</code> to be a function that does not require a <code>this</code> type)。</p>
|
||||
<p>接着,使用<code>this</code>来对调用代码进行注释:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Handler {
|
||||
info: <span class="hljs-built_in">string</span>;
|
||||
onClickBad (<span class="hljs-keyword">this</span>: Handler, e: Event) {
|
||||
<span class="hljs-comment">// 呃,这里使用了 `this`。如果使用这个回调函数,那么在运行时就将崩溃</span>
|
||||
<span class="hljs-keyword">this</span>.info = e.message;
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> h = <span class="hljs-keyword">new</span> Handler ();
|
||||
uiElement.addClickListener (h.onClickGood);
|
||||
</code></pre>
|
||||
<p>在对<code>this</code>进行了注释后,就显式的要求<code>onClickGood</code>必须在<code>Handler</code>类的某个实例上加以调用(With <code>this</code> annotated, you make it explicit that <code>onClickGood</code> must be called on an instance of <code>Handler</code>)。那么TypeScript就将侦测到<code>addClickListener</code>要求有着<code>this: void</code>的函数了。为解决这个问题,就需要修改<code>this</code>的类型:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Handler {
|
||||
info: <span class="hljs-built_in">string</span>;
|
||||
onClickGood (<span class="hljs-keyword">this</span>: <span class="hljs-built_in">void</span>, e: Event) {
|
||||
<span class="hljs-comment">// 这里是无法使用`this`的,因为其为`void`类型</span>
|
||||
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">'clicked!'</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> h = <span class="hljs-keyword">new</span> Handler ();
|
||||
uiElement.addClickListener (h.onClickGood);
|
||||
</code></pre>
|
||||
<p>因为<code>onClickGood</code>将其<code>this</code>类型指定为了<code>void</code>,所以传递给<code>addClickListener</code>是合法的。当然,这也意味着<code>onClickGood</code>不能使用<code>this.info</code>了。如既要传递给<code>addClickListener</code>又要使用<code>this.info</code>,那么就不得不使用一个箭头函数了(箭头函数在创建时捕获<code>this</code>,调用时不捕获)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> Handler {
|
||||
info: <span class="hljs-built_in">string</span>;
|
||||
onClickGood = (e: Event) => { <span class="hljs-keyword">this</span>.info = e.message; }
|
||||
}
|
||||
</code></pre>
|
||||
<p>这会起作用,因为箭头函数不对<code>this</code>进行捕获,因此总是能够将它们传递给那些期望<code>this: void</code>的主调函数。此方法的不足之处在于,对于每个类型处理器对象,一个箭头函数就被创建出来。而对于作为另一方式的对象方法,则是只被创建一次,随后就附着在处理器的原型之上。这些对象方法,在类型处理器的所有对象之间得以共享(The downside is that one arrow function is created per object of type Handler. Methods, on the other hand, are only created once and attached to Handler's prototype. They are shared between all objects of type Handler)。</p>
|
||||
<h2 id="overloads">Overloads</h2>
|
||||
<p>JavaScript本质上是一种甚为动态的语言。基于所传入的参数形状,某单个的JavaScript函数返回不同类型的对象,这种情况并不罕见(JavaScript is inherently a very dynamic language. It's not uncommon for a single JavaScript function to return different types of objects based on the shape of the arguments passed in)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> suits = [<span class="hljs-string">"hearts"</span>, <span class="hljs-string">"spades"</span>, <span class="hljs-string">"clubs"</span>, <span class="hljs-string">"diamonds"</span>];
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">pickCard</span>(<span class="hljs-params">x</span>): <span class="hljs-title">any</span> </span>{
|
||||
<span class="hljs-comment">// </span>
|
||||
<span class="hljs-comment">//</span>
|
||||
<span class="hljs-keyword">if</span> ( <span class="hljs-keyword">typeof</span> x == <span class="hljs-string">"object"</span> ) {
|
||||
<span class="hljs-keyword">let</span> pickedCard = <span class="hljs-built_in">Math</span>.floor (<span class="hljs-built_in">Math</span>.random() * x.length);
|
||||
<span class="hljs-keyword">return</span> pickedCard;
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// </span>
|
||||
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> x == <span class="hljs-string">"number"</span>) {
|
||||
<span class="hljs-keyword">let</span> pickedSuit = <span class="hljs-built_in">Math</span>.floor(x/<span class="hljs-number">13</span>);
|
||||
<span class="hljs-keyword">return</span> { suit: suits[pickedSuit], card: x%<span class="hljs-number">13</span> };
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myDeck = [{suit: <span class="hljs-string">"diamonds"</span>, card: <span class="hljs-number">2</span>}, {suit: <span class="hljs-string">"spades"</span>, card: <span class="hljs-number">10</span>}, {suit: <span class="hljs-string">"hearts"</span>, card: <span class="hljs-number">4</span>}];
|
||||
<span class="hljs-keyword">let</span> pickedCard1 = myDeck[pickCard(myDeck)];
|
||||
alert(<span class="hljs-string">"Card: "</span> + pickedCard1.card + <span class="hljs-string">" of "</span> + pickedCard1.suit);
|
||||
|
||||
<span class="hljs-keyword">let</span> pickedCard2 = pickCard(<span class="hljs-number">15</span>);
|
||||
alert(<span class="hljs-string">"Card: "</span> + pickedCard2.card + <span class="hljs-string">" of "</span> + pickedCard2.suit);
|
||||
</code></pre>
|
||||
<p>基于用户传入参数,这里的<code>pickCard</code>函数将返回两种不同的结果。如果用户传入一个表示扑克牌的对象,那么该函数将抽出一张牌。而如果用户抽取了一张牌,那么这里将告诉他抽取的是那张牌。但怎么来将此逻辑描述给类型系统呢?</p>
|
||||
<p>答案就是,以 <strong>过载清单</strong> 的形式,为同一函数提供多个函数类型(The answer is to supply multiple function types for the same function as <strong>a list of overloads</strong>)。下面就来建立一个描述<code>pickCard</code>函数接受何种参数,以及返回什么值的过载清单。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> suits = [<span class="hljs-string">"hearts"</span>, <span class="hljs-string">"spades"</span>, <span class="hljs-string">"clubs"</span>, <span class="hljs-string">"diamonds"</span>];
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">pickCard</span> (<span class="hljs-params">x: {suit: <span class="hljs-built_in">string</span>; card: <span class="hljs-built_in">number</span>;} []</span>): <span class="hljs-title">number</span></span>;
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">pickCard</span> (<span class="hljs-params">x: <span class="hljs-built_in">number</span></span>): </span>{suit: <span class="hljs-built_in">string</span>; card: <span class="hljs-built_in">number</span>;};
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">pickCard</span> (<span class="hljs-params">x</span>): <span class="hljs-title">any</span> </span>{
|
||||
<span class="hljs-comment">// </span>
|
||||
<span class="hljs-comment">//</span>
|
||||
<span class="hljs-keyword">if</span> ( <span class="hljs-keyword">typeof</span> x == <span class="hljs-string">"object"</span> ) {
|
||||
<span class="hljs-keyword">let</span> pickedCard = <span class="hljs-built_in">Math</span>.floor (<span class="hljs-built_in">Math</span>.random() * x.length);
|
||||
<span class="hljs-keyword">return</span> pickedCard;
|
||||
}
|
||||
|
||||
<span class="hljs-comment">// </span>
|
||||
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (<span class="hljs-keyword">typeof</span> x == <span class="hljs-string">"number"</span>) {
|
||||
<span class="hljs-keyword">let</span> pickedSuit = <span class="hljs-built_in">Math</span>.floor(x/<span class="hljs-number">13</span>);
|
||||
<span class="hljs-keyword">return</span> { suit: suits[pickedSuit], card: x%<span class="hljs-number">13</span> };
|
||||
}
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myDeck = [{suit: <span class="hljs-string">"diamonds"</span>, card: <span class="hljs-number">2</span>}, {suit: <span class="hljs-string">"spades"</span>, card: <span class="hljs-number">10</span>}, {suit: <span class="hljs-string">"hearts"</span>, card: <span class="hljs-number">4</span>}];
|
||||
<span class="hljs-keyword">let</span> pickedCard1 = myDeck[pickCard(myDeck)];
|
||||
alert(<span class="hljs-string">"Card: "</span> + pickedCard1.card + <span class="hljs-string">" of "</span> + pickedCard1.suit);
|
||||
|
||||
<span class="hljs-keyword">let</span> pickedCard2 = pickCard(<span class="hljs-number">15</span>);
|
||||
alert(<span class="hljs-string">"Card: "</span> + pickedCard2.card + <span class="hljs-string">" of "</span> + pickedCard2.suit);
|
||||
</code></pre>
|
||||
<p>做出此改变后,现在过载就给到了对<code>pickCard</code>函数 <strong>有类型检查的调用</strong>( <strong>type-checked calls</strong> )了。</p>
|
||||
<p>为了让编译器拾取到正确的类型检查,编译器采取了与JavaScript底层类似的处理。编译器查看过载清单,从首条过载开始尝试以所提供的参数,对函数进行调用。在发现参数与函数类型中的参数类型匹配时,就取用该过载作为正确的过载。因此,就应将那些过载,以最具体到最宽泛的顺序加以排列。</p>
|
||||
<p>请注意这里的<code>function pickCard(x): any</code>代码,就并非该过载清单的部分了,那么函数<code>pickCard</code>就只有两条过载:一个是取得一个对象,另一个是取得一个数字。若以任何其它参数类型调用<code>pickCard</code>,都将引发错误。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="04_interfaces.html" class="navigation navigation-prev " aria-label="Previous page: 接口">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="06_generics.html" class="navigation navigation-next " aria-label="Next page: 泛型">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"函数","level":"1.6","depth":1,"next":{"title":"泛型","level":"1.7","depth":1,"path":"06_generics.md","ref":"06_generics.md","articles":[]},"previous":{"title":"接口","level":"1.5","depth":1,"path":"04_interfaces.md","ref":"04_interfaces.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"05_functions.md","mtime":"2019-04-03T06:43:16.308Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
534
_book/06_generics.html
Normal file
534
_book/06_generics.html
Normal file
@ -0,0 +1,534 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>泛型 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="07_enums.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="05_functions.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >泛型</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="泛型(generics)">泛型(Generics)</h1>
|
||||
<h2 id="简介">简介</h2>
|
||||
<p>软件工程的一个主要部分,就是有关不仅有着良好定义并具备一致性,而且具备可重用性组件的构建(A major part of software engineering, is building components that not only have well-defined and consistent APIs)。既可处理现今的数据,又能处理往后的数据的组件,对于构建大型软件系统,将带来最灵活的效能。</p>
|
||||
<p>在诸如C#与Java这样的程序语言中,它们工具箱中用于可重用组件创建的主要工具之一,就是 <em>泛型(generics)</em>,借助于泛型特性,就可以创建出可工作于不同类型,而非单一类型的组件。这就允许用户对组件进行消费,并使用其各自的类型。</p>
|
||||
<p>(注:<a href="https://en.wikipedia.org/wiki/Generic_programming" target="_blank">Wikipedia:泛型</a> )</p>
|
||||
<h2 id="泛型入门">泛型入门</h2>
|
||||
<p>这里以泛型特性的“Hello World”开始。下面的<code>identity</code>函数将返回任何传递给它的东西。可将其想作与<code>echo</code>命令类似。</p>
|
||||
<p>在没有泛型特性时,就要么必须给予该<code>identity</code>函数某种指定类型:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span> (<span class="hljs-params">arg: <span class="hljs-built_in">number</span></span>): <span class="hljs-title">number</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>或者使用<code>any</code>类型类描述该<code>identity</code>函数:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span> (<span class="hljs-params">arg: <span class="hljs-built_in">any</span></span>): <span class="hljs-title">any</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>尽管使用<code>any</code>具备泛型,因为这样做导致该函数接收任何且所有类型的<code>arg</code>,不过实际上丢失了函数返回值时的类型。比如假设传入了一个数字,能得到的信息就仅是可返回任意类型(While using <code>any</code> is certainly genric in that it will cause the fucntion to accept any and all types for the type of <code>any</code>, we actually are losing the information about what that type was when the function returns. If we passed in a number, the only information we have is that any type could be returned)。</p>
|
||||
<p>取而代之的是,这里需要某种捕获参数类型的方式,通过此方式带注解将返回何种类型。那么这里将使用 <em>类型变量(type variable)</em>,类型变量与作用在值上的变量不同,其是一种作用在类型上的变量(Instead, we need a way of capturing the type of the argument in such a way that we can also use it to denote what is being returned. Here, we will use a <em>type variable</em>, a special kind of variable that works on types rather than values)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>> (<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>现在已经给<code>identity</code>函数加上了一个类型变量<code>T</code>。此<code>T</code>允许对用户提供的类型进行捕获(比如:<code>number</code>),因此就可以于随后使用该信息。这里再度使用<code>T</code>作为返回值类型。在检查时,就可以看到对参数与返回值类型,使用的是同一种类型了。这样做就允许将函数一侧的类型信息,运送到另一侧。</p>
|
||||
<p>那么就说此版本的<code>identity</code>就是泛型的了,因为其在一系列的类型上都可运作。与使用<code>any</code>不同,泛型的使用与上面的第一个对参数与返回值类型都用了数字的<code>identity</code>函数同样精确(也就是其并没有丢失任何信息)。</p>
|
||||
<p>而一旦写好这个泛型的<code>identity</code>函数,就可以两种方式对其进行调用了。第一种方式是将所有参数,包括参数类型,传递给该函数:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> output = identity<<span class="hljs-built_in">string</span>>(<span class="hljs-string">"myString"</span>);
|
||||
</code></pre>
|
||||
<p>这里显式地将<code>T</code>置为<code>string</code>,作为函数调用的参数之一,注意这里使用的<code><></code>而非<code>()</code>进行注记。</p>
|
||||
<p>第二种方式,也是最常见的了。就是使用 <em>类型参数推理(type argument inference)</em> -- 也就是,让编译器基于传递给它的参数类型,来自动设定<code>T</code>的值。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> output = identity(<span class="hljs-string">"myString"</span>); <span class="hljs-comment">// 输出类型将是 `string`</span>
|
||||
</code></pre>
|
||||
<p>注意这里不必显式地传入尖括号(the angle brackets, <code><></code>)中的类型;编译器只需查看值<code>myString</code>,并将<code>T</code>设置为<code>myString</code>的类型。尽管类型参数推理在保持代码简短及更具可读性上,能够作为一项有用的工具,但在一些更为复杂的示例中可能发生编译器无法完成类型推理时,仍需像先前的示例那样,显式地传入类型参数,</p>
|
||||
<h2 id="泛型类型变量的使用(working-with-generic-type-variables)">泛型类型变量的使用(Working with Generic Type Variables)</h2>
|
||||
<p>在一开始使用泛型时,将注意到在创建诸如<code>identify</code>这样的函数时,编译器将强制在函数体中正确地使用任意泛型的类型化参数。那就是说,实际上可将这些参数,像是任意及所有类型那样对待(When you begin to use generics, you'll notice that when you create generic functions like <code>identity</code>, the compiler will enforce that you use any generically typed parameters in the body of the function correctly. That is, that you actually treat these parameters as if they could be any and all types)。</p>
|
||||
<p>这里仍然以前面的<code>identity</code>函数做示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>那么如果在各个调用中要同时记录参数<code>arg</code>的长度到控制台会怎样呢?就可能会尝试这样来编写:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-built_in">console</span>.log(arg.length); <span class="hljs-comment">// Property 'length' does not exist on type 'T'. (2339)</span>
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>这样做的话,编译器将给出一个在成员<code>arg</code>上使用<code>.length</code>的错误,然而没有那里说过<code>arg</code>上有着此成员。请记住,前面已经提及到,这些类型变量代替的是<code>any</code>及所有类型,因此使用此函数的某个人可能传入的是一个<code>number</code>,而一个<code>number</code>显然是没有<code>.length</code>成员的。</p>
|
||||
<p>这里实际上是要该函数在<code>T</code>的数组上操作,而不是在<code>T</code>上。而一旦对数组进行操作,那么<code>.length</code>成员就可用了。可像下面将创建其它类型的数组那样,对此进行描述:</p>
|
||||
<pre><code class="lang-typescript">function loggingIdentity<T>(arg: T[]): T[] {
|
||||
console.log(arg.length); // 因为数组有着长度,因此不再发生错误
|
||||
return arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>可将<code>loggingIdentity</code>的类型,读作“通用函数<code>loggingIdentity</code>,获取一个类型参数<code>T</code>,以及一个为<code>T</code>的数组的参数<code>arg</code>,而返回一个<code>T</code>的数组”("the generic function <code>loggingIdentity</code> takes a type parameter <code>T</code>, and an argument <code>arg</code> which is an array of <code>T</code>s, and returns an array of <code>T</code>s")。在将一个数字数组传递进去时,将获取到一个返回的数字数组,同时<code>T</code>将绑定到<code>number</code>类型。这就允许将这里的泛型变量<code>T</code>作为所处理的类型的一部分,而非整个类型,从而带来更大的灵活性(This allows us to use our generic type variable <code>T</code> as part of the types we're working with, rather than the whole type, giving us greater flexibility,这里涉及两个类型,泛型<code>T</code>及泛型<code>T</code>的数组,因此说<code>T</code>是处理类型的部分)。</p>
|
||||
<p>还可以将同一示例,写成下面这种形式:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">loggingIdentity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: <span class="hljs-built_in">Array</span><T></span>): <span class="hljs-title">Array</span><<span class="hljs-title">T</span>> </span>{
|
||||
<span class="hljs-built_in">console</span>.log(arg.length);
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>其它语言中也有此种写法。下一小节,将探讨如何创建自己的诸如<code>Array<T></code>这样的泛型。</p>
|
||||
<h2 id="泛型(generic-types)">泛型(Generic Types)</h2>
|
||||
<p>上一小节中,创建出了通用的、可处理一系列类型的identity函数。本小节中,将就该函数本身的类型,以及如何创建通用接口,进行探索。</p>
|
||||
<p>通用函数的类型(the type of generic functions)与非通用函数一样,以所列出的类型参数开始,类似与函数的声明:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myIdentity: <T>(arg: T) => T = identity;
|
||||
</code></pre>
|
||||
<p>对于类型中的泛型参数,则可以使用不同的名称,只要与类型变量的数目及类型变量使用顺序一致即可(We could also have used a different name for the generic type parameter in the type, so long as the number of type variables and how the type variables are used line up)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myIdentity: <U>(arg: U) => U = identity;
|
||||
</code></pre>
|
||||
<p>还可以将该泛型写为某对象字面类型的调用签名(a call signature of an object literal type):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myIdentity: {<T>(arg: T): T} = identity;
|
||||
</code></pre>
|
||||
<p>这就引入编写首个通用接口(the generic interface)的问题了。这里把上一示例中的对象字面值,改写为接口的形式:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> GenericIdentityFn {
|
||||
<T>(arg: T): T;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>) <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myIdentity: GenericIdentityFn = identity;
|
||||
</code></pre>
|
||||
<p>在类似示例中,可能想要将通用参数,修改为整个接口的一个参数。这样做可获悉是对那些类型进行泛型处理(比如,是<code>Dictionary<string></code>而不只是<code>Dictionary</code>)。这样处理可将类型参数暴露给该接口的其它成员(In a similar example, we may want to move the generic parameter to be a parameter of the whole interface. This lets us see what type(s) we're generic over(e.g. <code>Dictionary<string></code> rather than just <code>Dictionary</code>). This makes the type parameter visible to all the other members of the interface)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> GenericIdentityFn<T> {
|
||||
(arg: T): T;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>) <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myIdentity: GenericIdentityFn<<span class="hljs-built_in">number</span>> = identity;
|
||||
</code></pre>
|
||||
<p>请注意这里的示例已被修改为有一点点的不同了。这里有了一个作为泛型一部分的非通用函数,取代了对一个通用函数的描述。现在使用<code>GenericIdentityFn</code>时,就需要明确指明一个对应的类型参数了(这里是<code>number</code>),从而有效锁定当前调用签名所具体使用的类型。掌握何时将类型参数直接放在调用签名上,以及何时将其放在接口本身上,对于阐明泛型的各个方面是有帮助的(Instead of describing a generic function, we now have a non-generic function signature that is a part of a generic type. When we use <code>GenericIdentityFn</code>, we now will also need to specify the corresponding type argument(here: <code>number</code>), effectively locking in what the underlying call signature will use. Understanding when to put the type parameter directly on the call signature and when to put it on the interface itself will be helpful in describing what aspects of a type are generic)。</p>
|
||||
<p>除开通用接口,还可以创建通用类。但请注意是不能创建通用枚举与命名空间的。</p>
|
||||
<h2 id="通用类(generic-classes)">通用类(Generic Classes)</h2>
|
||||
<p>通用类与通用接口有着类似外观。通用类在类名称之后,有着一个于尖括号(<code><></code>)中所列出的泛型参数清单(A generic class has a similar shape to a generic interface. Generic classes have a generic type parameter list in angle brackets(<code><></code>) following the name of the class)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">class</span> GenericNumber<T> {
|
||||
zeroValue: T;
|
||||
add: (x: T, y: T) => T;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> myGenericNumber = <span class="hljs-keyword">new</span> GenericNumber<<span class="hljs-built_in">number</span>>();
|
||||
myGenericNumber.zeroValue = <span class="hljs-number">0</span>;
|
||||
myGenericNumber.add = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x, y</span>) </span>{<span class="hljs-keyword">return</span> x+y;};
|
||||
</code></pre>
|
||||
<p>这是对<code>GenericNumber</code>类的相当直观的用法了,不过可能会注意到这里并没有限制该类仅使用<code>number</code>类型。因此可以使用<code>string</code>甚至更复杂的JavaScript对象。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> stringNumeric = <span class="hljs-keyword">new</span> GenericNumber<<span class="hljs-built_in">string</span>>();
|
||||
|
||||
stringNumeric.zeroValue = <span class="hljs-string">""</span>;
|
||||
stringNumeric.add = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">x, y</span>) </span>{ <span class="hljs-keyword">return</span> x + y; };
|
||||
|
||||
alert(stringNumeric.add(stringNumeric.zeroValue, <span class="hljs-string">"test"</span>));
|
||||
</code></pre>
|
||||
<p>与接口一样,将类型参数放在类本身上,可确保该类的所有属性,都与同一类型进行运作。</p>
|
||||
<p>如同在<a href="03_classes.html">类部分</a>所讲到的,类在其类型上有两侧:静态侧与示例侧。通用类则仅在示例侧是通用的,静态侧不具有通用性,因此在使用类时,静态成员无法使用到类的类型参数。</p>
|
||||
<h2 id="泛型约束(generic-constraints)">泛型约束(Generic Constraints)</h2>
|
||||
<p>如还记得早先的一个示例,有时候在了解到某些类型集所具备的功能时,而想要编写一个处理类型集的通用函数。在示例<code>loggingIdentity</code>中,是打算能够访问到<code>arg</code>的<code>length</code>属性,但编译器却无法证实每个类型都有<code>length</code>属性,因此它就警告无法做出此种假定。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">identity</span><<span class="hljs-title">T</span>>(<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-built_in">console</span>.log(arg.length); <span class="hljs-comment">// Property 'length' does not exist on type 'T'. (2339)</span>
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>为了避免处理任意与所有类型,这里就要将该函数约束为处理有着<code>length</code>属性的任意及所有类型。只要类型具有该成员,这里允许该类型,但仍要求该类型至少具备该属性。为了达到这个目的,就必须将这里的要求,作为<code>T</code>可以是何种类型的一个约束加以列出。</p>
|
||||
<p>做法就是,创建出一个描述约束的接口。下面将创建一个具有单一<code>.length</code>的接口,并使用该接口及<code>extends</code>语句,来表示这里的约束:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">interface</span> Lengthwise {
|
||||
length: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">loggingIdentity</span><<span class="hljs-title">T</span> <span class="hljs-title">extends</span> <span class="hljs-title">Lengthwise</span>>(<span class="hljs-params">arg: T</span>): <span class="hljs-title">T</span> </span>{
|
||||
<span class="hljs-built_in">console</span>.log(arg.length); <span class="hljs-comment">// 现在知道`arg`有着一个`.length`属性,因此不再报出错误</span>
|
||||
<span class="hljs-keyword">return</span> arg;
|
||||
}
|
||||
</code></pre>
|
||||
<p>因为该通用函数现在已被约束,故其不再对任意及所有类型运作:</p>
|
||||
<pre><code class="lang-typescript">loggingIdentity(<span class="hljs-number">3</span>); <span class="hljs-comment">// 错误,数字没有`.length`属性</span>
|
||||
</code></pre>
|
||||
<p>相反,这里需传入那些具有全部所需属性类型的值:</p>
|
||||
<pre><code class="lang-typescript">loggingIdentity({length: <span class="hljs-number">10</span>; value: <span class="hljs-number">3</span>});
|
||||
</code></pre>
|
||||
<h3 id="在泛型约束中使用类型参数(using-type-parameter-in-generic-constraints)">在泛型约束中使用类型参数(Using Type Parameter in Generic Constraints)</h3>
|
||||
<p>定义一个受其它类型参数约束的类型参数,也是可以的。比如这里要从一个对象,经由属性名称而获取到某个属性。肯定是要确保不会偶然去获取某个并不存在于该<code>obj</code>上的属性,因此就将在两个类型上,加上一条约束(You can declare a type parameter that is constrained by another type parameter. For example, here we'd like to get a property from an object given its name. We'd like to ensure that we're not accidentally grabbing a property that does not exist on the <code>obj</code>, so we'll place a constraint between the two types):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getProperty</span><<span class="hljs-title">T</span>, <span class="hljs-title">K</span> <span class="hljs-title">extends</span> <span class="hljs-title">keyof</span> <span class="hljs-title">T</span>>(<span class="hljs-params">obj: T, key: K</span>) </span>{
|
||||
<span class="hljs-keyword">return</span> obj[key];
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> x = { a: <span class="hljs-number">1</span>, b: <span class="hljs-number">2</span>, c: <span class="hljs-number">3</span>, d: <span class="hljs-number">4</span> };
|
||||
|
||||
getProperty(x, <span class="hljs-string">"m"</span>); <span class="hljs-comment">// Argument of type '"m"' is not assignable to parameter of type '"a" | "b" | "c" | "d"'. (2345)</span>
|
||||
</code></pre>
|
||||
<h3 id="在泛型中使用类类型(using-class-types-in-generics)">在泛型中使用类类型(Using Class Types in Generics)</h3>
|
||||
<p>在运用泛型来创建TypeScript的工厂(工厂是一种面向对象编程的设计模式,参见<a href="https://thedulinreport.com/2017/07/30/design-patters-in-typescript-factory/" target="_blank">Design patterns in TypeScript: Factory</a>, <a href="http://www.oodesign.com/factory-pattern.html" target="_blank">oodesign.com: Factory Pattern</a>)时,有必要通过类的构造函数,对类的类型加以引用(When creating factories in TypeScript using generics, it is necessary to refer to class types by their constructor functions)。比如:</p>
|
||||
<pre><code class="lang-typescript">function create<T>(c: { new(): T; }): T {
|
||||
return new c();
|
||||
}
|
||||
</code></pre>
|
||||
<p>下面是一个更为复杂的示例,其使用了原型属性,来推断及约束构造函数与类的类型实例侧之间的关系(A more advanced example uses the prototype property to infer and constrain relationships between the constructor function and the instance side of class types)。</p>
|
||||
<pre><code class="lang-typescript">class BeeKeeper {
|
||||
hasMask: boolean;
|
||||
}
|
||||
|
||||
class ZooKeeper {
|
||||
nametag: string;
|
||||
}
|
||||
|
||||
class Animal {
|
||||
numLegs: number;
|
||||
}
|
||||
|
||||
class Bee extends Animal {
|
||||
keeper: BeeKeeper;
|
||||
}
|
||||
|
||||
class Lion extends Animal {
|
||||
keeper: ZooKeeper;
|
||||
}
|
||||
|
||||
function createInstance<A extends Animal>(c: new () => A): A {
|
||||
return new c();
|
||||
}
|
||||
|
||||
createInstance(Lion).keeper.nametag; // 类型检查, Cannot read property 'nametag' of undefined
|
||||
createInstance(Bee).keeper.hasMask;
|
||||
</code></pre>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="05_functions.html" class="navigation navigation-prev " aria-label="Previous page: 函数">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="07_enums.html" class="navigation navigation-next " aria-label="Next page: 枚举">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"泛型","level":"1.7","depth":1,"next":{"title":"枚举","level":"1.8","depth":1,"path":"07_enums.md","ref":"07_enums.md","articles":[]},"previous":{"title":"函数","level":"1.6","depth":1,"path":"05_functions.md","ref":"05_functions.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"06_generics.md","mtime":"2019-04-03T06:43:16.308Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
539
_book/07_enums.html
Normal file
539
_book/07_enums.html
Normal file
@ -0,0 +1,539 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>枚举 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="08_type_inference.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="06_generics.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >枚举</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="枚举(enums)">枚举(Enums)</h1>
|
||||
<p>Enum [en^m]是源自Enumerate, 意思是一一列举出来。</p>
|
||||
<p>枚举特性令到定义一个命名常量的集合可行。使用枚举可使得意图表达,或创建差异案例更为容易(Using enums can make it easier to document intent, or create a set of distinct cases)。TypeScript同时支持基于数字与字符串这两种枚举。</p>
|
||||
<h2 id="数字的枚举(numeric-enums)">数字的枚举(Numeric enums)</h2>
|
||||
<p>这里将首先以数字枚举开始,如有着其它语言的经验,那么这种枚举可能更为熟悉。使用<code>enum</code>关键字,就可以定义出一个枚举。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Direction {
|
||||
Up = <span class="hljs-number">1</span>,
|
||||
Down,
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
</code></pre>
|
||||
<p>上面的示例有着一个数字的枚举,其中<code>Up</code>以<code>1</code>进行了初始化。其后的所有成员,都被从那个点自动增加。也就是说,<code>Direction.Up</code>的值为<code>1</code>,<code>Down</code>为<code>2</code>,<code>Left</code>为<code>3</code>,<code>Right</code>为<code>4</code>。</p>
|
||||
<p>如有需要,亦可将初始值完全留空:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Direction {
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
</code></pre>
|
||||
<p>此时,<code>Up</code>的值将为<code>0</code>,<code>Down</code>将为<code>1</code>,等等。对于那些不会考虑成员值本身的案例,这种自动增加的行为是有用的,不过无需担心在同一枚举中各个值与其它值是各异的。</p>
|
||||
<p>使用枚举很简单:只要以枚举本身属性的方式,并使用枚举的名称来声明类型,来访问其任何成员即可(Using an enum is simple: just access any member as a property off of the enum itself, and declare types using the name of the enum)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Response {
|
||||
No = <span class="hljs-number">0</span>,
|
||||
Yes,
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">respond</span> (<span class="hljs-params">recipient: <span class="hljs-built_in">string</span>, message: Response</span>): <span class="hljs-title">void</span> </span>{
|
||||
<span class="hljs-comment">// ...</span>
|
||||
}
|
||||
|
||||
respond (<span class="hljs-string">"Princess Caroline"</span>, Response.Yes);
|
||||
</code></pre>
|
||||
<p>数字枚举可混合计算的与常量成员(见后)。简单的说,没有初始值的枚举成员,要么需放在第一个,或必须在那些以数值常量或其它常量枚举成员初始化过的数字枚举成员之后(Numberic enums can be mixed in computed and constant members(see below). The short story is, enums without initializers either need to be first, or have to come after numberic enums initialized with numberic constants or other constant enum members)。也就是说,下面这种方式是不允许的:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> E {
|
||||
A = getSomeValue (),
|
||||
B, <span class="hljs-comment">// Enum member must have initializer. (1061)</span>
|
||||
}
|
||||
</code></pre>
|
||||
<h2 id="字符串枚举(string-enums)">字符串枚举(String enums)</h2>
|
||||
<p>字符串枚举的概念相同,但有一些细微的运行时上的不同(runtime differences),后面会有说明。在字符串枚举中,每个成员都必须使用字符串字面值,或其它字符串枚举成员加以初始化。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Direction {
|
||||
Up = <span class="hljs-string">"UP"</span>,
|
||||
Down = <span class="hljs-string">"DOWN"</span>,
|
||||
Left = <span class="hljs-string">"LEFT"</span>,
|
||||
Right = <span class="hljs-string">"RIGHT"</span>,
|
||||
}
|
||||
</code></pre>
|
||||
<p>虽然字符串枚举不具有自动增加行为,它们却仍然受益于其良好的“连续性”。换句话说,加入正在对程序进行调试,而不得不读取某个数字枚举的运行时值,该值通常是不透明的 -- 该值并不能提供到任何其本身有用的意义(尽管反向映射通常有所帮助),但字符串枚举却允许在代码运行时,独立于枚举成员本身,赋予有意义且可读的值(While string enums don't have auto-incrementing behavior, string enums have the benefit that they "serialize" well. In other words, if you are debugging and had to read the runtime value of a numeric enum, the value is ofter opaque - it doesn't convey any useful meaning on its own(though reverse mapping can often help), string enums allow you to give a meaningful and readable value when your code runs, independent of the name of the enum member itself)。</p>
|
||||
<h2 id="异质枚举(heterogeneous-enums)">异质枚举(Heterogeneous enums)</h2>
|
||||
<p>技术上枚举是可以混合字符串与数字成员的,但这么做似乎没有什么理由:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> BooleanLikeHeterogeneousEnum {
|
||||
No = <span class="hljs-number">0</span>,
|
||||
Yes = <span class="hljs-string">"YES"</span>,
|
||||
}
|
||||
</code></pre>
|
||||
<p>除非要以某种明智的方式来利用JavaScript的运行时行为,否则建议不要这样做(Unless you're really trying to take advantage of JavaScript's runtime behavior in a clever way, it's advised that you don't do this)。</p>
|
||||
<h2 id="计算的与常量成员(computed-and-constant-members)">计算的与常量成员(Computed and constant members)</h2>
|
||||
<p>枚举的每个成员,都有着一个与其关联的值,该值可以是 <em>常量或计算值(constant or computed)</em>。在以下情况下,枚举成员将被看着是常量:</p>
|
||||
<ul>
|
||||
<li><p>其作为枚举中的第一个成员且没有初始值,这种情况下其就被赋予值<code>0</code>:</p>
|
||||
<pre><code class="lang-typescript"> <span class="hljs-comment">// E.X 是常量</span>
|
||||
<span class="hljs-keyword">enum</span> E { X }
|
||||
</code></pre>
|
||||
</li>
|
||||
<li><p>没有初始值,且前一个枚举成员是一个 <em>数字</em> 常量。这种情况下当前枚举成员的值将是其前一个枚举成员加一。</p>
|
||||
<pre><code class="lang-typescript"> <span class="hljs-comment">// `E1`与`E2`中的所有枚举成员都是常量。</span>
|
||||
<span class="hljs-keyword">enum</span> E1 { X, Y, Z }
|
||||
<span class="hljs-keyword">enum</span> E2 { A = <span class="hljs-number">1</span>, B, C }
|
||||
</code></pre>
|
||||
</li>
|
||||
<li><p>以常量枚举表达式(a constant enum expression)初始化的成员。常量枚举表达式是TypeScript表达式的一个子集,在运行时可被完整执行。在满足以下条件是,表达式就是常量枚举表达式:</p>
|
||||
<ol>
|
||||
<li>字面的枚举表达式(基本的字符串表达式或数字表达式, a literal enum expression(basically a string literal or a numeric literal))</li>
|
||||
<li>对先前定义的常量枚举成员(可以来自不同枚举)的引用 (a reference to previously defined constant enum member(which can originate from a different enum))</li>
|
||||
<li>一个用括号包围的常量枚举表达式(a parentthesized constant enum expression)</li>
|
||||
<li>运用到常量枚举表达式的<code>+</code>、<code>-</code>及<code>~</code>三个一元运算符之一(one of the <code>+</code>, <code>-</code>, <code>~</code> unary operators applied to constant enum expression)</li>
|
||||
<li>与将常量枚举表达式作为操作数一起的<code>+</code>、<code>-</code>、<code>*</code>、<code>/</code>、<code>%</code>、<code>>></code>、<code><<</code>、<code>>>></code>、<code>&</code>、<code>|</code>、<code>^</code>等二元运算符</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
<p>对于结果为<code>NaN</code>(Not a Number, 非数值)或<code>Infinity</code>(无穷),将作为编译时错误加以对待(It is compile time error for constant enum expressions to be evaluated to <code>NaN</code> or <code>Infinity</code>)。</p>
|
||||
<p>那么其它所有情况下,枚举成员都将被看作是计算的(In all other cases enum member is considered computed)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> FileAccess {
|
||||
<span class="hljs-comment">// 常量成员</span>
|
||||
None,
|
||||
Read = <span class="hljs-number">1</span> << <span class="hljs-number">1</span>,
|
||||
Write = <span class="hljs-number">1</span> << <span class="hljs-number">2</span>,
|
||||
ReadWrite = Read | Write,
|
||||
<span class="hljs-comment">// 计算的成员</span>
|
||||
G = <span class="hljs-string">"123"</span>.length,
|
||||
}
|
||||
</code></pre>
|
||||
<h2 id="联合枚举与枚举成员类型(union-enums-and-enum-member-types)">联合枚举与枚举成员类型(Union enums and enum member types)</h2>
|
||||
<p>存在这么一个非计算的常量枚举成员的特殊子集: <strong>字面的枚举成员</strong>。字面枚举成员是不带有初始值的,或有着被初始化为以下值的常量枚举成员(There is a special subset of constant enum members that aren't calculated: literal enum members. <strong>A literal enum member</strong> is a constant enum member with no initialized value, or with values that are initialized to):</p>
|
||||
<ul>
|
||||
<li>任意字符串字面值(比如<code>"foo"</code>、<code>"bar"</code>、<code>"baz"</code>)</li>
|
||||
<li>任意数字的字面值(比如<code>1</code>、<code>100</code>)</li>
|
||||
<li>应用到任意数字字面值的一元减号运算符(比如<code>-1</code>、<code>-100</code>)</li>
|
||||
</ul>
|
||||
<p>在某个枚举中所有成员都有着字面枚举值时,某些特别的语法就会生效。</p>
|
||||
<p>第一就是枚举成员还成为了类型!比如,这里可以说某些成员 <em>只</em> 能具有某个枚举成员的值(The first is that enum members also become types as well! For example, we can say that certain members can <em>only</em> have the value of an enum member):</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> ShapeKind {
|
||||
Circle,
|
||||
Square,
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> Circle {
|
||||
kind: ShapeKind.Circle;
|
||||
radius: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">interface</span> Square {
|
||||
kind: ShapeKind.Square;
|
||||
sideLength: <span class="hljs-built_in">number</span>;
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> c: Circle = {
|
||||
kind: ShapeKind.Square,
|
||||
<span class="hljs-comment">// Type '{ kind: ShapeKind.Square; radius: number; }' is not assignable to type 'Circle'.</span>
|
||||
<span class="hljs-comment">// Types of property 'kind' are incompatible.</span>
|
||||
<span class="hljs-comment">// Type 'ShapeKind.Square' is not assignable to type 'ShapeKind.Circle'. (2322)</span>
|
||||
radius: <span class="hljs-number">100</span>,
|
||||
}
|
||||
</code></pre>
|
||||
<p>另一改变,就是枚举类型本身,有效地成为各枚举成员的 <em>联合</em> 。虽然到这里还没有讨论到 <strong>联合类型</strong> (<strong>union types</strong>),只需知道有了联合枚举,TypeScript的类型系统,就能够利用其对存在于枚举本身中的那些确切值的知悉这一事实。而正由于这一点,TypeScript就能捕捉到那些可能进行不正确地值比较等愚蠢程序错误(The other change is that enum types themselves effectively become a <em>union</em> of each enum member. While we havn't discussed <strong>union types</strong> yet, all that you need to know is that with union enums, the type system is able to leverage the fact that it knows the exact set of values that exist in the enum itself. Because of that, TypeScript can catch silly bugs where we might be comparing values incorrectly)。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> E {
|
||||
Foo,
|
||||
Bar,
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span> (<span class="hljs-params">x: E</span>) </span>{
|
||||
<span class="hljs-keyword">if</span> ( x !== E.Foo || x !== E.Bar ) {
|
||||
<span class="hljs-comment">// ~~~~~~~~~~</span>
|
||||
<span class="hljs-comment">// Operator '!==' cannot be applied to types 'E.Foo' and 'E.Bar'. (2365)</span>
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>在该示例中,首先检查了<code>x</code>是否不是<code>E.Foo</code>。如此检查成功,那么这里的<code>||</code>将短路,同时<code>if</code>的语句体将得到运行。但是若那个检查不成功,那么<code>x</code>就只能是<code>E.Foo</code>,因此再来判断其是否等于<code>E.Bar</code>就没有意义了(In that example, we first checked whether <code>x</code> was <em>not</em> <code>E.Foo</code>. If that check succeeds, then our <code>||</code> will <em>short-circuit</em>, and the body of the <code>if</code> will get run. However, if the check didn't succed, then <code>x</code> can <em>only</em> be <code>E.Foo</code>, so it doesn't make sense to see whether it's equal to <code>E.Bar</code>)。</p>
|
||||
<h2 id="运行时的枚举(enums-at-runtime)">运行时的枚举(Enums at runtime)</h2>
|
||||
<p>运行时存在的枚举,都是真实的对象。比如,下面的这个枚举:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> E {
|
||||
X, Y, Z
|
||||
}
|
||||
</code></pre>
|
||||
<p>就能被确切地传递给函数:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">f</span>(<span class="hljs-params">obj: { X: <span class="hljs-built_in">number</span> }</span>) </span>{
|
||||
<span class="hljs-keyword">return</span> obj.X;
|
||||
}
|
||||
|
||||
f(E);
|
||||
</code></pre>
|
||||
<h2 id="反向映射(reverse-mappings)">反向映射(Reverse mappings)</h2>
|
||||
<p>除了创建出一个带有属性名称成员的对象之外,数字枚举成员,还可以得到一个枚举值到枚举名称的 <em>反向映射</em> (In addition to creating an object with property names for members, numeric enums members also get a <em>reverse mapping</em> from enum values to enum names)。比如,在下面的示例中:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">enum</span> Enum {
|
||||
A
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> a = Enum.A;
|
||||
<span class="hljs-keyword">let</span> nameOfA = Enum[a]; <span class="hljs-comment">// "A"</span>
|
||||
</code></pre>
|
||||
<p>TypeScript 会将此编译到类似下面的JavaScript代码:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> Enum;
|
||||
(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">Enum</span>) </span>{
|
||||
Enum[Enum[<span class="hljs-string">"A"</span>] = <span class="hljs-number">0</span>] = <span class="hljs-string">"A"</span>;
|
||||
})( Enum || (Enum = {}) );
|
||||
|
||||
<span class="hljs-keyword">var</span> a = Enum.A;
|
||||
<span class="hljs-keyword">var</span> nameOfA = Enum[a]; <span class="hljs-comment">// "A"</span>
|
||||
</code></pre>
|
||||
<p>在生成的代码中,枚举就被编译成一个同时存储了正向(<code>name</code> -> <code>value</code>)与逆向(<code>value</code> -> <code>name</code>)映射的对象中。对其它枚举成员的引用,总是作为属性访问而被省略,且绝不会被内联(In this generated code, an enum is compiled into an object that stores both forward (<code>name</code> -> <code>value</code>) and reverse (<code>value</code> -> <code>name</code>) mappings. References to other enum members are always emitted as property accesses and never inlined)。</p>
|
||||
<p>请记住字符串的枚举成员,并不会得到一个生成的反向映射(Keep in mind that string enum members <em>do not</em> get a reverse mapping generated at all)。</p>
|
||||
<h2 id="常量枚举(const-enums)">常量枚举(<code>const</code> enums)</h2>
|
||||
<p>大多数情况下,枚举都是一种相当有效的方案。不过某些时候需求更为紧致。为避免付出额外生成的代码与在访问枚举值时多余的间接性这两个代价,就可以使用常量枚举。所谓常量枚举,就是在枚举上使用<code>const</code>这个修饰器,所定义的枚举(In most cases, enums are a perfectly valid solution. However sometimes requirements are tighter. To avoid paying the cost of extra generated code and additional indirection when accessing enum values, it's possible to use <code>const</code> enums. Const enums are defined using the <code>const</code> modifier on our enums)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">const</span> <span class="hljs-keyword">enum</span> Enum {
|
||||
A = <span class="hljs-number">1</span>,
|
||||
B = A * <span class="hljs-number">2</span>
|
||||
}
|
||||
</code></pre>
|
||||
<p>常量枚举只能使用常量枚举表达式,而与常规枚举不一样,它们在编译期间就被完全移除了。在使用到常量枚举的地方,其成员完全是内联的。这可能是因为常量枚举不能拥有计算的成员的关系(Const enums can only use constant enum expressions and unlike regular enums they are completely removed during compilation. Const enum members are inlined at use sites. This is possible since const enums cannot have computed members)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">const</span> <span class="hljs-keyword">enum</span> Directions {
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
|
||||
<span class="hljs-keyword">let</span> directions = [Directions.Up, Directions.Down, Directions.Left, Directions.Right];
|
||||
</code></pre>
|
||||
<p>这段代码所对应的编译生成的JavaScript代码将成为:</p>
|
||||
<pre><code class="lang-javascript"><span class="hljs-keyword">var</span> directions = [<span class="hljs-number">0</span> <span class="hljs-comment">/* Up */</span>, <span class="hljs-number">1</span> <span class="hljs-comment">/* Down */</span>, <span class="hljs-number">2</span> <span class="hljs-comment">/* Left */</span>, <span class="hljs-number">3</span> <span class="hljs-comment">/* Right */</span>];
|
||||
</code></pre>
|
||||
<h2 id="环境枚举(ambient-enums)">环境枚举(Ambient enums)</h2>
|
||||
<p>环境枚举用于描述已存在枚举类型的形状(Ambient enums are used to describe the shape of already existing enum types)。</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">declare</span> <span class="hljs-keyword">enum</span> Enum {
|
||||
A = <span class="hljs-number">1</span>,
|
||||
B,
|
||||
C = <span class="hljs-number">2</span>
|
||||
}
|
||||
</code></pre>
|
||||
<p>环境枚举与非环境枚举的一个重要的不同,就是在常规枚举中,不带有初始器的成员,在其前导枚举成员被认为是常量时,将被看作是常量。而与此相比,不带有初始器的环境(且非常量)枚举成员, <em>始终</em> 被认为是计算的成员(One important difference between ambient and non-ambient enums is that, in regular enums, members that don't have an initializer will be considered constant if its preceding enum member is considered constant. In contrast, an ambient(and non-const) enum member that does not have initializer is <em>always</em> considered computed)。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="06_generics.html" class="navigation navigation-prev " aria-label="Previous page: 泛型">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="08_type_inference.html" class="navigation navigation-next " aria-label="Next page: 类型推导">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"枚举","level":"1.8","depth":1,"next":{"title":"类型推导","level":"1.9","depth":1,"path":"08_type_inference.md","ref":"08_type_inference.md","articles":[]},"previous":{"title":"泛型","level":"1.7","depth":1,"path":"06_generics.md","ref":"06_generics.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"07_enums.md","mtime":"2019-04-03T06:43:16.312Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
372
_book/08_type_inference.html
Normal file
372
_book/08_type_inference.html
Normal file
@ -0,0 +1,372 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>类型推导 · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
|
||||
<link rel="prev" href="07_enums.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >类型推导</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="类型推导">类型推导</h1>
|
||||
<p><strong>Type Inference</strong></p>
|
||||
<h2 id="简介">简介</h2>
|
||||
<p>本章节将涵盖TypeScript中的类型推导。也就是说,这里将讨论类型在何处及如何被推导。</p>
|
||||
<h2 id="类型推导基础">类型推导基础</h2>
|
||||
<p>在TypeScript中,有好几个地方都使用到类型推导,来处理那些没有显式类型注解(explicit type annotation)时,用于提供类型的信息。比如,在下面的代码中:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> x = <span class="hljs-number">3</span>;
|
||||
</code></pre>
|
||||
<p>变量<code>i</code>的类型,就被推导为<code>number</code>。这种推导,是在对变量及成员进行初始化、参数默认值的设置(setting parameter default values),以及确定函数返回值类型等期间发生的。</p>
|
||||
<p>大多数情况下,类型推导都是直截了当的。在下面部分中,将对类型是如何进行推导的细微之处,进行探讨。</p>
|
||||
<h2 id="最优通用类型(best-common-type)">最优通用类型(Best common type)</h2>
|
||||
<p>当类型推导是从几个表达式生成的时,这些表达式的类型,就被用作计算出一个“最优通用类型”。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> x = [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-literal">null</span>];
|
||||
</code></pre>
|
||||
<p>为推导出上面示例中<code>x</code>的类型,就必须考虑各个数组元素的类型。这里给到的该数组类型有两个选择:<code>number</code>与<code>null</code>。 <strong>最优通用类型算法</strong> 就对各个候选类型加以考虑,并选取那个兼容所有其它候选项的类型( <strong>the best common type algorithm</strong> considers each candidate type, and picks the type that is compatible with all the other candidates)。</p>
|
||||
<p>因为必须要从所提供的候选类型选出最优通用类型,那么就有着某些候选类型共享一个通用结构,却并存在一个作为所有候选类型超集的类型的情况。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> zoo = [<span class="hljs-keyword">new</span> Rhino(), <span class="hljs-keyword">new</span> Elephant(), <span class="hljs-keyword">new</span> Snake()];
|
||||
</code></pre>
|
||||
<p>理想情况下,可能希望将<code>zoo</code>推导为一个<code>Animal[]</code>,但因为该数组中没有对象是严格的<code>Animal</code>类型,所以无法做出有关该数组元素类型的推导。为了纠正这一点,就要在没有一种类型是其它候选类型的超类型时,提供显式地提供一个类型:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-keyword">let</span> zoo: Animal[] = [<span class="hljs-keyword">new</span> Rhino(), <span class="hljs-keyword">new</span> Elephant(), <span class="hljs-keyword">new</span> Snake()];
|
||||
</code></pre>
|
||||
<p>而在找不到最佳通用类型时,推导结果就是联合数组类型(the union array type),<code>(Rhino | Elephant | Snake)[]</code>。</p>
|
||||
<h2 id="上下文的类型(contextual-type)">上下文的类型(Contextual Type)</h2>
|
||||
<p>在TypeScript中,类型推导在某些情况下还以“其它方向”起作用(Type inference also works in "the other direction" in some cases in TypeScript)。这就是所谓的“上下文的赋予类型(contextual typing)”。上下文类型赋予是在某个表达式的类型由其所处位置所决定时,发生的。比如:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-built_in">window</span>.onmousedown = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">mouseEvent</span>) </span>{
|
||||
<span class="hljs-built_in">console</span>.log(mouseEvent.button); <span class="hljs-comment">//<- Error</span>
|
||||
};
|
||||
</code></pre>
|
||||
<p>为了从上面的代码中检查出错误,TypeScript的类型检查器使用了<code>window.onmousedown</code>函数的类型,类推导该赋值语句右侧的函数表达式的类型(For the code above to give the type error, the TypeScript type checker used the type of the <code>window.onmousedown</code> function to infer the type of the function expression on the right hand side of the assignment)。在其这样做的时候,就能够推导出<code>mouseEvent</code>参数的类型。而假如该函数表达式并不是在一个上下文类型赋予位置(not in a contextually typed position),那么参数<code>mouseEvent</code>将有着类型<code>any</code>,从而不会出现任何错误。</p>
|
||||
<p>而如果上下文类型赋予的表达式(the contextually typed expression)包含了显式的类型信息,那么上下文类型将被忽略。也就是像下面这样写上面的示例:</p>
|
||||
<pre><code class="lang-typescript"><span class="hljs-built_in">window</span>.onmousedown = <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">mouseEvent: <span class="hljs-built_in">any</span></span>) </span>{
|
||||
<span class="hljs-built_in">console</span>.log(mouseEvent.button); <span class="hljs-comment">// <- Now, no error is given</span>
|
||||
};
|
||||
</code></pre>
|
||||
<p>参数上带有显式类型注记的函数表达式,将覆盖上下文类型。而一旦这样做,就不会报出错误了,因为应用没有上下文类型特性。</p>
|
||||
<p>在很多情况下,上下文类型赋予都得以应用。常见的包括函数调用的参数、赋值语句的右侧、类型断言、对象的成员与数组字面值,以及返回语句等(Contextual typing applies in many cases. Common cases include arguments to function calls, right hand sides of assignments, type assertions, members of object and array literals, and return statements)。在最佳通用类型中,上下文类型也扮演了一种候选类型。比如:</p>
|
||||
<pre><code class="lang-typescript">function createZoo(): Animal[] {
|
||||
return [new Rhino(), new Elephant(), new Snake()];
|
||||
}
|
||||
</code></pre>
|
||||
<p>在此示例中,最佳通用类型有着四种候选类型的集合:<code>Animal</code>、<code>Rhino</code>、<code>Elephant</code>以及<code>Snake</code>。其中<code>Animal</code>可能会被最佳通用类型算法选中。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="07_enums.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 枚举">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"类型推导","level":"1.9","depth":1,"previous":{"title":"枚举","level":"1.8","depth":1,"path":"07_enums.md","ref":"07_enums.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"08_type_inference.md","mtime":"2019-04-03T06:43:16.312Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
272
_book/09_type_compatibility.md
Normal file
272
_book/09_type_compatibility.md
Normal file
@ -0,0 +1,272 @@
|
||||
# 类型兼容性
|
||||
|
||||
**Type Compatibility**
|
||||
|
||||
## 简介
|
||||
|
||||
TypeScript中的类型兼容性,是基于结构化子类型赋予的。结构化的类型赋予,是一种仅依靠类型的成员,而将这些类型联系起来的方式。这一点与名义上的类型赋予有所不同(Type compatibility in TypeScript is based on structural subtyping. Structural typing is a way of relating types based solely on their members. This is in contrast with nominal typing)。请考虑以下代码:
|
||||
|
||||
```typescript
|
||||
interface Named {
|
||||
name: string;
|
||||
}
|
||||
|
||||
class Person {
|
||||
name: string;
|
||||
}
|
||||
|
||||
let p: Named;
|
||||
|
||||
// 没有问题,因为这里的结构化类型赋予
|
||||
p = new Person();
|
||||
```
|
||||
|
||||
在诸如C#或Java这样的 **名义类型语言** 中,等效代码将报出错误,因为类`Person`并未显式地将其描述为是`Named`接口的一个 **实现器** (In **nominally-typed languages** like C# or Java, the equivalent code would be an error because the `Person` class does not explicity describe itself as being an **an implementor** of the `Named` interface)。
|
||||
|
||||
TypeScript的结构化类型系统,是基于JavaScript代码的一般编写方式而设计的。因为JavaScript广泛用到诸如函数表达式及对象字面值这样的匿名对象,因此使用结构化类型系统而非名义类型系统,对于表示JavaScript的那些库中所发现的关系种类,就更加自然一些(TypeScript's structural type system was designed based on how JavaScript code is typically written. Because JavaScript widely uses anonymous objects like function expressions and object literals, it's much more natural to represent the kinds of relationships found in JavaScript libraries with a structural type system instead of a nominal one)。
|
||||
|
||||
### 关于可靠性/健全性的说明(A Note on Soundness)
|
||||
|
||||
TypeScript的类型系统,令到一些在编译时无法知晓的操作是安全的。当某个类型系统具备了此种属性时,就说其不是“健全的”。至于TypeScript允许在哪里存在不健全行为,则是被仔细考虑过的,贯穿本文,这里将对这些特性于何处发生,以及它们背后的动机场景,加以解释(TypeScript's type system allows certain operations that can't be known at compile-time to be safe. When a type system has this property, it is said to not be "sound". The places where TypeScript allows unsound behavior were carefully considered, and throughout this document we'll explain where these happen and the motivating scenarios behind them)。
|
||||
|
||||
## 开始(Starting out)
|
||||
|
||||
TypeScript的结构化类型系统的基本规则,就是在`y`具备与`x`相同成员时,`x`就兼容`y`。比如:
|
||||
|
||||
```typescript
|
||||
interface Named {
|
||||
name: string;
|
||||
}
|
||||
|
||||
let x: Named;
|
||||
|
||||
// y 所引用的类型是 { name: string; location: string; }
|
||||
let y = { name: "Alice", location: "Seattle" };
|
||||
|
||||
x = y;
|
||||
```
|
||||
|
||||
编译器要检查这里的`y`是否可以被赋值给`x`,就会对`x`的各个属性进行检查,以在`y`中找到相应的兼容属性。在本例中,`y`必须具有一个名为`name`的字符串成员。而它确实有这样的一个成员,因此该赋值是允许的。
|
||||
|
||||
```typescript
|
||||
interface Named {
|
||||
name: string;
|
||||
age: number;
|
||||
}
|
||||
|
||||
let x: Named;
|
||||
|
||||
// y 所引用的类型是 { name: string; location: string; }
|
||||
let y = { name: "Alice", location: "Seattle" };
|
||||
|
||||
// TSError: ⨯ Unable to compile TypeScript
|
||||
// src/main.ts (12,1): Type '{ name: string; location: string; }' is not assignable to type 'Named'.
|
||||
// Property 'age' is missing in type '{ name: string; location: string; }'. (2322)
|
||||
x = y;
|
||||
```
|
||||
|
||||
在对函数调用参数进行检查时,也使用到通用的赋值规则(The same rule for assignment is used when checking function call arguments):
|
||||
|
||||
```typescript
|
||||
function greet (n: Named) {
|
||||
alert ("Hello, " + n.name);
|
||||
}
|
||||
|
||||
greet(y); // 没有问题
|
||||
```
|
||||
|
||||
注意这里的`y`有着一个额外的`location`属性,但这并不会造成错误。在对兼容性进行检查时,仅会考虑目标类型(这里也就是`Named`)的那些成员。
|
||||
|
||||
该比较过程是递归进行的,对每个成员及子成员进行遍历(This comparison process proceeds recursively, exploring the type of each member and sub-member)。
|
||||
|
||||
## 两个函数的比较(Comparing two functions)
|
||||
|
||||
可以看出,对原生类型与对象类型的比较是相对直接的,而何种函数应被看着是兼容的这个问题,就牵扯到更多方面了(While comparing primitive types and object types is relatively straightforward, the question of what kinds of functions should be considered is a bit more involved)。下面就以两个仅在参数清单上不同的函数的基本示例开始:
|
||||
|
||||
```typescript
|
||||
let x = (a: number) => 0;
|
||||
let y = (b: number, s: string) => 0;
|
||||
|
||||
y = x; // 没有问题
|
||||
|
||||
// TSError: ⨯ Unable to compile TypeScript
|
||||
// src/main.ts (9,1): Type '(b: number, s: string) => number' is not assignable to type '(a: number) => number'. (2322)
|
||||
x = y; // 错误
|
||||
```
|
||||
|
||||
为检查`x`是否可被赋值给`y`,首先要看看参数清单。`x`中的每个参数,在`y`中都必须有一个类型兼容的参数与其对应。注意参数名称是不考虑的,考虑的仅是它们的类型。在本示例中,函数`x`的每个参数,在`y`中都有一个兼容的参数与其对应,因此该赋值是允许的。
|
||||
|
||||
第二个赋值是错误的赋值,因为`y`有着必要的第二个参数,`x`并没有,因此该赋值是不允许的。
|
||||
|
||||
对于示例中`y = x`之所以允许“丢弃”参数的原因,在JavaScript中,此种忽略额外函数参数的赋值,实际上是相当常见的。比如`Array#forEach`方法就提供了3个参数给回调函数:数组元素、数组元素的索引,以及所位处的数组。不过,给其一个仅使用首个参数的回调函数,仍然是很有用的:
|
||||
|
||||
```typescript
|
||||
let items = [1, 2, 3];
|
||||
|
||||
// Don't force these extra parameters
|
||||
items.forEach((item, index, array) => console.log(item));
|
||||
|
||||
// 这样也是可以的
|
||||
items.forEach(item => console.log(item));
|
||||
```
|
||||
|
||||
现在来看看返回值类型是如何加以对待的,下面使用两个仅在放回值类型上有所区别的函数:
|
||||
|
||||
```typescript
|
||||
let x = () => ({name: "Alice"});
|
||||
let y = () => ({name: "Alice", location: "Seattle"});
|
||||
|
||||
x = y; // 没有问题
|
||||
|
||||
// TSError: ⨯ Unable to compile TypeScript
|
||||
// src/main.ts (6,1): Type '() => { name: string; }' is not assignable to type '() => { name: string; location: string; }'.
|
||||
// Type '{ name: string; }' is not assignable to type '{ name: string; location: string; }'.
|
||||
// Property 'location' is missing in type '{ name: string; }'. (2322)
|
||||
y = x; // 错误,因为`x`缺少一个location属性
|
||||
```
|
||||
|
||||
类型系统强制要求 **源函数** 的返回值类型,是 **目标函数** 返回值类型的一个子集(The type system enforces that the source function's return type be a subtype of the target type's return type)。
|
||||
|
||||
### 函数参数的双向协变(Funtion Parameter Bi-variance)
|
||||
|
||||
在对函数参数的类型进行比较时,加入源参数可被赋值给目标参数,或目标参数可赋值给源参数,那么函数间的赋值将成功。这是不完备的,因为某个调用器可能以被给予一个取更为具体类型的函数,却以不那么具体类型,来触发该函数而结束。在实践中,此类错误很少见,同时此特性带来了很多常见的JavaScript模式(When comparing the types of function parameters, assignment succeeds if either the source parameter is assignable to the target parameter, or vice versa. This is unsound because a caller might end up being given a function that takes a more specialized type, but invokes the funtion with a less specialized type. In practice, this sort of error is rare, and allowing this enables many common JavaScript patterns)。下面是一个简要的示例:
|
||||
|
||||
```typescript
|
||||
enum EventType { Mouse, Keyboard }
|
||||
|
||||
interface Event { timestamp: number; }
|
||||
interface MouseEvent extends Event { x: number; y: number }
|
||||
interface KeyEvent extends Event { keyCode: number }
|
||||
|
||||
function listenEvent (eventType: EventType, handler: (n: Event) => void) {
|
||||
//...
|
||||
}
|
||||
|
||||
//不完备,却是有用且常见的做法
|
||||
listenEvent(EventType.Mouse, (e.MouseEvent) => console.log(e.x + "," + e.y));
|
||||
|
||||
// 具备完备性的不可取做法
|
||||
listenEvent(EventType.Mouse, (e: Event) => console.log((<MouseEvent>e).x + "," + (<MouseEvent>e>).y);
|
||||
listenEvent(EventType.Mouse, <(e: Event) => void>((e: MouseEvent) => console.log(e.x + "," + e.y));
|
||||
|
||||
// 下面这样写是仍然不允许的(肯定是错的)。因为完全不兼容类型,而强制开启类型安全(Still disallowed (clear erro). Type safety enforced for wholly incompatible types)
|
||||
listenEvent(EventType.Mouse, (e: number) => console.log(e));
|
||||
```
|
||||
|
||||
### 可选参数与其余参数(Optional Parameters and Rest Parameters)
|
||||
|
||||
在出于兼容性而对函数加以比较时,可选参数与必需参数是通用的。源类型的额外可选参数并不是一个错误,同时目标类型的、在源类型中没有对应参数的可选参数也不是一个错误(When comparing functions for compatibility, optional and required parameters are interchangeable. Extra optional parameters of the source type are not an error, and optional parameters of the target type without corresponding parameters in the source type are not an error)。
|
||||
|
||||
在某个函数具有其余参数时,其余参数就被当成是有无限个可选参数加以对待(When a function has a rest parameter, it is treated as if it were an infinite series of optional parameters)。
|
||||
|
||||
这一点从类型系统角度看是不完备的,但因为对于大多数函数来数,在那个位置传递`undefined`都是等效的,因此从运行时角度,可选参数这一概念通常并不是精心构思的(This is unsound from a type system perspective, but from a runtime point of view the idea of an optional parameter is generally not well-enforced since passing `undefined` in that position is equivalent for most functions)。
|
||||
|
||||
下面的示例就是某个取一个回调函数,并以可预测(对于程序员)却未知(对于类型系统)数量的参数来触发该回调函数的函数的常见模式(The motivating example is the common pattern of a function that takes a callback and invokes it with some predictable(to the programmer) but unknown(to the type system) number of arguments):
|
||||
|
||||
```typescript
|
||||
function invokeLater(args: any[], callback: (...args: any[]) => void) {
|
||||
/* 以 args 来触发回调函数 */
|
||||
}
|
||||
|
||||
// 不完备 -- invokeLater "可能" 提供任意数量的参数
|
||||
invokeLater([1, 2], (x, y) => console.log(x + ", " + y));
|
||||
|
||||
// 混乱(x与y实际上是必需的)且无法发现(Confusing ( x and y are actually required ) and undiscoverable )
|
||||
invokeLater([1, 2], (x?, y?) => console.log(x + ", " + y));
|
||||
```
|
||||
|
||||
### 带过载的函数(Functions with overloads)
|
||||
|
||||
当函数有着过载时,那么源类型中的每个过载,在目标类型上都必须有一个兼容的签名与其匹配。这样才能确保目标函数可与源函数所在的同样场合进行调用(When a function has overloads, each overload in the source type must be matched by a compatible signature on the target type. This ensures that the target function can be called in all the same situation as the source function)。
|
||||
|
||||
## 枚举的兼容性
|
||||
|
||||
枚举与数字兼容,同时数字也与枚举兼容。不同枚举类型的枚举值,被看着是兼容的。比如:
|
||||
|
||||
```typescript
|
||||
enum Status { Ready, Waiting };
|
||||
enum Color { Red, Blue, Green };
|
||||
|
||||
let status = Status.Ready;
|
||||
status = Color.Green; // 没毛病
|
||||
```
|
||||
|
||||
## 类的兼容性(Classes)
|
||||
|
||||
类的兼容性与对象字面值及接口类似,但有一个例外:类同时有着静态与实例类型(Classes have both a static and an instance type)。在对某个类类型的两个对象进行比较时,仅比较实例的成员。静态成员与构造器并不影响兼容性。
|
||||
|
||||
```typescript
|
||||
class Animal {
|
||||
feet: number;
|
||||
|
||||
constructor (name: string, numFeet: number) {}
|
||||
}
|
||||
|
||||
class Size {
|
||||
feet: number;
|
||||
|
||||
constructor (numFeet: number) {}
|
||||
}
|
||||
|
||||
let a: Animal;
|
||||
let s: Size;
|
||||
|
||||
a = s; //OK
|
||||
s = a; //OK
|
||||
```
|
||||
|
||||
### 类中的私有与受保护成员
|
||||
|
||||
类中的私有与受保护成员,对类的兼容性有影响。在对类的某个实例进行兼容性检查时,如目标类型包含了一个私有成员,那么源类型也必须要有一个从同样类继承的私有成员。与此类似,同样的规则也适用与有着受保护成员的实例。这就令到类可被兼容的赋值给其超类,但却 **不能** 兼容的赋值给那些来自不同继承层次、除此之外有着同样外形的类(This allows a class to be assignment compatible with its super class, but *not* with classes from a different inheritance hierarchy which otherwise have the same shape)。
|
||||
|
||||
## 泛型(Generics)
|
||||
|
||||
因为TypeScript是一个结构化的类型系统(a structural type system),所以类型参数在作为某成员类型一部分而被消费是,其仅影响最终类型。比如:
|
||||
|
||||
```typescript
|
||||
interface Empty<T> {}
|
||||
|
||||
let x: Empty<number>;
|
||||
let y: Empty<string>;
|
||||
|
||||
x = y; //没有问题,y 与 x 的解构匹配
|
||||
```
|
||||
|
||||
在上面的代码中,`x`与`y`是兼容的,因为它们的解构没有以各异的方式来使用那个类型参数。如通过加入一个成员到`Empty<T>`中,而对此示例进行修改,就可以反映出这一点:
|
||||
|
||||
```typescript
|
||||
interface NotEmpty<T> {
|
||||
data: T;
|
||||
}
|
||||
|
||||
let x: NotEmpty<number>;
|
||||
let y: NotEmpty<string>;
|
||||
|
||||
x = y; //错误,x 与 y 不兼容
|
||||
```
|
||||
|
||||
这种情况下,有着上面这种指定类型参数的泛型,与一个非通用类型的表现一致(In this way, a generic type that has its type arguments specified acts just like a non-generic type)。
|
||||
|
||||
对于没有指定类型参数的泛型,兼容性的检查,是通过在所有未指定类型参数的地方指定`any`进行的。随后对最终类型进行兼容性检查,就跟非通用类型一样(For generic types that do not have their type arguments specified, compatibility is checked by specifying `any` in place of all unspecified type arguments. Then resulting types are then checked for compatibility, just as in the non-generic case)。
|
||||
|
||||
比如,
|
||||
|
||||
```typescript
|
||||
let identity = function<T>(x: T): T {
|
||||
//...
|
||||
}
|
||||
|
||||
let reverse = function<U>(y: U): U {
|
||||
//...
|
||||
}
|
||||
|
||||
identity = reverse; //没有问题,因为(x: any)=>any 与(y: any)=>any是匹配的
|
||||
```
|
||||
|
||||
## 高级话题(Advanced Topics)
|
||||
|
||||
### 子类型与赋值语句(Subtype vs Assignment)
|
||||
|
||||
到目前为止,都使用的是“兼容性”一词,但这个说法在语言规格中并没有对其进行定义。在TypeScript中,兼容有两种:子类型与赋值。它们的不同仅在于赋值以允许赋值给与从`any`,以及赋值给及从有着对应的数字值的枚举,这两个规则,对子类型进行了拓展(In TypeScript, there are two kinds of compatibility: subtype and assignment. These differ only in that assignment extends subtype compatibility with rules to allow assignment to and from `any` and to and from enum with corresponding numeric values)。
|
||||
|
||||
根据不同情况,语言中的不同地方会使用这两种兼容性机制之一。实际来看,就算有着`implements`及`extends`关键字,类型兼容性仍按赋值兼容性看待(Different places in the language use one of the two compatibility mechanisms, depending on the situation. For practical purposes, type compatibility is dicated by assignment compatibility even in the cases of the `implements` and `extends` clauses)。更多信息,请查阅TypeScript规格。
|
872
_book/10_advanced_types.md
Normal file
872
_book/10_advanced_types.md
Normal file
@ -0,0 +1,872 @@
|
||||
#复杂类型
|
||||
|
||||
**Advanced Types**
|
||||
|
||||
##交集类型(Intersection Types)
|
||||
|
||||
交集类型将多个类型结合为一个。该特性令到将既有类型加在一起,从而得到一个有着所有所需特性的单个类型。比如,`Person & Serializable & Loggable`就是一个`Person` *与* `Serializable` *与* `Loggable`。那就意味着此类型的对象,将有着所有三个类型的所有成员。
|
||||
|
||||
多数情况下,交集类型都用在混入及其它一些无法放入到经典的面向对象模子中的一些概念。(JavaScript中可是有很多这种概念!You will mostly see intersection types used for mixins and other concepts that don't fit in the classic object-oriented mold. (There are a lot of these in JavaScript!))下面是一个演示如何创建混入的示例:
|
||||
|
||||
```typescript
|
||||
function extend<T, U>(first: T, second: U): T & U {
|
||||
let result = <T & U> {};
|
||||
for (let id in first) {
|
||||
(<any>result)[id] = (<any>first)[id];
|
||||
}
|
||||
for (let id in second) {
|
||||
if (!result.hasOwnProperty(id)) {
|
||||
(<any>result)[id] = (<any>second)[id];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
class Person {
|
||||
constructor (public name: string) {}
|
||||
}
|
||||
|
||||
interface Loggable {
|
||||
log(): void;
|
||||
}
|
||||
|
||||
class ConsoleLogger implements Loggable {
|
||||
log() {
|
||||
//...
|
||||
}
|
||||
}
|
||||
|
||||
var jim = extend(new Person("Jim"), new ConsoleLogger());
|
||||
var n = jim.name;
|
||||
jim.log();
|
||||
```
|
||||
|
||||
## 联合类型(Union Types)
|
||||
|
||||
联合类型与交集类型密切相关,但二者的用法却截然不同。少数情况下,将遇到某些需要一个可能是`number`,也可能是`string`参数的库。请看下面这个函数的实例:
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* 取得一个字符串并将`padding`添加到其左侧。
|
||||
* 如果`padding`是一个字符串,那么`paddin`就被追加到左侧。
|
||||
* 如果`padding`是一个数字,那么该数目个的空格就被追加到左侧。
|
||||
*/
|
||||
|
||||
function padLeft (value: string, padding: any) {
|
||||
if (typeof padding === "number") {
|
||||
return Array(padding + 1).join(" ") + value;
|
||||
}
|
||||
if (typeof padding === "string") {
|
||||
return padding + value;
|
||||
}
|
||||
|
||||
throw new Error(`Expected string or number, got '${padding}'`);
|
||||
}
|
||||
|
||||
padLeft("Hello world", 4);
|
||||
```
|
||||
|
||||
`padLeft`函数的问题在于,它的`padding`参数所赋予的类型是`any`。那就意味着可以一个既不是`number`也不是`string`的参数对其进行调用,TypeScript也不会检查到问题。
|
||||
|
||||
```typescript
|
||||
let indentedString = padLeft("Hello world", true); // 在编译时可通过,但运行时失败。
|
||||
```
|
||||
|
||||
在传统的面向对象代码中,可能会通过创建出类型的层次,来对这两种类型进行抽象。虽然这样做相对比较显式,但其也有些矫枉过正了。上面那个最初版本的`padLeft`有一个好的方面,就是可仅传入原生类型的参数(One of the nice things about the original version of `padLeft` was that we were able to just pass in primitives)。那意味着其用法是较为简洁的。而如仅尝试使用一个已在其它地方存在的函数,新方法也没有用。
|
||||
|
||||
对于`padding`参数,可使用 *联合* 类型类来代替`any`:
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* 取得一个字符串并将`padding`添加到其左侧。
|
||||
* 如果`padding`是一个字符串,那么`paddin`就被追加到左侧。
|
||||
* 如果`padding`是一个数字,那么该数目个的空格就被追加到左侧。
|
||||
*/
|
||||
|
||||
function padLeft (value: string, padding: string | number) {
|
||||
// ...
|
||||
}
|
||||
|
||||
let indentedString = padLeft("Hello world", true); // 这时在编译时就会报错了。
|
||||
```
|
||||
|
||||
联合类型将某个值描述为可以是多个类型的某一种。使用竖杠`|`来将各个类型分开,那么`number | string | boolean`就是说某个值的类型,可以是一个`number`、`string`或者`boolean`。
|
||||
|
||||
加入有着一个带有联合类型的值,那么就只能访问那些在联合中所有类型都具备的成员(If we have a value that has a union type, we can only access members that are common to all types in the union)。
|
||||
|
||||
```typescript
|
||||
interface Bird {
|
||||
fly();
|
||||
layEggs();
|
||||
}
|
||||
|
||||
interface Fish {
|
||||
swim();
|
||||
layEggs();
|
||||
}
|
||||
|
||||
function getSmallPet(): Fish | Bird {
|
||||
// ...
|
||||
}
|
||||
|
||||
let pet = getSmallPet();
|
||||
|
||||
pet.layEggs(); // 没有问题
|
||||
pet.swim(); // 错误
|
||||
```
|
||||
|
||||
这里联合类型就有些摸不着头脑了,不过只需要一些直觉,就可以习惯它。加入某个值有着类型`A | B`,那就唯一能 **明确** 的是,它有着`A` **与** `B` 都有的成员。在本示例中,`Bird`有一个名为`fly`的成员。这里无法确定某个类型为`Bird | Fish`的变量具有`fly`的方法。如果运行时该变量实际上是`Fish`,那么调用`pet.fly()`就将失败。
|
||||
|
||||
## 类型保护与区分类型(Type Guards and Differentiating Types)
|
||||
|
||||
当某些值可能在它们所承载的类型上出现重叠时,联合类型对于这些情况下的建模是有用的。那么当需要明确知道是否有着一个`Fish`时,会发生什么呢?JavaScript中区分两个可能的值的习惯做法,就是对是否存在某个成员进行检查。如上面所提到的,只能访问到那些保证位于联合类型的所有构成类型中成员(Union types are useful for modeling situations when values can overlap in the types they can take on. What happens when we need to know specifically whether we have a `Fish`? A common idiom in JavaScript to differentiate between two possible values is to check for the presence of a member. As we mentioned, you can only access members that are guaranteed to be in all the constituents of a union type)。
|
||||
|
||||
```typescript
|
||||
let pet = getSmallPet();
|
||||
|
||||
// 这些属性访问都将引发错误
|
||||
if (pet.swim) {
|
||||
pet.swim();
|
||||
}
|
||||
else if (pet.fly) {
|
||||
pet.fly();
|
||||
}
|
||||
```
|
||||
|
||||
为让同样的代码工作,就需要使用类型断言(a type assertion):
|
||||
|
||||
```typescript
|
||||
let pet = getSmallPet();
|
||||
|
||||
if ((<Fish>pet).swim) {
|
||||
(<Fish>pet).swim();
|
||||
}
|
||||
else {
|
||||
(<Bird>pet).fly();
|
||||
}
|
||||
```
|
||||
|
||||
### 用户定义的类型保护(User-Defined Type Guards)
|
||||
|
||||
请注意上面必须要使用多次的类型断言。如果在一旦完成检查,就可以知晓各个分支中`pet`的类型,那就会好很多(Notice that we had to use type assertion several times. It would be much better if once we performed the check, we could know the type of `pet` within each branch)。
|
||||
|
||||
因为TypeScript有着名为 *类型保护(type guard)*特性,那么很容易做到了。类型保护一些执行运行时检查的表达式,用以确保类型出于特定范围。要定义一个类型保护,只需定定义一个返回值为 *类型谓词* 的函数即可(It just so happens that TypeScript has something called a *type guard*. A type guard is some expression that performs a runtime check that guarantees the type in some scope. To define a type guard, we simply need to define a function whose return type is a *type perdicate*)。
|
||||
|
||||
```typescript
|
||||
function isFish(pet: Fish | Bird): pet is Fish {
|
||||
return (<Fish>pet).swim !== undefined;
|
||||
}
|
||||
```
|
||||
|
||||
`pet is Fish`就是该示例中的类型谓词。谓词的形式就是`parameterName is Type`,其中的`parameterName`必须是当前函数签名中某个参数的名称。
|
||||
|
||||
现在只要以某个变量对`isFish`进行调用,如果初始类型兼容,那么TypeScript就会将那个变量 *缩小* 到特定类型(Any time `isFish` is called with some variable, TypeScript will *narrow* that variable to that specific type if the original type is compatible)。
|
||||
|
||||
```typescript
|
||||
// 现在对`swim`与`fly`的调用都没有问题了
|
||||
|
||||
if (isFish(pet)) {
|
||||
pet.swim();
|
||||
}
|
||||
else {
|
||||
pet.fly();
|
||||
}
|
||||
```
|
||||
|
||||
请注意TypeScript不仅知道`if`分支语句中的`pet`是一个`Fish`;它还知道在`else`分支语句中,在不是`Fish`时,那么就肯定是`Bird`了。
|
||||
|
||||
### `typeof`的类型保护(`typeof` type guards)
|
||||
|
||||
现在来回头写一下使用联合类型版本的`padLeft`。可像下面这样使用类型谓词加以编写:
|
||||
|
||||
```typescript
|
||||
function isNumber(x: any): x is number {
|
||||
return typeof x === "number";
|
||||
}
|
||||
|
||||
function isString(x: any): x is string {
|
||||
return typeof x === "string";
|
||||
}
|
||||
|
||||
function padLeft (value: string, padding: string | number) {
|
||||
if (isNumber(padding)) {
|
||||
return Array(padding + 1).join(" ") + value;
|
||||
}
|
||||
if (isString(padding)) {
|
||||
return padding + value;
|
||||
}
|
||||
|
||||
throw new Error(`Expected string or number, got '${padding}'`);
|
||||
}
|
||||
```
|
||||
|
||||
但是,这里不得不去定义一个函数来判断某个原生类型就太痛苦了。幸运的是,因为TypeScript本身就可以将`typeof x === "number"`识别为类型保护,所以无需将其抽象到其本身的函数中。那就意味着可将这些检查写在行内(That means we could just write these checks inline)。
|
||||
|
||||
```typescript
|
||||
function padLeft(value: string, padding: string | number) {
|
||||
if (typeof padding === "number") {
|
||||
return Array(padding + 1).join(" ") + value;
|
||||
}
|
||||
if (typeof padding === "string") {
|
||||
return padding + value;
|
||||
}
|
||||
throw new Error(`Expected string or number, got '${padding}'`);
|
||||
}
|
||||
```
|
||||
|
||||
这些 *`typeof` 的类型保护* 被以两种形式加以识别:`typeof v === "typename"` 与 `typeof v !== "typename"`,其中的`typename`必须是`"number"`、`"string"`、`"boolean"`或`"symbol"`。尽管TypeScript不会阻止与其它字符串进行对比,但语言不会将这些表达式作为类型保护加以识别。
|
||||
|
||||
### `instanceof`的类型保护
|
||||
|
||||
在了解了有关`typeof`类型保护后,并熟悉JavaScript中的`instanceof`运算符的话,那么对本小节的内容就有了个大概了解了。
|
||||
|
||||
*`instanceof` 类型保护* 是一种使用构造函数来限定类型的方式( *`instanceof` type guards* are a way of narrowing types using their constructor function )。下面借用之前的生产中的字符串追加器实例来做说明:
|
||||
|
||||
```typescript
|
||||
interface Padder {
|
||||
getPaddingString(): string
|
||||
}
|
||||
|
||||
class SpaceRepeatingPadder implements Padder {
|
||||
constructor (private numSpaces: number) { }
|
||||
|
||||
getPaddingString () {
|
||||
return Array(this.numSpaces + 1).join(" ");
|
||||
}
|
||||
}
|
||||
|
||||
class StringPadder implements Padder {
|
||||
constructor (private value: string) {}
|
||||
|
||||
getPaddingString () {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
function getRandomPadder () {
|
||||
return Math.random() < 0.5 ?
|
||||
new SpaceRepeatingPadder (4) :
|
||||
new StringPadder(" ");
|
||||
}
|
||||
|
||||
// 类型是 `SpaceRepeatingPadder | StringPadder`
|
||||
let padder: Padder = getRandomPadder();
|
||||
|
||||
if ( padder instanceof SpaceRepeatingPadder ) {
|
||||
padder; // 类型被限定为 `SpaceRepeatingPadder`
|
||||
}
|
||||
|
||||
if ( padder instanceof StringPadder ) {
|
||||
padder; // 类型被限定为`StringPadder`
|
||||
}
|
||||
```
|
||||
|
||||
`instanceof`的右侧需要是构造函数,而TypeScript将把变量限定为(The right side of the `instanceof` needs to be a constructor function, and TypeScript will narrow down to):
|
||||
|
||||
1. 在该函数的`prototype`属性类型不是`any`时,该函数的`prototype`属性类型(the type of the function's `prototype` property if its type is not `any`)
|
||||
|
||||
2. 该函数`prototype`属性类型的构造签名所返回的类型联合(the union of types returned by that type's construct signatures)
|
||||
|
||||
并按二者的先后顺序进行。
|
||||
|
||||
## 可为空值的类型(Nullable types)
|
||||
|
||||
TypeScript有两种特别的类型,`null`与`undefined`,相应地有着空值与未定义值。在[基本类型章节](00_basic_data_types.md)对它们进行了简要介绍。默认情况下,类型检查器认为`null`与`undefined`可被赋值给任何变量。对于所有类型,`null`与`undefined`都是有效的值。那就意味着,要 *阻止* 将它们赋值给各种类型,即使有意这样做,都是不可能的。`null`值的发明者,Tony Hoare, 把这一特性,称之为他的[“十亿美元错误”](https://en.wikipedia.org/wiki/Null_pointer#History)。
|
||||
|
||||
编译器的`--strictNullChecks`开关可修正这一点:在声明某个变量时,它就不自动包含`null`或`undefined`了。要显式地包含它们,可使用联合类型:
|
||||
|
||||
```typescript
|
||||
let s = "foo";
|
||||
s = null; // 错误,`null` 无法赋值给`string`
|
||||
|
||||
let sn: string | null = "bar";
|
||||
sn = null; // 没有问题
|
||||
|
||||
sn = undefined; // 错误,`undefined` 无法赋值给 `string | null`
|
||||
```
|
||||
|
||||
请留意TypeScript是以不同方式来对待`null`与`undefined`的,这是为了与JavaScript的语义相匹配。`string | null`与`string | undefined` 及`string | undefined | null`是不同的类型。
|
||||
|
||||
### 可选参数与属性(Optional parameters and properties)
|
||||
|
||||
在开启`--strictNullChecks`编译选项时,可选参数将自动加上`| undefined`:
|
||||
|
||||
```typescript
|
||||
function f(x: number, y?: number) {
|
||||
return x + (y || 0);
|
||||
}
|
||||
|
||||
f(1, 2);
|
||||
f(1);
|
||||
f(1, undefined);
|
||||
f(1, null); //错误,`null`不能赋值给`number | undefined`
|
||||
```
|
||||
|
||||
对于可选属性,这也是适用的:
|
||||
|
||||
```typescript
|
||||
class C {
|
||||
a: number;
|
||||
b?: number;
|
||||
}
|
||||
|
||||
let c = new C();
|
||||
c.a = 12;
|
||||
c.a = undefined; // 错误,`undefined`不能赋值给`number`
|
||||
c.b = 13;
|
||||
c.b = undefined;
|
||||
c.b = null; // 错误,`null` 无法赋值给`number | undefined`
|
||||
```
|
||||
|
||||
### 类型保护与类型断言(Type guards and type assertions)
|
||||
|
||||
因为可为空值类型,是以联合(a union)实现的,那么就需要使用类型保护来处理`null`。幸运的是,这与在JavaScript中所写的代码一样:
|
||||
|
||||
```typescript
|
||||
function f (sn: string | null): string {
|
||||
if (sn == null) {
|
||||
return "default";
|
||||
}
|
||||
else {
|
||||
return sn;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
这里`null`的排除是相当直观的,但也可以使用更简洁的运算符:
|
||||
|
||||
```typescript
|
||||
function f (sn: string | null): string {
|
||||
return sn || "default";
|
||||
}
|
||||
```
|
||||
|
||||
在那些编译器无法消除`null`或`undefined`的地方,可使用类型断言运算符(the type assertion operator)来手动移除它们。该语法就是后缀`!`的使用: `identifier!`将从`identifier`的类型中移除`null`与`undefined`:
|
||||
|
||||
```typescript
|
||||
function broken(name: string | null): string {
|
||||
function postfix(epithet: string) {
|
||||
return name.charAt(0) + '. the ' + epithet; // 错误,`name` 可能是`null`
|
||||
}
|
||||
|
||||
name = name || "Bob";
|
||||
return postfix("great");
|
||||
}
|
||||
|
||||
function fixed(name: string | null): string {
|
||||
function postfix(epithet: string) {
|
||||
return name!.charAt(0) + '. the ' + epithet; // 没有问题
|
||||
}
|
||||
|
||||
name = name || "Bob";
|
||||
return postfix("great");
|
||||
}
|
||||
```
|
||||
|
||||
因为编译器无法消除嵌套函数内部的空值(除了那些立即执行函数表达式外),因此该示例使用了一个嵌套函数。而编译器之所以无法消除嵌套函数内的空值,是因为编译器无法对所有的嵌套函数调用进行追踪,尤其是在外层函数内返回嵌套函数时。由于编译器在不知道嵌套函数在何处调用,那么它就无法知道函数体执行时`name`的类型会是什么(The example uses a nested function here because the compiler can't eliminate nulls inside a nested function(except immediately-invoked function expressions). That's because it can't track all calls to the nested function, especially if you return it from the outer function. Without knowing where the function is called, it can't know what the type of `name` will be at the time the body executes)。
|
||||
|
||||
|
||||
## 类型别名(Type Aliases)
|
||||
|
||||
类型别名特性,为某个类型创建出一个新的名称。类型别名有时与接口类似,但可以对原生类型、联合类型、元组及其它不得不手写的类型进行命名(Type aliases create a new name for a type. Type aliases are sometimes similar to interfaces, but can name primitives, unions, tuples, and any other types that you'd otherwise have to write by hand)。
|
||||
|
||||
```typescript
|
||||
type Name = string;
|
||||
type NameResolver = () => string;
|
||||
type NameOrResolver = Name | NameResolver;
|
||||
|
||||
function getName (n: NameOrResolver): Name {
|
||||
if ( typeof n === "string" ) {
|
||||
return n;
|
||||
}
|
||||
else {
|
||||
return n();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
命名操作并不会直接创建出一个新类型 -- 其创建出一个到那个类型引用的 *名称* (Aliasing doesn't actually create a new type - it creates a new *name* to refer to that type)。对原生类型的重命名并不十分有用,不过这可用作一种程序文档的形式。
|
||||
|
||||
与接口一样,类型别名也可以是泛型的(通用的) -- 可仅加上类型参数,并在别名声明的右侧使用即可。
|
||||
|
||||
```typescript
|
||||
type Container<T> = { value: T };
|
||||
```
|
||||
|
||||
还可以在属性中引用类型别名本身:
|
||||
|
||||
```typescript
|
||||
type Tree<T> {
|
||||
value: T;
|
||||
left: Tree<T>;
|
||||
right: Tree<T>;
|
||||
}
|
||||
```
|
||||
|
||||
当与交集类型一起时,就可以做出一些相当令人费解的类型:
|
||||
|
||||
```typescript
|
||||
type LinkedList<T> = T & { next: LinkedList<T> };
|
||||
|
||||
interface Person {
|
||||
name: string;
|
||||
}
|
||||
|
||||
var people: LinkedList<Person>;
|
||||
var s = people.name;
|
||||
var s = people.next.name;
|
||||
var s = people.next.next.name;
|
||||
var s = people.next.next.next.name;
|
||||
```
|
||||
|
||||
但是,要将类型别名放在声明右侧的任意地方,是不可能的:
|
||||
|
||||
```typescript
|
||||
type Yikes = Array<Yikes>; //错误
|
||||
```
|
||||
|
||||
### 接口与类型别名(Interfaces vs. Type Aliases)
|
||||
|
||||
如前面所提到的,类型别名能表现得有点像接口那样;但类型别名与接口也有着些许不同。
|
||||
|
||||
一个差异在于接口创建出在所有地方使用的新名称。而类型别名并不会创建出新名称 -- 举例来说,错误消息就不会使用别名。在下面的代码里,如在代码编辑器中鼠标悬挺在`interfaced`上,就会提示其返回的是一个`Interface`,但对于`aliased`,则将提示返回的是对象字面值类型(object literal type)。
|
||||
|
||||
```typescript
|
||||
type Alias = { num: number }
|
||||
interface Interface {
|
||||
num: number;
|
||||
}
|
||||
|
||||
declare function aliased (arg: Alias): Alias;
|
||||
declare function interfaced (arg: Interface): Interface;
|
||||
```
|
||||
|
||||
第二个重要的不同,就是类型别名不能被扩展或被实施(它们也不能扩展或实施其它类型,A second important difference is that type aliases cannot be extended or implemented from(nor can they extend/implement other types))。由于[软件的理想属性,在于对扩展始终开放](https://en.wikipedia.org/wiki/Open/closed_principle),因此应尽可能使用接口,而不是类型别名。
|
||||
|
||||
反过来说,在无法使用接口类表达某个外形(建模)及需要使用联合或元组类型时,往往就是类型别名派上用场的时候。
|
||||
|
||||
## 字符串字面类型(String Literal Type)
|
||||
|
||||
字符串字面类型特性,允许给某个字符串指定其所肯定具有的准确值(String literal types allow you to specify the exact value a string must have)。实践中的字符串字面类型,与联合类型、类型保护及类型别名等有很好的结合。可一并使用这些特性,从而获得字符串的类似于枚举的表现。
|
||||
|
||||
```typescript
|
||||
type Easing = "ease-in" | "ease-out" | "ease-in-out";
|
||||
|
||||
class UIElement {
|
||||
animate(dx: number, dy: number, easing: Easing) {
|
||||
if ( easing === "ease-in" ) {
|
||||
// ...
|
||||
}
|
||||
else if ( easing === "ease-out" ) {
|
||||
// ...
|
||||
}
|
||||
else if ( easing === "ease-in-out" ) {
|
||||
// ...
|
||||
}
|
||||
else {
|
||||
// 错误!不会传入 `null` 或 `undefined`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let button = new UIElement();
|
||||
button.animate(0, 0, "ease-in");
|
||||
button.animate(0, 0, "uneasy"); // 错误: `uneasy`是不允许的
|
||||
```
|
||||
|
||||
可传入三个允许字串的任意一个,但任何其它字符串的传入,都将导致错误:
|
||||
|
||||
```sh
|
||||
`"uneasy"`类型的参数不能指派给类型`"ease-in" | "easy-out" | "easy-in-out"`的参数
|
||||
```
|
||||
|
||||
字符串字面值类型还可以同样方式,用于区分加载元素(String literal types can be used in the same way to distinguish overloads):
|
||||
|
||||
```typescript
|
||||
function createElement (tagName: "img"): HTMLImageElement;
|
||||
function createElement (tagName: "input"): HTMLInputElement;
|
||||
// ... 更多的加载元素 ...
|
||||
function createElement (tagName: string): Element {
|
||||
// ... 这里是代码 ...
|
||||
}
|
||||
```
|
||||
|
||||
## 数字字面值类型(Numeric Literal Types)
|
||||
|
||||
TypeScript 也具有数字字面值类型。
|
||||
|
||||
```typescript
|
||||
function rollDie(): 1 | 2 | 3 | 4 | 5 | 6 {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
很少显式地写数字字面值类型,在使用数字字面值类型来缩小范围,从而可捕获程序错误时,此特性就有用处:
|
||||
|
||||
```typescript
|
||||
function foo (x: number) {
|
||||
if ( x !== 1 || x !== 2 ) {
|
||||
// ~~~~~~~
|
||||
// 运算符 `!==` 不能应用在类型 `1` 与 `2` 上
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
也就是说,`x` 在与`2`进行比较时,`x`必定为 `1`, 这意味着上面的检查造成了无效的比较。
|
||||
|
||||
## 枚举成员类型(Enum Member Types)
|
||||
|
||||
如同在[枚举章节](07_enums.md)所提到的,当所有枚举成员都有字面值初始化时,枚举成员就具有类型(As mentioned in [our section on enums](07_enums.md), enum members have types when every member is literal-initialized)。
|
||||
|
||||
在谈及“单例类型”时,大部分都指的是枚举成员类型与数字/字符串字面值类型,虽然很多人都会将“单例类型”与“字面值类型”混用(Much of the time when we talk about "singleton types", we're referring to both enum member types as well as numeric/string literal types, though many users will use "singleton types" and "literal types" interchangeably)。
|
||||
|
||||
## 可辨识联合(Dicriminated Unions)
|
||||
|
||||
可将单体类型、联合类型、类型保护及类型别名结合起来,构建出一种名为 *可辨识联合*,也叫作 *标签联合* 或 *代数数据类型* 的复杂模式。可辨识联合在函数式编程中是有用的。一些编程语言会对联合进行自动辨识;但TypeScript是在JavaScript模式上构建可辨识联合的,因为这些JavaScript模式业已存在。可辨识联合有以下三种成分(You can combine singleton types, union types, type guards, and type aliases to build an advanced pattern called *dicriminated unions*, also known as *tagged unions* or *algebraic data types*. Discriminated unions are useful in functional programming. Some languages automatically discriminate unions for you; TypeScript instead builds on JavaScript patterns as they exist today. There are three ingredients):
|
||||
|
||||
1. 具有共同的、单体类型属性的一些类型 -- 辨识依据(Types that have a common, singleton type property - the *discrimainant*)
|
||||
|
||||
2. 一个这些类型联合的类型别名 -- 联合(A type alias that takes the union of those types - the *union*)
|
||||
|
||||
3. 共同属性上的类型保护(Type guards on the common property)
|
||||
|
||||
```typescript
|
||||
interface Square {
|
||||
kind: "square";
|
||||
size: number;
|
||||
}
|
||||
interface Rectangle {
|
||||
kind: "rectangle";
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
interface Circle {
|
||||
kind: "circle";
|
||||
radius: number;
|
||||
}
|
||||
```
|
||||
|
||||
这里首先声明了一些将在联合中使用到的一些接口。注意每个接口都具备一个有着不同字符串字面值的`kind`属性。该`kind`属性就被成为 *辨识依据(discriminant)* 或 *标签(tag)*。其它属性则是特定于不同接口的。注意此时这些接口都还未联系起来。那么下面就将它们放入到一个联合中:
|
||||
|
||||
```typescript
|
||||
type Shape = Square | Rectangle | Circle;
|
||||
```
|
||||
|
||||
现在对该可辨识联合加以使用:
|
||||
|
||||
```typescript
|
||||
function area (s: Shape) {
|
||||
switch ( s.kind ) {
|
||||
case "square": return s.size * s.size;
|
||||
case "rectangle": return s.width * s.height;
|
||||
case "circle": return Math.PI * s.radius ** 2;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 全面性检查(Exhaustiveness checking)
|
||||
|
||||
在没有涵盖到可辨识联合的全部变种时,如果编译器能予以提示,那就再好不过了。比如,在将`Triangle`加入到`Shape`后,就需要同时更新`area`:
|
||||
|
||||
```typescript
|
||||
type Shape = Square | Rectangle | Circle | Triangle;
|
||||
|
||||
function area (s: Shape) {
|
||||
switch ( s.kind ) {
|
||||
case "square": return s.size * s.size;
|
||||
case "rectangle": return s.width * s.height;
|
||||
case "circle": return Math.PI * s.radius ** 2;
|
||||
}
|
||||
// 这里因该报错 -- 因为并未处理“triangle”情况
|
||||
}
|
||||
```
|
||||
|
||||
要达到此目的,有两种方式。第一个就是开启`--strictNullChecks`编译选项,并为该函数指定一个返回值类型:
|
||||
|
||||
```typescript
|
||||
function area (s: Shape): number { // 错误:返回 `number | undefined` (因为三角形时将返回 undefined)
|
||||
switch (s.kind) {
|
||||
case "square": return s.size * s.size;
|
||||
case "rectangle": return s.width * s.height;
|
||||
case "circle": return Math.PI * s.radius ** 2;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
因为`switch`已不全面,所以TypeScript就注意到某些时候函数`area`将返回`undefined`。在使用了显式的`number`返回类型时,就会得到编译器给出的返回值类型为`number | undefined`的报错。当这种方式有些微妙,同时`--strictNullChecks`对于旧代码也并不总是管用。
|
||||
|
||||
第二种方式使用了可被编译器用来对完备性进行检查的`never`类型(The second method uses the `never` type that the compiler uses to check for exhaustiveness):
|
||||
|
||||
```typescript
|
||||
function assertNever (x: never): never {
|
||||
throw new Error ("Unexpected object: " + x);
|
||||
}
|
||||
|
||||
function area (s: Shape) {
|
||||
switch ( s.kind ) {
|
||||
case "square": return s.size * s.size;
|
||||
case "rectangle": return s.width * s.height;
|
||||
case "circle": return Math.PI * s.radius ** 2;
|
||||
default: return assertNever(s); // 如有漏掉的情形,这里就会出现错误
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
这里的`assertNever`函数检查`s`为`never`类型 -- 即在排除了所有其它情形后剩下的类型(Here, `assertNever` checks that `s` is of type `never` -- the type's left after all other cases have been removed)。如果忘掉某个情形,那么`s`将具有真实的类型,就将得到一个类型错误。此方式需要定义一个额外函数,不过在忘掉某个情形时,这种方式要直观得多。
|
||||
|
||||
## 多态`this`类型(Polymorphic `this` types)
|
||||
|
||||
多态`this`类型,代表的是包含`this`的类或接口的一个 *子类型* 。这被称为F-边界多态。此特性好处在于,比如令到更易于表达层次化的i **流式接口** 等。下面是一个在每次操作后都返回`this`的一个简单的计算器代码(A polymorphic `this` type represents a type that is the *subtype* of the containing class or interface. This is called F-bounded polymorphism. This makes hierarchical **fluent interfaces** much easier to express, for example. Take a simple calculator that return `this` after each operation):
|
||||
|
||||
```typescript
|
||||
class BasicCalculator {
|
||||
public constructor ( protected value: number = 0 ) {}
|
||||
|
||||
public currentValue (): number {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public add ( operand: number ): this {
|
||||
this.value += operand;
|
||||
return this;
|
||||
}
|
||||
|
||||
public multiply ( operand: number ): this {
|
||||
this.value *= operand;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// ... 这里是其它运算 ...
|
||||
}
|
||||
|
||||
let v = new BasicCalculator (2)
|
||||
.multiply(5)
|
||||
.add(1)
|
||||
.currentValue();
|
||||
```
|
||||
|
||||
因为类用到`this`类型,就可以将其扩展为新类型,且新类型可不加修改地使用要旧有的方法:
|
||||
|
||||
```typescript
|
||||
class ScientificCalculator extends BasicCalculator {
|
||||
public constructor ( value = 0 ) {
|
||||
super ( value );
|
||||
}
|
||||
|
||||
public sin () {
|
||||
this value = Math.sin ( this.value );
|
||||
return this;
|
||||
}
|
||||
|
||||
// ... 其它的运算在这里 ...
|
||||
}
|
||||
|
||||
let v = new ScientificCalculator (2)
|
||||
.multiply(5)
|
||||
.sin()
|
||||
.add(1)
|
||||
.currentValue();
|
||||
```
|
||||
|
||||
如果没有`this`类型,`ScientificCalculator`就无法对`BasicCalculator`进行扩展并保留流式接口(the fluent interface)。`multiply`将返回`BasicCalculator`,而`BasicCalculator`是没有`sin`方法的。不过,在有了`this`类型后,`multiply`将返回`this`,就是这里的`ScientificCalculator`了。
|
||||
|
||||
## 索引类型(Index types)
|
||||
|
||||
使用索引类型特性,就可以让编译器对那些用到 **动态属性名称** 的代码进行检查。一种常见的JavaScript范式,就是从某个对象中拾取属性的子集(With index types, you can get the compiler to check code that uses **dynamic property names**. For example, a common JavaScript pattern is to pick a subset of properties from an object):
|
||||
|
||||
```typescript
|
||||
function pluck (o, names) {
|
||||
return names.map( n => o[n] );
|
||||
}
|
||||
```
|
||||
|
||||
下面是在TypeScript中上面函数的写法与用法,使用了 **索引类型查询** 与 **经索引的读写** 运算符(Here's how you would write and use this function in TypeScript, using the **index type query** and **indexed access** operators):
|
||||
|
||||
```typescript
|
||||
function pluck<T, K extends keyof T>(o: T, names: K[]): T[K][] {
|
||||
return names.map(n => o[n]);
|
||||
}
|
||||
|
||||
interface Person {
|
||||
name: string;
|
||||
age: number;
|
||||
}
|
||||
|
||||
let person: Person = {
|
||||
name: "Jirad",
|
||||
age: 35
|
||||
}
|
||||
|
||||
let strings = string[] = pluck ( person, ['name'] ); // 没有问题,string[]
|
||||
```
|
||||
|
||||
编译器对`name`是`Person`上的属性进行检查。该示例引入了两个新的类型运算符(type operators)。首先是`keyof T`,也就是 **索引类型查询运算符**。对于任意类型的`T`,`keyof T`都是`T`的 **已知的、公开的属性名称的联合**(First is `keyof T`, the **index type query operator**. For any type `T`, `keyof T` is **the union of known, public names** of `T`)。比如:
|
||||
|
||||
```typescript
|
||||
let personProps: keyof Person; // 'name' | `age`;
|
||||
```
|
||||
|
||||
`keyof Person`与`'name' | 'age'`是可完全互换的。区别在于如给`Person`加上另一个属性,比如`address: string`,那么`keyof Person`将自动更新为`'name' | 'age' | 'address'`。同时可在如`pluck`函数这样的,提前并不知道有哪些属性名称的通用场合,使用`keyof`运算符。那意味着编译器将就是否传递了正确的属性名称集合给`pluck`进行检查:
|
||||
|
||||
```typescript
|
||||
pluck ( person, ['age', 'unkown'] ); // 错误,'unkown' 不再 `'name' | 'age'` 属性名称联合中
|
||||
```
|
||||
|
||||
引入的第二个运算符,就是`T[K]`,**受索引的读写运算符**(the **indexed access operator**)。这里的类型语法反映的是表达式语法(Here, **the type syntax** reflects **the expression syntax**)。那就是说`person['name']`具有类型`Person['name']` -- 在示例中那就仅是`string`。但与索引类型查询一样,可在通用环境中使用`T[K]`,这才是其与生俱来的威力。只需确保类型变量`K extends keyof T`即可。下面是另一个名为`getProperty`函数的示例:
|
||||
|
||||
```typescript
|
||||
function getProperty<T, K extends keyof T>(o: T, name: K): T[K] {
|
||||
return o[name]; // o[name] 的类型就是`T[K]`
|
||||
}
|
||||
```
|
||||
|
||||
在函数`getProperty`中,`o: T` 与 `name: K`,就意味着`o[name]: T[K]`。一旦返回了`T[K]`结果,编辑器将立即实例化键的实际类型,因此`getProperty`函数的返回值类型,将根据所请求的属性,而有所不同。
|
||||
|
||||
```typescript
|
||||
let name: string = getProperty(person, 'name');
|
||||
let age: number = getProperty(person, 'age');
|
||||
let unkown = getProperty(person, 'unknown'); // 错误,'unkown'不在 `'name' | 'age'`中
|
||||
```
|
||||
|
||||
## 索引类型与字符串索引签名(Index types and string index signatures)
|
||||
|
||||
`keyof`与`T[K]`都作用于 **字符串索引签名**。如有一个带有字符串索引签名的类型,那么`keyof T`就仅仅是`string`。同时`T[string]`也仅仅是该索引签名的类型(`keyof` and `T[K]` interact with **string index signatures**. If you have a type with a string index signature, `keyof T` will just be `string`. And `T[string]` is just the type of the index signature)。
|
||||
|
||||
```typescript
|
||||
interface Map<T> {
|
||||
[key: string]: T;
|
||||
}
|
||||
|
||||
let keys: keyof Map<number>; // 字符串
|
||||
let values: Map<number>['foo']; // 数字
|
||||
```
|
||||
|
||||
## 映射的类型(Mapped types)
|
||||
|
||||
使用既有类型并令到其各个属性可选,是一项很常见的任务(A common task is to take an existing type and make each of its properties optional):
|
||||
|
||||
```typescript
|
||||
interface PersonPartial {
|
||||
name?: string;
|
||||
age?: number;
|
||||
}
|
||||
```
|
||||
|
||||
或者可能想要一个只读版本:
|
||||
|
||||
```typescript
|
||||
interface PersonPartial {
|
||||
readonly name: string;
|
||||
readonly age: number;
|
||||
}
|
||||
```
|
||||
|
||||
因为在JavaScript或出现很多这种情况,因此TypeScript提供了一种基于原有类型来创建新类型的方式 -- **映射的类型**(This happens often enough in JavaScript that TypeScript provides a way to create new types based on old types -- **mapped types**)。在映射的类型中,新类型对原有类型中的各个属性,都以同样方式进行转换。比如,可将所有属性,都成为`readonly`的或可选的。下面是两个示例:
|
||||
|
||||
```typescript
|
||||
type Readonly<T> = {
|
||||
readonly [P in keyof T]: T[P];
|
||||
}
|
||||
|
||||
type Partial<T> = {
|
||||
[P in keyof T]? T[P];
|
||||
}
|
||||
```
|
||||
|
||||
下面是用法:
|
||||
|
||||
```typescript
|
||||
type PersonPartial = Partial<Person>;
|
||||
type ReadonlyPerson = Readonly<Person>;
|
||||
```
|
||||
|
||||
来看看下面这个最简单的映射类型及其构成(Let's take a look at the simplest mapped type and its parts):
|
||||
|
||||
```typescript
|
||||
type Keys = 'option1' | 'option2';
|
||||
type Flags = { [K in Keys]: boolean };
|
||||
```
|
||||
|
||||
该语法酷似那种内部带有`for .. in`的索引签名语法(The syntax resembles the syntax for index signatures with a `for .. in` inside)。其有着三个构成部分:
|
||||
|
||||
1. 类型变量`K`,其将依次绑定到各个属性。
|
||||
|
||||
2. 字符串字面值的联合`Keys`,其包含了那些要进行迭代的属性名称。
|
||||
|
||||
3. 属性的结果类型(The resulting type of the property)。
|
||||
|
||||
上面的示例中,`Keys`是一个硬编码的属性名称清单,同时属性类型全是`boolean`,那么此映射的类型就等价于下面的写法:
|
||||
|
||||
```typescript
|
||||
type Flags = {
|
||||
option1: boolean;
|
||||
option2: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
但实际应用看起来会像上面的`Readonly`或`Partial`(Real applications, however, look like `Readonly` or `Partial` above)。它们总是基于一些既有类型,以某种方式对属性进行转换。那就是要用到`keyof`与受索引读写类型的地方:
|
||||
|
||||
```typescript
|
||||
type NullablePerson = { [P in keyof Person]: Person[P] | null }
|
||||
type PartialPerson = { [P in keyof Person]?: Person[P] }
|
||||
```
|
||||
|
||||
在这些示例中,属性清单为`keyof T`,结果类型是`T[P]`的某些变种。这可作为映射类型一般用法的良好模板。这是因为此类变换,是[同态的](https://en.wikipedia.org/wiki/Homomorphism),也就是说,只是对于`T`的属性进行映射,而不涉及其它部分。编译器明白,在加入任何新东西前,其只能对所有既有属性修饰器进行拷贝(In these examples, the properties list is `keyof T` and the resulting type is come variant of `T[P]`. This is a good template for any general use of mapped types. That's because this kind of transformation is [homemorphic](https://en.wikipedia.org/wiki/Homomorphism), which means that the mapping applies only to properties of `T` and no others. The compiler knows that it can copy all the existing property modifiers before adding any new ones. For example, if `Person.name` was readonly, `Partial<Person>.name` would be readonly and optional)。比如,如果`Person.name`是只读的,那么`Partial<Person>.name`将是只读且可选的。
|
||||
|
||||
下面是另一个示例,其中`T[P]`被封装在`Proxy<T>`类中:
|
||||
|
||||
```typescript
|
||||
type Proxy<T> = {
|
||||
get(): T;
|
||||
set(value: T): void;
|
||||
}
|
||||
|
||||
type Proxify<T> = {
|
||||
[P in keyof T]: Proxy<T[P]>;
|
||||
}
|
||||
|
||||
function proxify<T>(o: T): Proxify<T> {
|
||||
// ... 这里封装了代理 ...
|
||||
}
|
||||
|
||||
let proxyProps = proxify(props);
|
||||
```
|
||||
|
||||
注意`Readonly<T>`与`Partial<T>`是如此重要,以至于它们与`Pick`及`Record`一道,被收录进入了TypeScript的标准库中:
|
||||
|
||||
```typescript
|
||||
type Pick<T, K extends keyof T> = {
|
||||
[P in K]: T[P];
|
||||
}
|
||||
|
||||
type Record<K extends string, T> = {
|
||||
[P in K]: T;
|
||||
}
|
||||
```
|
||||
|
||||
`Readonly`、`Partial`与`Pick`是同态的,但`Record`却不是。`Record`不是同态的一个原因,就是其并不是取得一个要从其中拷贝属性的输入类型(One clue that `Record` is not homomorphic is that it doesn't take an input type to copy properties from):
|
||||
|
||||
```typescript
|
||||
type ThreeStringProps = Record<'prop1' | 'prop2' | 'prop3', string>
|
||||
```
|
||||
|
||||
非同态类型,会创建新的属性,因此它们无法从任何地方拷贝属性修饰器(Non-homomorphic types are essentially creating new properties, so they can't copy property modifiers from anywhere)。
|
||||
|
||||
### 自映射类型的推导(Inference from mapped types)
|
||||
|
||||
现在以及知晓封装类型属性的方法,那么接着就要对这些类型属性进行解封装(Now that you know how to wrap the properties of a type, the next thing you'll want to do is unwrap them)。幸运的是,对类型属性的解封装,是相当容易的:
|
||||
|
||||
```typescript
|
||||
function unproxify<T>(t: Proxify<T>): T {
|
||||
let result = {} as T;
|
||||
|
||||
for ( const k in t ) {
|
||||
result[k] = t[k].get();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
```
|
||||
|
||||
注意这种解封装推导仅适用于同态的映射类型。如映射类型不是同态的,就必须给解封装函数一个显式类型参数(Note that this unwrapping inference only works on homomorphic mapped types. If the mapped type is not homomorphic you'll have to give an explicit type parameter to your unwrapping function)。
|
100
_book/11_symbols.md
Normal file
100
_book/11_symbols.md
Normal file
@ -0,0 +1,100 @@
|
||||
# 符号
|
||||
|
||||
**Symbols**
|
||||
|
||||
## 简介
|
||||
|
||||
从ECMAScript 2015开始,与`number`和`string`一样,`symbol`就是一种原生数据类型了。
|
||||
|
||||
`symbol`值的创建,是通过调用`Symbol`构造器完成的。
|
||||
|
||||
```typescript
|
||||
let sym1 = Symbol();
|
||||
let sym2 = Symbol("key"); // “key”是可选字符串
|
||||
```
|
||||
|
||||
符号是不可修改的,且具独特性。
|
||||
|
||||
```typescript
|
||||
let sym2 = Symbol("key");
|
||||
let sym3 = Symbol("key");
|
||||
|
||||
sym2 === sym3; // `false`,因为符号是独特的
|
||||
```
|
||||
|
||||
与字符串一样,符号可作为对象属性的键来使用。
|
||||
|
||||
```typescript
|
||||
let sym = Symbol();
|
||||
|
||||
let obj = {
|
||||
[sym]: "value"
|
||||
};
|
||||
|
||||
console.log(obj[sym]); // "value"
|
||||
```
|
||||
|
||||
符号也可与 **计算属性声明** 一起,来声明对象属性与类成员(Symbols can also be combined with **computed property declarations** to declare object properties and class members)。
|
||||
|
||||
```typescript
|
||||
const getClassNameSymbol = Symbol();
|
||||
|
||||
class C {
|
||||
[getClassNameSymbol](){
|
||||
return "C";
|
||||
}
|
||||
}
|
||||
|
||||
let c = new C();
|
||||
let className = c[getClassNameSymbol](); // "C"
|
||||
```
|
||||
|
||||
## 一些熟知的符号(Well-known Symbols)
|
||||
|
||||
出来用户定义的符号外,还有一些内建熟知的符号。内建的符号,用于表示内部的语言行为(In addition to user-defined symbols, there are Well-known built-in symbols. Built-in symbols are used to represent internal language behaviors)。
|
||||
|
||||
下面是一个熟知符号的清单。
|
||||
|
||||
### `Symbol.hasInstance`
|
||||
|
||||
判断构造器对象是否将某个对象识别为该构造器的一个实例的方法。由`instanceof`运算符的语义调用(A method that determines if a constructor object recognizes an object as one of the constructor's insstance. Called by the semantics of the `instanceof` operator)。
|
||||
|
||||
### `symbol.isConcatSpreadable`
|
||||
|
||||
一个表明某对象应通过`Array.prototype.concat`被扁平化到其数组元素的逻辑值(A Boolean value indicating taht an object should be flattened to its array elements by `Array.prototype.concat`)。
|
||||
|
||||
### `Symbol.iterator`
|
||||
|
||||
返回某对象默认迭代器的方法。由`for .. of`语句的语义调用(A method that returns the default iterator for an object. Called by the semantics of the `for .. in` statement)。
|
||||
|
||||
### `Symbol.match`
|
||||
|
||||
一个对正则表达式与字符串进行匹配的正则表达式函数。由`String.prototype.match`方法进行调用(A regular expression method that matches the regular expression against a string. Called by the `String.prototype.match` method)。
|
||||
|
||||
### `Symbol.replace`
|
||||
|
||||
一个对字符串中匹配的子字符串进行匹配的正则表达式函数。由`String.prototype.replace`方法进行调用(A regular expression method that replaces matched substring of a string. Called by the `String.prototype.replace` method)。
|
||||
|
||||
### `Symbol.search`
|
||||
|
||||
一个返回与正则表达式匹配的某字符串中索引的正则表达式函数。由`String.prototype.search`方法调用(A regular expression method that returns the index within a string that matches the regular expression. Called by the `String.prototype.search` method)。
|
||||
|
||||
### `Symbol.species`
|
||||
|
||||
一个用于创建派生对象的函数值属性,也就是构造函数(A function valued property that is the constructor function that is used to create derived objects)。
|
||||
|
||||
### `Symbol.split`
|
||||
|
||||
一个在与给出的正则表达式匹配的索引出对字符串进行分割的正则表达式函数。由`String.prototype.split`方法进行调用(A regular expression method that splits a string at the indices that match the regular expression. Called by the `String.prototype.split` method)。
|
||||
|
||||
### `Symbol.toPrimitive`
|
||||
|
||||
一个将对象转换到相应的原生值的方法。由`ToPrimitive`抽象操作进行调用(A method that converts an object to a corresponding primitive value. Called by the `ToPrimitive` abstract operation)。
|
||||
|
||||
### `Symbol.toStringTag`
|
||||
|
||||
一个在对象默认字符串说明的创建中用到的字符串值。由内建的`Object.prototype.toString`方法调用(A string value that is used in the creation of the default string description of an object. Called by the built-in method `Object.prototype.toString`)。
|
||||
|
||||
### `Symbol.unscopables`
|
||||
|
||||
一个其自身属性名称是那些排除在相关对象的`with`环境绑定之外的属性名称的对象(An `Object` whose own property names are property names excluded from the `with` environment bindings of the associated objects)。
|
82
_book/12_iterators_and_generators.md
Normal file
82
_book/12_iterators_and_generators.md
Normal file
@ -0,0 +1,82 @@
|
||||
# 迭代器与生成器
|
||||
|
||||
**Iterators and Generators**
|
||||
|
||||
## 可迭代对象(Iterables)
|
||||
|
||||
在对象有着`Symbol.iterator`属性时,其就被认为是可迭代的。一些内建类型,比如`Array`、`Map`、`Set`、`String`、`Int32Array`、`Uint32Array`等,都已经有着其已实现的`Symbol.iterator`属性。对象上的`Symbol.iterator`函数,赋值返回要迭代的值的清单(`Symbol.iterator` function on an object is responsible for returning the list of values to iterate on)。
|
||||
|
||||
### `for..of`语句
|
||||
|
||||
`for..of`对可迭代对象进行循环,调用对象上的`Symbol.iterator`属性。下面是一个在数组上的简单`for..of`循环:
|
||||
|
||||
```typescript
|
||||
let someArray = [1, "string", false];
|
||||
|
||||
for (let entry of someArray){
|
||||
console.log(entry); // 1, "string", false
|
||||
}
|
||||
```
|
||||
|
||||
### `for..of`与`for..in`语句
|
||||
|
||||
`for..of`与`for..in`语句都是对清单进行迭代;但所迭代的值却是不同的,`for..in`返回的是所迭代对象的 *键* 的清单,而`for..of`则是返回的所迭代对象数值属性的 *值* 的清单(Both `for..of` and `for..in` statements iterate over lists; the values iterated on are differenct though, `for..in` returns a list of *keys* on the object being iterated, whereas `for..of` returns a list of *values* of the numeric properties of the object being interatd)。
|
||||
|
||||
```typescript
|
||||
let list = [4, 5, 6];
|
||||
|
||||
for (let i in list) {
|
||||
console.log(i); // "0", "1", "2"
|
||||
}
|
||||
|
||||
for (let i of list) {
|
||||
console.log(i); // "4", "5", "6"
|
||||
}
|
||||
```
|
||||
|
||||
另一个区别就是`for..in`在任何对象上均可执行;它提供了一种探测对象上属性的方法。而`for..of`则主要关注的是可迭代对象的值。诸如`Map`及`Set`等实现了`Symbol.iterator`属性的内建对象,才允许对存储值的访问(Built-in objects like `Map` and `Set` implement `Symbol.iterator` property allowing access to stored values)。
|
||||
|
||||
```typescript
|
||||
let pets = new Set(["Cat", "Dog", "Hamster"]);
|
||||
|
||||
pets["species"] = "mammals";
|
||||
|
||||
for (let pet in pets) {
|
||||
console.log(pet); // "species"
|
||||
}
|
||||
|
||||
for (let pet of pets) {
|
||||
console.log(pet); // "Cat", "Dog", "Hamster"
|
||||
}
|
||||
```
|
||||
|
||||
## 关于代码生成(Code generation)
|
||||
|
||||
### 目标代码为ES5及ES3
|
||||
|
||||
在生成目标代码为ES5或ES3时,只允许在`Array`类型上使用迭代器。就算非数组值实现了`Symbol.iterator`属性, 在它们上使用`for..of`循环都是错误的。
|
||||
|
||||
编译器将为`for..of`循环生成一个简单的`for`循环,例如:
|
||||
|
||||
```typescript
|
||||
let numbers = [1, 2, 3];
|
||||
|
||||
for (let num of numbers) {
|
||||
console.log(num);
|
||||
}
|
||||
```
|
||||
|
||||
将生成如下代码:
|
||||
|
||||
```javascript
|
||||
var numbers = [1, 2, 3];
|
||||
|
||||
for (var _i = 0; _i < numbers.length; _i++) {
|
||||
var num = numbers[_i];
|
||||
console.log(_i);
|
||||
}
|
||||
```
|
||||
|
||||
### 目标代码为ECMAScript2015或更高版本时
|
||||
|
||||
在以兼容ECMAScript2015引擎为目标时,编译器将生成`for..of`循环,从而以引擎中的内建迭代器实现为目标。
|
777
_book/13_modules.md
Normal file
777
_book/13_modules.md
Normal file
@ -0,0 +1,777 @@
|
||||
# 模块
|
||||
|
||||
**Modules**
|
||||
|
||||
> **关于术语的一点说明**:在TypeScript 1.5中需要注意的是,其中的命名法发生了改变。为了与ECMAScript 2015的命名法保持一致,"内部模块"以及被命名为“命名空间”。“外部模块”已被简化为“模块”,(名以上`module X {`与现在所指的`namespace X{`是等价的。it's important to note that in TypeScript 1.5, the nomenclature has changed. "Internal modules" are now "namespace". "External modules" are now simply "modules", as to align with ECMAScript 2015's terminology, (namely that `module X {` is equivalent to the now-preferred `namespace X{`))。
|
||||
|
||||
## 简介
|
||||
|
||||
从ECMAScript 2015开始,JavaScript就有了模块的概念。TypeScript采纳了此概念。
|
||||
|
||||
模块在它们自己的作用域,而非全局作用域中执行(Modules are executed within their own scope, not in the global scope); 这就意味着在模块中所声明的变量、函数、类等等,除非在使用某种[`export`形式](#export)被显式地对其进行了导出,否则它们在模块外面是不可见的。反过来,要消费从另一个模块中导出的变量、函数、类、接口等,就必须要使用某种[`import`形式](#import)将其导入。
|
||||
|
||||
模块是声明式的;模块间的关系,实在文件级别,以导入及导出进行指定的(Modules are declarative; the relationships between modules are specified in terms of imports and exports at the file level)。
|
||||
|
||||
使用模块加载器,可在模块中导入其它模块。运行时的模块加载器,负责在执行某个模块前,定位并执行其所有依赖。在JavaScript中,熟知的模块加载器有Node.js的[CommonJS](https://en.wikipedia.org/wiki/CommonJS)模块加载器,及Web应用的[require.js](http://requirejs.org/)加载器。
|
||||
|
||||
在TypeScript中,就如同ECMAScript 2015中一样,任何包含了顶级`import`与`export`的文件,都被看作是一个模块(In TypeScript, just as in ECMAScript 2015, any file containing a top-level `import` and `export` is considered a module)。相反,不带有顶级`import`或`export`声明的文件,则被作为脚本对待,其内容是全局作用域可用的(因此对模块也可用)。
|
||||
|
||||
## 导出
|
||||
|
||||
### 导出某个声明
|
||||
|
||||
任何声明(诸如变量、函数、类型、类型别名或接口等)都可以通过加上`export`关键字,加以导出。
|
||||
|
||||
*Validation.ts*
|
||||
|
||||
```typescript
|
||||
export interface StringValidator {
|
||||
isAcceptable(s: string): boolean;
|
||||
}
|
||||
```
|
||||
|
||||
*ZipCodeValidator.ts*
|
||||
|
||||
```typescript
|
||||
export const numberRange = /^[0-9]+$/;
|
||||
|
||||
export class ZipCodeValidator implements StringValidator {
|
||||
isAcceptable(s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 导出语句
|
||||
|
||||
在需要为消费者而将导出项重命名时,导出语句就很好用,因此上面的示例可写成这样:
|
||||
|
||||
```typescript
|
||||
class ZipCodeValidator implements StringValidator {
|
||||
isAcceptable(s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
|
||||
export { ZipCodeValidator };
|
||||
export { ZipCodeValidator as mainValidator };
|
||||
```
|
||||
|
||||
### 再度导出(Re-exports)
|
||||
|
||||
通常模块会对其它模块进行扩展,并部分地暴露出一些它们的特性。那么再度导出就不会在本地导入,或是引入一个本地变量(A re-export does not import it locally, or introduce a local variable)。
|
||||
|
||||
*ParseIntBasedZipCodeValidator.ts*
|
||||
|
||||
```typescript
|
||||
export class ParseIntBasedZipCodeValidator {
|
||||
isAcceptable (s: string) {
|
||||
return s.length === 5 && parseInt(s).toString() === s;
|
||||
}
|
||||
}
|
||||
|
||||
// 在重命名原始的验证器后导出
|
||||
export { ZipCodeValidator as RegExpBasedZipCodeValidator } from "./ZipCodeValidator";
|
||||
```
|
||||
|
||||
作为可选项,一个模块可封装一个或多个模块,并通过使用`export * from "module"`,而将所有它们的导出项结合起来。
|
||||
|
||||
*AllValidators.ts*
|
||||
|
||||
```typescript
|
||||
export * from "./StringValidator"; // 导出接口 `StringValidator`
|
||||
export * from "./LettersOnlyValidator"; // 导出类 `LettersOnlyValidator`
|
||||
export * from "./ZipCodeValidator"; // 导出类`ZipCodeValidator`
|
||||
```
|
||||
|
||||
## 导入
|
||||
|
||||
导入就跟从模块导出一样容易。通过下面这些`import`形式,就可完成已导出声明的导入:
|
||||
|
||||
### 从某个模块中导入单一的导出项
|
||||
|
||||
```typescript
|
||||
import { ZipCodeValidator } from "./ZipCodeValidator";
|
||||
|
||||
let myValidator = new ZipCodeValidator();
|
||||
```
|
||||
|
||||
导入项也可以被重命名
|
||||
|
||||
```typescript
|
||||
import { ZipCodeValidator as ZCV } from "./ZipCodeValidator";
|
||||
|
||||
let myValidator = new ZCV();
|
||||
```
|
||||
|
||||
### 将整个模块导入到单个变量中,并使用该变量来访问该模块的导出项
|
||||
|
||||
```typescript
|
||||
import * as validator from "./ZipCodeValidator";
|
||||
|
||||
let myValidator = new validator.ZipCodeValidator();
|
||||
```
|
||||
|
||||
### 仅以副作用目的导入模块(Import a module for side-effects only)
|
||||
|
||||
尽管此种方式不是推荐的做法,但某些模块设置了一些可被其它模块使用的全局状态。这些模块可以没有导出项,或者消费者并不对其导出项感兴趣。要导入这些模块,就用下面的形式:
|
||||
|
||||
```typescript
|
||||
import "./my-module.js"
|
||||
```
|
||||
|
||||
## 默认导出项(Default exports)
|
||||
|
||||
每个模块可选择导出一个`default`导出项。默认导出项是以关键字`default`进行标记的;同时每个模块只能有一个`default`导出项。`default`导出项的导入,使用的是一种有别的形式。
|
||||
|
||||
`default`导出项用起来很顺手。比如,诸如Jquery这样的库,就可以有一个`jQuery`或`$`的默认导出项,当然也要以名称`$`或`jQuery`对其进行导入。
|
||||
|
||||
*JQuery.d.ts*
|
||||
|
||||
```typescript
|
||||
declare let $: JQuery;
|
||||
export default $;
|
||||
```
|
||||
|
||||
*App.ts*
|
||||
|
||||
```typescript
|
||||
import $ from "JQuery";
|
||||
|
||||
$("button.continue").html( "Next Step..." );
|
||||
```
|
||||
|
||||
类与函数的声明,可直接作为默认导出项进行编写。默认导出的类与函数声明名称是可选的(Default export class and function declaration names are optional)。
|
||||
|
||||
*ZipCodeValidator.ts*
|
||||
|
||||
```typescript
|
||||
export default class ZipCodeValidator {
|
||||
static numberRegexp = /^[0-9]+$/;
|
||||
|
||||
isAcceptable (s: string) {
|
||||
return s.length === 5 && ZipCodeValidator.numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Test.ts*
|
||||
|
||||
```typescript
|
||||
import validator from "./ZipCodeValidator";
|
||||
|
||||
let myValidator = new validator();
|
||||
```
|
||||
|
||||
或者
|
||||
|
||||
*StaticZipCodeValidator.ts*
|
||||
|
||||
```typescript
|
||||
const numberRegexp = /^[0-9]+$/;
|
||||
|
||||
export default function (s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
```
|
||||
|
||||
*Test.ts*
|
||||
|
||||
```typescript
|
||||
import validator from "./StaticZipCodeValidator";
|
||||
|
||||
let strings = ["Hello", "98052", "101"];
|
||||
|
||||
// 使用函数验证
|
||||
strings.forEach(s => {
|
||||
console.log("${s}" ${validate(s)}) ? " matches ": " does not match ";
|
||||
});
|
||||
```
|
||||
|
||||
`default`导出项还可以只是值:
|
||||
|
||||
*OneTwoThree.ts*
|
||||
|
||||
```typescript
|
||||
export default "123";
|
||||
```
|
||||
|
||||
*Log.ts*
|
||||
|
||||
```typescript
|
||||
import num from "./OneTwoThree";
|
||||
|
||||
console.log(num); // "123"
|
||||
```
|
||||
|
||||
## `export =`与`import = require()`
|
||||
|
||||
CommonJS与AMD(Asynchronous Module Definition API,异步模块定义接口)都具有`exports`对象这个概念,该对象包含了来自某个模块的所有导出项。
|
||||
|
||||
它们也支持以一个定制单一对象,来替换`exports`。默认导出项就是为了作为进行此做法的一个替代;但二者并不兼容。TypeScript支持`export =`特性,以对传统的CommonJS与AMD工作流进行模仿(They also support replacing the `exports` object with a custom single object. Default exports are meant to act as a replacement for this behavior; however, the two are incompatible. TypeScript supports `export =` to model the traditional CommonJS and AMD workflow)。
|
||||
|
||||
`export =`语法指定出从模块导出的单个对象。其可以是类、接口、命名空间、函数或枚举等(The `export =` syntx specifies a single object that is exported from the module. This can be a class, interface, namespace, funciton, or enum)。
|
||||
|
||||
在使用`export =`来导出某个模块时,必须使用特定于TypeScript的`import module = require("module")`,来导入该模块。
|
||||
|
||||
*ZipCodeValidator.ts*
|
||||
|
||||
```typescript
|
||||
let numberRegexp = /^[0-9]+$/;
|
||||
|
||||
class ZipCodeValidator {
|
||||
isAcceptable (s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
|
||||
export = ZipCodeValidator;
|
||||
```
|
||||
|
||||
*Test.ts*
|
||||
|
||||
```typescript
|
||||
import zip = require("./ZipCodeValidator");
|
||||
|
||||
// 一些要尝试的示例
|
||||
let strings = ["hello", "98052", "101"];
|
||||
|
||||
// 要使用的验证器
|
||||
let validator = new zip();
|
||||
|
||||
// 给出各个字符串是否通过各个验证器检查
|
||||
strings.forEach(s => {
|
||||
console.log("${s}" - ${ validator.isAcceptable(s) ? " matches" : "does not match"});
|
||||
});
|
||||
```
|
||||
|
||||
## 模块的代码生成
|
||||
|
||||
根据编译期间特定的目标模块,编译器将生成针对Node.js(CommonJS)、require.js(AMD)、[UMD](https://github.com/umdjs/umd)(Universal Module Definition API,通用模块定义接口)、[SystemJS](https://github.com/systemjs/systemjs)(启用在浏览器及NodeJS中动态ES模块工作流的,可配值模块加载器),或[ECMAScript 2015原生模块](http://www.ecma-international.org/ecma-262/6.0/#sec-modules)(ES6)的模块加载系统。可参考上述各个模块加载器文档,来进一步了解有关生成代码中`define`、`require`与`register`调用有什么作用。
|
||||
|
||||
下面的简单示例,演示了在导入与导出期间所用到的名称,是如何被翻译到模块加载代码中去的。
|
||||
|
||||
*SimpleModule.ts*
|
||||
|
||||
```typescript
|
||||
import m = require("mod");
|
||||
export let t = m.something + 1;
|
||||
```
|
||||
|
||||
*AMD/RequireJS 的 SimpleModule.js*
|
||||
|
||||
```javascript
|
||||
define(["require", "exports", "./mod"], function(require, exports, mod_1) {
|
||||
exports.t = mod_1.something + 1;
|
||||
});
|
||||
```
|
||||
|
||||
*CommonJS/Node 的 SimpleModule.js*
|
||||
|
||||
```javascript
|
||||
var mod_1 = require("./mod");
|
||||
exports.t = mod_1。something + 1;
|
||||
```
|
||||
|
||||
*UMD de SimpleModule.js*
|
||||
|
||||
```javascript
|
||||
(function (factory) {
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
var v = factory(require, exports);
|
||||
|
||||
if (v !== undefined) {
|
||||
module.exports = v;
|
||||
}
|
||||
}
|
||||
else if (typeof define === "function" && define.amd){
|
||||
define(["require", "exports", "./mod"], factory);
|
||||
}
|
||||
})(function(require, exports) {
|
||||
var mod_1 = require("./mod");
|
||||
exports.t = mod_1.something + 1;
|
||||
});
|
||||
```
|
||||
|
||||
*SystemJS 的 SimpleModule.js*
|
||||
|
||||
```javascript
|
||||
System.register(["./mod"], function(exports_1) {
|
||||
var mod_1;
|
||||
var t;
|
||||
return {
|
||||
setters: [
|
||||
function (mod_1_1) {
|
||||
mod_1 = mod_1_1;
|
||||
}],
|
||||
execute: function () {
|
||||
exports_1("t", t = mod_1.something + 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
*原生ECMAScript 2015模块式的 SimpleModule.js*
|
||||
|
||||
```javascript
|
||||
import { something } from "./mod"
|
||||
export var t = something + 1;
|
||||
```
|
||||
|
||||
## 简单示例
|
||||
|
||||
接下来将对先前示例中用到的验证器实现,综合为仅从各个模块导出单个的命名导出项(Below, we've consolidated the Validator implementations used in previous examples to only export a single named export from each module)。
|
||||
|
||||
必须要在命令行指定模块编译的目标。对于Node.js,使用`--module commonjs`;对于require.js,使用`--module amd`。比如:
|
||||
|
||||
```bash
|
||||
tsc --module commonjs Test.ts
|
||||
```
|
||||
|
||||
编译完成时,每个模块都将成为一个单独的`.js`文件。对于那些引用标签,编译器将跟随`import`语句对依赖文件进行编译(As with reference tags, the compiler will follow `import` statements to compile dependent files)。
|
||||
|
||||
*Validation.ts*
|
||||
|
||||
```typescript
|
||||
export interface StringValidator {
|
||||
isAcceptable (s: string): boolean;
|
||||
}
|
||||
```
|
||||
|
||||
*LettersOnlyValidator.ts*
|
||||
|
||||
```typescript
|
||||
import { StringValidator } from "./Validation"
|
||||
|
||||
const lettersRegexp = /^[A-Za-z]+$/;
|
||||
|
||||
export class LettersOnlyValidator implements StringValidator {
|
||||
isAcceptable (s: string) {
|
||||
return lettersRegexp.test(s);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*ZipCodeValidator.ts*
|
||||
|
||||
```typescript
|
||||
import { StringValidator } from "./Validation";
|
||||
|
||||
const numberRegexp = /^[0-9]+$/;
|
||||
|
||||
export class ZipCodeValidator implements StringValidator {
|
||||
isAcceptable (s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Test.ts*
|
||||
|
||||
```typescript
|
||||
import { StringValidator } from "./Validation";
|
||||
import { ZipCodeValidator } from "./ZipCodeValidator";
|
||||
import { LettersOnlyValidator } from "./LettersOnlyValidator";
|
||||
|
||||
// 一些测试样本
|
||||
let strings = ["Hello", "98052", "101"];
|
||||
|
||||
// 要用到的验证器
|
||||
let validators: { [s: string]: StringValidator; } = {};
|
||||
|
||||
validators["ZIP code"] = new ZipCodeValidator();
|
||||
validators["Letters only"] = new LettersOnlyValidator();
|
||||
|
||||
// 演示各个字符串是否通过各个验证器验证
|
||||
strings.forEach(s => {
|
||||
for (let name in validators) {
|
||||
console.log(`"${ s }" - ${ validators[name].isAcceptable(s) ? "matches": "does not match" } ${ name }`);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## 可选的模块加载与其它复杂加载场景(Optional Module Loading and Other Advanced Loading Scenarios)
|
||||
|
||||
在一些案例中,可能打算仅在部分情况下才装入某个模块(In some cases, you may want to only load a module under some condition)。TypeScript中可使用下面所给出的模式,实现这种或其它复杂加载场景,以在不损失类型安全的前提下,实现模块加载器的直接调用。
|
||||
|
||||
编译器对各个模块在生成的JavaScript中是否用到进行探测。如果某个模块识别符仅作为类型注记的部分被用到,而没有作为表达式用到,那么对那个模块就不会生成`require`调用(If a module identifier is only ever used as part of a type annotations and never as an expression, then no `require` call is emitted for that module)。这种对未使用引用的省略,是一种良好的性能优化,同时也允许这些模块的可选加载。
|
||||
|
||||
该模式的核心理念, 就是`import id = require("...")`语句给予了对该模块所暴露出的类型的访问(The core idea of the pattern is that the `import id = require("...")` statement gives us access to the types exposed by the module)。如下面所给出的`if`块一样,该模块加载器是动态触发的(通过`require`)。此特性利用了引用省略优化(the reference-elision optimization),因此仅在需要该模块时才进行加载。此模式要生效,就在于通过`import`所定义的符号,在类型位置处用到(即是,绝不能在将会生成到JavaScript中的位置用到)。
|
||||
|
||||
可使用`typeof`关键字,来维护类型安全。在某个类型位置出使用`typeof`关键字时,将产生某个值的类型,在该模式的情况下,就是模块的类型。
|
||||
|
||||
*Node.js 中的动态模块加载*
|
||||
|
||||
```typescript
|
||||
declare function require(moduleName: string): any;
|
||||
|
||||
import { ZipCodeValidator as Zip } from "./ZipCodeValidator";
|
||||
|
||||
if ( needZipValidation ) {
|
||||
let ZipCodeValidator: typeof Zip = require("./ZipCodeValidator");
|
||||
let validator = new ZipCodeValidator();
|
||||
if (validator.isAcceptable("...")) { /* ... */ }
|
||||
}
|
||||
```
|
||||
|
||||
*示例: require.js中的动态模块加载*
|
||||
|
||||
```typescript
|
||||
declare function require(moduleName: string[], onLoad: (...args: any[]) => void): void;
|
||||
|
||||
import * as Zip from "./ZipCodeValidator";
|
||||
|
||||
if (needZipValidation) {
|
||||
require(["./ZipCodeValidator"], (ZipCodeValidator: typeof Zip) => {
|
||||
let validator = new ZipCodeValidator.ZipCodeValidator();
|
||||
if (validator.isAcceptable("...")) { /* ... */ }
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
## 与别的JavaScript库打交道(Working with Other JavaScript Libraries)
|
||||
|
||||
需要对库所暴露出的API进行声明,以描述那些不是用TypeScript编写的库的形状(To describe the shape of libraries not written in Typescript, we need to declare the API that the library exposes)。
|
||||
|
||||
对于那些并未定义某种实现的声明,将其成为“外围”(We call delarations that don't define an implementation "ambient")。这些声明通常都是在`.d.ts`文件中定义的。如属性C/C++语言,那么这些文件可被看作是`.h`文件。来看看下面这些示例。
|
||||
|
||||
### 外围模块(Ambient Modules)
|
||||
|
||||
Node.js中的大多数任务,都是通过加载一个或多个模块完成的。尽管可将各个模块定义在其自己的、带有顶层导出声明的`.d.ts`文件中,不过将这些模块作为一个较大的`.d.ts`文件进行编写,则会更方便。做法就是使用一个类似与外围命名空间的结构,实际上使用`module`关键字,与在随后的导入中可以使用的模块引用名称(To do so, we use a construct similar to ambient namespaces, but we use the `module` keyword and the quoted name of the module which will be available to a later import)。比如:
|
||||
|
||||
*node.d.ts (简化摘要)*
|
||||
|
||||
```typescript
|
||||
declare module "url" {
|
||||
export interface Url {
|
||||
protocol?: string;
|
||||
hostname?: string;
|
||||
pathname?: string;
|
||||
}
|
||||
|
||||
export function parse(urlStr: string, parseQueryString?, slashesDenoteHost?): Url;
|
||||
}
|
||||
|
||||
declare module "path" {
|
||||
export function nomarlize(p: string): string;
|
||||
export function join(...paths: any[]): string;
|
||||
export var sep: string;
|
||||
}
|
||||
```
|
||||
|
||||
现在就可以 `/// <reference> node.d.ts` 并使用`import url = require("url");` 或 `import * as URL from "url"`来装入模块了。
|
||||
|
||||
```typescript
|
||||
/// <reference path="node.d.ts"/>
|
||||
|
||||
import * as URL from "url";
|
||||
let myUrl = URL.parse("http://www.typescriptlang.org");
|
||||
```
|
||||
|
||||
### 速记式外围模块(Shorthand ambient modules)
|
||||
|
||||
在不打算于使用某个新模块之前花时间编写其声明时,就可使用速记式声明特性(a shorthand declaration),以快速开工(If you don't want to take the time to write out declarations before using a new module, you can use a shorthand declaration to get started quickly)。
|
||||
|
||||
*declarations.d.ts*
|
||||
|
||||
```typescript
|
||||
declare module "hot-new-module";
|
||||
```
|
||||
|
||||
来自速记模块的所有导入,都将具有`any`类型。
|
||||
|
||||
```typescript
|
||||
import x, {y} from "hot-new-module";
|
||||
x(y);
|
||||
```
|
||||
|
||||
### 通配符式模块声明(Wildcard module declarations)
|
||||
|
||||
一些诸如`SystemJS`及`AMD`的模块加载器允许导入非JavaScript内容(Some module loaders such as SystemJS and AMD allow non-JavaScript content to be imported)。这些模块加载器通常使用前缀或后缀(a prefix or suffix)来表明特殊加载的语义。通配符式模块声明就可用来满足这些情况。
|
||||
|
||||
```typescript
|
||||
declare module "*!text" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
// 反过来的做法
|
||||
declare module "json!*" {
|
||||
const value: any;
|
||||
export default value;
|
||||
}
|
||||
```
|
||||
|
||||
现在就可以导入与`"*!text"`或`json!*`匹配的模块了。
|
||||
|
||||
```typescript
|
||||
import fileContent from "./xyz.txt!text";
|
||||
import data from "json!http://example.com/data.json";
|
||||
|
||||
console.log(data, fileContent);
|
||||
```
|
||||
|
||||
### UMD模块(UMD Modules)
|
||||
|
||||
一些库被设计为可在多种模块加载器中使用,或是不带有模块加载功能(它们采用全局变量)。这些就是所说的UMD模块。这类库的访问,是通过导入项或全局变量进行的。比如:
|
||||
|
||||
*math-lib.d.ts*
|
||||
|
||||
```typescript
|
||||
export function isPrime (x: number): boolean;
|
||||
export as namespace mathLib;
|
||||
```
|
||||
|
||||
随后该库便可作为模块内的一个导入进行使用了:
|
||||
|
||||
```typescript
|
||||
import { isPrime } from "math-lib";
|
||||
|
||||
isPrime(2);
|
||||
mathLib.isPrime(2); // 错误:在模块内部不能使用全局定义
|
||||
```
|
||||
|
||||
其也可以作为一个全局变量使用,但仅限于在脚本内部(脚本是不带有导入与导出的文件)。
|
||||
|
||||
```typescript
|
||||
mathLib.isPrime(2);
|
||||
```
|
||||
|
||||
## 模块如何组织的守则(Guidance for structuring modules)
|
||||
|
||||
***尽可能在顶层进行导入(Export as close to top-level as possible)***
|
||||
|
||||
模块消费者在使用导入的模块时,摩擦应尽可能少。加入过多层次的嵌套将导致低效,因此在打算如何组织模块上应深思熟虑(Consumers of your module should have as little friction as possible when using things that you export. Adding too many levels of nesting tends to be cumbersome, so think carefully about how you want to structure things)。
|
||||
|
||||
从模块导出命名空间,就是加入过多层数嵌套的一个示例。虽然命名空间有时有其用处,但在使用模块时它们也加入了一层额外的非直接因素。这种做法很快会变为用户的痛点,同时通常是不必要的。
|
||||
|
||||
导出类上的静态方法,有着类似问题 -- 类本身加入了一层嵌套。除非这么做提升表现力或有某种明确有用形式的意图,那么就考虑简单地导出一个辅助函数(a helper function)。
|
||||
|
||||
***如仅导出单个的`class` 或 `function`,那么请使用`export default`***
|
||||
|
||||
与`靠近顶层导出`一样,默认导出项的使用,也能减少模块消费者上的摩擦(Just as "exporting near the top-level" reduces friction on your module's consumers, so does introducing a default export)。在模块的主要目的是存放一个特定的导出时,就应考虑将其作为默认导出项进行导出。这样做令到导入与导入项的使用更为容易一些。比如:
|
||||
|
||||
*MyClass.ts*
|
||||
|
||||
```typescript
|
||||
export default class SomeType {
|
||||
constructor () { ... }
|
||||
}
|
||||
```
|
||||
|
||||
*MyFunc.ts*
|
||||
|
||||
```typescript
|
||||
export default function getThing() { return "thing"; }
|
||||
```
|
||||
|
||||
*Consumer.ts*
|
||||
|
||||
```typescript
|
||||
import t from "./MyClass";
|
||||
import f from "./MyFunc";
|
||||
|
||||
let x = new t();
|
||||
console.log(f());
|
||||
```
|
||||
|
||||
对于模块消费者,这是可选的。它们可将类型命名为它们想要的任何名字(这里的`t`),并不需要任何过度过度点缀来找到对象(They can name your type whatever they want(`t` in this case) and don't have to do any excessive dotting to find your objects)。
|
||||
|
||||
***如要导出多个对象,那么将它们一起放在顶层***
|
||||
|
||||
*MyThings.ts*
|
||||
|
||||
```typescript
|
||||
export class SomeType { /* ... */ }
|
||||
export function someFunc () { /* ... */ }
|
||||
```
|
||||
|
||||
相反,在导入时应注意以下规则:
|
||||
|
||||
***显式地列出所导入的名称(Explicitly list imported names)***
|
||||
|
||||
*Consumer.ts*
|
||||
|
||||
```typescript
|
||||
import { SomeType, someFunc } from "./MyThings";
|
||||
|
||||
let x = new SomeType();
|
||||
let y = someFunc();
|
||||
```
|
||||
|
||||
***使用命名空间导入模式,来导入较多的对象(Use the namespace import pattern if you're importing a large number of things)***
|
||||
|
||||
*MyLargeModule.ts*
|
||||
|
||||
```typescript
|
||||
export class Dog { ... }
|
||||
export class Cat { ... }
|
||||
export class Tree { ... }
|
||||
export class Flower { ... }
|
||||
```
|
||||
|
||||
*Consumer.ts*
|
||||
|
||||
```typescript
|
||||
import * as myLargeModule from "./MyLargeModule.ts";
|
||||
let x = new myLargeModule.Dog();
|
||||
```
|
||||
|
||||
### 再导出以进行扩展(Re-export to extend)
|
||||
|
||||
通常需要在某个模块上进行功能扩展。一种常见的JS模式就是使用 *扩展* 来增加原始对象,这与JQuery的扩展原理类似。如同先前提到的,模块并不会像全局命名空间对象那样 *融合*。因此推荐的做法是 *不要* 改动原始对象,而是导出一个提供新功能的新实体(A common JS pattern is to augment the original object with *extensions*, similar to how JQuery extensions work. As we've mentioned before, modules do not *merge* like global namespace objects would. The recommended solution is to *not* mutate the original object, but rather export a new entity that provides the new functionality)。
|
||||
|
||||
考虑下面这个定义在模块`Calculator.ts`中简单的计算器实现。该模块还导出了一个通过传入输入字符串清单,并在最后写出结果的,用于对计算器进行功能测试的辅助函数。
|
||||
|
||||
*Calculator.ts*
|
||||
|
||||
```typescript
|
||||
export class Calculator {
|
||||
private current = 0;
|
||||
private memory = 0;
|
||||
private operator: string;
|
||||
|
||||
protected processDigit (digit: string, currentValue: number) {
|
||||
if (digit >= "0" && digit <= "9") {
|
||||
return currentValue * 10 + (digit.charCodeAt(0) - "0".charCodeAt(0));
|
||||
}
|
||||
}
|
||||
|
||||
protected processOperator (operator: string) {
|
||||
if (["+", "-", "*", "/"].indexOf(operator) >= 0) {
|
||||
return operator;
|
||||
}
|
||||
}
|
||||
|
||||
protected evaluateOperator (operator: string, left: number, right: number): number {
|
||||
switch (this.operator) {
|
||||
case "+": return left + right;
|
||||
case "-": return left - right;
|
||||
case "*": return left * right;
|
||||
case "/": return left / right;
|
||||
}
|
||||
}
|
||||
|
||||
private evaluate () {
|
||||
if (this.operator) {
|
||||
this.memory = this.evaluateOperator(this.operator, this.memory, this.current);
|
||||
}
|
||||
else {
|
||||
this.memory = this.current;
|
||||
}
|
||||
this.current = 0;
|
||||
}
|
||||
|
||||
public handelChar (char: string) {
|
||||
if (char === "=") {
|
||||
this.evaluate();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
let value = this.processDigit(char, this.current);
|
||||
|
||||
if (value !== undefined) {
|
||||
this.current = value;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
let value = this.processOperator(char);
|
||||
|
||||
if (value !== undefined) {
|
||||
this.evaluate();
|
||||
this.operator = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error(`Unsupported input: '${char}'`);
|
||||
}
|
||||
|
||||
public getResult() {
|
||||
return this.memory;
|
||||
}
|
||||
}
|
||||
|
||||
export function test (c: Calculator, input: string) {
|
||||
for (let i = 0; i < input.length; i++){
|
||||
c.handelChar(input[i]);
|
||||
}
|
||||
|
||||
console.log(`result of '${input}' is '${c.getResult()}'`);
|
||||
}
|
||||
```
|
||||
|
||||
下面是使用所暴露出来的`test`函数的一个计算器的简单测试。
|
||||
|
||||
*TestCalculator.ts*
|
||||
|
||||
```typescript
|
||||
import { Calculator, test } from "./Calculator";
|
||||
|
||||
let c = new Calculator;
|
||||
test(c, "1+2*33/11=");
|
||||
```
|
||||
|
||||
接着将其扩展到加入对其它进制的支持,来创建`ProgrammerCalculator.ts`吧。
|
||||
|
||||
*ProgrammerCalculator.ts*
|
||||
|
||||
```typescript
|
||||
import { Calculator } from "./Calculator";
|
||||
|
||||
class ProgrammerCalculator extends Calculator {
|
||||
static digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
|
||||
|
||||
constructor (public base: number) {
|
||||
super();
|
||||
|
||||
if (base <= 0 || base > ProgrammerCalculator.digits.length) {
|
||||
throw new Error("基数必须要在0到16的范围");
|
||||
}
|
||||
}
|
||||
|
||||
protected processDigit(digit: string, currentValue: number) {
|
||||
if (Programmercalculator.digits.indexOf(digit) >= 0) {
|
||||
return currentValue * this.base + ProgrammerCalculator.digits.indexOf(digit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 将新的已扩展的计算器作为`Calculator`进行导出
|
||||
export { ProgrammerCalculator as Calculator };
|
||||
|
||||
// 还要导出辅助函数
|
||||
export { test } from "./Calculator";
|
||||
```
|
||||
|
||||
新的`ProgrammerCalculator`模块导出了一个与原始的`Calculator`模块类似的API外形,但并没有对原始模块中的任何对象进行修改。下面是对`ProgrammerCalculator`类的测试:
|
||||
|
||||
*TestProgrammerCalculator.ts*
|
||||
|
||||
```typescript
|
||||
import { Calculator, test } from "./ProgrammerCalculator";
|
||||
|
||||
let c = new Calculator(2);
|
||||
test(c, "001+010=");
|
||||
```
|
||||
|
||||
### 不要在模块中使用命名空间(Do not use namespaces in modules)
|
||||
|
||||
在初次迁移到基于模块的组织形式时,常见的倾向就是将导出项封装到一个额外的命名空间层中(When first moving to a module-based organization, a common tendency is to wrap exports in an additional layer of namespaces)。模块有着其自己的作用域,同时仅有导出的声明是从模块外部可见的。记住了这一点,就明白在使用模块时,命名空间所提供到的价值就是很有限的。
|
||||
|
||||
在组织方式前,对于将逻辑上有联系的对象与类型,在全局作用域中进行分组,命名空间是很好用的。比如在C#中,就能在`System.Collections`找到所有的集合类型。通过将类型组织到层次化的命名空间,就能为这些类型的用户提到到良好的“发现”体验。但是模块本身必然已经文件系统中有所呈现。必须通过路径与文件名来解析这些模块,因此已经有了一套可使用的逻辑组织方案。比如可有着一个包含了清单模块的`/collections/generic/`文件夹(On the organization front, namespaces are handy for grouping together logically-related objects and types in the global scope. For example, in C#, you're going to find all the collection types in `System.Collections`. By organizing our types into hierarchical namespaces, we provide a good "discovery" experience for users of those types. Modules, on the other hand, are already present in a file system, necessarily. We have to resolve them by path and filename, so there's a logical organization scheme for us to use. We can have a `/collections/generic` folder with a list module in it)。
|
||||
|
||||
命名空间特性要注意避免全局作用域下的命名冲突。比如可能存在`My.Application.Customer.AddForm`与`My.Application.Order.AddForm`两个有着同样名称而不在同一命名空间的类型。这在模块中却不成问题。在模块中,并没有要让两个对象使用相同名称的不明原因。而从消费侧来看,任何给定模块的消费者有自主选取它们用于引用该模块的名称的权力,因此偶发的命名冲突是不可能出现的(Namespaces are important to avoid naming collisions in the global scope. For example, you might have `My.Application.Customer.AddForm` and `My.Application.Order.AddForm` -- two types with the same name, but a different namespace. This, however, is not an issue with modules. Within a module, there's no plausible reason to have two objects with the same name. From the comsumption side, the consumer of any given modules gets to pick the name that they will use to refer to the modules, so accidental naming conflicts are impossible)。
|
||||
|
||||
> 关于模块与命名空间的更多讨论,请参考[命名空间与模块](15_namespaces_and_modules.md)小节。
|
||||
|
||||
## 避免事项(Red Flags)
|
||||
|
||||
所有下面列出的,都是模块组织中需要避免的。在文件中有下面之一时,对要两次检查没有试着将外部模块进行命名空间操作(All of the following are red flags for module structuring. Double-check that you're not trying to namespace your external modules if any of these apply to your files)。
|
||||
|
||||
+ 仅有一个顶层声明,且为`export namespace Foo { ... }`的文件(移除`Foo`并将所有内容进行提升,A file whose only top-level declaration is `export namespace Foo { ... }` (remove `Foo` and move everything 'up' level))
|
||||
|
||||
+ 仅有单个的`export class`或`export function`的文件(请考虑使用`export default`)
|
||||
|
||||
+ 有着相同位处顶层的`export namespace Foo {`的多个文件(一定不要认为它们会结合到同一个`Foo`中去,Multiple files that have the same `export namespace Foo {` at top-level(don't think that these are going to combine into one `Foo`!))
|
255
_book/14_namespaces.md
Normal file
255
_book/14_namespaces.md
Normal file
@ -0,0 +1,255 @@
|
||||
# 命名空间
|
||||
|
||||
> **关于术语的一点说明**:在TypeScript 1.5中需要注意的是,其中的命名法发生了改变。为了与ECMAScript 2015的命名法保持一致,"内部模块"以及被命名为“命名空间”。“外部模块”已被简化为“模块”,(名以上`module X {`与现在所指的`namespace X{`是等价的。it's important to note that in TypeScript 1.5, the nomenclature has changed. "Internal modules" are now "namespace". "External modules" are now simply "modules", as to align with ECMAScript 2015's terminology, (namely that `module X {` is equivalent to the now-preferred `namespace X{`))。
|
||||
|
||||
## 简介
|
||||
|
||||
本文指出了TypeScript中使用命名空间(也就是先前的“内部模块”)来组织代码的不同方法。正如在有关命名法的注释中所暗示的,现已使用“命名空间”来指代“内部模块”了。此外,在将`module`关键字用于声明某个内部模块时,都可以且应当使用`namespace`关键字。这样做可避免由相似命名的用词带来的负担,而令到新用户迷惑。
|
||||
|
||||
## 第一步(First Steps)
|
||||
|
||||
这里以一个将贯穿本章节的示例开始。因为可能要对用户在web页中表单上的输入,或对某个外部提供的数据文件的格式进行检查,前面在模块章节曾编写了一个小的简化字符串验证器合集。
|
||||
|
||||
**单个文件中的验证器**
|
||||
|
||||
```typescript
|
||||
interface StringValidator {
|
||||
isAcceptable (s: string): boolean;
|
||||
}
|
||||
|
||||
let lettersRegexp = /^[A-Za-z]+$/;
|
||||
let numberRegexp = /^[0-9]+$/;
|
||||
|
||||
class LettersOnlyValidator implements StringValidator {
|
||||
isAcceptable (s: string) {
|
||||
return lettersRegexp.test(s);
|
||||
}
|
||||
}
|
||||
|
||||
class ZipCodeValidator implements StringValidator {
|
||||
isAcceptable(s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
|
||||
// 一些尝试样本
|
||||
let strings = ["Hello", "98052", "101"];
|
||||
|
||||
|
||||
// 要使用的验证器
|
||||
let validators: { [s: string]: StringValidator; } = {};
|
||||
|
||||
validators["ZIP code"] = new ZipCodeValidator();
|
||||
validators["Letters only"] = new LettersOnlyValidator();
|
||||
|
||||
|
||||
// 展示各个字符串是否通过各个验证器验证
|
||||
for (let s of strings) {
|
||||
for (let name in validators) {
|
||||
let isMatch = validators[name].isAcceptable(s);
|
||||
console.log(`"${ s }" ${ isMatch ? "matches" : "does not match" } "${ name }".`);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 命名空间化(Namespacing)
|
||||
|
||||
随着更多验证器的加入,就将想有着某种组织方案,从而可对类型加以跟踪,并不必担心与其它对象的名称冲突。可将这些对象封装到命名空间,以取代将很多不同名称放到全局命名空间的落后方式(As we add more validators, we're going to want to have some kind of organization scheme so that we can keep track of our types and not worry about name collisions with other objects. Instead of putting lots of different names into the global namespace, let's wrap up our objects into a namespace)。
|
||||
|
||||
在本例中,将把所有验证器相关的实体,移入到一个叫做`Validation`的命名空间中。因为想要这里的接口与类对外部可见,所以要使用`export`来为它们建立索引。反过来,变量`lettersRegexp`与`numberRegexp`则是实现细节,因此它们会保持非导出状态,且对命名空间外部不可见。在该文件底部的测试代码中,在命名空间外部使用这些类型时,就需要对这些类型的名称进行修饰了,比如`Validation.LettersOnlyValidator`。
|
||||
|
||||
**已命名空间化的验证器**
|
||||
|
||||
```typescript
|
||||
namespace Validation {
|
||||
export interface StringValidator {
|
||||
isAcceptable (s: string): boolean;
|
||||
}
|
||||
|
||||
const lettersRegexp = /^[A-Za-z]+$/;
|
||||
const numberRegexp = /^[0-9]+$/;
|
||||
|
||||
export class LettersOnlyValidator implements StringValidator {
|
||||
isAcceptable (s: string) {
|
||||
return lettersRegexp.test(s);
|
||||
}
|
||||
}
|
||||
|
||||
export class ZipCodeValidator implements StringValidator {
|
||||
isAcceptable(s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 一些尝试样本
|
||||
let strings = ["Hello", "98052", "101"];
|
||||
|
||||
// 要使用的验证器
|
||||
let validators: { [s: string]: Validation.StringValidator; } = {};
|
||||
|
||||
validators["ZIP code"] = new Validation.ZipCodeValidator();
|
||||
validators["Letters only"] = new Validation.LettersOnlyValidator();
|
||||
|
||||
|
||||
// 展示各个字符串是否通过各个验证器验证
|
||||
for (let s of strings) {
|
||||
for (let name in validators) {
|
||||
let isMatch = validators[name].isAcceptable(s);
|
||||
console.log(`"${ s }" ${ isMatch ? "matches" : "does not match" } "${ name }".`);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 拆分到多个文件(Splitting Across Files)
|
||||
|
||||
随着应用日益增长,就有将代码拆分到多个文件的想法,目的是令代码易于维护。
|
||||
|
||||
### 多文件命名空间(Multi-file namespace)
|
||||
|
||||
下面将把上面的命名空间`Validation`,拆分到许多文件(Here, we'll split our `Validation` namespace across many files)。尽管这些文件是分立的,它们却都能贡献到同一命名空间,且可以像是定义在一处那样被消费。因为文件之间存在依赖,所以将添加 **参考标志**(reference tags),来告诉编译器文件之间的关系。此外,测试代码并没有改动。
|
||||
|
||||
*Validation.ts*
|
||||
|
||||
```typescript
|
||||
namespace Validation {
|
||||
export interface StringValidator {
|
||||
isAcceptable (s: string): boolean;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*LettersOnlyValidator.ts*
|
||||
|
||||
```typescript
|
||||
/// <reference path="Validation.ts">
|
||||
namespace Validation {
|
||||
const lettersRegexp = /^[A-Za-z]+$/;
|
||||
|
||||
export class LettersOnlyValidator implements StringValidator {
|
||||
isAcceptable (s: string) {
|
||||
return lettersRegexp.test(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*ZipCodeValidator.ts*
|
||||
|
||||
```typescript
|
||||
/// <reference path="Validation.ts">
|
||||
namespace Validation {
|
||||
const numberRegexp = /^[0-9]+$/;
|
||||
|
||||
export class ZipCodeValidator implements StringValidator {
|
||||
isAcceptable(s: string) {
|
||||
return s.length === 5 && numberRegexp.test(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Test.ts*
|
||||
|
||||
```typescript
|
||||
/// <reference path="Validation.ts">
|
||||
/// <reference path="LettersOnlyValidator.ts">
|
||||
/// <reference path="ZipCodeValidator.ts">
|
||||
|
||||
// 一些尝试样本
|
||||
let strings = ["Hello", "98052", "101"];
|
||||
|
||||
// 要使用的验证器
|
||||
let validators: { [s: string]: Validation.StringValidator; } = {};
|
||||
|
||||
validators["ZIP code"] = new Validation.ZipCodeValidator();
|
||||
validators["Letters only"] = new Validation.LettersOnlyValidator();
|
||||
|
||||
|
||||
// 展示各个字符串是否通过各个验证器验证
|
||||
for (let s of strings) {
|
||||
for (let name in validators) {
|
||||
let isMatch = validators[name].isAcceptable(s);
|
||||
console.log(`"${ s }" ${ isMatch ? "matches" : "does not match" } "${ name }".`);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
在涉及到多个文件时,就需要确保所有已编译的代码得到加载。而确保所有已编译代码得到加载的方式,有两种。
|
||||
|
||||
第一种,可使用级联输出(concatenated output)。就是使用`--outFile`编译选项,来将所有输入文件,编译到一个单独的输出文件中。
|
||||
|
||||
```bash
|
||||
tsc --outFile sample.js Test.ts
|
||||
```
|
||||
|
||||
基于这些文件中所出现的参考标志,编译器将自动对输出文件进行排序。还可以对各个文件进行单独指定:
|
||||
|
||||
```bash
|
||||
tsc --outFile sample.js Validation.ts LettersOnlyValidator.ts ZipCodeValidator.ts Test.ts
|
||||
```
|
||||
|
||||
第二种方式,就是各个文件的单独编译(这是默认的做法),从而为每个输入文件都生成一个JavaScript文件。在产生了多个JS文件后,就需要在网页上使用`<script>`标签,来将各个生成的文件以适当顺序进行加载,比如:
|
||||
|
||||
*MyTestPage.html(片段)*
|
||||
|
||||
```html
|
||||
<script src="Validation.js" type="text/javascript" />
|
||||
<script src="LettersOnlyValidarot.js" type="text/javascript" />
|
||||
<script src="ZipCodeValidator.js" type="text/javascript" />
|
||||
<script src="Test.js" type="text/javascript" />
|
||||
```
|
||||
|
||||
## 别名(Alias)
|
||||
|
||||
另一种可简化命名空间使用的方式,就是使用`import q = x.y.z`,来为一些常用对象创建较短名称(Another way that you can simplify working with of namespaces is to use `import q = x.y.z` to create shorter names for commonly-used objects)。请将此种语法不要与用于加载模块的`import x = require("name")`语法搞混,此种语法只是简单地创建一个指定符号的别名。对于任何种类的标识符,包括模块导入项所建立的对象,都可以使用这类的导入(通常被称作别名,You can use these sorts of imports(commonly referred to as aliases) for any kind of identifier, including objects created from module imports)。
|
||||
|
||||
```typescript
|
||||
namespace Shapes {
|
||||
export namespace Polygons {
|
||||
export class Triangle {}
|
||||
export class Square {}
|
||||
}
|
||||
}
|
||||
|
||||
import polygons = Shapes.Polygons;
|
||||
let sq = new polygons.Square(); // 与 `new Shapes.Polygons.Square()` 效果一样
|
||||
```
|
||||
|
||||
注意这里没有使用`require`关键字;而是直接从所导入的符号的合格名称进行赋值。这就与使用`var`关键字类似,但也在所导入的符号的类型与命名空间涵义上有效。重要的是,对于数值来说,`import`则相对于原始符号,是不同的引用,因此对别名化的`var`的修改,将不会反映到原始变量(instead we assign directly from the qualified name of the symbol we're importing. This is similar to using `var`, but also works on the type and namespace meanings of the imported symbol. Importantly, for values, `import` is a distinct reference from the original symbol, so changes to an aliased `var` will not be reflected in the original variable)。
|
||||
|
||||
## 与其它JavaScript库的交互(Working with Other JavaScript Libraries)
|
||||
|
||||
为对那些不是以TypeScript编写的库的外形进行描述,需要声明该库所暴露出的API。因为大多数的JavaScript库都仅会暴露少数几个的顶级对象,所以命名空间是一种对这些库进行表示的好方式(To describe the shape of libraries not written in TypeScript, we need to declare the API that the library exposes. Because most JavaScript libraries expose only a few top-level objects, namespaces are a good way to represent them)。
|
||||
|
||||
对于那些没有对实现进行定义的声明,这里将其成为“外围”声明。外围声明通常都是定义在`.d.ts`文件中的。如对C/C++较为熟悉,那么可将这些`.d.ts`文件,看作是`.h`文件。下面是一些示例。
|
||||
|
||||
### 外围命名空间(Ambient Namespaces)
|
||||
|
||||
流行库[D3](https://d3js.org/)就是在叫做`d3`的全局对象中定义其功能的。因为该库是通过`<script>`标签(而不是模块加载器)加载的,所以其声明使用了命名空间来定义其外形。要让TypeScript的编译器看到该外形,就要使用外围命名空间声明(an ambient namespace declaration)。比如,可像下面这样开始编写该外围命名空间声明:
|
||||
|
||||
*D3.d.ts (简化摘抄)*
|
||||
|
||||
```typescript
|
||||
declare namespace D3 {
|
||||
export interface Selectors {
|
||||
select: {
|
||||
(selector: string): Selection;
|
||||
(element: EventTarget): Selection;
|
||||
}
|
||||
}
|
||||
|
||||
export interface Event {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export interface Base extends Selectors {
|
||||
event: Event;
|
||||
}
|
||||
}
|
||||
|
||||
declare var d3: D3.Base;
|
||||
```
|
||||
|
||||
|
100
_book/15_modules_and_namespaces.md
Normal file
100
_book/15_modules_and_namespaces.md
Normal file
@ -0,0 +1,100 @@
|
||||
# 命名空间与模块
|
||||
|
||||
> **关于术语的一点说明**:在TypeScript 1.5中需要注意的是,其中的命名法发生了改变。为了与ECMAScript 2015的命名法保持一致,"内部模块"以及被命名为“命名空间”。“外部模块”已被简化为“模块”,(名以上`module X {`与现在所指的`namespace X{`是等价的。it's important to note that in TypeScript 1.5, the nomenclature has changed. "Internal modules" are now "namespace". "External modules" are now simply "modules", as to align with ECMAScript 2015's terminology, (namely that `module X {` is equivalent to the now-preferred `namespace X{`))。
|
||||
|
||||
## 简介
|
||||
|
||||
本文对TypeScript中使用命名空间与模块进行代码组织的多种方式进行了说明。还将对如何使用命名空间与模块中的一些复杂问题进行分析,并就TypeScript中它们的使用上的一些常见陷阱,进行排除。
|
||||
|
||||
关于模块与命名空间的更多信息,请分别参阅[模块](13_moduels.md)与[命名空间](14_namespaces.md)章节。
|
||||
|
||||
## 使用命名空间(Using Namespaces)
|
||||
|
||||
简单来说,命名空间就是全局命名空间中的一些命名的JavaScript对象。这就令到命名空间成其为一种可用的、非常简单的解构(Namespaces are simply named JavaScript objects in the global namespace. This makes namespaces a very simple construct to use)。它们可以跨越多个文件,并可通过使用`--outFile`编译选项进行级联。对于Web应用中代码的结构化,就是将所有依赖都作为HTML页面中`<script>`标签进行包含来说,命名空间可作为一个良好方法。
|
||||
|
||||
与所有全局命名空间污染一样,命名空间的使用仍有着难于识别组件依赖的问题,尤其实在大型应用中。
|
||||
|
||||
## 使用模块(Using Modules)
|
||||
|
||||
与命名空间一样,模块也可包含代码与声明。主要的不同就是模块 *声明* 了它们的依赖。
|
||||
|
||||
模块同样有着模块加载器的依赖(比如CommonJS/Require.js,Modules also have a dependency on a module loader(such as CommonJS/Require.js))。对于小型JS应用,这可能不是最优的,但对于较大型应用,却可受益于长期的模块化与可维护性所带来的开销。模块提供了更佳的代码重用、更强的隔离与更好的捆绑工具支持(Modules provide for better code reuse, stronger isolation and better tooling support for bundling)。
|
||||
|
||||
值得指出的是,对于Node.js应用,模块是组织代码的默认及推荐方法。
|
||||
|
||||
从ECMAScript 2015开始,模块已经是该语言的原生部分,同时应被所有兼容殷勤实现所支持。因此,模块应作为新项目的推荐代码组织机制。
|
||||
|
||||
## 命名空间与模块的一些陷阱(Pitfalls of Namespaces and Modules)
|
||||
|
||||
本小节将对在使用命名空间与模块中的一些常见陷阱,以及如何避免它们进行描述。
|
||||
|
||||
### `/// <reference>-ing a moudle` (使用`///` 语法对模块的引用)
|
||||
|
||||
一个常见错误,就是尝试使用`/// <reference ... />`语法,而不是使用`import`语句,来对模块文件进行引用。为对这两种语法进行区分,首先需要搞清楚编译器是如何根据某个`import`的路径(比如`import x from "...";`中的`...`),来定位某个模块的类型信息的。
|
||||
|
||||
编译器将尝试在应用路径下找到一个`.ts`、`.tsx`及随后的`.d.ts`文件。如找不到特定文件,那么编译器将查找某个 *外围模块声明*(an *ambient module declaration*)。回顾一下就知道这些(外围模块声明)需在某个`.d.ts`文件中进行定义。
|
||||
|
||||
+ `myModule.d.ts`
|
||||
|
||||
```typescript
|
||||
// 应在某个`.d.ts`文件,或一个非模块的`.ts`文件中
|
||||
declare module "SomeModule" {
|
||||
export function fn(): string;
|
||||
}
|
||||
```
|
||||
|
||||
+ `myOtherModule.ts`
|
||||
|
||||
```typescript
|
||||
/// <reference path="myModule.d.ts" />
|
||||
import * as m from "SomeModule";
|
||||
```
|
||||
|
||||
这里用到的引用标签,允许对包含了外围模块声明的声明文件进行定位。这就是多个TypeScript示例所使用的`node.d.ts`被消费的方式(The reference tag here allows us to locate the declaration file that contains the declaration for the ambient module. This is how the `node.d.ts` file that several of the TypeScript samples use is consumed)。
|
||||
|
||||
### 不必要的命名空间化(Needless Namespacing)
|
||||
|
||||
如正将某个程序从命名空间式转换为模块式,就很容易得到一个像是下面的程序:
|
||||
|
||||
+ `shapes.ts`
|
||||
|
||||
```typescript
|
||||
export namespace Shapes {
|
||||
export class Triangle { /* ... */ }
|
||||
export class Square { /* ... */ }
|
||||
}
|
||||
```
|
||||
|
||||
这里的顶层模块`Shapes`毫无理由的封装了`Triange`与`Square`。这样做对于模块消费者来说,是令人困惑与烦人的。
|
||||
|
||||
+ `shapeConsumer.ts`
|
||||
|
||||
```typescript
|
||||
import * as shapes from "./shapes";
|
||||
|
||||
let t = new shapes.Shapes.Triangle(); // shapes.Shapes, 真的吗?
|
||||
```
|
||||
|
||||
TypeScript中模块的关键特性,就是连个不同的模块,绝不会将其名称放在同一作用域中。因为是由模块的消费者来决定将什么药的名称指派模块,所以不需要主动地将所导出的符号,封装到某个命名空间中(A key feature of modules in TypeScript is that two different modules will never contribute names to the same scope. Because the consumer of a module decides what name to assign it, there's no need to proactively wrap up the exported symbols in a namespace)。
|
||||
|
||||
为对为何不应对模块内容进行命名空间化操作进行重申,要知道命名空间化的一般构思,就是为了提供结构体的逻辑分组,以及防止名称上的冲突。因为模块文件本身就已经是逻辑分组的了,同时其顶层名称也已经通过其导入代码进行了定义,因此为已导出对象而使用一个额外模块层就是不必要的了。
|
||||
|
||||
下面是一个修订后的示例:
|
||||
|
||||
+ `shapes.ts`
|
||||
|
||||
```typescript
|
||||
export class Triangle { /* ... */ }
|
||||
export class Square { /* ... */ }
|
||||
```
|
||||
|
||||
+ `shapeConsumer.ts`
|
||||
|
||||
```typescript
|
||||
import * as shapes from "./shapes";
|
||||
let t = new shapes.Triangle();
|
||||
```
|
||||
|
||||
## 模块的权衡(Trade-offs of Modules)
|
||||
|
||||
JS文件与模块之间有着一一对应关系,与之一样,TypeScript在模块源文件和它们所生成的文件之间,也有着一一对应关系。这一特征的一个影响就是,无法将多个依据目标模块系统的模块源文件级联起来(One effect of this is that it's not possible to concatenate multiple source files depending on the module system you target)。比如就在目标模块系统为`commonjs`或`umd`时,无法使用`--outFile`编译选项,但在TypeScript 1.8之后的版本中,在以`amd`或`system`为目标模块系统时,使用`--outFile`选项是可能的。
|
468
_book/16_module_resolution.md
Normal file
468
_book/16_module_resolution.md
Normal file
@ -0,0 +1,468 @@
|
||||
# 模块解析
|
||||
|
||||
**Module Resolution**
|
||||
|
||||
> 本章节假定已对模块的一些基本知识有所掌握。请参阅[模块](13_modules.md)了解更多信息。
|
||||
|
||||
*模块解析* 是编译器用于弄清导入项引用的是什么的过程( *Module resolution* is the process the compiler uses to figure out what an import refers to)。请想想`import { a } from "moduleA"`这样的导入语句;为了对`a`的所有使用进行检查,编译器就需要准确地知道其代表的是什么,且将对其定义`moduleA`进行检查。
|
||||
|
||||
此刻,编译器就会询问“`moduleA`的外形是什么?”,尽管这听起来很直截,`moduleA`则可能是定义在某个`.ts/.tsx`文件中,或这在代码所依赖的某个`.d.ts`文件中。
|
||||
|
||||
首先,编译器将尝试找到代表所导入模块的文件。编译器依据两种不同策略之一完成这一步:经典方式或节点方式(First, the compiler will try to locate a file that represents the imported module. To do so the compiler follows one of two different strategies: Classic or Node)。这两种策略告诉编译器去 *哪里* 查找`moduleA`。
|
||||
|
||||
如两种策略都不奏效且模块名称是非相对的(在`moduleA`这种情况下,模块名称就是相对的),那么编译器将尝试定位一个外围模块声明(ambient module declaration)。接下来会对非相对导入项进行讨论。
|
||||
|
||||
最后,在编译器无法对模块进行解析是,就会记录一个错误。在这种情况下,错误将为像是`error TS2307: Cannot find module 'moduleA'.`这样的。
|
||||
|
||||
### 相对与非相对模块导入项(Relative vs. Non-relative module imports)
|
||||
|
||||
根据模块引用为相对或非相对的不同,模块导入项的解析会有所不同(Module imports are resolved differently based on whether the module reference is relative or Non-relative)。
|
||||
|
||||
|
||||
*相对导入项* 就是以 `/`、`./`或`../`开头的导入项。下面是一些示例:
|
||||
|
||||
+ `import Entry from "./components/Entry";`
|
||||
|
||||
+ `import { DefaultHeaders } from "../constants/http";`
|
||||
|
||||
+ `import "/mod";`
|
||||
|
||||
除此之外所有其它导入都被认为是 **非相对** 的。下面是一些示例:
|
||||
|
||||
+ `import * as $ from "jquery";`
|
||||
|
||||
+ `import { Component } from "@angular/core";`
|
||||
|
||||
相对导入项被解析为相对于导入文件,并 *无法* 解析为外围模块声明。对于自己的可在运行时保证其相对位置维护的模块,可使用相对导入项( You should use relative imports for your own modules that are guaranteed to maintain their relative location at runtime)。
|
||||
|
||||
非相对导入则可被解析为相对于`baseUrl`,或通过下面将讲到的路径映射(A non-relative import can be resolved relative to `baseUrl`, or through path mapping, which we'll cover below)。非相对导入项也可解析到外围模块声明。在导入所有外部依赖时,都要使用非相对路径(Use non-relative paths when importing any of your external dependencies)。
|
||||
|
||||
### 模块解析策略(Module Resolution Strategies)
|
||||
|
||||
模块解析策略有两种:节点策略与经典策略。可使用`--moduleResoluton`选项来指定模块解析策略。在没有指定时,对于`--module AMD | System | ES2015`的默认策略是经典策略,对其它模块,默认策略是节点策略。
|
||||
|
||||
### 经典策略(Classic)
|
||||
|
||||
该模块解析策略曾是TypeScript的默认解析策略。如今,该策略主要是为向后兼容性而保留。
|
||||
|
||||
相对导入项将被解析为相对于导入文件。因此源文件`/root/src/folder/A.ts`中的`import { b } from "./moduleB"`将导致以下查找:
|
||||
|
||||
1. `/root/src/folder/moduleB.ts`
|
||||
|
||||
2. `/root/src/folder/moduleB.d.ts`
|
||||
|
||||
而对于非相对导入项,编译器就唤醒以包含导入文件开始的目录树,尝试定位匹配的定义文件。
|
||||
|
||||
比如:
|
||||
|
||||
在源文件`/root/src/folder/A.ts`中到`moduleB`的一个非相对导入项,比如`import { b } from "moduleB"`,将导致尝试在下面的位置,对`moduleB`进行定位:
|
||||
|
||||
1. `/root/src/folder/moduleB.ts`
|
||||
|
||||
2. `/root/src/folder/moduleB.d.ts`
|
||||
|
||||
3. `/root/src/moduleB.ts`
|
||||
|
||||
4. `/root/src/moduleB.d.ts`
|
||||
|
||||
5. `/root/moduleB.ts`
|
||||
|
||||
6. `/root/moduleB.d.ts`
|
||||
|
||||
7. `/root/moduleB.ts`
|
||||
|
||||
8. `/root/moduleB.d.ts`
|
||||
|
||||
|
||||
### 节点策略(Node)
|
||||
|
||||
此解析策略尝试在运行时对`Node.js`的模块解析机制进行模仿(This resolution strategy attempts to mimic the Node.js module resolution mechanism at runtime)。完整的Node.js解析算法在[Node.js模块文档](https://nodejs.org/api/modules.html#modules_all_together)中有说明。
|
||||
|
||||
*Node.js是如何解析模块的*
|
||||
|
||||
要理解TypeScript所跟随的脚步,就要对Node.js模块有进一步了解。
|
||||
|
||||
传统上,Node.js中的导入是通过调用一个名为`require`的函数完成的。根据给予`require`函数的是一个相对路径或绝对路径,Node.js所采取的做法会有所不同。
|
||||
|
||||
相对路径就相当直接。比如,考虑一个包含了`var x = require("./moduleB");`,位于`/root/src/moduleA.js`的文件,Node.js就会按照以下顺序对那个导入进行解析:
|
||||
|
||||
1. 如存在名为`/root/src/moduleB.js`的文件,就询问该文件。
|
||||
|
||||
2. 如文件夹`/root/src/moduleB`包含了名为`package.json`、指定了一个`"main"`模块的文件,那么就对该文件夹进行询问。在这个示例中,如Node.js发现文件`/root/src/moduleB/package.json`中包含`{ "main": "lib/mainModule.js" }`,那么Node.js将引用到`/root/src/moduleB/lib/mainModule.js`。
|
||||
|
||||
3. 询问文件夹`/root/src/moduleB`是否包含一个名为`index.js`的文件。那个文件被显式地认为是那个文件夹的`main`模块。
|
||||
|
||||
有关此方面的内容,可参考Node.js的文档中[文件模块](https://nodejs.org/api/modules.html#modules_file_modules)与[文件夹模块](https://nodejs.org/api/modules.html#modules_folders_as_modules)的内容。
|
||||
|
||||
但对[非相对模块名称](https://www.typescriptlang.org/docs/handbook/module-resolution.html#relative-vs-non-relative-module-imports)的解析,则是不同的。Node.js将在名为`node_modules`的特殊文件夹中查找。`node_modules`文件夹可以与当前文件在同一级别,或在目录链中的更高级别。Node.js将唤醒该目录链,将各个`node_modules`找个遍,直到找到尝试载入的模块为止。
|
||||
|
||||
接着上面的示例,试想在`/root/src/moduleA.js`使用了非相对路径并有着`var x = require("moduleB");`。那么Node就会尝试将`moduleB`解析到下面这些位置,知道某个位置工作。
|
||||
|
||||
1. `/root/src/node_modules/moduleB.js`
|
||||
|
||||
2. `/root/src/node_modules/moduleB/package.json` (在该文件指明了一个`main`属性时)
|
||||
|
||||
3. `/root/src/node_modules/moduleB/index.js`
|
||||
|
||||
|
||||
|
||||
4. `/root/node_modules/moduleB.js`
|
||||
|
||||
5. `/root/node_modules/moduleB/package.json` (在该文件指明了一个`main`属性时)
|
||||
|
||||
6. `/root/node_modules/moduleB/index.js`
|
||||
|
||||
|
||||
|
||||
|
||||
7. `/node_modules/moduleB.js`
|
||||
|
||||
8. `/node_modules/moduleB/package.json` (在该文件指明了一个`main`属性时)
|
||||
|
||||
9. `/node_modules/moduleB/index.js`
|
||||
|
||||
|
||||
请注意在第4及7步Node.js都往上跳了一个目录。
|
||||
|
||||
可从Node.js文档中有关[从`node_modules`加载模块](https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders)部分,了解更多此过程的信息。
|
||||
|
||||
## TypeScript解析模块的方式(How TypeScript resolves modules)
|
||||
|
||||
为了在编译时对模块的定义文件进行定位,TypeScript将模仿Node.js的运行时解析策略(the Node.js run-time resolution strategy)。为达到此目的,TypeScript以TypeScript源文件扩展名(`.ts`、`.tsx`及`.d.ts`)来覆盖Node的解析逻辑。TypeScript也将使用`package.json`中的一个名为`"types"`的字段,来反映Node.js中`"main"`的目的 -- 编译器将使用`"types"`字段来找到需要参考的“main”定义文件(To accomplish this, TypeScript overlays the TypeScript source file extensions(`.ts`, `.tsx`, and `.d.ts`) over the Node's resolution logic. TypeScript will also use a field in `package.json` names `"types"` to mirror the purpose of `"main"` -- the compiler will use it to find the "main" definition file to consult)。
|
||||
|
||||
|
||||
比如,一个`/root/src/moduleA.ts`中像`import { b } from "./moduleB";`的导入语句,将导致编译器尝试在一下位置对`"./moduleB"`进行定位:
|
||||
|
||||
1. `/root/src/moduleB.ts`
|
||||
|
||||
2. `/root/src/moduleB.tsx`
|
||||
|
||||
3. `/root/src/moduleB.d.ts`
|
||||
|
||||
4. `/root/src/moduleB/package.json` (如`package.json`中指明了`types`属性)
|
||||
|
||||
5. `/root/src/moduleB/index.ts`
|
||||
|
||||
6. `/root/src/moduleB/index.tsx`
|
||||
|
||||
7. `/root/src/moduleB/index.d.ts`
|
||||
|
||||
|
||||
回想上面,Node.js就是先查找名为`moduleB.js`的文件,再查找一个应用的`package.json`,随后再查找一个`index.js`的。
|
||||
|
||||
与此类似,对于非相对导入项,也会依循Node.js的解析逻辑,首先查找文件,再查找应用文件夹(an application folder)。因此源文件`/root/src/moduleA.ts`中的`import { b } from "moduleB";`将导致下面的查找:
|
||||
|
||||
1. `/root/src/node_modules/moduleB.ts`
|
||||
|
||||
2. `/root/src/node_modules/moduleB.tsx`
|
||||
|
||||
3. `/root/src/node_modules/moduleB.d.ts`
|
||||
|
||||
|
||||
4. `/root/src/node_modules/moduleB/package.json` (在其指明了`types`属性时)
|
||||
|
||||
5. `/root/src/node_modules/moduleB/index.ts`
|
||||
|
||||
6. `/root/src/node_modules/moduleB/index.tsx`
|
||||
|
||||
7. `/root/src/node_modules/moduleB/index.d.ts`
|
||||
|
||||
|
||||
8. `/root/node_modules/moduleB.ts`
|
||||
|
||||
9. `/root/node_modules/moduleB.tsx`
|
||||
|
||||
10. `/root/node_modules/moduleB.d.ts`
|
||||
|
||||
|
||||
11. `/root/node_modules/moduleB/package.json` (在其指明了`types`属性时)
|
||||
|
||||
12. `/root/node_modules/moduleB/index.ts`
|
||||
|
||||
13. `/root/node_modules/moduleB/index.tsx`
|
||||
|
||||
14. `/root/node_modules/moduleB/index.d.ts`
|
||||
|
||||
|
||||
15. `/node_modules/moduleB.ts`
|
||||
|
||||
16. `/node_modules/moduleB.tsx`
|
||||
|
||||
17. `/node_modules/moduleB.d.ts`
|
||||
|
||||
|
||||
|
||||
18. `/node_modules/moduleB/package.json` (在其指明了`types`属性时)
|
||||
|
||||
19. `/node_modules/moduleB/index.ts`
|
||||
|
||||
20. `/node_modules/moduleB/index.tsx`
|
||||
|
||||
21. `/node_modules/moduleB/index.d.ts`
|
||||
|
||||
|
||||
不要被这里的步数吓到 -- TypeScript仍只是在第8和15步处两次网上跳了一个目录而已。这与Node.js所做的,也并没有更复杂。
|
||||
|
||||
### 额外的模块解析开关(Additional module resolution flags)
|
||||
|
||||
在有的时候,项目源代码布局并不与输出所匹配。通常有一套的构建步骤,来生成最终结果(A project source layout sometimes does not match that of the output. Usually a set of build steps result in generating the final output)。这些步骤包括将`.ts`文件编译为`.js`文件,以及将不同源代码位置的依赖,拷贝到单个的输出位置。最终结果就是运行时的模块,可能有着与包含这些模块定义的源文件所不同的名称。或者最后输出中的模块路径,可能与编译时这些模块所对应的源文件路径不一致。
|
||||
|
||||
TypeScript编译器有着一套额外选项,以 *告知* 编译器为了生成最终输出,而期望对源程序进行的一些调整(The TypeScript compiler has a set of additional flags to *inform* the compiler of transformations that expected to happen to the sources to generate the final output)。
|
||||
|
||||
比如`baseUrl`的设置,就可告诉编译器在何处去找到模块。所有非相对名称的模块导入项,都被假定相对于`baseUrl`。
|
||||
|
||||
*baseUrl*的值,取决于以下两个因素:
|
||||
|
||||
+ `baseUrl`值的命令行参数(如给出的路径为相对路径,那么`baseUrl`的值就根据当前路径计算得出)
|
||||
|
||||
+ 'tsconfig.json'中`baseUrl`属性的值(如果该属性值为相对的,那么`baseUrl`的值就根据'tsconfg.json'的位置计算得出)
|
||||
|
||||
注意相对模块导入项是不受baseUrl设置的影响的,因为因为相对模块导入项,总是被解析到相对于它们的导入文件。
|
||||
|
||||
有关baseUrl的更多信息,请参考[RequireJS](http://requirejs.org/docs/api.html#config-baseUrl)及[SystemJS](https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#baseurl)的文档。
|
||||
|
||||
### 路径映射(Path mapping)
|
||||
|
||||
模块有的时候并不是直接位于 *baseUrl* 下。比如,到模块`jquery`的导入项,就会在运行时被翻译到`node_modules/jquery/dist/jquery.slim.min.js`。加载器使用映射配置(a mapping configuration),以在运行时将模块名称映射到文件,请参阅[RequireJS 文档](http://requirejs.org/docs/api.html#config-paths)与[SystemJS 文档](https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#paths)。
|
||||
|
||||
TypeScript编译器通过在`tsconfig.json`文件中使用`paths`属性,来支持此类映射的声明(The TypeScript compiler supports the declaration of such mappings using `paths` in `tsconfig.json` files)。下面是一个如何为`jquery`指定`paths`属性的示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".", // 如指定了"paths", 那么就必须指定"baseUrl"
|
||||
"paths": {
|
||||
"jquery": ["node_modules/jquery/dist/jquery"] // 该映射是相对于baseUrl的
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
请注意`"paths"`是被解析到相对于`"baseUrl"`的。在将`"baseUrl"`设置为非`"."`时,比如`tsconfig.json`的目录时,映射也必须进行相应修改。也就是说,在将上面的示例设置为`"baseUrl": "./src"`后,jquery就应被映射到`"../node_modules/jquery/dist/jquery"`。
|
||||
|
||||
`"paths"`的使用,可实现包括设置多个错误回退位置特性等的较复杂映射机制(Using `"paths"` also allows for more sophisticated mappings including multiple fall back locations)。设想某个项目的配置中,在一个位置仅有部分模块是可用的,其余则是在另一处的情形。构建步骤就会将这些不同位置的模块放在一个地方。该项目布局看起来像这样:
|
||||
|
||||
```bash
|
||||
projectRoot
|
||||
├── folder1
|
||||
│ ├── file1.ts (imports 'folder1/file2' and 'folder2/file3')
|
||||
│ └── file2.ts
|
||||
├── generated
|
||||
│ ├── folder1
|
||||
│ └── folder2
|
||||
│ └── file3.ts
|
||||
└── tsconfig.json
|
||||
```
|
||||
|
||||
那么相应的`tsconfig.json`就应像这样了:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"*",
|
||||
"generated/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
这样做就告诉编译器,对于所有与模式`"*"`(也就是所有值)匹配的模块导入项,要在两个地方进行查找:
|
||||
|
||||
1. `"*"`: 意指未改变的同一名称,因此映射为`<moduleName> => <baseUrl>/<moduleName>`
|
||||
|
||||
2. `"generated/*"` 意指带有追加了前缀"generated"的模块名称,因此映射为 `<moduleName> => <baseUrl>/generated/<moduleName>`
|
||||
|
||||
那么按照此逻辑,编译器将如下对这两个导入项进行解析:
|
||||
|
||||
+ 对于导入项'folder1/file2':
|
||||
|
||||
1. 匹配了模式`'*'`,同时通配符捕获到整个名称
|
||||
|
||||
2. 尝试清单中的第一个代换(substitution):`'*'`, 从而得到 `folder1/file2`
|
||||
|
||||
3. 代换结果为非相对名称 -- 将其与 *baseUrl* 结合,得到 `projectRoot/folder1/file2.ts`
|
||||
|
||||
4. 该文件存在。解析成功。
|
||||
|
||||
+ 对于导入项'folder2/file3'
|
||||
|
||||
1. 匹配了模式`"*"`,且通配符捕获到整个模块名称
|
||||
|
||||
2. 尝试清单中的第一个代换: `'*' -> folder2/file3`
|
||||
|
||||
3. 代换结果为非相对名称 -- 将其与 *baseUrl* 结合,得到`projectRoot/folder2/file3.ts`
|
||||
|
||||
4. 文件不存在,移至第二个代换
|
||||
|
||||
5. 第二个代换 `generated/*` 得到 `generated/folder2/file3`
|
||||
|
||||
6. 代换结果为非相对名称 -- 将其与 *baseUrl* 结合,得到 `projectRoot/generated/folder2/file3.ts`
|
||||
|
||||
7. 文件存在,解析完毕。
|
||||
|
||||
|
||||
### 使用`rootDirs`的虚拟目录(Virtual Directories with `rootDirs`)
|
||||
|
||||
有时,编译时多个目录的全部项目源码,都要被结合在一起,从而生成一个单一的输出目录。这种做法可被视为由一个源代码目录集合,创建出一个“虚拟”目录(This can be viewed as a set of source directories create a "virtual" directory)。
|
||||
|
||||
通过使用`'rootDirs'`选项(在`tsconfig.json`中),就可以告知编译器组成该“虚拟”路径的 “roots”(根目录);而因此编译器就可以在这些“根目录”中, *像是* 在单个目录中融合在一起那样,对这些相对模块导入项进行解析了(Using `"rootDirs"`, you can inform the compiler of the *roots* making up this "virtual" directory; and thus the compiler can resolve relative modules imports within these "virtual" directories *as if* were merged together in one directory)。
|
||||
|
||||
试想下面的项目解构作为示例:
|
||||
|
||||
```bash
|
||||
src
|
||||
└── views
|
||||
└── view1.ts (imports './template1')
|
||||
└── view2.ts
|
||||
|
||||
generated
|
||||
└── templates
|
||||
└── views
|
||||
└── template1.ts (imports './view2')
|
||||
```
|
||||
|
||||
`src/views`中的文件是一些UI控件的用户代码。`generated/templates`中的文件则是由模板生成器自动生成的、作为构建一部分的UI模板绑定代码。构建的一步,将把`/src/views`与`/generated/templates/views`中的文件进行拷贝到输出中的同一目录。而在运行时,某个视图就可以期望它的模板是存在于它旁边的,并因此而可以使用一个如同`"./template"`这样的相对名称,对模板进行导入(A build step will copy the files in `/src/views` and `/generated/templates/views` to the same directory in the output. At run-time, a view can expect its template to exist next to ti, and thus should import it using a relative name as `"./template"`)。
|
||||
|
||||
要将这种关系指明给编译器,就使用`"rootDirs"`选项。该选项指明一个 *根目录(roots)* 清单,其中的内容希望在运行时进行融合。因此根据这里的示例,其`tsconfig.json`文件就应该像下面这样:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDirs": [
|
||||
"src/views",
|
||||
"generated/templates/views"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
随后编译器一旦见到`rootDirs`清单中任意条目的子目录中的相对模块导入项,其就会尝试在`rootDirs`的各个条目中查找该导入项。
|
||||
|
||||
`rootDirs`的灵活性不仅仅在于指明要被逻辑融合的一个物理源码目录清单。所提供的数组可包含任意数目的特定条目、任意的目录名称,而不管这些目录是否存在。这就令到编译器可对复杂捆绑与诸如条件包含及特定于项目的加载器插件等运行时特性,以类型安全的方式进行捕获(The flexibility of `rootDirs` is not limited to specifying a list of physical source directories that are logically merged. The supplied array may include any number of ad hoc, arbitary directory names, regardless of whether they exist or not. This allows the compiler to capture sophisticated bundling and runtime features such as conditional inclusion and project specified loader plugins in a type safe way)。
|
||||
|
||||
试想这样一个国际化场景,其中通过以相对模块路径的一部分,比如`./#{locale}/messages`,而插入一个特殊令牌,比如`#{locale}`,构建工具从而自动生成特定语言环境程序包(Consider an internationalization scenario where a build tool automatically generates locale specific bundles by interpolating a special path token, say `#{locale}`, as part of a relative module path such as `./#{locale}/messages`)。在这种假定设置下,构建工具将对所支持的语言环境进行枚举,而映射到抽象路径`./zh/messages`、`./de/messages`等等。
|
||||
|
||||
假设这些语言模块都导出了一个字符串数组。比如`./zh/messages`可能包含:
|
||||
|
||||
```typescript
|
||||
export default [
|
||||
"您好吗",
|
||||
"很高兴认识你"
|
||||
];
|
||||
```
|
||||
|
||||
利用`rootDirs`,就可以告诉编译器这种映射,从而安全地对`./#{locale}/messages`进行解析,尽管该目录根本不会存在。以下面的`tsconfig.json`文件为例:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDirs": [
|
||||
"src/zh",
|
||||
"src/de",
|
||||
"src/#{locale}"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
现在编译器将会以工具目的,把`import messages from './#{locale}/messages'` 解析到 `import messages from './zh/messages'`,从而允许在语言环境不可知下的开发,不受设计时间支持的威胁(allowing development in a locale agnostic manner without compromising design time support)。
|
||||
|
||||
### 对模块解析进行追踪(Tracing module resolution)
|
||||
|
||||
正如前面所讲到的,在对模块进行解析时,编译器可访问位处当前文件夹外部的文件。这会导致难于诊断某个模块不能解析,或被解析到不正确的定义的原因。而通过使用`--traceResolution`,开启编译器模块解析追踪(the compiler module resolution tracing)特性,就能提供到在模块解析过程中发生了什么的信息。
|
||||
|
||||
假设有着一个使用了`typescript`模块的示例应用。`app.ts`具有像是`import * as ts from "typescript"`这样的导入项。
|
||||
|
||||
```bash
|
||||
│ tsconfig.json
|
||||
├───node_modules
|
||||
│ └───typescript
|
||||
│ └───lib
|
||||
│ typescript.d.ts
|
||||
└───src
|
||||
app.ts
|
||||
```
|
||||
|
||||
以`--traceResolution`选项来调用编译器
|
||||
|
||||
```bash
|
||||
tsc --traceResolution
|
||||
```
|
||||
|
||||
将得到如下的输出:
|
||||
|
||||
```bash
|
||||
======== Resolving module 'typescript' from 'src/app.ts'. ========
|
||||
Module resolution kind is not specified, using 'NodeJs'.
|
||||
Loading module 'typescript' from 'node_modules' folder.
|
||||
File 'src/node_modules/typescript.ts' does not exist.
|
||||
File 'src/node_modules/typescript.tsx' does not exist.
|
||||
File 'src/node_modules/typescript.d.ts' does not exist.
|
||||
File 'src/node_modules/typescript/package.json' does not exist.
|
||||
File 'node_modules/typescript.ts' does not exist.
|
||||
File 'node_modules/typescript.tsx' does not exist.
|
||||
File 'node_modules/typescript.d.ts' does not exist.
|
||||
Found 'package.json' at 'node_modules/typescript/package.json'.
|
||||
'package.json' has 'types' field './lib/typescript.d.ts' that references 'node_modules/typescript/lib/typescript.d.ts'.
|
||||
File 'node_modules/typescript/lib/typescript.d.ts' exist - use it as a module resolution result.
|
||||
======== Module name 'typescript' was successfully resolved to 'node_modules/typescript/lib/typescript.d.ts'. ========
|
||||
```
|
||||
|
||||
***要查找的项目***
|
||||
|
||||
+ 导入项的名称与位置
|
||||
|
||||
> ======== Resolving module 'typescript' from 'src/app.ts'. ========
|
||||
|
||||
+ 编译器依循的策略
|
||||
|
||||
> Module resolution kind is not specified, using 'NodeJs'.
|
||||
|
||||
+ 来自npm软件包的加载类型(Loading of types from npm packages)
|
||||
|
||||
> 'package.json' has 'types' field './lib/typescript.d.ts' that references 'node_modules/typescript/lib/typescript.d.ts'.
|
||||
|
||||
+ 最终结果
|
||||
|
||||
> ======== Module name 'typescript' was successfully resolved to 'node_modules/typescript/lib/typescript.d.ts'. ========
|
||||
|
||||
### `--noResolve`选项的使用(Using `--noResolve`)
|
||||
|
||||
通常编译器在开始编译过程前,会先尝试对所有模块导入项进行解析。在每次成功地将一个`import`解析到一个文件后,该文件就被加入到于稍后将进行处理的一个文件集合中。
|
||||
|
||||
编译器选项`--noResolve`通知编译器不要将那些未在命令行传递的文件,“添加” 到编译过程。编译器仍会尝试将模块解析到文件,但如该文件未被指定,其就不会被包含进去(The `--noResolve` compiler options instructs the compiler not to "add" any files to the compilation that were not passed on the command line. It will still try to resolve the module to files, but if the file is not specified, it will not be included)。
|
||||
|
||||
举例来说:
|
||||
|
||||
*app.ts*
|
||||
|
||||
```typescript
|
||||
import * as A from "moduleA" // 没有问题,‘moduleA’在命令行上有传入
|
||||
import * as B from "moduleB" // Error TS2307: Cannot find module 'moduleB'.
|
||||
```
|
||||
|
||||
```bash
|
||||
tsc app.ts moduleA.ts --noResolve
|
||||
```
|
||||
|
||||
使用`--noResolve`选项来编译`app.ts`将导致:
|
||||
|
||||
+ 因为`moduleA`有在命令行上传入,其被正确地找到
|
||||
|
||||
+ 而因为`moduleB`未被传入,故因无法找到`moduleB`而报错
|
||||
|
||||
### 常见问题(Common Questions)
|
||||
|
||||
***为何一个排除清单中的模块,仍被编译器拾取到了?***
|
||||
|
||||
***Why does a module in the exclude list still get picked up by the compiler?***
|
||||
|
||||
`tsconfig.json`文件可将文件夹转变为一个“项目”(`tsconfig.json` turns a folder into a "project")。在没有指定任何`exclude`或`include`条目时,包含了`tsconfig.json`的文件夹中的所有文件,及该文件夹的所有子目录,都是包含在编译中的。如打算使用`"exclude"`来排除某些文件,还不如通过使用`files`来指定所需的文件,从而让编译器来查找这些文件。
|
||||
|
||||
那就是`tsconfig.json`的自动包含特性。拿不会嵌入上面所讨论的模块解析。在编译器识别到作为某个模块导入项的目标文件时,该文件将自动包含到编译中,而不管其是否被排除在前面的步骤(That was `tsconfig.json` automatic inclusion. That does not embed module resolution as discussed above. If the compiler identified a file as a target of a module import, it will be included in the compilation regardless if it was excluded in the previous steps)。
|
||||
|
||||
所以要将某个文件排除在编译之外,就需要将其与 **所有** 有着到它的`import` 或 `/// <reference path="...">`指令的文件,都要排除。
|
296
_book/17_declaration_merging.md
Normal file
296
_book/17_declaration_merging.md
Normal file
@ -0,0 +1,296 @@
|
||||
# 声明融合特性
|
||||
|
||||
**Declaration Merging**
|
||||
|
||||
## 简介
|
||||
|
||||
TypeScript中有一些特有概念,它们在类型级别对JavaScript对象外形进行描述(Some of the unique concepts in TypeScript describe the shape of JavaScript objects at the type level)。一个尤其特定于TypeScript的例子,就是“声明融合”这一概念。对此概念的掌握,对于与现有Javascript操作,较有优势。对此概念的掌握,也开启了其它复杂抽象概念的大门。
|
||||
|
||||
作为本文的目标,“声明融合”特性,就是指编译器把两个以相同名称进行声明的单独声明,融合为一个单一声明。融合后的声明,有着原先两个声明的特性。任意数目的声明都可被融合;而不受限于仅两个声明。
|
||||
|
||||
## 基本概念
|
||||
|
||||
在TypeScript中,一个声明将创建出至少三组之一的实体:命名空间、类型或值。命名空间创建式声明创建出包含可通过使用 *点缀符号* 进行访问的名称的命名空间。类型创建式声明,则仅完成这些:它们创建出一个对所声明的外形可见,且绑定到给定名称的类型。最后值创建式声明创建的是在输出的JavaScript中可见的数值(In TypeScript, a declaration creates entities in at least one of three groups: namespace, type, or value. Namespace-creating declarations create a namespace, which contains names that are accessed using a dotted notation. Type-creating declarations do just that: they create a type that is visible with the declared shape and bound to the given name. Lastly, value-creating declarations create values that are visible in the output JavaScript)。
|
||||
|
||||
| 声明类型 | 命名空间 | 类型 | 数值 |
|
||||
| :--- | :--: | :--: | :--: |
|
||||
| 命名空间 | X | | X |
|
||||
| 类 | | X | X |
|
||||
| 枚举 | | X | X |
|
||||
| 接口 | | X | |
|
||||
| 类型别名 | | X | |
|
||||
| 函数 | | | X |
|
||||
| 变量 | | | X |
|
||||
|
||||
对各种声明都创建了什么的掌握,有助于理解哪些在执行声明融合时被融合了。
|
||||
|
||||
|
||||
## 接口的融合(Merging Interfaces)
|
||||
|
||||
最简单也是最常见的声明融合类别,要数接口融合。在最基础阶段,这种融合机械地将两个声明的成员,以那个相同的名称结合起来。
|
||||
|
||||
```typescript
|
||||
interface Box {
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
|
||||
interface Box {
|
||||
scale: number;
|
||||
}
|
||||
|
||||
let box: Box = {height: 5, width: 6, scale: 10};
|
||||
```
|
||||
|
||||
这些接口的非函数成员都应唯一。如出现重复,那么重复的成员应具有相同类型。在接口声明了有相同名称,类型却不一样的非函数成员时,编译器将发出错误。
|
||||
|
||||
对于接口中的函数成员,名称相同的各个函数,是以对同一函数的过载进行对待的(For function members, each function member of the same name is treated as describing an overload of the same function)。需要说明的是,在接口`A`与其后的接口`A`融合的情况下,那么第二个接口比第一个接口有着较高的优先权。
|
||||
|
||||
那就是说,在下面的示例中:
|
||||
|
||||
```typescript
|
||||
interface Cloner {
|
||||
clone(animal: Animal): Animal;
|
||||
}
|
||||
|
||||
interface Cloner {
|
||||
clone(animal: Sheep): Sheep;
|
||||
}
|
||||
|
||||
interface Cloner {
|
||||
clone(animal: Dog): Dog;
|
||||
clone(animal: Cat): Cat;
|
||||
}
|
||||
```
|
||||
|
||||
这三个接口将融合为创建一个下面的单一的接口:
|
||||
|
||||
```typescript
|
||||
interface Cloner {
|
||||
clone(animal: Dog): Dog;
|
||||
clone(animal: Cat): Cat;
|
||||
clone(animal: Sheep): Sheep;
|
||||
clone(animal: Animal): Animal;
|
||||
}
|
||||
```
|
||||
|
||||
注意每个分组的元素,保持了同样顺序,而各分组本身则以较后过载集合靠前的顺序被融合的(Notice that the elements of each group maintains the same order, but the groups themselves are merged with later overload sets ordered first)。
|
||||
|
||||
这条规则的一个例外,就是特殊签名(specialized signatures)。在某个签名具有类型为 *单一* 字符串字面值类型(就是说不是字符串字面值的联合)的参数时,那么该函数将被提升到其融合过载清单的顶部(If a signature has a parameter whose type is a *single* string literal type(e.g. not a union of string literals), then it will be bubbled toward the top of its merged overload list)。
|
||||
|
||||
举例来说,下面这些接口将融合到一起:
|
||||
|
||||
```typescript
|
||||
interface Document {
|
||||
createElement(tagName: any): Element;
|
||||
}
|
||||
|
||||
interface Document {
|
||||
createElement(tagName: "div"): HTMLDivElement;
|
||||
createElement(tagName: "span"): HTMLSpanElement;
|
||||
}
|
||||
|
||||
interface Document {
|
||||
createElement(tagName: string): HTMLElement;
|
||||
createElement(tagName: "canvas"): HTMLCanvasElement;
|
||||
}
|
||||
```
|
||||
|
||||
融合后的`Document`将是下面这样:
|
||||
|
||||
```typescript
|
||||
interface Document {
|
||||
createElement(tagName: "canvas"): HTMLCanvasElement;
|
||||
createElement(tagName: "div"): HTMLDivElement;
|
||||
createElement(tagName: "span"): HTMLSpanElement;
|
||||
createElement(tagName: string): HTMLElement;
|
||||
createElement(tagName: any): Element;
|
||||
}
|
||||
```
|
||||
|
||||
## 命名空间的融合(Merging Namespaces)
|
||||
|
||||
与接口类似,相同名称的命名空间也将对其成员进行融合。因为命名空间同时创建了命名空间与值,所以需要掌握命名空间与值二者是如何进行融合的。
|
||||
|
||||
为对命名空间进行融合,来自在各个命名空间中定义的导出接口的类型定义自身被融合,从而形成一个单一的,内部有着这些接口定义的命名空间(To merge the namespaces, type definitions from exported interfaces declared in each namespaces are themselves merged, forming a single namespace with merged interface definitions inside)。
|
||||
|
||||
为对命名空间值进行融合,那么在各声明处,如已存在有着给定名称的命名空间,那么其就被通过以取得既有命名空间并将第二个命名空间所导出的成员加入到前一个的方式,被进一步扩展(To merge the namespace value, at each declaration site, if a namespace already exists with the given name, it is further extended by taking the existing namespace and adding the exported members of the second namespace to the first)。
|
||||
|
||||
看看下面这个示例中`Animals`的声明融合:
|
||||
|
||||
```typescript
|
||||
namespace Animals {
|
||||
export class Zebra {}
|
||||
}
|
||||
|
||||
namespace Animals {
|
||||
export interface Legged { numberOfLegs: number; }
|
||||
export class Dog {}
|
||||
}
|
||||
```
|
||||
|
||||
其等价于:
|
||||
|
||||
```typescript
|
||||
namespace Animals {
|
||||
export interface Legged { numberOfLegs: number; }
|
||||
|
||||
export class Zebra {}
|
||||
export class Dog {}
|
||||
}
|
||||
```
|
||||
|
||||
这种命名空间融合模式作为起点是有用的,但也需要掌握对于非导出成员,是怎样进行融合的。 非导出成员仅在原始(未融合的)命名空间中可见。这就意味着在融合之后,来自其它声明的已融合成员,是无法看到那些非融合成员的。
|
||||
|
||||
在下面的示例中,可更清楚的看到这一点:
|
||||
|
||||
```typescript
|
||||
namespace Animal {
|
||||
let haveMuscles = true;
|
||||
|
||||
export function animalsHaveMuscles () {
|
||||
return haveMuscles;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Animal {
|
||||
export function doAnimalsHaveMuscles () {
|
||||
return haveMuscles; // <-- 错误,`haveMuscles` 在这里不可见
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
因为`haveMuscles`未被导出,所以只有共享了同一未融合命名空间的`animalsHaveMuscles`函数才能看到该符号(the symbol)。而对于`doAnimalsHaveMuscles`函数,尽管其是融合后的`Animal`命名空间的一部分,其仍然不能看到这个未导出成员。
|
||||
|
||||
## 命名空间与类、函数及枚举的融合(Merging Namespaces with Classes, Functions, and Enums)
|
||||
|
||||
因为命名空间有足够的灵活性,故其可与其它类型的声明进行融合。而要与其它类型的声明融合,命名空间就 **必须** 位于要与其融合的声明之后。融合得到的声明,将有着所融合声明类型的各自属性。TypeScript利用这种功能,来模仿JavaScript及其它编程语言的某些模式(The resulting declaration has properties of both declaration types. TypeScript uses this capability to model some of the patterns in JavaScript as well as other programming languages)。
|
||||
|
||||
### 命名空间与类的融合(Merging Namespaces with Classes)
|
||||
|
||||
这么做给出了一种描述内层类的方式:
|
||||
|
||||
```typescript
|
||||
class Album {
|
||||
label: Album.AlbumLabel;
|
||||
}
|
||||
|
||||
namespace Album {
|
||||
export class AlbumLabel {}
|
||||
}
|
||||
```
|
||||
|
||||
被融合成员的可见性规则与“命名空间融合”小节中所讲到的相同,因此为让该融合的类`AlbumLabel`可见,就必须将其导出。融合结果就是在另一个类中进行管理的一个类。还可以使用命名空间,来将更多静态成员加入到既有的类中(The end result is a class managed inside of another class. You can also use namespaces to add more static members to an existing class)。
|
||||
|
||||
出了内层类(inner classes)这种模式之外,还有那种建立一个函数并于随后通过往函数上加入属性,来进一步扩展函数的JavaScript做法。TypeScript是通过使用声明融合,来以类型安全的方式,构造类似定义的。
|
||||
|
||||
```typescript
|
||||
function buildLabel(name: string): string {
|
||||
return buildLabel.prefix + name + buildLabel.suffix;
|
||||
}
|
||||
|
||||
namespace buildLabel {
|
||||
export let suffix = "";
|
||||
export let prefix = "Hello, ";
|
||||
}
|
||||
|
||||
alert(buildLabel("Sam Smith"));
|
||||
```
|
||||
|
||||
于此类似,命名空间也可用于对带有静态成员的枚举进行扩展:
|
||||
|
||||
```typescript
|
||||
enum Color {
|
||||
red = 1,
|
||||
green = 2,
|
||||
blue = 4
|
||||
}
|
||||
|
||||
namespace Color {
|
||||
export function mixColor (colorName: string) {
|
||||
if (colorName === "yellow") {
|
||||
return Color.red + Color.green;
|
||||
}
|
||||
else if (colorName === "white") {
|
||||
return Color.red + Color.green + Color.blue;
|
||||
}
|
||||
else if (colorName === "magenta") {
|
||||
return Color.red + Color.blue;
|
||||
}
|
||||
else if (colorName === "cyan") {
|
||||
return Color.green + Color.blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 不允许的融合(Diallowed Merges)
|
||||
|
||||
TypeScript中并非所有融合都是允许的。目前,类就被允许与其它类或变量融合。有关对类融合的模仿,请参考[TypeScript中的混入](20_mixins.md)章节。
|
||||
|
||||
## 模块增强(Module Augmentation)
|
||||
|
||||
尽管JavaScript模块并不支持融合,但可通过导入并随后对其进行更新,来对既有对象进行补充(Although JavaScript modules do not support merging, you can patch existing objects by importing and then updating them)。看看下面这个`Observable`的示例:
|
||||
|
||||
```typescript
|
||||
// observable.js
|
||||
export class Observable<T> {
|
||||
// ... 实现由读者作为练习完成 ...
|
||||
}
|
||||
|
||||
// map.js
|
||||
import { Observable } from "./observable";
|
||||
|
||||
Observable.prototype.map = function (f) {
|
||||
// ... 作为读者的另一个练习
|
||||
}
|
||||
```
|
||||
|
||||
这种做法在TypeScript中也是可行的,不过编译器并不知道`Observable.prototype.map`。这里就可以使用模块增强特性,来将其告诉编译器:
|
||||
|
||||
```typescript
|
||||
// observable.ts 保持不变
|
||||
// map.ts
|
||||
import { Observable } from "./observable";
|
||||
|
||||
declare module "./observable" {
|
||||
interface Observable<T> {
|
||||
map(U)(f: (x: T) => U): Observable<U>;
|
||||
}
|
||||
}
|
||||
|
||||
Observable.prototype.map = function (f) {
|
||||
// ... 留给读者的另一个练习
|
||||
}
|
||||
|
||||
// consumer.ts
|
||||
import { Observable } from "./observable";
|
||||
import "./map";
|
||||
|
||||
let o: Observable<number>;
|
||||
|
||||
o.map(x => x.toFixed());
|
||||
```
|
||||
|
||||
### 全局增强(Global augmentation)
|
||||
|
||||
亦可从某个模块内部,将声明添加到全局作用域(You can also add declarations to the global scope from inside a module)。
|
||||
|
||||
```typescript
|
||||
// observable.ts
|
||||
export class Observable<T> {
|
||||
// ... 仍旧没有实现 ...
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Array<T> {
|
||||
toObservable(): Observable<T>;
|
||||
}
|
||||
}
|
||||
|
||||
Array.prototype.toObservable = function () {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
全局增强与模块增强,有着同样的行为和限制(Global augmentations have the same behavior and limits as module augmentations)。
|
386
_book/18_jsx.md
Normal file
386
_book/18_jsx.md
Normal file
@ -0,0 +1,386 @@
|
||||
# JSX
|
||||
|
||||
## 简介
|
||||
|
||||
[JSX](https://facebook.github.io/jsx/)是一种可嵌入式的、类似于XML的语法(JSX is an embeddable XML-like syntax)。其是为了被转换成有效的JavaScript,固然那种转换的语义是特定于具体实现的。JSX的流行,是由[React](https://reactjs.org/)框架的流行带来的,在其它应用中也有见到JSX。TypeScript支持JSX的嵌入、类型检查及将JSX直接编译到JavaScript。
|
||||
|
||||
## 基本用法(Basic Usage)
|
||||
|
||||
为了使用JSX,必须完成两件事:
|
||||
|
||||
1. 以`.tsx`扩展名来命名文件
|
||||
|
||||
2. 开启`jsx`选项(编译器的)
|
||||
|
||||
TypeScript本身带有三个JSX模式:`preserve`、`react`与`react-native`。这些模式仅影响生成阶段 -- 类型检查不受影响。`preserve`模式将保留JSX作为输出的部分,以被其它转换步骤(比如[Babel](https://babeljs.io/))进一步处理。此外该模式下的输出将有着`.jsx`文件扩展名。`react`模式将生成`React.createElement`,在使用钱不需要通过JSX转换,同时输出将有着`.js`文件扩展名。`react-native`模式与`preserve`等价,该模式下将保留所有JSX,但输出仍将为`.js`文件扩展名。
|
||||
|
||||
| 模式 | 输入 | 输出 | 输出文件扩展名 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `preserve` | `<div />` | `<div />` | `.jsx` |
|
||||
| `react` | `<div />` | `React.createElement("div")` | `.js` |
|
||||
| `react-native` | `<div />` | `<div />` | `.js` |
|
||||
|
||||
可通过命令行标志`--jsx`或在`tsconfig.json`文件中的相应选项,来对此模式进行指定。
|
||||
|
||||
> *注意:* 标识符`React`是硬编码的,因此必须要有`R`开头的React。
|
||||
|
||||
## `as`运算符(The `as` Operator)
|
||||
|
||||
回顾一下类型断言(a type assertion)是怎么写的:
|
||||
|
||||
```typescript
|
||||
var foo = <foo>bar;
|
||||
```
|
||||
|
||||
这里对变量`bar`有着类型`foo`进行了断言。因为TypeScript也将尖括号用于类型断言,因此JSX的语法就引入了一些解析困难。结果就是,TypeScript不允许在`.tsx`文件中出现尖括号类型断言。
|
||||
|
||||
为了弥补`.tsx`文件中的这个功能损失,就加入了一个新的类型断言运算符:`as`。使用`as`运算符,上面的示例就可很容易写出来。
|
||||
|
||||
```typescript
|
||||
var foo = bar as foo;
|
||||
```
|
||||
|
||||
在`.ts`与`.tsx`文件中,都可以使用`as`运算符,其作用与其它类型断言样式一致。
|
||||
|
||||
## 类型检查(Type Checking)
|
||||
|
||||
为了理解JSX下的类型检查,就必须首先掌握固有元素与基于值的元素的区别(In order to understand type checking with JSX, you must first understand the difference between intrinsic elements and value-based elements)。对于一个JSX表达式`<expr />`,`expr` 既可以是对环境中固有元素(比如DOM环境中的`div`或`span`)的参考,也可以是对某个创建出来的组件的参考。因为以下两个原因,这一点很重要:
|
||||
|
||||
1. 对于React, 固有元素生成的是字符串(`React.createElement("div")`),但对于创建出的组件则不是(`React.createElement(MyComponent)`)。
|
||||
|
||||
2. 传入给JSX的属性的类型,应以不同的方式进行查找。固有元素属性应本质上就知道,而组件将期望给它们指定一套属性(The types of the attributes being passed in the JSX element should be looked up differently. Intrinsic element attributes should be known *intrinsically* whereas components will likely want to specify their own set of attributes)。
|
||||
|
||||
对于如何区分二者,TypeScript使用了[与React相同的约定](http://facebook.github.io/react/docs/jsx-in-depth.html#html-tags-vs.-react-components)。固有元素总是以小写字母开头,而基于值的元素则全部以大写字母开头。
|
||||
|
||||
### 固有元素(Intrinsic elements)
|
||||
|
||||
固有元素是在一个特殊接口`JSX.IntrinsicElements`上查找的。默认情况下,如果没有指定该接口,那么什么都可以且固有元素不会被检查类型。但如果指定了该接口,那么固有元素的名称将作为一个属性,在`JSX.IntrinsicElements`上进行查找。比如:
|
||||
|
||||
```typescript
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
foo: any
|
||||
}
|
||||
}
|
||||
|
||||
<foo />; // 没有问题
|
||||
<bar />; // 错误
|
||||
```
|
||||
|
||||
在上面的示例中,`<foo />`将正确工作,但`<bar />`将因为其没有在`JSX.IntrinsicElements`上进行指明,而导致一个错误。
|
||||
|
||||
> 注意: 也可以像下面这样,在`JSX.IntrinsicElements`上指定一个全能字符串索引器(a catch-all string indexer)。
|
||||
|
||||
```typescript
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
[elemName: string]: any;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 基于值的元素(Value-based elements)
|
||||
|
||||
基于值的元素,是简单地通过作用域中的标识符进行查找的。
|
||||
|
||||
```typescript
|
||||
import MyComponent from "./MyComponent";
|
||||
|
||||
<MyComponent />; // 没有问题
|
||||
<SomeOtherComponent />; // 错误
|
||||
```
|
||||
|
||||
基于值元素的定义有两种方式:
|
||||
|
||||
1. 无状态函数式组件方式(Stateless Functional Component, SFC)
|
||||
|
||||
2. 类组件方式(Class Component)
|
||||
|
||||
因为在JSX表达式中二者难于区分,所以首先会尝试使用 **过载方案** 来将表达式作为无状态函数式组件进行解析(Because these two types of value-based elements are indistinguishable from each other in JSX expression, we first try to resolve the expression as Stateless Functional Component using **overload resolution**)。加入该过程成功,那么就完成了将表达式解析为其声明。而在将其解析为SFC失败时,就会尝试将其作为类组件进行解析。加入仍然失败,就会报告一个错误。
|
||||
|
||||
***关于无状态函数式组件***
|
||||
|
||||
***Stateless Functional Components***
|
||||
|
||||
如同该名称所体现的那样,这种组件是以首个参数为`props`对象的JavaScript函数进行定义的。这里要强调,其定义函数的返回值,必须是可赋值给`JSX.Element`的类型
|
||||
|
||||
```typescript
|
||||
interface FooProp {
|
||||
name: string;
|
||||
X: number;
|
||||
Y: number;
|
||||
}
|
||||
|
||||
declare function AnotherComponent (prop: {name: string});
|
||||
|
||||
function ComponentFoo (prop: FooProp) {
|
||||
return <AnotherComponent name=prop.name />;
|
||||
}
|
||||
|
||||
const Button = (prop: {value: string}, context: { color: string }) => <button>;
|
||||
```
|
||||
|
||||
因为SFC就是简单的JavaScript函数,因此这里也可以使用函数过载特性(function overload)。
|
||||
|
||||
```typescript
|
||||
interface ClickableProps {
|
||||
children: JSX.Element[] | JSX.Element
|
||||
}
|
||||
|
||||
interface HomeProps extends ClickableProps {
|
||||
home: JSX.Element;
|
||||
}
|
||||
|
||||
interface SideProps extends ClickableProps {
|
||||
side: JSX.Element | string;
|
||||
}
|
||||
|
||||
function MainButton (prop: HomeProps): JSX.Element;
|
||||
function MainButton (prop: SideProps): JSX.Element {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
***类组件***
|
||||
|
||||
对类组件的限定是可行的。但为达到这个目的,就必须引入两个新术语: *元素类类型* 与 *元素示例类型* (the *element class type* and the *element instance type*)。
|
||||
|
||||
在给定了`<Expr />`时,那么 *元素类类型* 就是 `Expr` 的类型。因此在上面的示例中,在`MyComponent`是一个ES6的类时,那么类类型就应是那个类。而如果`MyComponent`是一个工厂函数(a factory function),那么类类型就应是那个函数。
|
||||
|
||||
类类型一旦建立,实例类型就有该类类型的调用签名与构造签名的返回值类型联合确定下来(Once the class type is established, the instance type is determined by the union of the return types of the class type's call signatures and construct signatures)。因此又会出现,在ES6类的情况下,实例类型将会是那个类的实例的类型,同时,在工厂函数的情况下,实例类型将是自函数返回值的类型。
|
||||
|
||||
```typescript
|
||||
class MyComponent {
|
||||
render(){}
|
||||
}
|
||||
|
||||
// 使用构造签名
|
||||
var myComponent = new MyComponent();
|
||||
|
||||
// 元素类类型为 `MyComponent`
|
||||
// 元素实例类型为 `{ render: () => void }`
|
||||
|
||||
function MyFactoryFunction () {
|
||||
return {
|
||||
render: () => {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 使用调用签名
|
||||
var = myComponent = MyFactoryFunction();
|
||||
|
||||
// 元素类类型为 `FactoryFunction`
|
||||
// 元素实例类型为 `{ render: () => void }`
|
||||
```
|
||||
|
||||
元素实例类型很有趣,因为它必须是可赋值给`JSX.ElementClass`的,否则就会造成错误。默认`JSX.ElementClass`就是`{}`,但可将其扩充为将`JSX`的使用限制到仅符合适当接口的那些类型(By default `JSX.ElementClass` is `{}`, but it can be augmented to limit the use of JSX to only those types that conform to the proper interface)。
|
||||
|
||||
```typescript
|
||||
declare namespace JSX {
|
||||
interface ElementClass {
|
||||
render: any;
|
||||
}
|
||||
}
|
||||
|
||||
class MyComponent {
|
||||
render () {}
|
||||
}
|
||||
|
||||
function MyFactoryFunction () {
|
||||
return { render: () => {} }
|
||||
}
|
||||
|
||||
<MyComponent />; // 没有问题
|
||||
<MyFactoryFunction />; // 没有问题
|
||||
|
||||
class NotAValidComponent {}
|
||||
function NotAValidFactoryFunction () {
|
||||
return {};
|
||||
}
|
||||
|
||||
<NotAValidComponent />; //错误
|
||||
<NotAValidFactoryFunction />; // 错误
|
||||
```
|
||||
|
||||
### 属性类型的检查
|
||||
|
||||
对属性的类型检查的第一步,就是确定 *元素属性类型* (The first step to type checking attributes is to determine the *element attributes type*)。这一步对于固有元素及基于值的元素有些许的不同。
|
||||
|
||||
对于固有元素,元素属性类型就是`JSX.IntrinsicElements`上的属性的类型
|
||||
|
||||
```typescript
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
foo: { bar?: boolean }
|
||||
}
|
||||
}
|
||||
|
||||
// `foo`的元素属性类型,就是 `{bar?: boolean}`
|
||||
<foo bar />;
|
||||
```
|
||||
|
||||
对于基于值的元素,元素属性类型这个问题,就复杂一些。元素属性类型是由早前所确定下来的 *元素实例类型* 上的一个属性的类型确定的。至于要使用哪一个属性,则是由`JSX.ElementAttributesProperty`所决定的。`JSX.ElementAttributesProperty`又应该以一个单一属性进行声明。随后就会使用那个属性(For value-based elements, it is a bit more complex. It is determined by the type of a property on the *element intance type* that was previously determined. Which property to use is determined by `JSX.ElementAttributesProperty`. It should be declared with a single property. The name of that property is then used)。
|
||||
|
||||
```typescript
|
||||
declare namespace JSX {
|
||||
interface ElementAttributesProperty {
|
||||
props; // 指定要使用的属性名称
|
||||
}
|
||||
}
|
||||
|
||||
class MyComponent {
|
||||
// 指定元素实例类型上的属性
|
||||
props: {
|
||||
foo?: string;
|
||||
}
|
||||
}
|
||||
|
||||
// `MyComponent` 的元素属性类型,就是`{foo?: string}`
|
||||
<MyComponent foo="bar" />
|
||||
```
|
||||
|
||||
元素属性类型被用于对JSX中的属性进行类型检查。支持可选与必需属性(The element attribute type is used to type check the attributes in the JSX. Optional and required properties are supported)。
|
||||
|
||||
```typescript
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
foo: { requiredProp: string; optionalProp?: number }
|
||||
}
|
||||
}
|
||||
|
||||
<foo requiredProp="bar" />; // 没有问题
|
||||
<foo requiredProp="bar" optionalProp={0} />; //没有问题
|
||||
<foo />; // 错误,找不到`requiredProp`
|
||||
<foo requiredProp={0} />; // 错误,`requiredProp`应是字符串
|
||||
<foo requiredProp="bar" unknownProp />; // 错误,`unknownProp`不存在
|
||||
<foo requiredProp="bar" some-unknown-prop />; // 没有问题,因为`some-unknown-prop`不是一个有效的标识符
|
||||
```
|
||||
|
||||
> 注意:在某个元素属性名称不是有效的JS标识符(a valid JS identifier, 比如`data-*`这样的元素属性)时,在元素属性类型中没有找到这个无效JS标识符,这不会被认为是一个错误(If an attribute name is not a valid JS identifier(like a `data-*` attribute), it is not considered to be an error if it is not found in the element attributes type)。
|
||||
|
||||
展开运算符也是可用的(The spead operator also works):
|
||||
|
||||
```typescript
|
||||
var props = { requiredProp: "bar" };
|
||||
<foo {...props} />; // 没有问题
|
||||
|
||||
var badProps = {};
|
||||
<foo {...badProps} />; // 错误
|
||||
```
|
||||
|
||||
### 子元素类型检查(Children Type Checking)
|
||||
|
||||
在版本2.3中,引入了对 *子元素* 的类型检查。 *子元素* 是经由元素属性类型检查而确定下来的 *元素属性类型* 的一个属性( *children* is a property in an *element attributes type* which we have determined from type checking attributes)。与使用`JSX.ElementAttributesProperty`来确定 *props* 的名称类似,也要使用`JSX.ElementChildrenAttributes`来确定 *子元素* 的名称。
|
||||
|
||||
应使用单一属性,来对`JSX.ElementChildrenAttributes`进行声明。
|
||||
|
||||
```typescript
|
||||
declare namespace JSX {
|
||||
interface ElementChildrenAttributes {
|
||||
children: {}; // 指定要使用的 子元素 名称
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
在没有显式指定子元素的类型时,就将使用[React typings](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) 中的默认类型。
|
||||
|
||||
|
||||
```typescript
|
||||
<div>
|
||||
<h1>Hello</h1>
|
||||
</div>;
|
||||
|
||||
<div>
|
||||
<h1>Hello</h1>
|
||||
World
|
||||
</div>;
|
||||
|
||||
const CustomComp = (props) => <div>props.children</div>
|
||||
|
||||
<CustomComp>
|
||||
<div>Hello World</div>
|
||||
{"This is just a JS expression..." + 1000}
|
||||
</CustomComp>
|
||||
```
|
||||
|
||||
可像其它元素属性一样,来指定 *子元素* 的类型。这样做会覆写来自 [React typings](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) 的类型。
|
||||
|
||||
```typescript
|
||||
interface PropsType {
|
||||
children: JSX.Element
|
||||
name: string
|
||||
}
|
||||
|
||||
class Component extends React.Component<PropsType, {}> {
|
||||
render () {
|
||||
return (
|
||||
<h2>
|
||||
this.props.children
|
||||
</h2>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 没有问题
|
||||
<Component>
|
||||
<h1>Hello World</h1>
|
||||
</Comonent>
|
||||
|
||||
// 错误:子元素 是类型 `JSX.Element` 而不是 `JSX.Element` 的数组
|
||||
<Component>
|
||||
<h1>Hello World</h1>
|
||||
<h2>Hello World</h2>
|
||||
</Component>
|
||||
|
||||
// 错误:子元素 是类型 `JSX.Element` 而不是 `JSX.Element` 的数组或字符串
|
||||
<Component>
|
||||
<h1>Hello</h1>
|
||||
World
|
||||
</Component>
|
||||
```
|
||||
|
||||
## JSX结果类型(The JSX result type)
|
||||
|
||||
默认JSX表达式的结果的类型为`any`(By default the result of a JSX expression is typed as `any`)。通过指定`JSX.Element`接口,就可以对该类型进行定制。然而从该接口获取有关JSX的元素、元素属性或子元素的类型信息,是无法做到的。其就是一个黑盒。
|
||||
|
||||
## 关于表达式的嵌入(Embedding Expressions)
|
||||
|
||||
JSX允许通过将表达式以花括符`{}`括起来的方式,将表达式在标签之间进行嵌入(JSX allows you to embed expressions between tags by surrounding the expressions with curly braces(`{}`))。
|
||||
|
||||
```typescript
|
||||
var a = <div>
|
||||
{["foo", "bar"].map(i => <span>{i / 2}</span>)}
|
||||
</div>
|
||||
```
|
||||
|
||||
因为无法将字符串除以数字,所以上面的代码将得到一个错误。而在使用`preserve`选项时,输出将是下面这样:
|
||||
|
||||
```typescript
|
||||
var a = <div>
|
||||
{["foo", "bar"].map(function (i) { return <span>{i / 2}</span>; })}
|
||||
</div>;
|
||||
```
|
||||
|
||||
|
||||
## React的集成(React integration)
|
||||
|
||||
要使用带有React的JSX,就应使用 [React typings](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)。这些分型对`JSX`的命名空间以适应React的使用而进行了定义(These typings define the `JSX` namespace appropriately for use with React)。
|
||||
|
||||
```typescript
|
||||
/// <reference path="react.d.ts" />
|
||||
|
||||
interface Props {
|
||||
foo: string;
|
||||
}
|
||||
|
||||
class MyComponent extends React.Component<Props, {}> {
|
||||
render () {
|
||||
return <span>{this.props.foo}</span>
|
||||
}
|
||||
}
|
||||
|
||||
<MyComponent foo="bar" />; // 没有问题
|
||||
<MyComponent foo={0} />; // 错误
|
||||
```
|
495
_book/19_decorators.md
Normal file
495
_book/19_decorators.md
Normal file
@ -0,0 +1,495 @@
|
||||
# 装饰器
|
||||
|
||||
**Decorators**
|
||||
|
||||
## 简介
|
||||
|
||||
随着TypeScript及ES6中类的引入,就有了一些需要对类与类的成员进行批注与修改等额外特性的场景(With the introduction of Classes in TypeScript and ES6, there now exist certain scennarios that require additional features to support annotating or modifying classes and class members)。装饰器这一特性,就提供了一种将类声明与成员的批注与元编程语法加入进来的方式。装饰器特性,是一项JavaScript的[第二阶段提议](https://github.com/tc39/proposal-decorators),且是TypeScript的一项实验特性。
|
||||
|
||||
> 注意:装饰器是一项实验特性,在以后的版本发布中可能改变。
|
||||
|
||||
要开启装饰器的实验性支持,就必须在命令行或`tsconfig.json`中开启编译器的`experimentalDecorators`选项:
|
||||
|
||||
**命令行**:
|
||||
|
||||
```bash
|
||||
tsc --target ES5 --experimentalDecorators
|
||||
```
|
||||
|
||||
**tsconfig.json**
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES5",
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 关于装饰器(Decorators)
|
||||
|
||||
*装饰器* 是一类特殊的声明,可被附加到[类的声明](#class-decorators)、[方法](#method-decorators)、[访问器](#accessor-decorators)、[属性](#property-decorators)或者[参数](#parameter-decorators)。装饰器采用`@expression`形式,其中的`expression`求值后必须是一个函数,在运行时该函数将以被装饰的声明有关的信息,被调用到(Decorators use the form `@expression`, where `expression` must evaluate to a function that will be called at runtime with information about the decorated declaration)。
|
||||
|
||||
比如,对于给定的装饰器`@sealed`,那么就可能向下面这样写该`sealed`函数:
|
||||
|
||||
```typescript
|
||||
function sealed(target) {
|
||||
// ... 对`target`进行一些操作 ...
|
||||
}
|
||||
```
|
||||
|
||||
> 注意:在下面的[类装饰器](#class-decorators)中,可以看到更详细的示例
|
||||
|
||||
<a name="decorator-factories"></a>
|
||||
## 装饰器工厂(Decorator Factories)
|
||||
|
||||
可通过编写一个装饰器工厂,来对装饰器作用于声明的方式进行定制。 *装饰器工厂* 就是一个返回由装饰器在运行时调用的表达式的函数(If you want to customize how a decorator is applied to a declaration, we can write a decorator factory. A *Decorator Factory* is simply a function that returns the expression that will be called by the decorator at runtime)。
|
||||
|
||||
可以下面的形式,来编写一个装饰器工厂:
|
||||
|
||||
```typescript
|
||||
function color (value: string) { // 这是装饰器工厂
|
||||
return function (target) { // 这是装饰器
|
||||
// 以`target`与`value`来完成一些操作
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> 注意,在下面的[方法装饰器](#method-decorators)部分,可见到装饰工厂的更详细示例。
|
||||
|
||||
## 装饰器的复合(Decorator Composition)
|
||||
|
||||
对某个声明,可应用多个装饰器,如下面的示例中那样:
|
||||
|
||||
+ 在同一行:
|
||||
|
||||
```typescript
|
||||
@f @g x
|
||||
```
|
||||
|
||||
+ 在多行上:
|
||||
|
||||
```typescript
|
||||
@f
|
||||
@g
|
||||
x
|
||||
```
|
||||
|
||||
当有多个装饰器应用到单个声明时,它们的执行与[数学中的复合函数](http://en.wikipedia.org/wiki/Function_composition)类似。在这个模型中,当将`f`与`g`进行复合时,`(f∘ g)(x)`复合结果与`f(g(x))`等价。
|
||||
|
||||
因此,TypeScript中在对单一声明上的多个装饰器进行执行时,将完成以下步骤:
|
||||
|
||||
1. 各个装饰器的表达式将自顶向下执行。
|
||||
|
||||
2. 随后的结果作为函数被自底向上进行调用。
|
||||
|
||||
当使用了[装饰器工厂](#decorator-factories),就可以在下面的示例中观察到这种执行顺序:
|
||||
|
||||
```typescript
|
||||
function f() {
|
||||
console.log("f(): evaluated");
|
||||
|
||||
return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
console.log("f(): called");
|
||||
}
|
||||
}
|
||||
|
||||
function g() {
|
||||
console.log("g(): evaluated");
|
||||
|
||||
return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
console.log("g(): called");
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
@f()
|
||||
@g()
|
||||
method() {}
|
||||
}
|
||||
```
|
||||
|
||||
其将把下面的输出打印到控制台:
|
||||
|
||||
```bash
|
||||
f(): evaluated
|
||||
g(): evaluated
|
||||
g(): called
|
||||
f(): called
|
||||
```
|
||||
|
||||
## 装饰器求值(Decorator Evaluation)
|
||||
|
||||
对于将装饰器如何应用到类内部的各种声明,有着以下可遵循的定义良好的顺序:
|
||||
|
||||
1. 对于各个实例成员, *参数装饰器*,接着分别是 *方法*、*访问器* 或者 *属性装饰器* 将被应用( *Parameter Decorators*, followed by *Method*, *Accessor*, or *Property Decorators* are applied for each instance member)。
|
||||
|
||||
2. 对于各个静态成员, *参数装饰器*,接着分别是 *方法*、*访问器* 或者 *属性装饰器* 将被应用( *Parameter Decorators*, followed by *Method*, *Accessor*, or *Property Decorators* are applied for each static member)。
|
||||
|
||||
3. 对于构造器,将应用参数装饰器( *Parameter Decorators* are applied for the constructor)。
|
||||
|
||||
4. 对于类,将应用 *类装饰器* ( *Class Decorators* are applied for the class )。
|
||||
|
||||
|
||||
<a name="class-decorators"></a>
|
||||
## 类装饰器
|
||||
|
||||
*类装饰器* 是在类声明之前、紧接着类声明处使用的。类声明作用与类的构造器,而可用于对类的定义进行观察、修改或替换。类装饰器不能在声明文件,或任何其它外围上下文中使用(比如在某个`declare`类上。The class decorator is applied to the constructor of the class and can be used to observe, modify or replace a class definition. A class decorator cannot be used in a declaration file, or in any other ambient context(such as on a `declare` class))。
|
||||
|
||||
> 什么是TypeScript的外围上下文(ambient context, 有的翻译为“已有环境”)?
|
||||
>
|
||||
>
|
||||
|
||||
类装饰器的表达式,将被作为一个函数,在运行时以被装饰的类的构造器函数,作为唯一参数而被调用。
|
||||
|
||||
> **注意** 应注意返回一个新的构造器函数,因为必须注意维护好原来的原型。运行时对装饰器的应用这一逻辑,并不会做这件事(Should you chose to return a new constructor function, you must take care to maintain the original prototype. The logic that applies decorators at runtime will not do this for you)。
|
||||
|
||||
下面是一个应用到`Greeter`类的类装饰器(`@sealed`)的示例:
|
||||
|
||||
```typescript
|
||||
@sealed
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
greeter () {
|
||||
return `Hello, { this.greeting }`;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
可将`@sealed`装饰器定义为使用下面的函数声明:
|
||||
|
||||
```typescript
|
||||
function sealed(constructor: Function) {
|
||||
Object.seal(constructor);
|
||||
Object.seal(constructor.prototype);
|
||||
}
|
||||
```
|
||||
|
||||
在`@sealed`装饰器(于运行时)被执行后,它将同时封闭构造器及其原型。
|
||||
|
||||
接着的是一个如何覆写构造器的示例:
|
||||
|
||||
```typescript
|
||||
function classDecorator<T extends {new( ...args: any[] ): {}}>(constructor: T) {
|
||||
return class extends constructor {
|
||||
newProperty = "new property";
|
||||
hello = "override";
|
||||
}
|
||||
}
|
||||
|
||||
@classDecorator
|
||||
class Greeter {
|
||||
property = "property";
|
||||
hello: string;
|
||||
|
||||
constructor(m: string) {
|
||||
this.hello = m;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(new Greeter("world"));
|
||||
```
|
||||
|
||||
<a name="method-decorators"></a>
|
||||
## 方法装饰器(Method Decorators)
|
||||
|
||||
*方法装饰器* 是在某个方法声明之前、紧接着该方法处使用的。此种装饰器被应用到方法的 *属性描述符* ,而可用于对方法定义进行观察、修改或替换。不能在定义文件、过载或任何其它已有上下文中(比如某个`declare`类中)使用方法装饰器(The decorator is applied to the *Property Descriptor* for the method, and can be used to observe, modify, or replace a method definition. A method decorator cannot be used in a declaration file, on an overload, or in any other ambient context(such as in a `declare` class))。
|
||||
|
||||
方法装饰器的表达式,将在运行时作为函数,以下面的三个参数进行调用:
|
||||
|
||||
1. 静态成员的类构造函数,或实例成员的类的原型(Either the constructor function of the class for a static member, or the prototype of the class for an instance member, )。
|
||||
|
||||
> 关于静态成员与实例成员的区别:
|
||||
|
||||
> 前面所说的都是对于类的实例成员,在实例化后的对象才会起作用。可以使用static定义类中的静态成员,所有实例可以使用this中的名称来访问静态成员。
|
||||
> [TypeScript笔记](http://yrq110.me/2018/01/06/20180106-typescript-note/)
|
||||
|
||||
2. 成员的名称。
|
||||
|
||||
3. 成员的 *属性描述符*。
|
||||
|
||||
> **注意** 在低于ES5的目标脚本中, *成员描述符* 将为 `undefined`。
|
||||
|
||||
在方法装饰器有返回值时,其将作为该方法的 *属性描述符*。
|
||||
|
||||
> **注意** 在目标脚本低于ES5版本中,该返回值将被忽略。
|
||||
|
||||
下面是一个应用到`Greeter`类的方法装饰器(`@enumerable`)的示例:
|
||||
|
||||
```typescript
|
||||
function enumerable (value: boolean) {
|
||||
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
descriptor.enumerable = value;
|
||||
}
|
||||
}
|
||||
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
|
||||
constructor (m: string) {
|
||||
this.greeting = m;
|
||||
}
|
||||
|
||||
@enumerable(false)
|
||||
greet () {
|
||||
return `Hello, ${ this.greeting }`;
|
||||
}
|
||||
}
|
||||
|
||||
let g = new Greeter("world");
|
||||
console.log(g.greet());
|
||||
```
|
||||
|
||||
这里的`@enumerable(false)`装饰器是一个装饰器工厂。在`@enumerable(false)`装饰器被调用时,其就对属性描述符的`enumberable`属性,进行修改。
|
||||
|
||||
<a name="accessor-decorators"></a>
|
||||
## 访问器装饰器(Accessor Decorators)
|
||||
|
||||
*访问器装饰器* 是在紧接着某个访问器声明之前进行声明的。访问器装饰器是应用到该访问器的 *属性描述符(the Property Descriptor)* 上的,且可用于对某个访问器的定义进行观察、修改或替换。在定义文件、或其他任何外围上下文(比如某个`declare`的类)中,都不能使用访问器的装饰器。
|
||||
|
||||
> **注意** 对与单个成员,TypeScript是不允许对其`get`或`set`访问器进行装饰的。而是该成员的所有装饰器,都必须应用到按文档顺序所指定的第一个访问器(TypeScript disallows decorating both the `get` and `set` accessor for a single member. Instead, all decorators for the member must be applied to the first accessor specified in document order)。这是因为应用到 *熟悉描述符* 的那些结合了`get`与`set`访问器的装饰器,并不是各自单独声明的。
|
||||
|
||||
访问器装饰器的表达式,在运行时将作为函数得以调用,有着以下三个参数:
|
||||
|
||||
1. 对于静态成员,类的构造函数;或对于实例成员,那就就是类的原型
|
||||
|
||||
2. 该成员的名称
|
||||
|
||||
3. 该成员的 *属性描述符*
|
||||
|
||||
在访问器装饰器返回一个值时,该值将作为成员的 *属性描述符* 得以使用。
|
||||
|
||||
> **注意** 在低于`ES5`的目标脚本下,该返回值将被忽略。
|
||||
|
||||
下面是一个应用到`Point`类的某个成员上的访问器修饰器`@configurable`的示例:
|
||||
|
||||
```typescript
|
||||
Class Point {
|
||||
private _x: number;
|
||||
private _y: number;
|
||||
|
||||
constructor (x: number, y: number) {
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
}
|
||||
|
||||
@configurable (false)
|
||||
get x() { return this._x; }
|
||||
|
||||
@configurable (false)
|
||||
get y() { return this._y; }
|
||||
}
|
||||
```
|
||||
|
||||
使用以下的函数声明,可定义出该`@configurable`装饰器:
|
||||
|
||||
```typescript
|
||||
function configurable (value: boolean) {
|
||||
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
descriptor.configurable = value;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<a name="property-decorators"></a>
|
||||
## 属性装饰器(Property Decorators)
|
||||
|
||||
*属性装饰器* 是紧接着某个属性声明之前进行声明的。在声明文件中,以及任何其他外围上下文(比如在某个`declare`类中),都不能使用属性装饰器。
|
||||
|
||||
属性装饰器的表达式,将在运行时作为函数进行调用,有着以下两个参数:
|
||||
|
||||
1. 某个静态成员的类构造函数,或某个实例成员的类的原型;
|
||||
|
||||
2. 该成员的名称。
|
||||
|
||||
> **注意** 由于在TypeScript中属性装饰器初始化方式的原因,将不会把 *属性描述符* 提供给属性装饰器。这是因为在定义某个原型的成员时,目前还没有对实例属性进行描述的机制,同时也没有对某个属性的初始化器进行观察与修改的途径。由于上述原因,属性装饰器的返回值也被加以忽略了。那么属性装饰器就只能用于已声明为某个类的、某个指定名称的属性进行观察了。
|
||||
|
||||
有了这些信息,就可以记录有关该属性的元数据了,如下面的示例:
|
||||
|
||||
```typescript
|
||||
class Greeter {
|
||||
@format("Hello, %s")
|
||||
greeting: string;
|
||||
|
||||
constructor (message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
greet () {
|
||||
let formatString = getFormat(this, "greeting");
|
||||
return formatString.replace(""%s", this.greeting);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
此时就可以使用下的函数声明,来定义该`@format`装饰器与`getFormat`函数:
|
||||
|
||||
```typescript
|
||||
import "reflect-metadata";
|
||||
|
||||
// const formatMetadataKey = Symbol("format");
|
||||
// const formatMetadataKey: Symbol;
|
||||
//
|
||||
// 上面两种写法都不行,估计是新版本的typescript已经不支持 Symbol 类型变量的初始化了
|
||||
let formatMetadataKey: Symbol;
|
||||
|
||||
function format (formatMetadataKey: string) {
|
||||
return Reflect.metadata(formatMetadataKey, formatString);
|
||||
}
|
||||
|
||||
function getFormat (target: any, propertyKey: string) {
|
||||
return Reflect.getMetadata(formatMetadataKey, target, propertyKey);
|
||||
}
|
||||
```
|
||||
|
||||
这里的装饰器 `@format("Hello, %s")`是一个 [装饰器工厂](#decorator-factories) 。在调用`@format("Hello, %s")`时,该函数就使用`reflect-metadata`库`Reflect.metadata`函数,添加该属性`greeting`的一个元数据条目。在调用`getFormat`时,`getFormat`函数就读取到那个格式的元数据值了。
|
||||
|
||||
> **注意** 此示例需要`reflect-metadata`库。请参阅 [元数据](#metadata) 部分了解有关 `reflect-metadata`库更多的信息。
|
||||
|
||||
|
||||
<a name="parameter-decorators"></a>
|
||||
## 参数装饰器(parameter decorators)
|
||||
|
||||
*参数装饰器*,是紧接着某个参数声明之前进行声明的。参数装饰器应用到类构造器或类的方法声明的函数上的(the parameter decorator is applied to the function for a class constructor or method declaration)。参数装饰器不能用在声明文件(`.d.ts`)、重载(overload)或其他外围上下文(ambient context,比如在某个`declare`类中)。
|
||||
|
||||
参数装饰器的表达式在运行时将作为函数加以调用,其有着以下三个参数:
|
||||
|
||||
1. 静态成员的类的构造函数,或实例成员的类的原型;
|
||||
|
||||
2. 成员的名称;
|
||||
|
||||
3. 对应参数在函数参数列表中的顺序索引。
|
||||
|
||||
> **注意** 参数装饰器只能用于对某个方法上已声明的某个参数进行观察(A parameter decorator can only be used to observe that a parameter has been declared on a method)。
|
||||
|
||||
以下是一个参数装饰器(`@required`)的示例,该参数装饰器应用到`Greeter`类的成员的参数上:
|
||||
|
||||
```typescript
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
@validate
|
||||
greet(@required name: string) {
|
||||
return "Hello " + name + ", " + this.greeting;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
可使用下面的函数声明,来定义出`@required`与`@validate`两个装饰器:
|
||||
|
||||
```typescript
|
||||
import "reflect-metadata";
|
||||
|
||||
let requiredMetadataKey: Symbol;
|
||||
|
||||
function required(target: Object, propertyKey: string | symbol, parameterIndex: number) {
|
||||
let existingRequiredParameters: number[] = Reflect.getOwnMetadata(requiredMetadataKey, target, propertyKey) || [];
|
||||
|
||||
existingRequiredParameters.push(parameterIndex);
|
||||
Reflect.defineMetadata(requiredMetadataKey, existingRequiredParameters, target, propertyKey);
|
||||
}
|
||||
|
||||
function validate (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<Function>) {
|
||||
let method = descriptor.value;
|
||||
|
||||
descriptor.value = function () {
|
||||
let requiredParameters: number[] = Reflect.getOwnMetadata(requiredMetadataKey, target, propertyName);
|
||||
|
||||
if(requiredParameters) {
|
||||
for ( let parameterIndex of requiredParameters ) {
|
||||
if (parameterIndex >= arguments.length || arguments[parameterIndex] === undefined) {
|
||||
throw new Error("缺少需要的参数。");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return method.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
这里的`@required`装饰器加入了一个将该参数标识为必需的元数据条目(the `@required` decorator adds a metadata entry that marks the parameter as required)。而`@validate`装饰器随后将现有的`greet`方法,封装为一个在调用该原始方法前,对参数进行验证的函数。
|
||||
|
||||
> **注意** 此示例需要`reflect-metadata`库。请参阅 [元数据](#metadata) 了解更多有个该`reflect-metadata`库的信息。
|
||||
|
||||
<a name="metadata"></a>
|
||||
## 关于元数据(Metadata)
|
||||
|
||||
上面的示例使用到加入了 [实验性元数据 API](https://github.com/rbuckton/ReflectDecorators)的 `reflect-metadata`库。该库还没有成为 ECMASript(JavaScript)标准的一部分。但如果装饰器一旦作为ECMAScript标准而正式采纳,那么这些扩展也将被提议采用。
|
||||
|
||||
可通过`npm`来安装该库:
|
||||
|
||||
```sh
|
||||
npm i reflect-metadata --save-dev
|
||||
```
|
||||
|
||||
TypeScript包含了对那些有着装饰器的声明的确定类型的元数据的生成的实验性支持(TypeScript includes experimental support for emitting certain types of metadata for declarations that have decorators)。要开启此项实验性支持功能,就必须通过命令行或在`tsconfig.json`文件中对`emitDecoratorMetadata`编译器选项进行设置:
|
||||
|
||||
**命令行方式**:
|
||||
|
||||
```sh
|
||||
tsc --target ES5 --experimentalDecorators --emitDecoratorMetadata
|
||||
```
|
||||
|
||||
**`tsconfig.json方式`**:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES5",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
在开启了这些选项,同时导入了`reflect-metadata`库之后,那些设计阶段的额外类型信息,将在运行时得以暴露。
|
||||
|
||||
在以下示例中,可观察到这一点起了作用:
|
||||
|
||||
```typescript
|
||||
import "reflect-metadata";
|
||||
|
||||
class Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
class Line {
|
||||
private _p0: Point;
|
||||
private _p1: Point;
|
||||
|
||||
@validate
|
||||
set p0(value: Point) { this._p0 = value; }
|
||||
get p0() { return this._p0; }
|
||||
|
||||
|
||||
@validate
|
||||
set p1(value: Point) { this._p1 = value; }
|
||||
get p1() { return this._p1; }
|
||||
}
|
||||
|
||||
function validate<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>) {
|
||||
let set = descriptor.set;
|
||||
descriptor.set = function(value: T) {
|
||||
let type = Reflect.getMetadata("design:type", target, propertyKey);
|
||||
|
||||
if (!(value instanceof type)) {
|
||||
throw new TypeError("无效的类型。");
|
||||
}
|
||||
set(value);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> **注意** 装饰器元数据是一项实验性特性,TypeScript以后的发布可能引入对此的剧烈变动。
|
136
_book/20_mixins.md
Normal file
136
_book/20_mixins.md
Normal file
@ -0,0 +1,136 @@
|
||||
# 混入
|
||||
|
||||
## Mixins
|
||||
|
||||
## 简介
|
||||
|
||||
自可重用组建构造出类,除了传统的面向对象层次外,还有另一种流行方式,即通过将较为简单的小部分类结合起来(along with traditional OO hierarchies, another popular way of building up classes from resuable components is to build them by combining simpler partial classes)。如熟悉 Scala 等编程语言中的 [混入](https://en.wikipedia.org/wiki/Mixin) 或 [traits](https://en.wikipedia.org/wiki/Trait_(computer_programming))特性,那么这些特性也已在 JavaScript 社区中有一些接受了。
|
||||
|
||||
## 混入示例
|
||||
|
||||
在下面的代码中,展示了在TypeScript进行混入建模的方式。接着该代码,这里将分步说明混入是如何工作的。
|
||||
|
||||
|
||||
```typescript
|
||||
// 一个名为 Disposable 的混入
|
||||
class Disposable {
|
||||
isDisposable: boolean;
|
||||
dispose () {
|
||||
this.isDisposable = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 一个名为 Activatable 的混入
|
||||
class Activatable {
|
||||
isActive: boolean;
|
||||
|
||||
activate() {
|
||||
this.isActive = true;
|
||||
}
|
||||
|
||||
deactivate() {
|
||||
this.isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
class SmartObject implements Disposable, Activatable {
|
||||
constructor() {
|
||||
setInterval(() => {
|
||||
console.log(`${this.isActive} : ${this.isDisposable}`)
|
||||
}, 500);
|
||||
}
|
||||
|
||||
interact() {
|
||||
this.activate();
|
||||
}
|
||||
|
||||
// Disposable
|
||||
isDisposable: boolean = false;
|
||||
dispose: () => void;
|
||||
|
||||
// Activatable
|
||||
isActive: boolean = false;
|
||||
activate: () => void;
|
||||
deactivate: () => void;
|
||||
}
|
||||
|
||||
applyMixins(SmartObject, [Disposable, Activatable]);
|
||||
|
||||
let smartObj = new SmartObject();
|
||||
setTimeout(() => smartObj.interact(), 1000);
|
||||
|
||||
function applyMixins(derivedCtor: any, baseCtors: any[]) {
|
||||
baseCtors.forEach(baseCtor => {
|
||||
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
||||
derivedCtor.prototype[name] = baseCtor.prototype[name];
|
||||
});
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
## 掌握该示例
|
||||
|
||||
该段代码一两个扮演了这里混入角色的类开始。可以看出他们各自着重于某个特定行为或功能。随后就将他们混合在了一起,从而形成了一个新的、同时有着二者功能的类。
|
||||
|
||||
```typescript
|
||||
// 一个名为 Disposable 的混入
|
||||
class Disposable {
|
||||
isDisposable: boolean;
|
||||
dispose () {
|
||||
this.isDisposable = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 一个名为 Activatable 的混入
|
||||
class Activatable {
|
||||
isActive: boolean;
|
||||
|
||||
activate() {
|
||||
this.isActive = true;
|
||||
}
|
||||
|
||||
deactivate() {
|
||||
this.isActive = false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
接着创建了将对上述两个混入进行结合的类。来更详细地看看这个新类是如何完成结合的:
|
||||
|
||||
```typescript
|
||||
class SmartObject implements Disposable, Activatable {}
|
||||
```
|
||||
|
||||
|
||||
可能注意到的第一件事,便是这里使用了`implements`而非`extends`关键字。此做法就将两个混入类作为接口看待了,同时仅使用了`Disposable`与`Activatable`背后的类型,而非他们的实现。这就意味着在新类`SmartObject`中必须提供到实现。不过,这一点正是在使用混入特性时要避免的(This means that we'll have to provide the implementation in class. Except, that's exactly what we want to avoid by using mixins)。
|
||||
|
||||
为满足此要求,这里为那些将要从混入类中过来的成员,创建出了他们的起身属性及其相应类型。于是令到编译器满足于运行时这些成员可用了。虽然这样做有些重复累赘,不过确实能获得使用混入特性的好处。
|
||||
|
||||
```typescript
|
||||
// Disposable
|
||||
isDisposable: boolean = false;
|
||||
dispose: () => void;
|
||||
|
||||
// Activatable
|
||||
isActive: boolean = false;
|
||||
activate: () => void;
|
||||
deactivate: () => void;
|
||||
```
|
||||
|
||||
最后,将两个混入类混合到一起,创建完整的实现。
|
||||
|
||||
```typescript
|
||||
applyMixins(SmartObject, [Disposable, Activatable]);
|
||||
```
|
||||
|
||||
代码的最后,创建了完成混合的一个助手函数。该函数将遍历各个混入类的那些属性,并将这些属性拷贝到这些混入的目标,以这些属性的实现,将其替身属性填充起来。
|
||||
|
||||
```typescript
|
||||
function applyMixins(derivedCtor: any, baseCtors: any[]) {
|
||||
baseCtors.forEach(baseCtor => {
|
||||
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
||||
derivedCtor.prototype[name] = baseCtor.prototype[name];
|
||||
});
|
||||
});
|
||||
}
|
||||
```
|
106
_book/21_triple-slash_directives.md
Normal file
106
_book/21_triple-slash_directives.md
Normal file
@ -0,0 +1,106 @@
|
||||
# 三斜杠指令
|
||||
|
||||
## Triple-Slash Directives
|
||||
|
||||
三斜杠指令,指的是包含了单个的 XML(eXtensible Markup Language, 可扩展标记语言)的单行评论。评论内容是作为编译器指令,进行使用的。
|
||||
|
||||
三斜杠指令, **只有** 位于包含他们的文件顶部时,才生效。一条三斜杠指令后面,只能跟一条单行或多行注释,包含其他三斜杠指令。在他们中有跟随了一条语句或圣母的情况,那么他们将作为常规的单行注释对待,而不再有特殊意义(A triple-slash directive can only be preceded by single or multi-line comments, including other triple-slash directives. If they are encountered following a statement or a declaration they are treated as regular single-line comments, and hold no special meaning)。
|
||||
|
||||
```typescript
|
||||
/// <reference path="..." />
|
||||
```
|
||||
|
||||
指令 `/// <reference path="..." />` 是三斜杠指令中最常见的。其是作为文件之间 *依赖* 的声明而发挥作用的(It serves as a declaration of *dependency* between files)。
|
||||
|
||||
三斜杠的引用,告知编译器在编译过程中,要包含额外的文件。
|
||||
|
||||
在使用了`--out` 或 `--outFile`选项时,三斜杠引用还作为一种将编译输出进行排序的方式,而发挥作用。此时编译生成的文件,将按照与预处理完成后的输出同样的顺序,生成到输出文件位置(They also serve as a method to order the output when using `--out` or `--outFile`. Files are emitted to the output file location in the same order as the input after preprocessing pass)。
|
||||
|
||||
## 输入文件的预处理(preprocessing input files)
|
||||
|
||||
编译器对输入文件执行预处理,从而对所有三斜杠指令完成解析。在此过程中,那些额外文件就被添加到编译中。
|
||||
|
||||
预处理过程一些 *根文件(root files)* 开始,这些根文件为在命令行上指定的文件名,或在`tsconfig.json`文件中列入到`files`字段的那些文件。这些根文件将按照指定他们的顺序得以预处理。在某个文件加入到根文件清单之前,所有该文件中的三斜杠引用,都会得到处理,且这些三斜杠引用的目标都被包含进来。三斜杠引用的解析,是以引用深度优先方式、以引用在文件中被观察到的顺序进行的。
|
||||
|
||||
在三斜杠引用路径没有指定根的时候,引用路径都是以相对与包含他们的那些文件,进行解析的。
|
||||
|
||||
## 错误处理(errors)
|
||||
|
||||
在引用了不存在的文件时,就出现了错误。对自身的三斜杠引用,也是错误的。
|
||||
|
||||
## `--noResolve`的使用(using `--noResolve`)
|
||||
|
||||
在指定了`--noResolve`编译器开关时,就会忽略三斜杠引用;此时三斜杠引用既不会加入新的文件,也不会改变所提供到的文件顺序。
|
||||
|
||||
## `/// <reference types="..." />`
|
||||
|
||||
与 `/// <reference path="..." />` 指令类似,该指令也是作为 *依赖* 的声明而发挥作用的;不过 `/// <reference types="..." />` 指令则声明了对某个包的依赖。
|
||||
|
||||
对这些包名称的解析过程,与`import`语句中对模块的解析过程类似。对“三斜杠类型引用(triple-slash-reference-types)”的一种简便理解,便是将其作为一个包声明的`import`语句。
|
||||
|
||||
比如,在某个声明文件中包含了`/// <reference types="node" />`,就声明了此文件将用到在`@types/node/index.d.ts`中中所声明的名称;那么因此这个`node`包就需要在编译过程中与该声明文件一同包含进来。
|
||||
|
||||
请只有在手动编写某个`d.ts`文件时,才使用这类指令。
|
||||
|
||||
对于那些在编译过程中生成的声明文件,编译器将自动为您加入`/// <reference types="..." />`指令;有且只有在生成文件用到所引用的包中的某个声明时,编译器才会将某个`/// <reference types="..." />`指令加入到所生成的声明文件中。
|
||||
|
||||
在声明对某个`.ts`文件中的`@types`包的依赖时,就要在命令行或`tsconfig.json`文件中,使用`--types`选项了。请参考 [在`tsconfig.json`文件中使用`@types`、`typeRoots`以及`types`](tsconfig-json.md#types-typeroots-and-types)。
|
||||
|
||||
## `/// <reference lib="..." />`
|
||||
|
||||
该指令令到某个文件可以显式地包含某个既有的内建 *库(lib)* 文件。
|
||||
|
||||
内建 *库* 文件是以与`tsconfig.json`中的`lib`编译器选项同样的方式(比如,使用`lib=es2015`而非 `lib="lib.es2015.d.ts"`等等),加以引用的。
|
||||
|
||||
对于那些对内建类型,比如DOM APIs或诸如`Symbol`或`Iterable`这样内建 JavaScript运行时构造器,有所依赖的声明文件编写者来说,推荐使用三斜杠库引用指令(triple-slash-reference lib directives)。在没有三斜杠库引用指令之前,这些`.d.ts`文件就必须加入这些内建类型的前向/重复声明(previously these `.d.ts` files had to add forward/duplicate declarations of such types)。
|
||||
|
||||
比如,将`/// <reference lib="es2017.string" />` 添加到编译中的某个文件,就等同于使用`--lib es2017.string`编译选项。
|
||||
|
||||
```typescript
|
||||
/// <reference lib="es2017.string" />
|
||||
|
||||
"foo".padStart(4); // " foo"
|
||||
```
|
||||
|
||||
## `/// <reference no-default-lib="true" />`
|
||||
|
||||
本指令将某个文件标记为 *默认库(default library)*。在`lib.d.ts`文件顶部可以看到此注释机器不同变种。
|
||||
|
||||
该指令告诉编译器在编译中不要包含默认库(比如`lib.d.ts`)。其影响与在命令行上传入`--noLib`选项类似。
|
||||
|
||||
还要注意在传入`--skipDefaultLibCheck`参数时,编译器仅跳过那些有着`/// <reference no-default-with="true" />`的文件的检查。
|
||||
|
||||
|
||||
## `/// <amd-module />`
|
||||
|
||||
> *注:* AMD是指异步模块定义API,Asynchronous Module Definition API, 参见[github.com/amdjs](https://github.com/amdjs/amdjs-api/wiki/AMD)。
|
||||
|
||||
默认情况下AMD的模块是匿名生成的。这在有使用其他工具,诸如某些打包器(如`r.js`),来处理生成的模块时可能导致某些问题。
|
||||
|
||||
`amd-module`指令允许将可选的模块名称,传递给编译器:
|
||||
|
||||
*amdModule.ts*
|
||||
|
||||
```typescript
|
||||
/// <amd-module name="NamedModule" />
|
||||
export class C {}
|
||||
```
|
||||
|
||||
上面的代码的效果是将名称`NamedModule`,作为对 AMD `define`的调用的一部分,赋予给该模块:
|
||||
|
||||
*amdModule.js*
|
||||
|
||||
```javascript
|
||||
define("NamedModule", ["require", "exports"], function (require, exports) {
|
||||
var C = (function () {
|
||||
function C() {}
|
||||
return C;
|
||||
})();
|
||||
|
||||
exports.C = C;
|
||||
});
|
||||
```
|
||||
|
||||
## `<amd-dependency />`
|
||||
|
||||
> **注意**: 该指令已被启用。请直接使用 `import "moduleName";` 语句。
|
1
_book/_config.yml
Normal file
1
_book/_config.yml
Normal file
@ -0,0 +1 @@
|
||||
theme: jekyll-theme-slate
|
13
_book/git-push.sh
Normal file
13
_book/git-push.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
git add .
|
||||
|
||||
if [ "$1" = "" ]
|
||||
then
|
||||
echo "没有commit -m的输入,请输入commit -m内容,以[ENTER]结束:"
|
||||
read msg
|
||||
git commit -m "$msg"
|
||||
git push
|
||||
else
|
||||
git commit -m "$1"
|
||||
git push
|
||||
fi
|
BIN
_book/gitbook/fonts/fontawesome/FontAwesome.otf
Normal file
BIN
_book/gitbook/fonts/fontawesome/FontAwesome.otf
Normal file
Binary file not shown.
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot
Normal file
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot
Normal file
Binary file not shown.
685
_book/gitbook/fonts/fontawesome/fontawesome-webfont.svg
Normal file
685
_book/gitbook/fonts/fontawesome/fontawesome-webfont.svg
Normal file
@ -0,0 +1,685 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata></metadata>
|
||||
<defs>
|
||||
<font id="fontawesomeregular" horiz-adv-x="1536" >
|
||||
<font-face units-per-em="1792" ascent="1536" descent="-256" />
|
||||
<missing-glyph horiz-adv-x="448" />
|
||||
<glyph unicode=" " horiz-adv-x="448" />
|
||||
<glyph unicode="	" horiz-adv-x="448" />
|
||||
<glyph unicode=" " horiz-adv-x="448" />
|
||||
<glyph unicode="¨" horiz-adv-x="1792" />
|
||||
<glyph unicode="©" horiz-adv-x="1792" />
|
||||
<glyph unicode="®" horiz-adv-x="1792" />
|
||||
<glyph unicode="´" horiz-adv-x="1792" />
|
||||
<glyph unicode="Æ" horiz-adv-x="1792" />
|
||||
<glyph unicode="Ø" horiz-adv-x="1792" />
|
||||
<glyph unicode=" " horiz-adv-x="768" />
|
||||
<glyph unicode=" " horiz-adv-x="1537" />
|
||||
<glyph unicode=" " horiz-adv-x="768" />
|
||||
<glyph unicode=" " horiz-adv-x="1537" />
|
||||
<glyph unicode=" " horiz-adv-x="512" />
|
||||
<glyph unicode=" " horiz-adv-x="384" />
|
||||
<glyph unicode=" " horiz-adv-x="256" />
|
||||
<glyph unicode=" " horiz-adv-x="256" />
|
||||
<glyph unicode=" " horiz-adv-x="192" />
|
||||
<glyph unicode=" " horiz-adv-x="307" />
|
||||
<glyph unicode=" " horiz-adv-x="85" />
|
||||
<glyph unicode=" " horiz-adv-x="307" />
|
||||
<glyph unicode=" " horiz-adv-x="384" />
|
||||
<glyph unicode="™" horiz-adv-x="1792" />
|
||||
<glyph unicode="∞" horiz-adv-x="1792" />
|
||||
<glyph unicode="≠" horiz-adv-x="1792" />
|
||||
<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
|
||||
<glyph unicode="" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
|
||||
<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z " />
|
||||
<glyph unicode="" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
|
||||
<glyph unicode="" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
|
||||
<glyph unicode="" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
|
||||
<glyph unicode="" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
|
||||
<glyph unicode="" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
|
||||
<glyph unicode="" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" />
|
||||
<glyph unicode="" d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49 t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
|
||||
<glyph unicode="" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
|
||||
<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
|
||||
<glyph unicode="" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" />
|
||||
<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
|
||||
<glyph unicode="" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
|
||||
<glyph unicode="" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
|
||||
<glyph unicode="" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
|
||||
<glyph unicode="" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
|
||||
<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
|
||||
<glyph unicode="" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
|
||||
<glyph unicode="" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M640 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1536 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1664 1088v-512q0 -24 -16.5 -42.5t-40.5 -21.5l-1044 -122q13 -60 13 -70q0 -16 -24 -64h920q26 0 45 -19t19 -45 t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 11 8 31.5t16 36t21.5 40t15.5 29.5l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t19.5 -15.5t13 -24.5t8 -26t5.5 -29.5t4.5 -26h1201q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
|
||||
<glyph unicode="" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" />
|
||||
<glyph unicode="" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-188v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-532q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
|
||||
<glyph unicode="" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
|
||||
<glyph unicode="" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
|
||||
<glyph unicode="" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
|
||||
<glyph unicode="" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" d="M519 336q4 6 -3 13q-9 7 -14 2q-4 -6 3 -13q9 -7 14 -2zM491 377q-5 7 -12 4q-6 -4 0 -12q7 -8 12 -5q6 4 0 13zM450 417q2 4 -5 8q-7 2 -8 -2q-3 -5 4 -8q8 -2 9 2zM471 394q2 1 1.5 4.5t-3.5 5.5q-6 7 -10 3t1 -11q6 -6 11 -2zM557 319q2 7 -9 11q-9 3 -13 -4 q-2 -7 9 -11q9 -3 13 4zM599 316q0 8 -12 8q-10 0 -10 -8t11 -8t11 8zM638 323q-2 7 -13 5t-9 -9q2 -8 12 -6t10 10zM1280 640q0 212 -150 362t-362 150t-362 -150t-150 -362q0 -167 98 -300.5t252 -185.5q18 -3 26.5 5t8.5 20q0 52 -1 95q-6 -1 -15.5 -2.5t-35.5 -2t-48 4 t-43.5 20t-29.5 41.5q-23 59 -57 74q-2 1 -4.5 3.5l-8 8t-7 9.5t4 7.5t19.5 3.5q6 0 15 -2t30 -15.5t33 -35.5q16 -28 37.5 -42t43.5 -14t38 3.5t30 9.5q7 47 33 69q-49 6 -86 18.5t-73 39t-55.5 76t-19.5 119.5q0 79 53 137q-24 62 5 136q19 6 54.5 -7.5t60.5 -29.5l26 -16 q58 17 128 17t128 -17q11 7 28.5 18t55.5 26t57 9q29 -74 5 -136q53 -58 53 -137q0 -57 -14 -100.5t-35.5 -70t-53.5 -44.5t-62.5 -26t-68.5 -12q35 -31 35 -95q0 -40 -0.5 -89t-0.5 -51q0 -12 8.5 -20t26.5 -5q154 52 252 185.5t98 300.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
|
||||
<glyph unicode="" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
|
||||
<glyph unicode="" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" />
|
||||
<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -40 7t-13 30q0 3 0.5 76.5t0.5 134.5q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 119 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24 q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-85 13.5q-45 -113 -8 -204q-79 -87 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-39 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5 t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -88.5t0.5 -54.5q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103zM291 305q3 7 -7 12 q-10 3 -13 -2q-3 -7 7 -12q9 -6 13 2zM322 271q7 5 -2 16q-10 9 -16 3q-7 -5 2 -16q10 -10 16 -3zM352 226q9 7 0 19q-8 13 -17 6q-9 -5 0 -18t17 -7zM394 184q8 8 -4 19q-12 12 -20 3q-9 -8 4 -19q12 -12 20 -3zM451 159q3 11 -13 16q-15 4 -19 -7t13 -15q15 -6 19 6z M514 154q0 13 -17 11q-16 0 -16 -11q0 -13 17 -11q16 0 16 11zM572 164q-2 11 -18 9q-16 -3 -14 -15t18 -8t14 14z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
|
||||
<glyph unicode="" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
|
||||
<glyph unicode="" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
|
||||
<glyph unicode="" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
|
||||
<glyph unicode="" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
|
||||
<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" />
|
||||
<glyph unicode="" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
|
||||
<glyph unicode="" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
|
||||
<glyph unicode="" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
|
||||
<glyph unicode="" d="M917 631q0 26 -6 64h-362v-132h217q-3 -24 -16.5 -50t-37.5 -53t-66.5 -44.5t-96.5 -17.5q-99 0 -169 71t-70 171t70 171t169 71q92 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585 h109v110h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1437 623q0 -208 -87 -370.5t-248 -254t-369 -91.5q-149 0 -285 58t-234 156t-156 234t-58 285t58 285t156 234t234 156t285 58q286 0 491 -192l-199 -191q-117 113 -292 113q-123 0 -227.5 -62t-165.5 -168.5t-61 -232.5t61 -232.5t165.5 -168.5t227.5 -62 q83 0 152.5 23t114.5 57.5t78.5 78.5t49 83t21.5 74h-416v252h692q12 -63 12 -122zM2304 745v-210h-209v-209h-210v209h-209v210h209v209h210v-209h209z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
|
||||
<glyph unicode="" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
|
||||
<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
|
||||
<glyph unicode="" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5 t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704 q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
|
||||
<glyph unicode="" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M526 142q0 -53 -37.5 -90.5t-90.5 -37.5q-52 0 -90 38t-38 90q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 -64q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -53 -37.5 -90.5t-90.5 -37.5 t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1522 142q0 -52 -38 -90t-90 -38q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM558 1138q0 -66 -47 -113t-113 -47t-113 47t-47 113t47 113t113 47t113 -47t47 -113z M1728 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1088 1344q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1618 1138q0 -93 -66 -158.5t-158 -65.5q-93 0 -158.5 65.5t-65.5 158.5 q0 92 65.5 158t158.5 66q92 0 158 -66t66 -158z" />
|
||||
<glyph unicode="" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
|
||||
<glyph unicode="" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
|
||||
<glyph unicode="" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" />
|
||||
<glyph unicode="" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" />
|
||||
<glyph unicode="" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" />
|
||||
<glyph unicode="" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
|
||||
<glyph unicode="" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
|
||||
<glyph unicode="" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
|
||||
<glyph unicode="" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
|
||||
<glyph unicode="" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
|
||||
<glyph unicode="" d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" />
|
||||
<glyph unicode="" d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
|
||||
<glyph unicode="" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
|
||||
<glyph unicode="" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" />
|
||||
<glyph unicode="" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
|
||||
<glyph unicode="" d="M1289 -96h-1118v480h-160v-640h1438v640h-160v-480zM347 428l33 157l783 -165l-33 -156zM450 802l67 146l725 -339l-67 -145zM651 1158l102 123l614 -513l-102 -123zM1048 1536l477 -641l-128 -96l-477 641zM330 65v159h800v-159h-800z" />
|
||||
<glyph unicode="" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1162 640q0 -164 -115 -279t-279 -115t-279 115t-115 279t115 279t279 115t279 -115t115 -279zM1270 1050q0 -38 -27 -65t-65 -27t-65 27t-27 65t27 65t65 27t65 -27t27 -65zM768 1270 q-7 0 -76.5 0.5t-105.5 0t-96.5 -3t-103 -10t-71.5 -18.5q-50 -20 -88 -58t-58 -88q-11 -29 -18.5 -71.5t-10 -103t-3 -96.5t0 -105.5t0.5 -76.5t-0.5 -76.5t0 -105.5t3 -96.5t10 -103t18.5 -71.5q20 -50 58 -88t88 -58q29 -11 71.5 -18.5t103 -10t96.5 -3t105.5 0t76.5 0.5 t76.5 -0.5t105.5 0t96.5 3t103 10t71.5 18.5q50 20 88 58t58 88q11 29 18.5 71.5t10 103t3 96.5t0 105.5t-0.5 76.5t0.5 76.5t0 105.5t-3 96.5t-10 103t-18.5 71.5q-20 50 -58 88t-88 58q-29 11 -71.5 18.5t-103 10t-96.5 3t-105.5 0t-76.5 -0.5zM1536 640q0 -229 -5 -317 q-10 -208 -124 -322t-322 -124q-88 -5 -317 -5t-317 5q-208 10 -322 124t-124 322q-5 88 -5 317t5 317q10 208 124 322t322 124q88 5 317 5t317 -5q208 -10 322 -124t124 -322q5 -88 5 -317z" />
|
||||
<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
|
||||
<glyph unicode="" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
|
||||
<glyph unicode="" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 q78 2 134 29z" />
|
||||
<glyph unicode="" d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
|
||||
<glyph unicode="" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
|
||||
<glyph unicode="" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
|
||||
<glyph unicode="" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324 l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" />
|
||||
<glyph unicode="" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
|
||||
<glyph unicode="" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
|
||||
<glyph unicode="" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
|
||||
<glyph unicode="" d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -5 1 -50.5t-1 -71.5q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z " />
|
||||
<glyph unicode="" d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 16 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" />
|
||||
<glyph unicode="" d="M1292 898q10 216 -161 222q-231 8 -312 -261q44 19 82 19q85 0 74 -96q-4 -57 -74 -167t-105 -110q-43 0 -82 169q-13 54 -45 255q-30 189 -160 177q-59 -7 -164 -100l-81 -72l-81 -72l52 -67q76 52 87 52q57 0 107 -179q15 -55 45 -164.5t45 -164.5q68 -179 164 -179 q157 0 383 294q220 283 226 444zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2176" d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40 t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29 q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9 q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102 t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" />
|
||||
<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69 q-46 32 -141.5 92.5t-142.5 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13 t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5 t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21 t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286 t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273 t273 -182.5t331.5 -68z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64 q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433 q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" />
|
||||
<glyph unicode="" d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q43 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0 q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" />
|
||||
<glyph unicode="" d="M768 750h725q12 -67 12 -128q0 -217 -91 -387.5t-259.5 -266.5t-386.5 -96q-157 0 -299 60.5t-245 163.5t-163.5 245t-60.5 299t60.5 299t163.5 245t245 163.5t299 60.5q300 0 515 -201l-209 -201q-123 119 -306 119q-129 0 -238.5 -65t-173.5 -176.5t-64 -243.5 t64 -243.5t173.5 -176.5t238.5 -65q87 0 160 24t120 60t82 82t51.5 87t22.5 78h-436v264z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1095 369q16 -16 0 -31q-62 -62 -199 -62t-199 62q-16 15 0 31q6 6 15 6t15 -6q48 -49 169 -49q120 0 169 49q6 6 15 6t15 -6zM788 550q0 -37 -26 -63t-63 -26t-63.5 26t-26.5 63q0 38 26.5 64t63.5 26t63 -26.5t26 -63.5zM1183 550q0 -37 -26.5 -63t-63.5 -26t-63 26 t-26 63t26 63.5t63 26.5t63.5 -26t26.5 -64zM1434 670q0 49 -35 84t-85 35t-86 -36q-130 90 -311 96l63 283l200 -45q0 -37 26 -63t63 -26t63.5 26.5t26.5 63.5t-26.5 63.5t-63.5 26.5q-54 0 -80 -50l-221 49q-19 5 -25 -16l-69 -312q-180 -7 -309 -97q-35 37 -87 37 q-50 0 -85 -35t-35 -84q0 -35 18.5 -64t49.5 -44q-6 -27 -6 -56q0 -142 140 -243t337 -101q198 0 338 101t140 243q0 32 -7 57q30 15 48 43.5t18 63.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191 t348 71t348 -71t286 -191t191 -286t71 -348z" />
|
||||
<glyph unicode="" d="M939 407q13 -13 0 -26q-53 -53 -171 -53t-171 53q-13 13 0 26q5 6 13 6t13 -6q42 -42 145 -42t145 42q5 6 13 6t13 -6zM676 563q0 -31 -23 -54t-54 -23t-54 23t-23 54q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1014 563q0 -31 -23 -54t-54 -23t-54 23t-23 54 q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1229 666q0 42 -30 72t-73 30q-42 0 -73 -31q-113 78 -267 82l54 243l171 -39q1 -32 23.5 -54t53.5 -22q32 0 54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5q-48 0 -69 -43l-189 42q-17 5 -21 -13l-60 -268q-154 -6 -265 -83 q-30 32 -74 32q-43 0 -73 -30t-30 -72q0 -30 16 -55t42 -38q-5 -25 -5 -48q0 -122 120 -208.5t289 -86.5q170 0 290 86.5t120 208.5q0 25 -6 49q25 13 40.5 37.5t15.5 54.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150 v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103 t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328 v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" />
|
||||
<glyph unicode="" d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123 v-369h123z" />
|
||||
<glyph unicode="" d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101 v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2038" d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14 q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24 q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33 q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5 t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43 q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5 t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13 t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" />
|
||||
<glyph unicode="" d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10 q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14 q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14 t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44 q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" />
|
||||
<glyph unicode="" d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5 t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5 q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126 t135.5 51q85 0 145 -60.5t60 -145.5z" />
|
||||
<glyph unicode="" d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q106 35 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 q20 0 20 -21v-418z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48 l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23 t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128 q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128 q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" />
|
||||
<glyph unicode="" d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9 t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9 t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9 t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68t68 28t68 -28l228 -228h368l228 228q28 28 68 28t68 -28t28 -68t-28 -68zM864 1152q0 -93 -65.5 -158.5 t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5 q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819 q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5 t100.5 134t141.5 55.5z" />
|
||||
<glyph unicode="" horiz-adv-x="768" d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z " />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67 t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-5 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70 v-400l434 -186q36 -16 57 -48t21 -70z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658 q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204 q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" />
|
||||
<glyph unicode="" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5 t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217 t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5 q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89 q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" />
|
||||
<glyph unicode="" d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5 q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5 q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z " />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188 l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5 t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1 q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384 q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5 l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5 t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" />
|
||||
<glyph unicode="" d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384 q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" />
|
||||
<glyph unicode="" d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64 q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37 q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M1024 1233l-303 -582l24 -31h279v-415h-507l-44 -30l-142 -273l-30 -30h-301v303l303 583l-24 30h-279v415h507l44 30l142 273l30 30h301v-303z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11 q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245 q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785 l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242 q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236q0 -11 -8 -19 t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786q-13 2 -22 11t-9 22v899 q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" />
|
||||
<glyph unicode="" d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127 t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5 t-103 128v128q0 69 103 128t280 93.5t385 34.5z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197 q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8 q-1 1 -1 2t-0.5 1.5t-0.5 1.5q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4l-3 21q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5t-3.5 -21.5l-4 -21h-4l-2 21 q-2 26 -7 46l-99 438h90v107h-300z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107 h-290v-107h68l189 -272l-194 -283h-68z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" />
|
||||
<glyph unicode="" d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400 v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79 q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5 q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" />
|
||||
<glyph unicode="" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243 l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" />
|
||||
<glyph unicode="" d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406 q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546 q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94 q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55 t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97q14 -16 29.5 -34t34.5 -40t29 -34q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5 t-85 -189.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194 q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5 t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1760 640q0 -176 -68.5 -336t-184 -275.5t-275.5 -184t-336 -68.5t-336 68.5t-275.5 184t-184 275.5t-68.5 336q0 213 97 398.5t265 305.5t374 151v-228q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5 t136.5 204t51 248.5q0 230 -145.5 406t-366.5 221v228q206 -31 374 -151t265 -305.5t97 -398.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41 t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170 t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136 q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251 l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162 q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33 q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5 t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
|
||||
<glyph unicode="" d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85 q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392 q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072 q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58 q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47 q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171 v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" />
|
||||
<glyph unicode="" d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5 t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153 t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5 q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20 t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5 t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25 q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5 q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109 q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 l863 639l-478 -797z" />
|
||||
<glyph unicode="" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23 t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15 t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2 t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160 q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5 q0 -26 -12 -48t-36 -22z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179 q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" />
|
||||
<glyph unicode="" d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256 q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" />
|
||||
<glyph unicode="" d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" />
|
||||
<glyph unicode="" d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5 t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5 t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91 q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9 t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323 l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23 zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5 t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1755 1083q37 -37 37 -90t-37 -91l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234l401 400 q38 37 91 37t90 -37z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5 t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q3 -2 11 -7 t11 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" />
|
||||
<glyph unicode="" d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36 q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q70 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5 t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87 q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19 t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121 q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38 h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" d="M1519 890q18 -84 -4 -204q-87 -444 -565 -444h-44q-25 0 -44 -16.5t-24 -42.5l-4 -19l-55 -346l-2 -15q-5 -26 -24.5 -42.5t-44.5 -16.5h-251q-21 0 -33 15t-9 36q9 56 26.5 168t26.5 168t27 167.5t27 167.5q5 37 43 37h131q133 -2 236 21q175 39 287 144q102 95 155 246 q24 70 35 133q1 6 2.5 7.5t3.5 1t6 -3.5q79 -59 98 -162zM1347 1172q0 -107 -46 -236q-80 -233 -302 -315q-113 -40 -252 -42q0 -1 -90 -1l-90 1q-100 0 -118 -96q-2 -8 -85 -530q-1 -10 -12 -10h-295q-22 0 -36.5 16.5t-11.5 38.5l232 1471q5 29 27.5 48t51.5 19h598 q34 0 97.5 -13t111.5 -32q107 -41 163.5 -123t56.5 -196z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M441 864q32 0 52 -26q266 -364 362 -774h-446q-127 441 -367 749q-12 16 -3 33.5t29 17.5h373zM1000 507q-49 -199 -125 -393q-79 310 -256 594q40 221 44 449q211 -340 337 -650zM1099 1216q235 -324 384.5 -698.5t184.5 -773.5h-451q-41 665 -553 1472h435zM1792 640 q0 -424 -101 -812q-67 560 -359 1083q-25 301 -106 584q-4 16 5.5 28.5t25.5 12.5h359q21 0 38.5 -13t22.5 -33q115 -409 115 -850z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27 q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128 q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M671 603h-13q-47 0 -47 -32q0 -22 20 -22q17 0 28 15t12 39zM1066 639h62v3q1 4 0.5 6.5t-1 7t-2 8t-4.5 6.5t-7.5 5t-11.5 2q-28 0 -36 -38zM1606 603h-12q-48 0 -48 -32q0 -22 20 -22q17 0 28 15t12 39zM1925 629q0 41 -30 41q-19 0 -31 -20t-12 -51q0 -42 28 -42 q20 0 32.5 20t12.5 52zM480 770h87l-44 -262h-56l32 201l-71 -201h-39l-4 200l-34 -200h-53l44 262h81l2 -163zM733 663q0 -6 -4 -42q-16 -101 -17 -113h-47l1 22q-20 -26 -58 -26q-23 0 -37.5 16t-14.5 42q0 39 26 60.5t73 21.5q14 0 23 -1q0 3 0.5 5.5t1 4.5t0.5 3 q0 20 -36 20q-29 0 -59 -10q0 4 7 48q38 11 67 11q74 0 74 -62zM889 721l-8 -49q-22 3 -41 3q-27 0 -27 -17q0 -8 4.5 -12t21.5 -11q40 -19 40 -60q0 -72 -87 -71q-34 0 -58 6q0 2 7 49q29 -8 51 -8q32 0 32 19q0 7 -4.5 11.5t-21.5 12.5q-43 20 -43 59q0 72 84 72 q30 0 50 -4zM977 721h28l-7 -52h-29q-2 -17 -6.5 -40.5t-7 -38.5t-2.5 -18q0 -16 19 -16q8 0 16 2l-8 -47q-21 -7 -40 -7q-43 0 -45 47q0 12 8 56q3 20 25 146h55zM1180 648q0 -23 -7 -52h-111q-3 -22 10 -33t38 -11q30 0 58 14l-9 -54q-30 -8 -57 -8q-95 0 -95 95 q0 55 27.5 90.5t69.5 35.5q35 0 55.5 -21t20.5 -56zM1319 722q-13 -23 -22 -62q-22 2 -31 -24t-25 -128h-56l3 14q22 130 29 199h51l-3 -33q14 21 25.5 29.5t28.5 4.5zM1506 763l-9 -57q-28 14 -50 14q-31 0 -51 -27.5t-20 -70.5q0 -30 13.5 -47t38.5 -17q21 0 48 13 l-10 -59q-28 -8 -50 -8q-45 0 -71.5 30.5t-26.5 82.5q0 70 35.5 114.5t91.5 44.5q26 0 61 -13zM1668 663q0 -18 -4 -42q-13 -79 -17 -113h-46l1 22q-20 -26 -59 -26q-23 0 -37 16t-14 42q0 39 25.5 60.5t72.5 21.5q15 0 23 -1q2 7 2 13q0 20 -36 20q-29 0 -59 -10q0 4 8 48 q38 11 67 11q73 0 73 -62zM1809 722q-14 -24 -21 -62q-23 2 -31.5 -23t-25.5 -129h-56l3 14q19 104 29 199h52q0 -11 -4 -33q15 21 26.5 29.5t27.5 4.5zM1950 770h56l-43 -262h-53l3 19q-23 -23 -52 -23q-31 0 -49.5 24t-18.5 64q0 53 27.5 92t64.5 39q31 0 53 -29z M2061 640q0 148 -72.5 273t-198 198t-273.5 73q-181 0 -328 -110q127 -116 171 -284h-50q-44 150 -158 253q-114 -103 -158 -253h-50q44 168 171 284q-147 110 -328 110q-148 0 -273.5 -73t-198 -198t-72.5 -273t72.5 -273t198 -198t273.5 -73q181 0 328 110 q-120 111 -165 264h50q46 -138 152 -233q106 95 152 233h50q-45 -153 -165 -264q147 -110 328 -110q148 0 273.5 73t198 198t72.5 273zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42 q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604 v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569 q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73 t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260 l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279 v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040 q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168 q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5 t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21 h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5 t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M745 630q0 -37 -25.5 -61.5t-62.5 -24.5q-29 0 -46.5 16t-17.5 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM1530 779q0 -42 -22 -57t-66 -15l-32 -1l17 107q2 11 13 11h18q22 0 35 -2t25 -12.5t12 -30.5zM1881 630q0 -36 -25.5 -61t-61.5 -25q-29 0 -47 16 t-18 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM513 801q0 59 -38.5 85.5t-100.5 26.5h-160q-19 0 -21 -19l-65 -408q-1 -6 3 -11t10 -5h76q20 0 22 19l18 110q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM822 489l41 261q1 6 -3 11t-10 5h-76 q-14 0 -17 -33q-27 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q28 0 58 12t48 32q-4 -12 -4 -21q0 -16 13 -16h69q19 0 22 19zM1269 752q0 5 -4 9.5t-9 4.5h-77q-11 0 -18 -10l-106 -156l-44 150q-5 16 -22 16h-75q-5 0 -9 -4.5t-4 -9.5q0 -2 19.5 -59 t42 -123t23.5 -70q-82 -112 -82 -120q0 -13 13 -13h77q11 0 18 10l255 368q2 2 2 7zM1649 801q0 59 -38.5 85.5t-100.5 26.5h-159q-20 0 -22 -19l-65 -408q-1 -6 3 -11t10 -5h82q12 0 16 13l18 116q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM1958 489 l41 261q1 6 -3 11t-10 5h-76q-14 0 -17 -33q-26 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q29 0 59 12t47 32q0 -1 -2 -9t-2 -12q0 -16 13 -16h69q19 0 22 19zM2176 898v1q0 14 -13 14h-74q-11 0 -13 -11l-65 -416l-1 -2q0 -5 4 -9.5t10 -4.5h66 q19 0 21 19zM392 764q-5 -35 -26 -46t-60 -11l-33 -1l17 107q2 11 13 11h19q40 0 58 -11.5t12 -48.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109 q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118 q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151 q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31 q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5 l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5 l418 363q10 8 23.5 7t21.5 -11z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128 q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161 q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167 q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5 t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53 q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24 t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61 t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10 t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5 t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11t55.5 -11t52.5 -38q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5t47 37.5 q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-35 0 -55.5 11t-52.5 38q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38t-58 27 t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448h256v448 h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51 t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9 t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20 q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50 t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1 q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" />
|
||||
<glyph unicode="" d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73 q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110 q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5 t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5 t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5 t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94 q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469 q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400 q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" />
|
||||
<glyph unicode="" d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5 h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327 q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5 q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q18 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119 t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5 t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14 q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88 q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5 t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206 q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307 t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14 t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" />
|
||||
<glyph unicode="" d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5 t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55 q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410 q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" />
|
||||
<glyph unicode="" d="M915 450h-294l147 551zM1001 128h311l-324 1024h-440l-324 -1024h311l383 314zM1536 1120v-960q0 -118 -85 -203t-203 -85h-960q-118 0 -203 85t-85 203v960q0 118 85 203t203 85h960q118 0 203 -85t85 -203z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M2048 641q0 -21 -13 -36.5t-33 -19.5l-205 -356q3 -9 3 -18q0 -20 -12.5 -35.5t-32.5 -19.5l-193 -337q3 -8 3 -16q0 -23 -16.5 -40t-40.5 -17q-25 0 -41 18h-400q-17 -20 -43 -20t-43 20h-399q-17 -20 -43 -20q-23 0 -40 16.5t-17 40.5q0 8 4 20l-193 335 q-20 4 -32.5 19.5t-12.5 35.5q0 9 3 18l-206 356q-20 5 -32.5 20.5t-12.5 35.5q0 21 13.5 36.5t33.5 19.5l199 344q0 1 -0.5 3t-0.5 3q0 36 34 51l209 363q-4 10 -4 18q0 24 17 40.5t40 16.5q26 0 44 -21h396q16 21 43 21t43 -21h398q18 21 44 21q23 0 40 -16.5t17 -40.5 q0 -6 -4 -18l207 -358q23 -1 39 -17.5t16 -38.5q0 -13 -7 -27l187 -324q19 -4 31.5 -19.5t12.5 -35.5zM1063 -158h389l-342 354h-143l-342 -354h360q18 16 39 16t39 -16zM112 654q1 -4 1 -13q0 -10 -2 -15l208 -360q2 0 4.5 -1t5.5 -2.5l5 -2.5l188 199v347l-187 194 q-13 -8 -29 -10zM986 1438h-388l190 -200l554 200h-280q-16 -16 -38 -16t-38 16zM1689 226q1 6 5 11l-64 68l-17 -79h76zM1583 226l22 105l-252 266l-296 -307l63 -64h463zM1495 -142l16 28l65 310h-427l333 -343q8 4 13 5zM578 -158h5l342 354h-373v-335l4 -6q14 -5 22 -13 zM552 226h402l64 66l-309 321l-157 -166v-221zM359 226h163v189l-168 -177q4 -8 5 -12zM358 1051q0 -1 0.5 -2t0.5 -2q0 -16 -8 -29l171 -177v269zM552 1121v-311l153 -157l297 314l-223 236zM556 1425l-4 -8v-264l205 74l-191 201q-6 -2 -10 -3zM1447 1438h-16l-621 -224 l213 -225zM1023 946l-297 -315l311 -319l296 307zM688 634l-136 141v-284zM1038 270l-42 -44h85zM1374 618l238 -251l132 624l-3 5l-1 1zM1718 1018q-8 13 -8 29v2l-216 376q-5 1 -13 5l-437 -463l310 -327zM522 1142v223l-163 -282zM522 196h-163l163 -283v283zM1607 196 l-48 -227l130 227h-82zM1729 266l207 361q-2 10 -2 14q0 1 3 16l-171 296l-129 -612l77 -82q5 3 15 7z" />
|
||||
<glyph unicode="" d="M0 856q0 131 91.5 226.5t222.5 95.5h742l352 358v-1470q0 -132 -91.5 -227t-222.5 -95h-780q-131 0 -222.5 95t-91.5 227v790zM1232 102l-176 180v425q0 46 -32 79t-78 33h-484q-46 0 -78 -33t-32 -79v-492q0 -46 32.5 -79.5t77.5 -33.5h770z" />
|
||||
<glyph unicode="" d="M934 1386q-317 -121 -556 -362.5t-358 -560.5q-20 89 -20 176q0 208 102.5 384.5t278.5 279t384 102.5q82 0 169 -19zM1203 1267q93 -65 164 -155q-389 -113 -674.5 -400.5t-396.5 -676.5q-93 72 -155 162q112 386 395 671t667 399zM470 -67q115 356 379.5 622t619.5 384 q40 -92 54 -195q-292 -120 -516 -345t-343 -518q-103 14 -194 52zM1536 -125q-193 50 -367 115q-135 -84 -290 -107q109 205 274 370.5t369 275.5q-21 -152 -101 -284q65 -175 115 -370z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1893 1144l155 -1272q-131 0 -257 57q-200 91 -393 91q-226 0 -374 -148q-148 148 -374 148q-193 0 -393 -91q-128 -57 -252 -57h-5l155 1272q224 127 482 127q233 0 387 -106q154 106 387 106q258 0 482 -127zM1398 157q129 0 232 -28.5t260 -93.5l-124 1021 q-171 78 -368 78q-224 0 -374 -141q-150 141 -374 141q-197 0 -368 -78l-124 -1021q105 43 165.5 65t148.5 39.5t178 17.5q202 0 374 -108q172 108 374 108zM1438 191l-55 907q-211 -4 -359 -155q-152 155 -374 155q-176 0 -336 -66l-114 -941q124 51 228.5 76t221.5 25 q209 0 374 -102q172 107 374 102z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1500 165v733q0 21 -15 36t-35 15h-93q-20 0 -35 -15t-15 -36v-733q0 -20 15 -35t35 -15h93q20 0 35 15t15 35zM1216 165v531q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-531q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM924 165v429q0 20 -15 35t-35 15h-101 q-20 0 -35 -15t-15 -35v-429q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM632 165v362q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-362q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM2048 311q0 -166 -118 -284t-284 -118h-1244q-166 0 -284 118t-118 284 q0 116 63 214.5t168 148.5q-10 34 -10 73q0 113 80.5 193.5t193.5 80.5q102 0 180 -67q45 183 194 300t338 117q149 0 275 -73.5t199.5 -199.5t73.5 -275q0 -66 -14 -122q135 -33 221 -142.5t86 -247.5z" />
|
||||
<glyph unicode="" d="M0 1536h1536v-1392l-776 -338l-760 338v1392zM1436 209v926h-1336v-926l661 -294zM1436 1235v201h-1336v-201h1336zM181 937v-115h-37v115h37zM181 789v-115h-37v115h37zM181 641v-115h-37v115h37zM181 493v-115h-37v115h37zM181 345v-115h-37v115h37zM207 202l15 34 l105 -47l-15 -33zM343 142l15 34l105 -46l-15 -34zM478 82l15 34l105 -46l-15 -34zM614 23l15 33l104 -46l-15 -34zM797 10l105 46l15 -33l-105 -47zM932 70l105 46l15 -34l-105 -46zM1068 130l105 46l15 -34l-105 -46zM1203 189l105 47l15 -34l-105 -46zM259 1389v-36h-114 v36h114zM421 1389v-36h-115v36h115zM583 1389v-36h-115v36h115zM744 1389v-36h-114v36h114zM906 1389v-36h-114v36h114zM1068 1389v-36h-115v36h115zM1230 1389v-36h-115v36h115zM1391 1389v-36h-114v36h114zM181 1049v-79h-37v115h115v-36h-78zM421 1085v-36h-115v36h115z M583 1085v-36h-115v36h115zM744 1085v-36h-114v36h114zM906 1085v-36h-114v36h114zM1068 1085v-36h-115v36h115zM1230 1085v-36h-115v36h115zM1355 970v79h-78v36h115v-115h-37zM1355 822v115h37v-115h-37zM1355 674v115h37v-115h-37zM1355 526v115h37v-115h-37zM1355 378 v115h37v-115h-37zM1355 230v115h37v-115h-37zM760 265q-129 0 -221 91.5t-92 221.5q0 129 92 221t221 92q130 0 221.5 -92t91.5 -221q0 -130 -91.5 -221.5t-221.5 -91.5zM595 646q0 -36 19.5 -56.5t49.5 -25t64 -7t64 -2t49.5 -9t19.5 -30.5q0 -49 -112 -49q-97 0 -123 51 h-3l-31 -63q67 -42 162 -42q29 0 56.5 5t55.5 16t45.5 33t17.5 53q0 46 -27.5 69.5t-67.5 27t-79.5 3t-67 5t-27.5 25.5q0 21 20.5 33t40.5 15t41 3q34 0 70.5 -11t51.5 -34h3l30 58q-3 1 -21 8.5t-22.5 9t-19.5 7t-22 7t-20 4.5t-24 4t-23 1q-29 0 -56.5 -5t-54 -16.5 t-43 -34t-16.5 -53.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M863 504q0 112 -79.5 191.5t-191.5 79.5t-191 -79.5t-79 -191.5t79 -191t191 -79t191.5 79t79.5 191zM1726 505q0 112 -79 191t-191 79t-191.5 -79t-79.5 -191q0 -113 79.5 -192t191.5 -79t191 79.5t79 191.5zM2048 1314v-1348q0 -44 -31.5 -75.5t-76.5 -31.5h-1832 q-45 0 -76.5 31.5t-31.5 75.5v1348q0 44 31.5 75.5t76.5 31.5h431q44 0 76 -31.5t32 -75.5v-161h754v161q0 44 32 75.5t76 31.5h431q45 0 76.5 -31.5t31.5 -75.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1430 953zM1690 749q148 0 253 -98.5t105 -244.5q0 -157 -109 -261.5t-267 -104.5q-85 0 -162 27.5t-138 73.5t-118 106t-109 126.5t-103.5 132.5t-108.5 126t-117 106t-136 73.5t-159 27.5q-154 0 -251.5 -91.5t-97.5 -244.5q0 -157 104 -250t263 -93q100 0 208 37.5 t193 98.5q5 4 21 18.5t30 24t22 9.5q14 0 24.5 -10.5t10.5 -24.5q0 -24 -60 -77q-101 -88 -234.5 -142t-260.5 -54q-133 0 -245.5 58t-180 165t-67.5 241q0 205 141.5 341t347.5 136q120 0 226.5 -43.5t185.5 -113t151.5 -153t139 -167.5t133.5 -153.5t149.5 -113 t172.5 -43.5q102 0 168.5 61.5t66.5 162.5q0 95 -64.5 159t-159.5 64q-30 0 -81.5 -18.5t-68.5 -18.5q-20 0 -35.5 15t-15.5 35q0 18 8.5 57t8.5 59q0 159 -107.5 263t-266.5 104q-58 0 -111.5 -18.5t-84 -40.5t-55.5 -40.5t-33 -18.5q-15 0 -25.5 10.5t-10.5 25.5 q0 19 25 46q59 67 147 103.5t182 36.5q191 0 318 -125.5t127 -315.5q0 -37 -4 -66q57 15 115 15z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1216 832q0 26 -19 45t-45 19h-128v128q0 26 -19 45t-45 19t-45 -19t-19 -45v-128h-128q-26 0 -45 -19t-19 -45t19 -45t45 -19h128v-128q0 -26 19 -45t45 -19t45 19t19 45v128h128q26 0 45 19t19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1280 832q0 26 -19 45t-45 19t-45 -19l-147 -146v293q0 26 -19 45t-45 19t-45 -19t-19 -45v-293l-147 146q-19 19 -45 19t-45 -19t-19 -45t19 -45l256 -256q19 -19 45 -19t45 19l256 256q19 19 19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M212 768l623 -665l-300 665h-323zM1024 -4l349 772h-698zM538 896l204 384h-262l-288 -384h346zM1213 103l623 665h-323zM683 896h682l-204 384h-274zM1510 896h346l-288 384h-262zM1651 1382l384 -512q14 -18 13 -41.5t-17 -40.5l-960 -1024q-18 -20 -47 -20t-47 20 l-960 1024q-16 17 -17 40.5t13 41.5l384 512q18 26 51 26h1152q33 0 51 -26z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1811 -19q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83 q19 19 45 19t45 -19l83 -83zM237 19q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -82l83 82q19 19 45 19t45 -19l83 -82l64 64v293l-210 314q-17 26 -7 56.5t40 40.5l177 58v299h128v128h256v128h256v-128h256v-128h128v-299l177 -58q30 -10 40 -40.5t-7 -56.5l-210 -314 v-293l19 18q19 19 45 19t45 -19l83 -82l83 82q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83zM640 1152v-128l384 128l384 -128v128h-128v128h-512v-128h-128z" />
|
||||
<glyph unicode="" d="M576 0l96 448l-96 128l-128 64zM832 0l128 640l-128 -64l-96 -128zM992 1010q-2 4 -4 6q-10 8 -96 8q-70 0 -167 -19q-7 -2 -21 -2t-21 2q-97 19 -167 19q-86 0 -96 -8q-2 -2 -4 -6q2 -18 4 -27q2 -3 7.5 -6.5t7.5 -10.5q2 -4 7.5 -20.5t7 -20.5t7.5 -17t8.5 -17t9 -14 t12 -13.5t14 -9.5t17.5 -8t20.5 -4t24.5 -2q36 0 59 12.5t32.5 30t14.5 34.5t11.5 29.5t17.5 12.5h12q11 0 17.5 -12.5t11.5 -29.5t14.5 -34.5t32.5 -30t59 -12.5q13 0 24.5 2t20.5 4t17.5 8t14 9.5t12 13.5t9 14t8.5 17t7.5 17t7 20.5t7.5 20.5q2 7 7.5 10.5t7.5 6.5 q2 9 4 27zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 61 4.5 118t19 125.5t37.5 123.5t63.5 103.5t93.5 74.5l-90 220h214q-22 64 -22 128q0 12 2 32q-194 40 -194 96q0 57 210 99q17 62 51.5 134t70.5 114q32 37 76 37q30 0 84 -31t84 -31t84 31 t84 31q44 0 76 -37q36 -42 70.5 -114t51.5 -134q210 -42 210 -99q0 -56 -194 -96q7 -81 -20 -160h214l-82 -225q63 -33 107.5 -96.5t65.5 -143.5t29 -151.5t8 -148.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M2301 500q12 -103 -22 -198.5t-99 -163.5t-158.5 -106t-196.5 -31q-161 11 -279.5 125t-134.5 274q-12 111 27.5 210.5t118.5 170.5l-71 107q-96 -80 -151 -194t-55 -244q0 -27 -18.5 -46.5t-45.5 -19.5h-256h-69q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5 t-131.5 316.5t131.5 316.5t316.5 131.5q76 0 152 -27l24 45q-123 110 -304 110h-64q-26 0 -45 19t-19 45t19 45t45 19h128q78 0 145 -13.5t116.5 -38.5t71.5 -39.5t51 -36.5h512h115l-85 128h-222q-30 0 -49 22.5t-14 52.5q4 23 23 38t43 15h253q33 0 53 -28l70 -105 l114 114q19 19 46 19h101q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-179l115 -172q131 63 275 36q143 -26 244 -134.5t118 -253.5zM448 128q115 0 203 72.5t111 183.5h-314q-35 0 -55 31q-18 32 -1 63l147 277q-47 13 -91 13q-132 0 -226 -94t-94 -226t94 -226 t226 -94zM1856 128q132 0 226 94t94 226t-94 226t-226 94q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94z" />
|
||||
<glyph unicode="" d="M1408 0q0 -63 -61.5 -113.5t-164 -81t-225 -46t-253.5 -15.5t-253.5 15.5t-225 46t-164 81t-61.5 113.5q0 49 33 88.5t91 66.5t118 44.5t131 29.5q26 5 48 -10.5t26 -41.5q5 -26 -10.5 -48t-41.5 -26q-58 -10 -106 -23.5t-76.5 -25.5t-48.5 -23.5t-27.5 -19.5t-8.5 -12 q3 -11 27 -26.5t73 -33t114 -32.5t160.5 -25t201.5 -10t201.5 10t160.5 25t114 33t73 33.5t27 27.5q-1 4 -8.5 11t-27.5 19t-48.5 23.5t-76.5 25t-106 23.5q-26 4 -41.5 26t-10.5 48q4 26 26 41.5t48 10.5q71 -12 131 -29.5t118 -44.5t91 -66.5t33 -88.5zM1024 896v-384 q0 -26 -19 -45t-45 -19h-64v-384q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v384h-64q-26 0 -45 19t-19 45v384q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5zM928 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5 t158.5 -65.5t65.5 -158.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1280 512h305q-5 -6 -10 -10.5t-9 -7.5l-3 -4l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-5 2 -21 20h369q22 0 39.5 13.5t22.5 34.5l70 281l190 -667q6 -20 23 -33t39 -13q21 0 38 13t23 33l146 485l56 -112q18 -35 57 -35zM1792 940q0 -145 -103 -300h-369l-111 221 q-8 17 -25.5 27t-36.5 8q-45 -5 -56 -46l-129 -430l-196 686q-6 20 -23.5 33t-39.5 13t-39 -13.5t-22 -34.5l-116 -464h-423q-103 155 -103 300q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124 t127 -344z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292 q11 134 80.5 249t182 188t245.5 88q170 19 319 -54t236 -212t87 -306zM128 960q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5z" />
|
||||
<glyph unicode="" d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-382 -383q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5 q203 0 359 -126l382 382h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M830 1220q145 -72 233.5 -210.5t88.5 -305.5q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5 t-147.5 384.5q0 167 88.5 305.5t233.5 210.5q-165 96 -228 273q-6 16 3.5 29.5t26.5 13.5h69q21 0 29 -20q44 -106 140 -171t214 -65t214 65t140 171q8 20 37 20h61q17 0 26.5 -13.5t3.5 -29.5q-63 -177 -228 -273zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" d="M1024 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-149 16 -270.5 103t-186.5 223.5t-53 291.5q16 204 160 353.5t347 172.5q118 14 228 -19t198 -103l255 254h-134q-14 0 -23 9t-9 23v64zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1280 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5t-147.5 384.5q0 201 126 359l-52 53l-101 -111q-9 -10 -22 -10.5t-23 7.5l-48 44q-10 8 -10.5 21.5t8.5 23.5l105 115l-111 112v-134q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9 t-9 23v288q0 26 19 45t45 19h288q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-133l106 -107l86 94q9 10 22 10.5t23 -7.5l48 -44q10 -8 10.5 -21.5t-8.5 -23.5l-90 -99l57 -56q158 126 359 126t359 -126l255 254h-134q-14 0 -23 9t-9 23v64zM832 256q185 0 316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1790 1007q12 -155 -52.5 -292t-186 -224t-271.5 -103v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-512v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23 t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292q17 206 164.5 356.5t352.5 169.5q206 21 377 -94q171 115 377 94q205 -19 352.5 -169.5t164.5 -356.5zM896 647q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM576 512q115 0 218 57q-154 165 -154 391 q0 224 154 391q-103 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5zM1152 128v260q-137 15 -256 94q-119 -79 -256 -94v-260h512zM1216 512q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5q-115 0 -218 -57q154 -167 154 -391 q0 -226 -154 -391q103 -57 218 -57z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1536 1120q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-31 -182 -166 -312t-318 -156q-210 -29 -384.5 80t-241.5 300q-117 6 -221 57.5t-177.5 133t-113.5 192.5t-32 230 q9 135 78 252t182 191.5t248 89.5q118 14 227.5 -19t198.5 -103l255 254h-134q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q59 -74 93 -169q182 -9 328 -124l255 254h-134q-14 0 -23 9 t-9 23v64zM1024 704q0 20 -4 58q-162 -25 -271 -150t-109 -292q0 -20 4 -58q162 25 271 150t109 292zM128 704q0 -168 111 -294t276 -149q-3 29 -3 59q0 210 135 369.5t338 196.5q-53 120 -163.5 193t-245.5 73q-185 0 -316.5 -131.5t-131.5 -316.5zM1088 -128 q185 0 316.5 131.5t131.5 316.5q0 168 -111 294t-276 149q3 -29 3 -59q0 -210 -135 -369.5t-338 -196.5q53 -120 163.5 -193t245.5 -73z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1664 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-32 -180 -164.5 -310t-313.5 -157q-223 -34 -409 90q-117 -78 -256 -93v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23 t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-155 17 -279.5 109.5t-187 237.5t-39.5 307q25 187 159.5 322.5t320.5 164.5q224 34 410 -90q146 97 320 97q201 0 359 -126l255 254h-134q-14 0 -23 9 t-9 23v64zM896 391q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM128 704q0 -185 131.5 -316.5t316.5 -131.5q117 0 218 57q-154 167 -154 391t154 391q-101 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5zM1216 256q185 0 316.5 131.5t131.5 316.5 t-131.5 316.5t-316.5 131.5q-117 0 -218 -57q154 -167 154 -391t-154 -391q101 -57 218 -57z" />
|
||||
<glyph unicode="" d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-213 -214l140 -140q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-140 141l-78 -79q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5 t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5q203 0 359 -126l78 78l-172 172q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l172 -172l213 213h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M640 892q217 -24 364.5 -187.5t147.5 -384.5q0 -167 -87 -306t-236 -212t-319 -54q-133 15 -245.5 88t-182 188t-80.5 249q-12 155 52.5 292t186 224t271.5 103v132h-160q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h160v165l-92 -92q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22 t9 23l202 201q19 19 45 19t45 -19l202 -201q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-92 92v-165h160q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-160v-132zM576 -128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5 t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1901 621q19 -19 19 -45t-19 -45l-294 -294q-9 -10 -22.5 -10t-22.5 10l-45 45q-10 9 -10 22.5t10 22.5l185 185h-294v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-132q-24 -217 -187.5 -364.5t-384.5 -147.5q-167 0 -306 87t-212 236t-54 319q15 133 88 245.5 t188 182t249 80.5q155 12 292 -52.5t224 -186t103 -271.5h132v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h294l-185 185q-10 9 -10 22.5t10 22.5l45 45q9 10 22.5 10t22.5 -10zM576 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5 t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-612q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v612q-217 24 -364.5 187.5t-147.5 384.5q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM576 512q185 0 316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1024 576q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1152 576q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123 t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" d="M1451 1408q35 0 60 -25t25 -60v-1366q0 -35 -25 -60t-60 -25h-391v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-735q-35 0 -60 25t-25 60v1366q0 35 25 60t60 25h1366z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M0 939q0 108 37.5 203.5t103.5 166.5t152 123t185 78t202 26q158 0 294 -66.5t221 -193.5t85 -287q0 -96 -19 -188t-60 -177t-100 -149.5t-145 -103t-189 -38.5q-68 0 -135 32t-96 88q-10 -39 -28 -112.5t-23.5 -95t-20.5 -71t-26 -71t-32 -62.5t-46 -77.5t-62 -86.5 l-14 -5l-9 10q-15 157 -15 188q0 92 21.5 206.5t66.5 287.5t52 203q-32 65 -32 169q0 83 52 156t132 73q61 0 95 -40.5t34 -102.5q0 -66 -44 -191t-44 -187q0 -63 45 -104.5t109 -41.5q55 0 102 25t78.5 68t56 95t38 110.5t20 111t6.5 99.5q0 173 -109.5 269.5t-285.5 96.5 q-200 0 -334 -129.5t-134 -328.5q0 -44 12.5 -85t27 -65t27 -45.5t12.5 -30.5q0 -28 -15 -73t-37 -45q-2 0 -17 3q-51 15 -90.5 56t-61 94.5t-32.5 108t-11 106.5z" />
|
||||
<glyph unicode="" d="M985 562q13 0 97.5 -44t89.5 -53q2 -5 2 -15q0 -33 -17 -76q-16 -39 -71 -65.5t-102 -26.5q-57 0 -190 62q-98 45 -170 118t-148 185q-72 107 -71 194v8q3 91 74 158q24 22 52 22q6 0 18 -1.5t19 -1.5q19 0 26.5 -6.5t15.5 -27.5q8 -20 33 -88t25 -75q0 -21 -34.5 -57.5 t-34.5 -46.5q0 -7 5 -15q34 -73 102 -137q56 -53 151 -101q12 -7 22 -7q15 0 54 48.5t52 48.5zM782 32q127 0 243.5 50t200.5 134t134 200.5t50 243.5t-50 243.5t-134 200.5t-200.5 134t-243.5 50t-243.5 -50t-200.5 -134t-134 -200.5t-50 -243.5q0 -203 120 -368l-79 -233 l242 77q158 -104 345 -104zM782 1414q153 0 292.5 -60t240.5 -161t161 -240.5t60 -292.5t-60 -292.5t-161 -240.5t-240.5 -161t-292.5 -60q-195 0 -365 94l-417 -134l136 405q-108 178 -108 389q0 153 60 292.5t161 240.5t240.5 161t292.5 60z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M128 128h1024v128h-1024v-128zM128 640h1024v128h-1024v-128zM1696 192q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM128 1152h1024v128h-1024v-128zM1696 704q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1696 1216 q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1792 384v-384h-1792v384h1792zM1792 896v-384h-1792v384h1792zM1792 1408v-384h-1792v384h1792z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1664 512h352q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-352q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5 t-9.5 22.5v352h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v352q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-352zM928 288q0 -52 38 -90t90 -38h256v-238q-68 -50 -171 -50h-874q-121 0 -194 69t-73 190q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q79 -61 154.5 -91.5t164.5 -30.5t164.5 30.5t154.5 91.5q20 17 39 17q132 0 217 -96h-223q-52 0 -90 -38t-38 -90v-192z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1781 320l249 -249q9 -9 9 -23q0 -13 -9 -22l-136 -136q-9 -9 -22 -9q-14 0 -23 9l-249 249l-249 -249q-9 -9 -23 -9q-13 0 -22 9l-136 136 q-9 9 -9 22q0 14 9 23l249 249l-249 249q-9 9 -9 23q0 13 9 22l136 136q9 9 22 9q14 0 23 -9l249 -249l249 249q9 9 23 9q13 0 22 -9l136 -136q9 -9 9 -22q0 -14 -9 -23zM1283 320l-181 -181q-37 -37 -37 -91q0 -53 37 -90l83 -83q-21 -3 -44 -3h-874q-121 0 -194 69 t-73 190q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q154 -122 319 -122t319 122q20 17 39 17q28 0 57 -6q-28 -27 -41 -50t-13 -56q0 -54 37 -91z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M256 512h1728q26 0 45 -19t19 -45v-448h-256v256h-1536v-256h-256v1216q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-704zM832 832q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM2048 576v64q0 159 -112.5 271.5t-271.5 112.5h-704 q-26 0 -45 -19t-19 -45v-384h1152z" />
|
||||
<glyph unicode="" d="M1536 1536l-192 -448h192v-192h-274l-55 -128h329v-192h-411l-357 -832l-357 832h-411v192h329l-55 128h-274v192h192l-192 448h256l323 -768h378l323 768h256zM768 320l108 256h-216z" />
|
||||
<glyph unicode="" d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM768 192q80 0 136 56t56 136t-56 136t-136 56 t-136 -56t-56 -136t56 -136t136 -56zM1344 768v512h-1152v-512h1152z" />
|
||||
<glyph unicode="" d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM288 224q66 0 113 47t47 113t-47 113t-113 47 t-113 -47t-47 -113t47 -113t113 -47zM704 768v512h-544v-512h544zM1248 224q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM1408 768v512h-576v-512h576z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M597 1115v-1173q0 -25 -12.5 -42.5t-36.5 -17.5q-17 0 -33 8l-465 233q-21 10 -35.5 33.5t-14.5 46.5v1140q0 20 10 34t29 14q14 0 44 -15l511 -256q3 -3 3 -5zM661 1014l534 -866l-534 266v600zM1792 996v-1054q0 -25 -14 -40.5t-38 -15.5t-47 13l-441 220zM1789 1116 q0 -3 -256.5 -419.5t-300.5 -487.5l-390 634l324 527q17 28 52 28q14 0 26 -6l541 -270q4 -2 4 -6z" />
|
||||
<glyph unicode="" d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1408v-1536h-1536v1536h1536z" />
|
||||
<glyph unicode="" horiz-adv-x="2296" d="M478 -139q-8 -16 -27 -34.5t-37 -25.5q-25 -9 -51.5 3.5t-28.5 31.5q-1 22 40 55t68 38q23 4 34 -21.5t2 -46.5zM1819 -139q7 -16 26 -34.5t38 -25.5q25 -9 51.5 3.5t27.5 31.5q2 22 -39.5 55t-68.5 38q-22 4 -33 -21.5t-2 -46.5zM1867 -30q13 -27 56.5 -59.5t77.5 -41.5 q45 -13 82 4.5t37 50.5q0 46 -67.5 100.5t-115.5 59.5q-40 5 -63.5 -37.5t-6.5 -76.5zM428 -30q-13 -27 -56 -59.5t-77 -41.5q-45 -13 -82 4.5t-37 50.5q0 46 67.5 100.5t115.5 59.5q40 5 63 -37.5t6 -76.5zM1158 1094h1q-41 0 -76 -15q27 -8 44 -30.5t17 -49.5 q0 -35 -27 -60t-65 -25q-52 0 -80 43q-5 -23 -5 -42q0 -74 56 -126.5t135 -52.5q80 0 136 52.5t56 126.5t-56 126.5t-136 52.5zM1462 1312q-99 109 -220.5 131.5t-245.5 -44.5q27 60 82.5 96.5t118 39.5t121.5 -17t99.5 -74.5t44.5 -131.5zM2212 73q8 -11 -11 -42 q7 -23 7 -40q1 -56 -44.5 -112.5t-109.5 -91.5t-118 -37q-48 -2 -92 21.5t-66 65.5q-687 -25 -1259 0q-23 -41 -66.5 -65t-92.5 -22q-86 3 -179.5 80.5t-92.5 160.5q2 22 7 40q-19 31 -11 42q6 10 31 1q14 22 41 51q-7 29 2 38q11 10 39 -4q29 20 59 34q0 29 13 37 q23 12 51 -16q35 5 61 -2q18 -4 38 -19v73q-11 0 -18 2q-53 10 -97 44.5t-55 87.5q-9 38 0 81q15 62 93 95q2 17 19 35.5t36 23.5t33 -7.5t19 -30.5h13q46 -5 60 -23q3 -3 5 -7q10 1 30.5 3.5t30.5 3.5q-15 11 -30 17q-23 40 -91 43q0 6 1 10q-62 2 -118.5 18.5t-84.5 47.5 q-32 36 -42.5 92t-2.5 112q16 126 90 179q23 16 52 4.5t32 -40.5q0 -1 1.5 -14t2.5 -21t3 -20t5.5 -19t8.5 -10q27 -14 76 -12q48 46 98 74q-40 4 -162 -14l47 46q61 58 163 111q145 73 282 86q-20 8 -41 15.5t-47 14t-42.5 10.5t-47.5 11t-43 10q595 126 904 -139 q98 -84 158 -222q85 -10 121 9h1q5 3 8.5 10t5.5 19t3 19.5t3 21.5l1 14q3 28 32 40t52 -5q73 -52 91 -178q7 -57 -3.5 -113t-42.5 -91q-28 -32 -83.5 -48.5t-115.5 -18.5v-10q-71 -2 -95 -43q-14 -5 -31 -17q11 -1 32 -3.5t30 -3.5q1 4 5 8q16 18 60 23h13q5 18 19 30t33 8 t36 -23t19 -36q79 -32 93 -95q9 -40 1 -81q-12 -53 -56 -88t-97 -44q-10 -2 -17 -2q0 -49 -1 -73q20 15 38 19q26 7 61 2q28 28 51 16q14 -9 14 -37q33 -16 59 -34q27 13 38 4q10 -10 2 -38q28 -30 41 -51q23 8 31 -1zM1937 1025q0 -29 -9 -54q82 -32 112 -132 q4 37 -9.5 98.5t-41.5 90.5q-20 19 -36 17t-16 -20zM1859 925q35 -42 47.5 -108.5t-0.5 -124.5q67 13 97 45q13 14 18 28q-3 64 -31 114.5t-79 66.5q-15 -15 -52 -21zM1822 921q-30 0 -44 1q42 -115 53 -239q21 0 43 3q16 68 1 135t-53 100zM258 839q30 100 112 132 q-9 25 -9 54q0 18 -16.5 20t-35.5 -17q-28 -29 -41.5 -90.5t-9.5 -98.5zM294 737q29 -31 97 -45q-13 58 -0.5 124.5t47.5 108.5v0q-37 6 -52 21q-51 -16 -78.5 -66t-31.5 -115q9 -17 18 -28zM471 683q14 124 73 235q-19 -4 -55 -18l-45 -19v1q-46 -89 -20 -196q25 -3 47 -3z M1434 644q8 -38 16.5 -108.5t11.5 -89.5q3 -18 9.5 -21.5t23.5 4.5q40 20 62 85.5t23 125.5q-24 2 -146 4zM1152 1285q-116 0 -199 -82.5t-83 -198.5q0 -117 83 -199.5t199 -82.5t199 82.5t83 199.5q0 116 -83 198.5t-199 82.5zM1380 646q-106 2 -211 0v1q-1 -27 2.5 -86 t13.5 -66q29 -14 93.5 -14.5t95.5 10.5q9 3 11 39t-0.5 69.5t-4.5 46.5zM1112 447q8 4 9.5 48t-0.5 88t-4 63v1q-212 -3 -214 -3q-4 -20 -7 -62t0 -83t14 -46q34 -15 101 -16t101 10zM718 636q-16 -59 4.5 -118.5t77.5 -84.5q15 -8 24 -5t12 21q3 16 8 90t10 103 q-69 -2 -136 -6zM591 510q3 -23 -34 -36q132 -141 271.5 -240t305.5 -154q172 49 310.5 146t293.5 250q-33 13 -30 34l3 9v1v-1q-17 2 -50 5.5t-48 4.5q-26 -90 -82 -132q-51 -38 -82 1q-5 6 -9 14q-7 13 -17 62q-2 -5 -5 -9t-7.5 -7t-8 -5.5t-9.5 -4l-10 -2.5t-12 -2 l-12 -1.5t-13.5 -1t-13.5 -0.5q-106 -9 -163 11q-4 -17 -10 -26.5t-21 -15t-23 -7t-36 -3.5q-2 0 -3 -0.5t-3 -0.5h-3q-179 -17 -203 40q-2 -63 -56 -54q-47 8 -91 54q-12 13 -20 26q-17 29 -26 65q-58 -6 -87 -10q1 -2 4 -10zM507 -118q3 14 3 30q-17 71 -51 130t-73 70 q-41 12 -101.5 -14.5t-104.5 -80t-39 -107.5q35 -53 100 -93t119 -42q51 -2 94 28t53 79zM510 53q23 -63 27 -119q195 113 392 174q-98 52 -180.5 120t-179.5 165q-6 -4 -29 -13q0 -2 -1 -5t-1 -4q31 -18 22 -37q-12 -23 -56 -34q-10 -13 -29 -24h-1q-2 -83 1 -150 q19 -34 35 -73zM579 -113q532 -21 1145 0q-254 147 -428 196q-76 -35 -156 -57q-8 -3 -16 0q-65 21 -129 49q-208 -60 -416 -188h-1v-1q1 0 1 1zM1763 -67q4 54 28 120q14 38 33 71l-1 -1q3 77 3 153q-15 8 -30 25q-42 9 -56 33q-9 20 22 38q-2 4 -2 9q-16 4 -28 12 q-204 -190 -383 -284q198 -59 414 -176zM2155 -90q5 54 -39 107.5t-104 80t-102 14.5q-38 -11 -72.5 -70.5t-51.5 -129.5q0 -16 3 -30q10 -49 53 -79t94 -28q54 2 119 42t100 93z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1524 -25q0 -68 -48 -116t-116 -48t-116.5 48t-48.5 116t48.5 116.5t116.5 48.5t116 -48.5t48 -116.5zM775 -25q0 -68 -48.5 -116t-116.5 -48t-116 48t-48 116t48 116.5t116 48.5t116.5 -48.5t48.5 -116.5zM0 1469q57 -60 110.5 -104.5t121 -82t136 -63t166 -45.5 t200 -31.5t250 -18.5t304 -9.5t372.5 -2.5q139 0 244.5 -5t181 -16.5t124 -27.5t71 -39.5t24 -51.5t-19.5 -64t-56.5 -76.5t-89.5 -91t-116 -104.5t-139 -119q-185 -157 -286 -247q29 51 76.5 109t94 105.5t94.5 98.5t83 91.5t54 80.5t13 70t-45.5 55.5t-116.5 41t-204 23.5 t-304 5q-168 -2 -314 6t-256 23t-204.5 41t-159.5 51.5t-122.5 62.5t-91.5 66.5t-68 71.5t-50.5 69.5t-40 68t-36.5 59.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M896 1472q-169 0 -323 -66t-265.5 -177.5t-177.5 -265.5t-66 -323t66 -323t177.5 -265.5t265.5 -177.5t323 -66t323 66t265.5 177.5t177.5 265.5t66 323t-66 323t-177.5 265.5t-265.5 177.5t-323 66zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348 t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM496 704q16 0 16 -16v-480q0 -16 -16 -16h-32q-16 0 -16 16v480q0 16 16 16h32zM896 640q53 0 90.5 -37.5t37.5 -90.5q0 -35 -17.5 -64t-46.5 -46v-114q0 -14 -9 -23 t-23 -9h-64q-14 0 -23 9t-9 23v114q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5zM896 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM544 928v-96 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 93 65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5v-96q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 146 -103 249t-249 103t-249 -103t-103 -249zM1408 192v512q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-512 q0 -26 19 -45t45 -19h896q26 0 45 19t19 45z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1920 1024v-768h-1664v768h1664zM2048 448h128v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288zM2304 832v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113 v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160q53 0 90.5 -37.5t37.5 -90.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M256 256v768h1280v-768h-1280zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M256 256v768h896v-768h-896zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M256 256v768h512v-768h-512zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23 v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1133 493q31 -30 14 -69q-17 -40 -59 -40h-382l201 -476q10 -25 0 -49t-34 -35l-177 -75q-25 -10 -49 0t-35 34l-191 452l-312 -312q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v1504q0 42 40 59q12 5 24 5q27 0 45 -19z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M832 1408q-320 0 -320 -224v-416h128v-128h-128v-544q0 -224 320 -224h64v-128h-64q-272 0 -384 146q-112 -146 -384 -146h-64v128h64q320 0 320 224v544h-128v128h128v416q0 224 -320 224h-64v128h64q272 0 384 -146q112 146 384 146h64v-128h-64z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M2048 1152h-128v-1024h128v-384h-384v128h-1280v-128h-384v384h128v1024h-128v384h384v-128h1280v128h384v-384zM1792 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 -128v128h-128v-128h128zM1664 0v128h128v1024h-128v128h-1280v-128h-128v-1024h128v-128 h1280zM1920 -128v128h-128v-128h128zM1280 896h384v-768h-896v256h-384v768h896v-256zM512 512h640v512h-640v-512zM1536 256v512h-256v-384h-384v-128h640z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M2304 768h-128v-640h128v-384h-384v128h-896v-128h-384v384h128v128h-384v-128h-384v384h128v640h-128v384h384v-128h896v128h384v-384h-128v-128h384v128h384v-384zM2048 1024v-128h128v128h-128zM1408 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 256 v128h-128v-128h128zM1536 384h-128v-128h128v128zM384 384h896v128h128v640h-128v128h-896v-128h-128v-640h128v-128zM896 -128v128h-128v-128h128zM2176 -128v128h-128v-128h128zM2048 128v640h-128v128h-384v-384h128v-384h-384v128h-384v-128h128v-128h896v128h128z" />
|
||||
<glyph unicode="" d="M1024 288v-416h-928q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68v-928h-416q-40 0 -68 -28t-28 -68zM1152 256h381q-15 -82 -65 -132l-184 -184q-50 -50 -132 -65v381z" />
|
||||
<glyph unicode="" d="M1400 256h-248v-248q29 10 41 22l185 185q12 12 22 41zM1120 384h288v896h-1280v-1280h896v288q0 40 28 68t68 28zM1536 1312v-1024q0 -40 -20 -88t-48 -76l-184 -184q-28 -28 -76 -48t-88 -20h-1024q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68 z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1951 538q0 -26 -15.5 -44.5t-38.5 -23.5q-8 -2 -18 -2h-153v140h153q10 0 18 -2q23 -5 38.5 -23.5t15.5 -44.5zM1933 751q0 -25 -15 -42t-38 -21q-3 -1 -15 -1h-139v129h139q3 0 8.5 -0.5t6.5 -0.5q23 -4 38 -21.5t15 -42.5zM728 587v308h-228v-308q0 -58 -38 -94.5 t-105 -36.5q-108 0 -229 59v-112q53 -15 121 -23t109 -9l42 -1q328 0 328 217zM1442 403v113q-99 -52 -200 -59q-108 -8 -169 41t-61 142t61 142t169 41q101 -7 200 -58v112q-48 12 -100 19.5t-80 9.5l-28 2q-127 6 -218.5 -14t-140.5 -60t-71 -88t-22 -106t22 -106t71 -88 t140.5 -60t218.5 -14q101 4 208 31zM2176 518q0 54 -43 88.5t-109 39.5v3q57 8 89 41.5t32 79.5q0 55 -41 88t-107 36q-3 0 -12 0.5t-14 0.5h-455v-510h491q74 0 121.5 36.5t47.5 96.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90 t90 38h2048q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M858 295v693q-106 -41 -172 -135.5t-66 -211.5t66 -211.5t172 -134.5zM1362 641q0 117 -66 211.5t-172 135.5v-694q106 41 172 135.5t66 211.5zM1577 641q0 -159 -78.5 -294t-213.5 -213.5t-294 -78.5q-119 0 -227.5 46.5t-187 125t-125 187t-46.5 227.5q0 159 78.5 294 t213.5 213.5t294 78.5t294 -78.5t213.5 -213.5t78.5 -294zM1960 634q0 139 -55.5 261.5t-147.5 205.5t-213.5 131t-252.5 48h-301q-176 0 -323.5 -81t-235 -230t-87.5 -335q0 -171 87 -317.5t236 -231.5t323 -85h301q129 0 251.5 50.5t214.5 135t147.5 202.5t55.5 246z M2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1664 -96v1088q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5zM1792 992v-1088q0 -66 -47 -113t-113 -47h-1088q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113 zM1408 1376v-160h-128v160q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h160v-128h-160q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1728 1088l-384 -704h768zM448 1088l-384 -704h768zM1269 1280q-14 -40 -45.5 -71.5t-71.5 -45.5v-1291h608q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1344q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h608v1291q-40 14 -71.5 45.5t-45.5 71.5h-491q-14 0 -23 9t-9 23v64 q0 14 9 23t23 9h491q21 57 70 92.5t111 35.5t111 -35.5t70 -92.5h491q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-491zM1088 1264q33 0 56.5 23.5t23.5 56.5t-23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5zM2176 384q0 -73 -46.5 -131t-117.5 -91 t-144.5 -49.5t-139.5 -16.5t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81zM896 384q0 -73 -46.5 -131t-117.5 -91t-144.5 -49.5t-139.5 -16.5 t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81z" />
|
||||
<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-77 -29 -149 -92.5 t-129.5 -152.5t-92.5 -210t-35 -253h1024q0 132 -35 253t-92.5 210t-129.5 152.5t-149 92.5q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" />
|
||||
<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -66 9 -128h1006q9 61 9 128zM1280 -128q0 130 -34 249.5t-90.5 208t-126.5 152t-146 94.5h-230q-76 -31 -146 -94.5t-126.5 -152t-90.5 -208t-34 -249.5h1024z" />
|
||||
<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -206 85 -384h854q85 178 85 384zM1223 192q-54 141 -145.5 241.5t-194.5 142.5h-230q-103 -42 -194.5 -142.5t-145.5 -241.5h910z" />
|
||||
<glyph unicode="" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-137 -51 -244 -196 h700q-107 145 -244 196q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" />
|
||||
<glyph unicode="" d="M1504 -64q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472zM130 0q3 55 16 107t30 95t46 87t53.5 76t64.5 69.5t66 60t70.5 55t66.5 47.5t65 43q-43 28 -65 43t-66.5 47.5t-70.5 55t-66 60t-64.5 69.5t-53.5 76t-46 87 t-30 95t-16 107h1276q-3 -55 -16 -107t-30 -95t-46 -87t-53.5 -76t-64.5 -69.5t-66 -60t-70.5 -55t-66.5 -47.5t-65 -43q43 -28 65 -43t66.5 -47.5t70.5 -55t66 -60t64.5 -69.5t53.5 -76t46 -87t30 -95t16 -107h-1276zM1504 1536q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9 h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472z" />
|
||||
<glyph unicode="" d="M768 1152q-53 0 -90.5 -37.5t-37.5 -90.5v-128h-32v93q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-429l-32 30v172q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-224q0 -47 35 -82l310 -296q39 -39 39 -102q0 -26 19 -45t45 -19h640q26 0 45 19t19 45v25 q0 41 10 77l108 436q10 36 10 77v246q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-32h-32v125q0 40 -25 72.5t-64 40.5q-14 2 -23 2q-46 0 -79 -33t-33 -79v-128h-32v122q0 51 -32.5 89.5t-82.5 43.5q-5 1 -13 1zM768 1280q84 0 149 -50q57 34 123 34q59 0 111 -27 t86 -76q27 7 59 7q100 0 170 -71.5t70 -171.5v-246q0 -51 -13 -108l-109 -436q-6 -24 -6 -71q0 -80 -56 -136t-136 -56h-640q-84 0 -138 58.5t-54 142.5l-308 296q-76 73 -76 175v224q0 99 70.5 169.5t169.5 70.5q11 0 16 -1q6 95 75.5 160t164.5 65q52 0 98 -21 q72 69 174 69z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M880 1408q-46 0 -79 -33t-33 -79v-656h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528v-256l-154 205q-38 51 -102 51q-53 0 -90.5 -37.5t-37.5 -90.5q0 -43 26 -77l384 -512q38 -51 102 -51h688q34 0 61 22t34 56l76 405q5 32 5 59v498q0 46 -33 79t-79 33t-79 -33 t-33 -79v-272h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528h-32v656q0 46 -33 79t-79 33zM880 1536q68 0 125.5 -35.5t88.5 -96.5q19 4 42 4q99 0 169.5 -70.5t70.5 -169.5v-17q105 6 180.5 -64t75.5 -175v-498q0 -40 -8 -83l-76 -404q-14 -79 -76.5 -131t-143.5 -52 h-688q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 106 75 181t181 75q78 0 128 -34v434q0 99 70.5 169.5t169.5 70.5q23 0 42 -4q31 61 88.5 96.5t125.5 35.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1073 -128h-177q-163 0 -226 141q-23 49 -23 102v5q-62 30 -98.5 88.5t-36.5 127.5q0 38 5 48h-261q-106 0 -181 75t-75 181t75 181t181 75h113l-44 17q-74 28 -119.5 93.5t-45.5 145.5q0 106 75 181t181 75q46 0 91 -17l628 -239h401q106 0 181 -75t75 -181v-668 q0 -88 -54 -157.5t-140 -90.5l-339 -85q-92 -23 -186 -23zM1024 583l-155 -71l-163 -74q-30 -14 -48 -41.5t-18 -60.5q0 -46 33 -79t79 -33q26 0 46 10l338 154q-49 10 -80.5 50t-31.5 90v55zM1344 272q0 46 -33 79t-79 33q-26 0 -46 -10l-290 -132q-28 -13 -37 -17 t-30.5 -17t-29.5 -23.5t-16 -29t-8 -40.5q0 -50 31.5 -82t81.5 -32q20 0 38 9l352 160q30 14 48 41.5t18 60.5zM1112 1024l-650 248q-24 8 -46 8q-53 0 -90.5 -37.5t-37.5 -90.5q0 -40 22.5 -73t59.5 -47l526 -200v-64h-640q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5 t90.5 -37.5h535l233 106v198q0 63 46 106l111 102h-69zM1073 0q82 0 155 19l339 85q43 11 70 45.5t27 78.5v668q0 53 -37.5 90.5t-90.5 37.5h-308l-136 -126q-36 -33 -36 -82v-296q0 -46 33 -77t79 -31t79 35t33 81v208h32v-208q0 -70 -57 -114q52 -8 86.5 -48.5t34.5 -93.5 q0 -42 -23 -78t-61 -53l-310 -141h91z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1151 1536q61 0 116 -28t91 -77l572 -781q118 -159 118 -359v-355q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v177l-286 143h-546q-80 0 -136 56t-56 136v32q0 119 84.5 203.5t203.5 84.5h420l42 128h-686q-100 0 -173.5 67.5t-81.5 166.5q-65 79 -65 182v32 q0 80 56 136t136 56h959zM1920 -64v355q0 157 -93 284l-573 781q-39 52 -103 52h-959q-26 0 -45 -19t-19 -45q0 -32 1.5 -49.5t9.5 -40.5t25 -43q10 31 35.5 50t56.5 19h832v-32h-832q-26 0 -45 -19t-19 -45q0 -44 3 -58q8 -44 44 -73t81 -29h640h91q40 0 68 -28t28 -68 q0 -15 -5 -30l-64 -192q-10 -29 -35 -47.5t-56 -18.5h-443q-66 0 -113 -47t-47 -113v-32q0 -26 19 -45t45 -19h561q16 0 29 -7l317 -158q24 -13 38.5 -36t14.5 -50v-197q0 -26 19 -45t45 -19h384q26 0 45 19t19 45z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M816 1408q-48 0 -79.5 -34t-31.5 -82q0 -14 3 -28l150 -624h-26l-116 482q-9 38 -39.5 62t-69.5 24q-47 0 -79 -34t-32 -81q0 -11 4 -29q3 -13 39 -161t68 -282t32 -138v-227l-307 230q-34 26 -77 26q-52 0 -89.5 -36.5t-37.5 -88.5q0 -67 56 -110l507 -379 q34 -26 76 -26h694q33 0 59 20.5t34 52.5l100 401q8 30 10 88t9 86l116 478q3 12 3 26q0 46 -33 79t-80 33q-38 0 -69 -25.5t-40 -62.5l-99 -408h-26l132 547q3 14 3 28q0 47 -32 80t-80 33q-38 0 -68.5 -24t-39.5 -62l-145 -602h-127l-164 682q-9 38 -39.5 62t-68.5 24z M1461 -256h-694q-85 0 -153 51l-507 380q-50 38 -78.5 94t-28.5 118q0 105 75 179t180 74q25 0 49.5 -5.5t41.5 -11t41 -20.5t35 -23t38.5 -29.5t37.5 -28.5l-123 512q-7 35 -7 59q0 93 60 162t152 79q14 87 80.5 144.5t155.5 57.5q83 0 148 -51.5t85 -132.5l103 -428 l83 348q20 81 85 132.5t148 51.5q87 0 152.5 -54t82.5 -139q93 -10 155 -78t62 -161q0 -30 -7 -57l-116 -477q-5 -22 -5 -67q0 -51 -13 -108l-101 -401q-19 -75 -79.5 -122.5t-137.5 -47.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 1408q-53 0 -90.5 -37.5t-37.5 -90.5v-512v-384l-151 202q-41 54 -107 54q-52 0 -89 -38t-37 -90q0 -43 26 -77l384 -512q38 -51 102 -51h718q22 0 39.5 13.5t22.5 34.5l92 368q24 96 24 194v217q0 41 -28 71t-68 30t-68 -28t-28 -68h-32v61q0 48 -32 81.5t-80 33.5 q-46 0 -79 -33t-33 -79v-64h-32v90q0 55 -37 94.5t-91 39.5q-53 0 -90.5 -37.5t-37.5 -90.5v-96h-32v570q0 55 -37 94.5t-91 39.5zM640 1536q107 0 181.5 -77.5t74.5 -184.5v-220q22 2 32 2q99 0 173 -69q47 21 99 21q113 0 184 -87q27 7 56 7q94 0 159 -67.5t65 -161.5 v-217q0 -116 -28 -225l-92 -368q-16 -64 -68 -104.5t-118 -40.5h-718q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 105 74.5 180.5t179.5 75.5q71 0 130 -35v547q0 106 75 181t181 75zM768 128v384h-32v-384h32zM1024 128v384h-32v-384h32zM1280 128v384h-32 v-384h32z" />
|
||||
<glyph unicode="" d="M1288 889q60 0 107 -23q141 -63 141 -226v-177q0 -94 -23 -186l-85 -339q-21 -86 -90.5 -140t-157.5 -54h-668q-106 0 -181 75t-75 181v401l-239 628q-17 45 -17 91q0 106 75 181t181 75q80 0 145.5 -45.5t93.5 -119.5l17 -44v113q0 106 75 181t181 75t181 -75t75 -181 v-261q27 5 48 5q69 0 127.5 -36.5t88.5 -98.5zM1072 896q-33 0 -60.5 -18t-41.5 -48l-74 -163l-71 -155h55q50 0 90 -31.5t50 -80.5l154 338q10 20 10 46q0 46 -33 79t-79 33zM1293 761q-22 0 -40.5 -8t-29 -16t-23.5 -29.5t-17 -30.5t-17 -37l-132 -290q-10 -20 -10 -46 q0 -46 33 -79t79 -33q33 0 60.5 18t41.5 48l160 352q9 18 9 38q0 50 -32 81.5t-82 31.5zM128 1120q0 -22 8 -46l248 -650v-69l102 111q43 46 106 46h198l106 233v535q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5v-640h-64l-200 526q-14 37 -47 59.5t-73 22.5 q-53 0 -90.5 -37.5t-37.5 -90.5zM1180 -128q44 0 78.5 27t45.5 70l85 339q19 73 19 155v91l-141 -310q-17 -38 -53 -61t-78 -23q-53 0 -93.5 34.5t-48.5 86.5q-44 -57 -114 -57h-208v32h208q46 0 81 33t35 79t-31 79t-77 33h-296q-49 0 -82 -36l-126 -136v-308 q0 -53 37.5 -90.5t90.5 -37.5h668z" />
|
||||
<glyph unicode="" horiz-adv-x="1973" d="M857 992v-117q0 -13 -9.5 -22t-22.5 -9h-298v-812q0 -13 -9 -22.5t-22 -9.5h-135q-13 0 -22.5 9t-9.5 23v812h-297q-13 0 -22.5 9t-9.5 22v117q0 14 9 23t23 9h793q13 0 22.5 -9.5t9.5 -22.5zM1895 995l77 -961q1 -13 -8 -24q-10 -10 -23 -10h-134q-12 0 -21 8.5 t-10 20.5l-46 588l-189 -425q-8 -19 -29 -19h-120q-20 0 -29 19l-188 427l-45 -590q-1 -12 -10 -20.5t-21 -8.5h-135q-13 0 -23 10q-9 10 -9 24l78 961q1 12 10 20.5t21 8.5h142q20 0 29 -19l220 -520q10 -24 20 -51q3 7 9.5 24.5t10.5 26.5l221 520q9 19 29 19h141 q13 0 22 -8.5t10 -20.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1042 833q0 88 -60 121q-33 18 -117 18h-123v-281h162q66 0 102 37t36 105zM1094 548l205 -373q8 -17 -1 -31q-8 -16 -27 -16h-152q-20 0 -28 17l-194 365h-155v-350q0 -14 -9 -23t-23 -9h-134q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h294q128 0 190 -24q85 -31 134 -109 t49 -180q0 -92 -42.5 -165.5t-115.5 -109.5q6 -10 9 -16zM896 1376q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM1792 640 q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M605 303q153 0 257 104q14 18 3 36l-45 82q-6 13 -24 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13t-23.5 -14.5t-28.5 -13.5t-33.5 -9.5t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78 q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-148 0 -246 -96.5t-98 -240.5q0 -146 97 -241.5t247 -95.5zM1235 303q153 0 257 104q14 18 4 36l-45 82q-8 14 -25 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13t-23.5 -14.5t-28.5 -13.5t-33.5 -9.5 t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-147 0 -245.5 -96.5t-98.5 -240.5q0 -146 97 -241.5t247 -95.5zM896 1376 q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191 t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M736 736l384 -384l-384 -384l-672 672l672 672l168 -168l-96 -96l-72 72l-480 -480l480 -480l193 193l-289 287zM1312 1312l672 -672l-672 -672l-168 168l96 96l72 -72l480 480l-480 480l-193 -193l289 -287l-96 -96l-384 384z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M717 182l271 271l-279 279l-88 -88l192 -191l-96 -96l-279 279l279 279l40 -40l87 87l-127 128l-454 -454zM1075 190l454 454l-454 454l-271 -271l279 -279l88 88l-192 191l96 96l279 -279l-279 -279l-40 40l-87 -88zM1792 640q0 -182 -71 -348t-191 -286t-286 -191 t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M651 539q0 -39 -27.5 -66.5t-65.5 -27.5q-39 0 -66.5 27.5t-27.5 66.5q0 38 27.5 65.5t66.5 27.5q38 0 65.5 -27.5t27.5 -65.5zM1805 540q0 -39 -27.5 -66.5t-66.5 -27.5t-66.5 27.5t-27.5 66.5t27.5 66t66.5 27t66.5 -27t27.5 -66zM765 539q0 79 -56.5 136t-136.5 57 t-136.5 -56.5t-56.5 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM1918 540q0 80 -56.5 136.5t-136.5 56.5q-79 0 -136 -56.5t-57 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM850 539q0 -116 -81.5 -197.5t-196.5 -81.5q-116 0 -197.5 82t-81.5 197 t82 196.5t197 81.5t196.5 -81.5t81.5 -196.5zM2004 540q0 -115 -81.5 -196.5t-197.5 -81.5q-115 0 -196.5 81.5t-81.5 196.5t81.5 196.5t196.5 81.5q116 0 197.5 -81.5t81.5 -196.5zM1040 537q0 191 -135.5 326.5t-326.5 135.5q-125 0 -231 -62t-168 -168.5t-62 -231.5 t62 -231.5t168 -168.5t231 -62q191 0 326.5 135.5t135.5 326.5zM1708 1110q-254 111 -556 111q-319 0 -573 -110q117 0 223 -45.5t182.5 -122.5t122 -183t45.5 -223q0 115 43.5 219.5t118 180.5t177.5 123t217 50zM2187 537q0 191 -135 326.5t-326 135.5t-326.5 -135.5 t-135.5 -326.5t135.5 -326.5t326.5 -135.5t326 135.5t135 326.5zM1921 1103h383q-44 -51 -75 -114.5t-40 -114.5q110 -151 110 -337q0 -156 -77 -288t-209 -208.5t-287 -76.5q-133 0 -249 56t-196 155q-47 -56 -129 -179q-11 22 -53.5 82.5t-74.5 97.5 q-80 -99 -196.5 -155.5t-249.5 -56.5q-155 0 -287 76.5t-209 208.5t-77 288q0 186 110 337q-9 51 -40 114.5t-75 114.5h365q149 100 355 156.5t432 56.5q224 0 421 -56t348 -157z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5 t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94 q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z" />
|
||||
<glyph unicode="" d="M927 956q0 -66 -46.5 -112.5t-112.5 -46.5t-112.5 46.5t-46.5 112.5t46.5 112.5t112.5 46.5t112.5 -46.5t46.5 -112.5zM1141 593q-10 20 -28 32t-47.5 9.5t-60.5 -27.5q-10 -8 -29 -20t-81 -32t-127 -20t-124 18t-86 36l-27 18q-31 25 -60.5 27.5t-47.5 -9.5t-28 -32 q-22 -45 -2 -74.5t87 -73.5q83 -53 226 -67l-51 -52q-142 -142 -191 -190q-22 -22 -22 -52.5t22 -52.5l9 -9q22 -22 52.5 -22t52.5 22l191 191q114 -115 191 -191q22 -22 52.5 -22t52.5 22l9 9q22 22 22 52.5t-22 52.5l-191 190l-52 52q141 14 225 67q67 44 87 73.5t-2 74.5 zM1092 956q0 134 -95 229t-229 95t-229 -95t-95 -229t95 -229t229 -95t229 95t95 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1720" d="M1565 1408q65 0 110 -45.5t45 -110.5v-519q0 -176 -68 -336t-182.5 -275t-274 -182.5t-334.5 -67.5q-176 0 -335.5 67.5t-274.5 182.5t-183 275t-68 336v519q0 64 46 110t110 46h1409zM861 344q47 0 82 33l404 388q37 35 37 85q0 49 -34.5 83.5t-83.5 34.5q-47 0 -82 -33 l-323 -310l-323 310q-35 33 -81 33q-49 0 -83.5 -34.5t-34.5 -83.5q0 -51 36 -85l405 -388q33 -33 81 -33z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1494 -103l-295 695q-25 -49 -158.5 -305.5t-198.5 -389.5q-1 -1 -27.5 -0.5t-26.5 1.5q-82 193 -255.5 587t-259.5 596q-21 50 -66.5 107.5t-103.5 100.5t-102 43q0 5 -0.5 24t-0.5 27h583v-50q-39 -2 -79.5 -16t-66.5 -43t-10 -64q26 -59 216.5 -499t235.5 -540 q31 61 140 266.5t131 247.5q-19 39 -126 281t-136 295q-38 69 -201 71v50l513 -1v-47q-60 -2 -93.5 -25t-12.5 -69q33 -70 87 -189.5t86 -187.5q110 214 173 363q24 55 -10 79.5t-129 26.5q1 7 1 25v24q64 0 170.5 0.5t180 1t92.5 0.5v-49q-62 -2 -119 -33t-90 -81 l-213 -442q13 -33 127.5 -290t121.5 -274l441 1017q-14 38 -49.5 62.5t-65 31.5t-55.5 8v50l460 -4l1 -2l-1 -44q-139 -4 -201 -145q-526 -1216 -559 -1291h-49z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M949 643q0 -26 -16.5 -45t-41.5 -19q-26 0 -45 16.5t-19 41.5q0 26 17 45t42 19t44 -16.5t19 -41.5zM964 585l350 581q-9 -8 -67.5 -62.5t-125.5 -116.5t-136.5 -127t-117 -110.5t-50.5 -51.5l-349 -580q7 7 67 62t126 116.5t136 127t117 111t50 50.5zM1611 640 q0 -201 -104 -371q-3 2 -17 11t-26.5 16.5t-16.5 7.5q-13 0 -13 -13q0 -10 59 -44q-74 -112 -184.5 -190.5t-241.5 -110.5l-16 67q-1 10 -15 10q-5 0 -8 -5.5t-2 -9.5l16 -68q-72 -15 -146 -15q-199 0 -372 105q1 2 13 20.5t21.5 33.5t9.5 19q0 13 -13 13q-6 0 -17 -14.5 t-22.5 -34.5t-13.5 -23q-113 75 -192 187.5t-110 244.5l69 15q10 3 10 15q0 5 -5.5 8t-10.5 2l-68 -15q-14 72 -14 139q0 206 109 379q2 -1 18.5 -12t30 -19t17.5 -8q13 0 13 12q0 6 -12.5 15.5t-32.5 21.5l-20 12q77 112 189 189t244 107l15 -67q2 -10 15 -10q5 0 8 5.5 t2 10.5l-15 66q71 13 134 13q204 0 379 -109q-39 -56 -39 -65q0 -13 12 -13q11 0 48 64q111 -75 187.5 -186t107.5 -241l-56 -12q-10 -2 -10 -16q0 -5 5.5 -8t9.5 -2l57 13q14 -72 14 -140zM1696 640q0 163 -63.5 311t-170.5 255t-255 170.5t-311 63.5t-311 -63.5 t-255 -170.5t-170.5 -255t-63.5 -311t63.5 -311t170.5 -255t255 -170.5t311 -63.5t311 63.5t255 170.5t170.5 255t63.5 311zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191 t191 -286t71 -348z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M893 1536q240 2 451 -120q232 -134 352 -372l-742 39q-160 9 -294 -74.5t-185 -229.5l-276 424q128 159 311 245.5t383 87.5zM146 1131l337 -663q72 -143 211 -217t293 -45l-230 -451q-212 33 -385 157.5t-272.5 316t-99.5 411.5q0 267 146 491zM1732 962 q58 -150 59.5 -310.5t-48.5 -306t-153 -272t-246 -209.5q-230 -133 -498 -119l405 623q88 131 82.5 290.5t-106.5 277.5zM896 942q125 0 213.5 -88.5t88.5 -213.5t-88.5 -213.5t-213.5 -88.5t-213.5 88.5t-88.5 213.5t88.5 213.5t213.5 88.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M903 -256q-283 0 -504.5 150.5t-329.5 398.5q-58 131 -67 301t26 332.5t111 312t179 242.5l-11 -281q11 14 68 15.5t70 -15.5q42 81 160.5 138t234.5 59q-54 -45 -119.5 -148.5t-58.5 -163.5q25 -8 62.5 -13.5t63 -7.5t68 -4t50.5 -3q15 -5 9.5 -45.5t-30.5 -75.5 q-5 -7 -16.5 -18.5t-56.5 -35.5t-101 -34l15 -189l-139 67q-18 -43 -7.5 -81.5t36 -66.5t65.5 -41.5t81 -6.5q51 9 98 34.5t83.5 45t73.5 17.5q61 -4 89.5 -33t19.5 -65q-1 -2 -2.5 -5.5t-8.5 -12.5t-18 -15.5t-31.5 -10.5t-46.5 -1q-60 -95 -144.5 -135.5t-209.5 -29.5 q74 -61 162.5 -82.5t168.5 -6t154.5 52t128 87.5t80.5 104q43 91 39 192.5t-37.5 188.5t-78.5 125q87 -38 137 -79.5t77 -112.5q15 170 -57.5 343t-209.5 284q265 -77 412 -279.5t151 -517.5q2 -127 -40.5 -255t-123.5 -238t-189 -196t-247.5 -135.5t-288.5 -49.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1493 1308q-165 110 -359 110q-155 0 -293 -73t-240 -200q-75 -93 -119.5 -218t-48.5 -266v-42q4 -141 48.5 -266t119.5 -218q102 -127 240 -200t293 -73q194 0 359 110q-121 -108 -274.5 -168t-322.5 -60q-29 0 -43 1q-175 8 -333 82t-272 193t-181 281t-67 339 q0 182 71 348t191 286t286 191t348 71h3q168 -1 320.5 -60.5t273.5 -167.5zM1792 640q0 -192 -77 -362.5t-213 -296.5q-104 -63 -222 -63q-137 0 -255 84q154 56 253.5 233t99.5 405q0 227 -99 404t-253 234q119 83 254 83q119 0 226 -65q135 -125 210.5 -295t75.5 -361z " />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 599q0 -56 -7 -104h-1151q0 -146 109.5 -244.5t257.5 -98.5q99 0 185.5 46.5t136.5 130.5h423q-56 -159 -170.5 -281t-267.5 -188.5t-321 -66.5q-187 0 -356 83q-228 -116 -394 -116q-237 0 -237 263q0 115 45 275q17 60 109 229q199 360 475 606 q-184 -79 -427 -354q63 274 283.5 449.5t501.5 175.5q30 0 45 -1q255 117 433 117q64 0 116 -13t94.5 -40.5t66.5 -76.5t24 -115q0 -116 -75 -286q101 -182 101 -390zM1722 1239q0 83 -53 132t-137 49q-108 0 -254 -70q121 -47 222.5 -131.5t170.5 -195.5q51 135 51 216z M128 2q0 -86 48.5 -132.5t134.5 -46.5q115 0 266 83q-122 72 -213.5 183t-137.5 245q-98 -205 -98 -332zM632 715h728q-5 142 -113 237t-251 95q-144 0 -251.5 -95t-112.5 -237z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1792 288v960q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1248v-960q0 -66 -47 -113t-113 -47h-736v-128h352q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23 v64q0 14 9 23t23 9h352v128h-736q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M138 1408h197q-70 -64 -126 -149q-36 -56 -59 -115t-30 -125.5t-8.5 -120t10.5 -132t21 -126t28 -136.5q4 -19 6 -28q51 -238 81 -329q57 -171 152 -275h-272q-48 0 -82 34t-34 82v1304q0 48 34 82t82 34zM1346 1408h308q48 0 82 -34t34 -82v-1304q0 -48 -34 -82t-82 -34 h-178q212 210 196 565l-469 -101q-2 -45 -12 -82t-31 -72t-59.5 -59.5t-93.5 -36.5q-123 -26 -199 40q-32 27 -53 61t-51.5 129t-64.5 258q-35 163 -45.5 263t-5.5 139t23 77q20 41 62.5 73t102.5 45q45 12 83.5 6.5t67 -17t54 -35t43 -48t34.5 -56.5l468 100 q-68 175 -180 287z" />
|
||||
<glyph unicode="" d="M1401 -11l-6 -6q-113 -114 -259 -175q-154 -64 -317 -64q-165 0 -317 64q-148 63 -259 175q-113 112 -175 258q-42 103 -54 189q-4 28 48 36q51 8 56 -20q1 -1 1 -4q18 -90 46 -159q50 -124 152 -226q98 -98 226 -152q132 -56 276 -56q143 0 276 56q128 55 225 152l6 6 q10 10 25 6q12 -3 33 -22q36 -37 17 -58zM929 604l-66 -66l63 -63q21 -21 -7 -49q-17 -17 -32 -17q-10 0 -19 10l-62 61l-66 -66q-5 -5 -15 -5q-15 0 -31 16l-2 2q-18 15 -18 29q0 7 8 17l66 65l-66 66q-16 16 14 45q18 18 31 18q6 0 13 -5l65 -66l65 65q18 17 48 -13 q27 -27 11 -44zM1400 547q0 -118 -46 -228q-45 -105 -126 -186q-80 -80 -187 -126t-228 -46t-228 46t-187 126q-82 82 -125 186q-15 32 -15 40h-1q-9 27 43 44q50 16 60 -12q37 -99 97 -167h1v339v2q3 136 102 232q105 103 253 103q147 0 251 -103t104 -249 q0 -147 -104.5 -251t-250.5 -104q-58 0 -112 16q-28 11 -13 61q16 51 44 43l14 -3q14 -3 32.5 -6t30.5 -3q104 0 176 71.5t72 174.5q0 101 -72 171q-71 71 -175 71q-107 0 -178 -80q-64 -72 -64 -160v-413q110 -67 242 -67q96 0 185 36.5t156 103.5t103.5 155t36.5 183 q0 198 -141 339q-140 140 -339 140q-200 0 -340 -140q-53 -53 -77 -87l-2 -2q-8 -11 -13 -15.5t-21.5 -9.5t-38.5 3q-21 5 -36.5 16.5t-15.5 26.5v680q0 15 10.5 26.5t27.5 11.5h877q30 0 30 -55t-30 -55h-811v-483h1q40 42 102 84t108 61q109 46 231 46q121 0 228 -46 t187 -126q81 -81 126 -186q46 -112 46 -229zM1369 1128q9 -8 9 -18t-5.5 -18t-16.5 -21q-26 -26 -39 -26q-9 0 -16 7q-106 91 -207 133q-128 56 -276 56q-133 0 -262 -49q-27 -10 -45 37q-9 25 -8 38q3 16 16 20q130 57 299 57q164 0 316 -64q137 -58 235 -152z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1551 60q15 6 26 3t11 -17.5t-15 -33.5q-13 -16 -44 -43.5t-95.5 -68t-141 -74t-188 -58t-229.5 -24.5q-119 0 -238 31t-209 76.5t-172.5 104t-132.5 105t-84 87.5q-8 9 -10 16.5t1 12t8 7t11.5 2t11.5 -4.5q192 -117 300 -166q389 -176 799 -90q190 40 391 135z M1758 175q11 -16 2.5 -69.5t-28.5 -102.5q-34 -83 -85 -124q-17 -14 -26 -9t0 24q21 45 44.5 121.5t6.5 98.5q-5 7 -15.5 11.5t-27 6t-29.5 2.5t-35 0t-31.5 -2t-31 -3t-22.5 -2q-6 -1 -13 -1.5t-11 -1t-8.5 -1t-7 -0.5h-5.5h-4.5t-3 0.5t-2 1.5l-1.5 3q-6 16 47 40t103 30 q46 7 108 1t76 -24zM1364 618q0 -31 13.5 -64t32 -58t37.5 -46t33 -32l13 -11l-227 -224q-40 37 -79 75.5t-58 58.5l-19 20q-11 11 -25 33q-38 -59 -97.5 -102.5t-127.5 -63.5t-140 -23t-137.5 21t-117.5 65.5t-83 113t-31 162.5q0 84 28 154t72 116.5t106.5 83t122.5 57 t130 34.5t119.5 18.5t99.5 6.5v127q0 65 -21 97q-34 53 -121 53q-6 0 -16.5 -1t-40.5 -12t-56 -29.5t-56 -59.5t-48 -96l-294 27q0 60 22 119t67 113t108 95t151.5 65.5t190.5 24.5q100 0 181 -25t129.5 -61.5t81 -83t45 -86t12.5 -73.5v-589zM692 597q0 -86 70 -133 q66 -44 139 -22q84 25 114 123q14 45 14 101v162q-59 -2 -111 -12t-106.5 -33.5t-87 -71t-32.5 -114.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1536 1280q52 0 90 -38t38 -90v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128zM1152 1376v-288q0 -14 9 -23t23 -9 h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 1376v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM1536 -128v1024h-1408v-1024h1408zM896 448h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224 v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1152 416v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23 t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47 t47 -113v-96h128q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1111 151l-46 -46q-9 -9 -22 -9t-23 9l-188 189l-188 -189q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22t9 23l189 188l-189 188q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l188 -188l188 188q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23l-188 -188l188 -188q9 -10 9 -23t-9 -22z M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1303 572l-512 -512q-10 -9 -23 -9t-23 9l-288 288q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l220 -220l444 444q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23 t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47 t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M448 1536q26 0 45 -19t19 -45v-891l536 429q17 14 40 14q26 0 45 -19t19 -45v-379l536 429q17 14 40 14q26 0 45 -19t19 -45v-1152q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h384z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M512 448q66 0 128 15v-655q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v655q61 -15 128 -15zM512 1536q212 0 362 -150t150 -362t-150 -362t-362 -150t-362 150t-150 362t150 362t362 150zM512 1312q14 0 23 9t9 23t-9 23t-23 9q-146 0 -249 -103t-103 -249 q0 -14 9 -23t23 -9t23 9t9 23q0 119 84.5 203.5t203.5 84.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1745 1239q10 -10 10 -23t-10 -23l-141 -141q-28 -28 -68 -28h-1344q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h576v64q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-64h512q40 0 68 -28zM768 320h256v-512q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v512zM1600 768 q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-1344q-40 0 -68 28l-141 141q-10 10 -10 23t10 23l141 141q28 28 68 28h512v192h256v-192h576z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M2020 1525q28 -20 28 -53v-1408q0 -20 -11 -36t-29 -23l-640 -256q-24 -11 -48 0l-616 246l-616 -246q-10 -5 -24 -5q-19 0 -36 11q-28 20 -28 53v1408q0 20 11 36t29 23l640 256q24 11 48 0l616 -246l616 246q32 13 60 -6zM736 1390v-1270l576 -230v1270zM128 1173 v-1270l544 217v1270zM1920 107v1270l-544 -217v-1270z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M512 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472q0 20 17 28l480 256q7 4 15 4zM1760 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472 q0 20 17 28l480 256q7 4 15 4zM640 1536q8 0 14 -3l512 -256q18 -10 18 -29v-1472q0 -13 -9.5 -22.5t-22.5 -9.5q-8 0 -14 3l-512 256q-18 10 -18 29v1472q0 13 9.5 22.5t22.5 9.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 640q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-110 0 -211 18q-173 -173 -435 -229q-52 -10 -86 -13q-12 -1 -22 6t-13 18q-4 15 20 37q5 5 23.5 21.5t25.5 23.5t23.5 25.5t24 31.5t20.5 37 t20 48t14.5 57.5t12.5 72.5q-146 90 -229.5 216.5t-83.5 269.5q0 174 120 321.5t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 -53 -37.5 -90.5t-90.5 -37.5 t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5 t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51 t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 130 71 248.5t191 204.5t286 136.5t348 50.5t348 -50.5t286 -136.5t191 -204.5t71 -248.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M512 345l512 295v-591l-512 -296v592zM0 640v-591l512 296zM512 1527v-591l-512 -296v591zM512 936l512 295v-591z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1709 1018q-10 -236 -332 -651q-333 -431 -562 -431q-142 0 -240 263q-44 160 -132 482q-72 262 -157 262q-18 0 -127 -76l-77 98q24 21 108 96.5t130 115.5q156 138 241 146q95 9 153 -55.5t81 -203.5q44 -287 66 -373q55 -249 120 -249q51 0 154 161q101 161 109 246 q13 139 -109 139q-57 0 -121 -26q120 393 459 382q251 -8 236 -326z" />
|
||||
<glyph unicode="" d="M0 1408h1536v-1536h-1536v1536zM1085 293l-221 631l221 297h-634l221 -297l-221 -631l317 -304z" />
|
||||
<glyph unicode="" d="M0 1408h1536v-1536h-1536v1536zM908 1088l-12 -33l75 -83l-31 -114l25 -25l107 57l107 -57l25 25l-31 114l75 83l-12 33h-95l-53 96h-32l-53 -96h-95zM641 925q32 0 44.5 -16t11.5 -63l174 21q0 55 -17.5 92.5t-50.5 56t-69 25.5t-85 7q-133 0 -199 -57.5t-66 -182.5v-72 h-96v-128h76q20 0 20 -8v-382q0 -14 -5 -20t-18 -7l-73 -7v-88h448v86l-149 14q-6 1 -8.5 1.5t-3.5 2.5t-0.5 4t1 7t0.5 10v387h191l38 128h-231q-6 0 -2 6t4 9v80q0 27 1.5 40.5t7.5 28t19.5 20t36.5 5.5zM1248 96v86l-54 9q-7 1 -9.5 2.5t-2.5 3t1 7.5t1 12v520h-275 l-23 -101l83 -22q23 -7 23 -27v-370q0 -14 -6 -18.5t-20 -6.5l-70 -9v-86h352z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1792 690q0 -58 -29.5 -105.5t-79.5 -72.5q12 -46 12 -96q0 -155 -106.5 -287t-290.5 -208.5t-400 -76.5t-399.5 76.5t-290 208.5t-106.5 287q0 47 11 94q-51 25 -82 73.5t-31 106.5q0 82 58 140.5t141 58.5q85 0 145 -63q218 152 515 162l116 521q3 13 15 21t26 5 l369 -81q18 37 54 59.5t79 22.5q62 0 106 -43.5t44 -105.5t-44 -106t-106 -44t-105.5 43.5t-43.5 105.5l-334 74l-104 -472q300 -9 519 -160q58 61 143 61q83 0 141 -58.5t58 -140.5zM418 491q0 -62 43.5 -106t105.5 -44t106 44t44 106t-44 105.5t-106 43.5q-61 0 -105 -44 t-44 -105zM1228 136q11 11 11 26t-11 26q-10 10 -25 10t-26 -10q-41 -42 -121 -62t-160 -20t-160 20t-121 62q-11 10 -26 10t-25 -10q-11 -10 -11 -25.5t11 -26.5q43 -43 118.5 -68t122.5 -29.5t91 -4.5t91 4.5t122.5 29.5t118.5 68zM1225 341q62 0 105.5 44t43.5 106 q0 61 -44 105t-105 44q-62 0 -106 -43.5t-44 -105.5t44 -106t106 -44z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M69 741h1q16 126 58.5 241.5t115 217t167.5 176t223.5 117.5t276.5 43q231 0 414 -105.5t294 -303.5q104 -187 104 -442v-188h-1125q1 -111 53.5 -192.5t136.5 -122.5t189.5 -57t213 -3t208 46.5t173.5 84.5v-377q-92 -55 -229.5 -92t-312.5 -38t-316 53 q-189 73 -311.5 249t-124.5 372q-3 242 111 412t325 268q-48 -60 -78 -125.5t-46 -159.5h635q8 77 -8 140t-47 101.5t-70.5 66.5t-80.5 41t-75 20.5t-56 8.5l-22 1q-135 -5 -259.5 -44.5t-223.5 -104.5t-176 -140.5t-138 -163.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M0 32v608h2304v-608q0 -66 -47 -113t-113 -47h-1984q-66 0 -113 47t-47 113zM640 256v-128h384v128h-384zM256 256v-128h256v128h-256zM2144 1408q66 0 113 -47t47 -113v-224h-2304v224q0 66 47 113t113 47h1984z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1549 857q55 0 85.5 -28.5t30.5 -83.5t-34 -82t-91 -27h-136v-177h-25v398h170zM1710 267l-4 -11l-5 -10q-113 -230 -330.5 -366t-474.5 -136q-182 0 -348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71q244 0 454.5 -124t329.5 -338l2 -4l8 -16 q-30 -15 -136.5 -68.5t-163.5 -84.5q-6 -3 -479 -268q384 -183 799 -366zM896 -234q250 0 462.5 132.5t322.5 357.5l-287 129q-72 -140 -206 -222t-292 -82q-151 0 -280 75t-204 204t-75 280t75 280t204 204t280 75t280 -73.5t204 -204.5l280 143q-116 208 -321 329 t-443 121q-119 0 -232.5 -31.5t-209 -87.5t-176.5 -137t-137 -176.5t-87.5 -209t-31.5 -232.5t31.5 -232.5t87.5 -209t137 -176.5t176.5 -137t209 -87.5t232.5 -31.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1427 827l-614 386l92 151h855zM405 562l-184 116v858l1183 -743zM1424 697l147 -95v-858l-532 335zM1387 718l-500 -802h-855l356 571z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M640 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1152 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1664 496v-752h-640v320q0 80 -56 136t-136 56t-136 -56t-56 -136v-320h-640v752q0 16 16 16h96 q16 0 16 -16v-112h128v624q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 6 2.5 9.5t8.5 5t9.5 2t11.5 0t9 -0.5v391q-32 15 -32 50q0 23 16.5 39t38.5 16t38.5 -16t16.5 -39q0 -35 -32 -50v-17q45 10 83 10q21 0 59.5 -7.5t54.5 -7.5 q17 0 47 7.5t37 7.5q16 0 16 -16v-210q0 -15 -35 -21.5t-62 -6.5q-18 0 -54.5 7.5t-55.5 7.5q-40 0 -90 -12v-133q1 0 9 0.5t11.5 0t9.5 -2t8.5 -5t2.5 -9.5v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-624h128v112q0 16 16 16h96 q16 0 16 -16z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M2288 731q16 -8 16 -27t-16 -27l-320 -192q-8 -5 -16 -5q-9 0 -16 4q-16 10 -16 28v128h-858q37 -58 83 -165q16 -37 24.5 -55t24 -49t27 -47t27 -34t31.5 -26t33 -8h96v96q0 14 9 23t23 9h320q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v96h-96 q-32 0 -61 10t-51 23.5t-45 40.5t-37 46t-33.5 57t-28.5 57.5t-28 60.5q-23 53 -37 81.5t-36 65t-44.5 53.5t-46.5 17h-360q-22 -84 -91 -138t-157 -54q-106 0 -181 75t-75 181t75 181t181 75q88 0 157 -54t91 -138h104q24 0 46.5 17t44.5 53.5t36 65t37 81.5q19 41 28 60.5 t28.5 57.5t33.5 57t37 46t45 40.5t51 23.5t61 10h107q21 57 70 92.5t111 35.5q80 0 136 -56t56 -136t-56 -136t-136 -56q-62 0 -111 35.5t-70 92.5h-107q-17 0 -33 -8t-31.5 -26t-27 -34t-27 -47t-24 -49t-24.5 -55q-46 -107 -83 -165h1114v128q0 18 16 28t32 -1z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1150 774q0 -56 -39.5 -95t-95.5 -39h-253v269h253q56 0 95.5 -39.5t39.5 -95.5zM1329 774q0 130 -91.5 222t-222.5 92h-433v-896h180v269h253q130 0 222 91.5t92 221.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348 t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1645 438q0 59 -34 106.5t-87 68.5q-7 -45 -23 -92q-7 -24 -27.5 -38t-44.5 -14q-12 0 -24 3q-31 10 -45 38.5t-4 58.5q23 71 23 143q0 123 -61 227.5t-166 165.5t-228 61q-134 0 -247 -73t-167 -194q108 -28 188 -106q22 -23 22 -55t-22 -54t-54 -22t-55 22 q-75 75 -180 75q-106 0 -181 -74.5t-75 -180.5t75 -180.5t181 -74.5h1046q79 0 134.5 55.5t55.5 133.5zM1798 438q0 -142 -100.5 -242t-242.5 -100h-1046q-169 0 -289 119.5t-120 288.5q0 153 100 267t249 136q62 184 221 298t354 114q235 0 408.5 -158.5t196.5 -389.5 q116 -25 192.5 -118.5t76.5 -214.5zM2048 438q0 -175 -97 -319q-23 -33 -64 -33q-24 0 -43 13q-26 17 -32 48.5t12 57.5q71 104 71 233t-71 233q-18 26 -12 57t32 49t57.5 11.5t49.5 -32.5q97 -142 97 -318zM2304 438q0 -244 -134 -443q-23 -34 -64 -34q-23 0 -42 13 q-26 18 -32.5 49t11.5 57q108 164 108 358q0 195 -108 357q-18 26 -11.5 57.5t32.5 48.5q26 18 57 12t49 -33q134 -198 134 -442z" />
|
||||
<glyph unicode="" d="M1500 -13q0 -89 -63 -152.5t-153 -63.5t-153.5 63.5t-63.5 152.5q0 90 63.5 153.5t153.5 63.5t153 -63.5t63 -153.5zM1267 268q-115 -15 -192.5 -102.5t-77.5 -205.5q0 -74 33 -138q-146 -78 -379 -78q-109 0 -201 21t-153.5 54.5t-110.5 76.5t-76 85t-44.5 83 t-23.5 66.5t-6 39.5q0 19 4.5 42.5t18.5 56t36.5 58t64 43.5t94.5 18t94 -17.5t63 -41t35.5 -53t17.5 -49t4 -33.5q0 -34 -23 -81q28 -27 82 -42t93 -17l40 -1q115 0 190 51t75 133q0 26 -9 48.5t-31.5 44.5t-49.5 41t-74 44t-93.5 47.5t-119.5 56.5q-28 13 -43 20 q-116 55 -187 100t-122.5 102t-72 125.5t-20.5 162.5q0 78 20.5 150t66 137.5t112.5 114t166.5 77t221.5 28.5q120 0 220 -26t164.5 -67t109.5 -94t64 -105.5t19 -103.5q0 -46 -15 -82.5t-36.5 -58t-48.5 -36t-49 -19.5t-39 -5h-8h-32t-39 5t-44 14t-41 28t-37 46t-24 70.5 t-10 97.5q-15 16 -59 25.5t-81 10.5l-37 1q-68 0 -117.5 -31t-70.5 -70t-21 -76q0 -24 5 -43t24 -46t53 -51t97 -53.5t150 -58.5q76 -25 138.5 -53.5t109 -55.5t83 -59t60.5 -59.5t41 -62.5t26.5 -62t14.5 -63.5t6 -62t1 -62.5z" />
|
||||
<glyph unicode="" d="M704 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1152 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103 t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 t73 -273t198 -198t273 -73zM864 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192z" />
|
||||
<glyph unicode="" d="M1088 352v576q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
|
||||
<glyph unicode="" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 t73 -273t198 -198t273 -73zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h576q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-576z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1757 128l35 -313q3 -28 -16 -50q-19 -21 -48 -21h-1664q-29 0 -48 21q-19 22 -16 50l35 313h1722zM1664 967l86 -775h-1708l86 775q3 24 21 40.5t43 16.5h256v-128q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5v128h384v-128q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5v128h256q25 0 43 -16.5t21 -40.5zM1280 1152v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2048" d="M1920 768q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-15l-115 -662q-8 -46 -44 -76t-82 -30h-1280q-46 0 -82 30t-44 76l-115 662h-15q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5h1792zM485 -32q26 2 43.5 22.5t15.5 46.5l-32 416q-2 26 -22.5 43.5 t-46.5 15.5t-43.5 -22.5t-15.5 -46.5l32 -416q2 -25 20.5 -42t43.5 -17h5zM896 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1280 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1632 27l32 416 q2 26 -15.5 46.5t-43.5 22.5t-46.5 -15.5t-22.5 -43.5l-32 -416q-2 -26 15.5 -46.5t43.5 -22.5h5q25 0 43.5 17t20.5 42zM476 1244l-93 -412h-132l101 441q19 88 89 143.5t160 55.5h167q0 26 19 45t45 19h384q26 0 45 -19t19 -45h167q90 0 160 -55.5t89 -143.5l101 -441 h-132l-93 412q-11 44 -45.5 72t-79.5 28h-167q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45h-167q-45 0 -79.5 -28t-45.5 -72z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M991 512l64 256h-254l-64 -256h254zM1759 1016l-56 -224q-7 -24 -31 -24h-327l-64 -256h311q15 0 25 -12q10 -14 6 -28l-56 -224q-5 -24 -31 -24h-327l-81 -328q-7 -24 -31 -24h-224q-16 0 -26 12q-9 12 -6 28l78 312h-254l-81 -328q-7 -24 -31 -24h-225q-15 0 -25 12 q-9 12 -6 28l78 312h-311q-15 0 -25 12q-9 12 -6 28l56 224q7 24 31 24h327l64 256h-311q-15 0 -25 12q-10 14 -6 28l56 224q5 24 31 24h327l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h254l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h311 q15 0 25 -12q9 -12 6 -28z" />
|
||||
<glyph unicode="" d="M841 483l148 -148l-149 -149zM840 1094l149 -149l-148 -148zM710 -130l464 464l-306 306l306 306l-464 464v-611l-255 255l-93 -93l320 -321l-320 -321l93 -93l255 255v-611zM1429 640q0 -209 -32 -365.5t-87.5 -257t-140.5 -162.5t-181.5 -86.5t-219.5 -24.5 t-219.5 24.5t-181.5 86.5t-140.5 162.5t-87.5 257t-32 365.5t32 365.5t87.5 257t140.5 162.5t181.5 86.5t219.5 24.5t219.5 -24.5t181.5 -86.5t140.5 -162.5t87.5 -257t32 -365.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M596 113l173 172l-173 172v-344zM596 823l173 172l-173 172v-344zM628 640l356 -356l-539 -540v711l-297 -296l-108 108l372 373l-372 373l108 108l297 -296v711l539 -540z" />
|
||||
<glyph unicode="" d="M1280 256q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM512 1024q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5 t112.5 -271.5zM1440 1344q0 -20 -13 -38l-1056 -1408q-19 -26 -51 -26h-160q-26 0 -45 19t-19 45q0 20 13 38l1056 1408q19 26 51 26h160q26 0 45 -19t19 -45zM768 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M104 830l792 -1015l-868 630q-18 13 -25 34.5t0 42.5l101 308v0zM566 830h660l-330 -1015v0zM368 1442l198 -612h-462l198 612q8 23 33 23t33 -23zM1688 830l101 -308q7 -21 0 -42.5t-25 -34.5l-868 -630l792 1015v0zM1688 830h-462l198 612q8 23 33 23t33 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M384 704h160v224h-160v-224zM1221 372v92q-104 -36 -243 -38q-135 -1 -259.5 46.5t-220.5 122.5l1 -96q88 -80 212 -128.5t272 -47.5q129 0 238 49zM640 704h640v224h-640v-224zM1792 736q0 -187 -99 -352q89 -102 89 -229q0 -157 -129.5 -268t-313.5 -111 q-122 0 -225 52.5t-161 140.5q-19 -1 -57 -1t-57 1q-58 -88 -161 -140.5t-225 -52.5q-184 0 -313.5 111t-129.5 268q0 127 89 229q-99 165 -99 352q0 209 120 385.5t326.5 279.5t449.5 103t449.5 -103t326.5 -279.5t120 -385.5z" />
|
||||
<glyph unicode="" d="M515 625v-128h-252v128h252zM515 880v-127h-252v127h252zM1273 369v-128h-341v128h341zM1273 625v-128h-672v128h672zM1273 880v-127h-672v127h672zM1408 20v1240q0 8 -6 14t-14 6h-32l-378 -256l-210 171l-210 -171l-378 256h-32q-8 0 -14 -6t-6 -14v-1240q0 -8 6 -14 t14 -6h1240q8 0 14 6t6 14zM553 1130l185 150h-406zM983 1130l221 150h-406zM1536 1260v-1240q0 -62 -43 -105t-105 -43h-1240q-62 0 -105 43t-43 105v1240q0 62 43 105t105 43h1240q62 0 105 -43t43 -105z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M896 720q-104 196 -160 278q-139 202 -347 318q-34 19 -70 36q-89 40 -94 32t34 -38l39 -31q62 -43 112.5 -93.5t94.5 -116.5t70.5 -113t70.5 -131q9 -17 13 -25q44 -84 84 -153t98 -154t115.5 -150t131 -123.5t148.5 -90.5q153 -66 154 -60q1 3 -49 37q-53 36 -81 57 q-77 58 -179 211t-185 310zM549 177q-76 60 -132.5 125t-98 143.5t-71 154.5t-58.5 186t-52 209t-60.5 252t-76.5 289q273 0 497.5 -36t379 -92t271 -144.5t185.5 -172.5t110 -198.5t56 -199.5t12.5 -198.5t-9.5 -173t-20 -143.5t-13 -107l323 -327h-104l-281 285 q-22 -2 -91.5 -14t-121.5 -19t-138 -6t-160.5 17t-167.5 59t-179 111z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1374 879q-6 26 -28.5 39.5t-48.5 7.5q-261 -62 -401 -62t-401 62q-26 6 -48.5 -7.5t-28.5 -39.5t7.5 -48.5t39.5 -28.5q194 -46 303 -58q-2 -158 -15.5 -269t-26.5 -155.5t-41 -115.5l-9 -21q-10 -25 1 -49t36 -34q9 -4 23 -4q44 0 60 41l8 20q54 139 71 259h42 q17 -120 71 -259l8 -20q16 -41 60 -41q14 0 23 4q25 10 36 34t1 49l-9 21q-28 71 -41 115.5t-26.5 155.5t-15.5 269q109 12 303 58q26 6 39.5 28.5t7.5 48.5zM1024 1024q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1600 640q0 -143 -55.5 -273.5t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5zM896 1408q-156 0 -298 -61t-245 -164t-164 -245t-61 -298t61 -298 t164 -245t245 -164t298 -61t298 61t245 164t164 245t61 298t-61 298t-164 245t-245 164t-298 61zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
|
||||
<glyph unicode="" d="M1438 723q34 -35 29 -82l-44 -551q-4 -42 -34.5 -70t-71.5 -28q-6 0 -9 1q-44 3 -72.5 36.5t-25.5 77.5l35 429l-143 -8q55 -113 55 -240q0 -216 -148 -372l-137 137q91 101 91 235q0 145 -102.5 248t-247.5 103q-134 0 -236 -92l-137 138q120 114 284 141l264 300 l-149 87l-181 -161q-33 -30 -77 -27.5t-73 35.5t-26.5 77t34.5 73l239 213q26 23 60 26.5t64 -14.5l488 -283q36 -21 48 -68q17 -67 -26 -117l-205 -232l371 20q49 3 83 -32zM1240 1180q-74 0 -126 52t-52 126t52 126t126 52t126.5 -52t52.5 -126t-52.5 -126t-126.5 -52z M613 -62q106 0 196 61l139 -139q-146 -116 -335 -116q-148 0 -273.5 73t-198.5 198t-73 273q0 188 116 336l139 -139q-60 -88 -60 -197q0 -145 102.5 -247.5t247.5 -102.5z" />
|
||||
<glyph unicode="" d="M880 336v-160q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h160q14 0 23 -9t9 -23zM1136 832q0 -50 -15 -90t-45.5 -69t-52 -44t-59.5 -36q-32 -18 -46.5 -28t-26 -24t-11.5 -29v-32q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v68q0 35 10.5 64.5 t24 47.5t39 35.5t41 25.5t44.5 21q53 25 75 43t22 49q0 42 -43.5 71.5t-95.5 29.5q-56 0 -95 -27q-29 -20 -80 -83q-9 -12 -25 -12q-11 0 -19 6l-108 82q-10 7 -12 20t5 23q122 192 349 192q129 0 238.5 -89.5t109.5 -214.5zM768 1280q-130 0 -248.5 -51t-204 -136.5 t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5 t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M366 1225q-64 0 -110 45.5t-46 110.5q0 64 46 109.5t110 45.5t109.5 -45.5t45.5 -109.5q0 -65 -45.5 -110.5t-109.5 -45.5zM917 583q0 -50 -30 -67.5t-63.5 -6.5t-47.5 34l-367 438q-7 12 -14 15.5t-11 1.5l-3 -3q-7 -8 4 -21l122 -139l1 -354l-161 -457 q-67 -192 -92 -234q-16 -26 -28 -32q-50 -26 -103 -1q-29 13 -41.5 43t-9.5 57q2 17 197 618l5 416l-85 -164l35 -222q4 -24 -1 -42t-14 -27.5t-19 -16t-17 -7.5l-7 -2q-19 -3 -34.5 3t-24 16t-14 22t-7.5 19.5t-2 9.5l-46 299l211 381q23 34 113 34q75 0 107 -40l424 -521 q7 -5 14 -17l3 -3l-1 -1q7 -13 7 -29zM514 433q43 -113 88.5 -225t69.5 -168l24 -55q36 -93 42 -125q11 -70 -36 -97q-35 -22 -66 -16t-51 22t-29 35h-1q-6 16 -8 25l-124 351zM1338 -159q31 -49 31 -57q0 -5 -3 -7q-9 -5 -14.5 0.5t-15.5 26t-16 30.5q-114 172 -423 661 q3 -1 7 1t7 4l3 2q11 9 11 17z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M504 542h171l-1 265zM1530 641q0 87 -50.5 140t-146.5 53h-54v-388h52q91 0 145 57t54 138zM956 1018l1 -756q0 -14 -9.5 -24t-23.5 -10h-216q-14 0 -23.5 10t-9.5 24v62h-291l-55 -81q-10 -15 -28 -15h-267q-21 0 -30.5 18t3.5 35l556 757q9 14 27 14h332q14 0 24 -10 t10 -24zM1783 641q0 -193 -125.5 -303t-324.5 -110h-270q-14 0 -24 10t-10 24v756q0 14 10 24t24 10h268q200 0 326 -109t126 -302zM1939 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5 t-7.5 60t-20 91.5t-41 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2123 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-45 -108t-74 -102.5h-51q38 45 66.5 104.5t41.5 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5 h43q41 -47 72 -107t45.5 -111.5t23 -96t10.5 -70.5zM2304 640q0 -11 -0.5 -29t-8 -71.5t-21.5 -102t-44.5 -108t-73.5 -102.5h-51q38 45 66 104.5t41 112t21 98t9 72.5l1 27q0 8 -0.5 22.5t-7.5 60t-19.5 91.5t-40.5 111.5t-66 124.5h43q41 -47 72 -107t45.5 -111.5t23 -96 t9.5 -70.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M617 -153q0 11 -13 58t-31 107t-20 69q-1 4 -5 26.5t-8.5 36t-13.5 21.5q-15 14 -51 14q-23 0 -70 -5.5t-71 -5.5q-34 0 -47 11q-6 5 -11 15.5t-7.5 20t-6.5 24t-5 18.5q-37 128 -37 255t37 255q1 4 5 18.5t6.5 24t7.5 20t11 15.5q13 11 47 11q24 0 71 -5.5t70 -5.5 q36 0 51 14q9 8 13.5 21.5t8.5 36t5 26.5q2 9 20 69t31 107t13 58q0 22 -43.5 52.5t-75.5 42.5q-20 8 -45 8q-34 0 -98 -18q-57 -17 -96.5 -40.5t-71 -66t-46 -70t-45.5 -94.5q-6 -12 -9 -19q-49 -107 -68 -216t-19 -244t19 -244t68 -216q56 -122 83 -161q63 -91 179 -127 l6 -2q64 -18 98 -18q25 0 45 8q32 12 75.5 42.5t43.5 52.5zM776 760q-26 0 -45 19t-19 45.5t19 45.5q37 37 37 90q0 52 -37 91q-19 19 -19 45t19 45t45 19t45 -19q75 -75 75 -181t-75 -181q-21 -19 -45 -19zM957 579q-27 0 -45 19q-19 19 -19 45t19 45q112 114 112 272 t-112 272q-19 19 -19 45t19 45t45 19t45 -19q150 -150 150 -362t-150 -362q-18 -19 -45 -19zM1138 398q-27 0 -45 19q-19 19 -19 45t19 45q90 91 138.5 208t48.5 245t-48.5 245t-138.5 208q-19 19 -19 45t19 45t45 19t45 -19q109 -109 167 -249t58 -294t-58 -294t-167 -249 q-18 -19 -45 -19z" />
|
||||
<glyph unicode="" horiz-adv-x="2176" d="M192 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM704 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 352 q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 352q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1472 864q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 864 q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM1984 1376q-66 0 -113 -47t-47 -113t47 -113t113 -47t113 47t47 113t-47 113t-113 47zM384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 192q0 -80 -56 -136 t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 1216q0 -80 -56 -136t-136 -56 t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 192q0 -80 -56 -136t-136 -56t-136 56 t-56 136t56 136t136 56t136 -56t56 -136zM1664 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM2176 704q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136 t56 136t136 56t136 -56t56 -136zM2176 1216q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M128 -192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM320 0q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM365 365l256 -256l-90 -90l-256 256zM704 384q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45z M1411 704q0 -59 -11.5 -108.5t-37.5 -93.5t-44 -67.5t-53 -64.5q-31 -35 -45.5 -54t-33.5 -50t-26.5 -64t-7.5 -74q0 -159 -112.5 -271.5t-271.5 -112.5q-26 0 -45 19t-19 45t19 45t45 19q106 0 181 75t75 181q0 57 11.5 105.5t37 91t43.5 66.5t52 63q40 46 59.5 72 t37.5 74.5t18 103.5q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM896 576q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45 t45 19t45 -19t19 -45zM1184 704q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 93 -65.5 158.5t-158.5 65.5q-92 0 -158 -65.5t-66 -158.5q0 -26 -19 -45t-45 -19t-45 19t-19 45q0 146 103 249t249 103t249 -103t103 -249zM1578 993q10 -25 -1 -49t-36 -34q-9 -4 -23 -4 q-19 0 -35.5 11t-23.5 30q-68 178 -224 295q-21 16 -25 42t12 47q17 21 43 25t47 -12q183 -137 266 -351zM1788 1074q9 -25 -1.5 -49t-35.5 -34q-11 -4 -23 -4q-44 0 -60 41q-92 238 -297 393q-22 16 -25.5 42t12.5 47q16 22 42 25.5t47 -12.5q235 -175 341 -449z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M1032 576q-59 2 -84 55q-17 34 -48 53.5t-68 19.5q-53 0 -90.5 -37.5t-37.5 -90.5q0 -56 36 -89l10 -8q34 -31 82 -31q37 0 68 19.5t48 53.5q25 53 84 55zM1600 704q0 56 -36 89l-10 8q-34 31 -82 31q-37 0 -68 -19.5t-48 -53.5q-25 -53 -84 -55q59 -2 84 -55 q17 -34 48 -53.5t68 -19.5q53 0 90.5 37.5t37.5 90.5zM1174 925q-17 -35 -55 -48t-73 4q-62 31 -134 31q-51 0 -99 -17q3 0 9.5 0.5t9.5 0.5q92 0 170.5 -50t118.5 -133q17 -36 3.5 -73.5t-49.5 -54.5q-18 -9 -39 -9q21 0 39 -9q36 -17 49.5 -54.5t-3.5 -73.5 q-40 -83 -118.5 -133t-170.5 -50h-6q-16 2 -44 4l-290 27l-239 -120q-14 -7 -29 -7q-40 0 -57 35l-160 320q-11 23 -4 47.5t29 37.5l209 119l148 267q17 155 91.5 291.5t195.5 236.5q31 25 70.5 21.5t64.5 -34.5t21.5 -70t-34.5 -65q-70 -59 -117 -128q123 84 267 101 q40 5 71.5 -19t35.5 -64q5 -40 -19 -71.5t-64 -35.5q-84 -10 -159 -55q46 10 99 10q115 0 218 -50q36 -18 49 -55.5t-5 -73.5zM2137 1085l160 -320q11 -23 4 -47.5t-29 -37.5l-209 -119l-148 -267q-17 -155 -91.5 -291.5t-195.5 -236.5q-26 -22 -61 -22q-45 0 -74 35 q-25 31 -21.5 70t34.5 65q70 59 117 128q-123 -84 -267 -101q-4 -1 -12 -1q-36 0 -63.5 24t-31.5 60q-5 40 19 71.5t64 35.5q84 10 159 55q-46 -10 -99 -10q-115 0 -218 50q-36 18 -49 55.5t5 73.5q17 35 55 48t73 -4q62 -31 134 -31q51 0 99 17q-3 0 -9.5 -0.5t-9.5 -0.5 q-92 0 -170.5 50t-118.5 133q-17 36 -3.5 73.5t49.5 54.5q18 9 39 9q-21 0 -39 9q-36 17 -49.5 54.5t3.5 73.5q40 83 118.5 133t170.5 50h6h1q14 -2 42 -4l291 -27l239 120q14 7 29 7q40 0 57 -35z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1056 704q0 -26 19 -45t45 -19t45 19t19 45q0 146 -103 249t-249 103t-249 -103t-103 -249q0 -26 19 -45t45 -19t45 19t19 45q0 93 66 158.5t158 65.5t158 -65.5t66 -158.5zM835 1280q-117 0 -223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5q0 -26 19 -45t45 -19t45 19 t19 45q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -55 -18 -103.5t-37.5 -74.5t-59.5 -72q-34 -39 -52 -63t-43.5 -66.5t-37 -91t-11.5 -105.5q0 -106 -75 -181t-181 -75q-26 0 -45 -19t-19 -45t19 -45t45 -19q159 0 271.5 112.5t112.5 271.5q0 41 7.5 74 t26.5 64t33.5 50t45.5 54q35 41 53 64.5t44 67.5t37.5 93.5t11.5 108.5q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5zM591 561l226 -226l-579 -579q-12 -12 -29 -12t-29 12l-168 168q-12 12 -12 29t12 29zM1612 1524l168 -168q12 -12 12 -29t-12 -30l-233 -233 l-26 -25l-71 -71q-66 153 -195 258l91 91l207 207q13 12 30 12t29 -12z" />
|
||||
<glyph unicode="" d="M866 1021q0 -27 -13 -94q-11 -50 -31.5 -150t-30.5 -150q-2 -11 -4.5 -12.5t-13.5 -2.5q-20 -2 -31 -2q-58 0 -84 49.5t-26 113.5q0 88 35 174t103 124q28 14 51 14q28 0 36.5 -16.5t8.5 -47.5zM1352 597q0 14 -39 75.5t-52 66.5q-21 8 -34 8q-91 0 -226 -77l-2 2 q3 22 27.5 135t24.5 178q0 233 -242 233q-24 0 -68 -6q-94 -17 -168.5 -89.5t-111.5 -166.5t-37 -189q0 -146 80.5 -225t227.5 -79q25 0 25 -3t-1 -5q-4 -34 -26 -117q-14 -52 -51.5 -101t-82.5 -49q-42 0 -42 47q0 24 10.5 47.5t25 39.5t29.5 28.5t26 20t11 8.5q0 3 -7 10 q-24 22 -58.5 36.5t-65.5 14.5q-35 0 -63.5 -34t-41 -75t-12.5 -75q0 -88 51.5 -142t138.5 -54q82 0 155 53t117.5 126t65.5 153q6 22 15.5 66.5t14.5 66.5q3 12 14 18q118 60 227 60q48 0 127 -18q1 -1 4 -1q5 0 9.5 4.5t4.5 8.5zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1535" d="M744 1231q0 24 -2 38.5t-8.5 30t-21 23t-37.5 7.5q-39 0 -78 -23q-105 -58 -159 -190.5t-54 -269.5q0 -44 8.5 -85.5t26.5 -80.5t52.5 -62.5t81.5 -23.5q4 0 18 -0.5t20 0t16 3t15 8.5t7 16q16 77 48 231.5t48 231.5q19 91 19 146zM1498 575q0 -7 -7.5 -13.5t-15.5 -6.5 l-6 1q-22 3 -62 11t-72 12.5t-63 4.5q-167 0 -351 -93q-15 -8 -21 -27q-10 -36 -24.5 -105.5t-22.5 -100.5q-23 -91 -70 -179.5t-112.5 -164.5t-154.5 -123t-185 -47q-135 0 -214.5 83.5t-79.5 219.5q0 53 19.5 117t63 116.5t97.5 52.5q38 0 120 -33.5t83 -61.5 q0 -1 -16.5 -12.5t-39.5 -31t-46 -44.5t-39 -61t-16 -74q0 -33 16.5 -53t48.5 -20q45 0 85 31.5t66.5 78t48 105.5t32.5 107t16 90v9q0 2 -3.5 3.5t-8.5 1.5h-10t-10 -0.5t-6 -0.5q-227 0 -352 122.5t-125 348.5q0 108 34.5 221t96 210t156 167.5t204.5 89.5q52 9 106 9 q374 0 374 -360q0 -98 -38 -273t-43 -211l3 -3q101 57 182.5 88t167.5 31q22 0 53 -13q19 -7 80 -102.5t61 -116.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M831 863q32 0 59 -18l222 -148q61 -40 110 -97l146 -170q40 -46 29 -106l-72 -413q-6 -32 -29.5 -53.5t-55.5 -25.5l-527 -56l-352 -32h-9q-39 0 -67.5 28t-28.5 68q0 37 27 64t65 32l260 32h-448q-41 0 -69.5 30t-26.5 71q2 39 32 65t69 26l442 1l-521 64q-41 5 -66 37 t-19 73q6 35 34.5 57.5t65.5 22.5h10l481 -60l-351 94q-38 10 -62 41.5t-18 68.5q6 36 33 58.5t62 22.5q6 0 20 -2l448 -96l217 -37q1 0 3 -0.5t3 -0.5q23 0 30.5 23t-12.5 36l-186 125q-35 23 -42 63.5t18 73.5q27 38 76 38zM761 661l186 -125l-218 37l-5 2l-36 38 l-238 262q-1 1 -2.5 3.5t-2.5 3.5q-24 31 -18.5 70t37.5 64q31 23 68 17.5t64 -33.5l142 -147l-4 -4t-5 -4q-32 -45 -23 -99t55 -85zM1648 1115l15 -266q4 -73 -11 -147l-48 -219q-12 -59 -67 -87l-106 -54q2 62 -39 109l-146 170q-53 61 -117 103l-222 148q-34 23 -76 23 q-51 0 -88 -37l-235 312q-25 33 -18 73.5t41 63.5q33 22 71.5 14t62.5 -40l266 -352l-262 455q-21 35 -10.5 75t47.5 59q35 18 72.5 6t57.5 -46l241 -420l-136 337q-15 35 -4.5 74t44.5 56q37 19 76 6t56 -51l193 -415l101 -196q8 -15 23 -17.5t27 7.5t11 26l-12 224 q-2 41 26 71t69 31q39 0 67 -28.5t30 -67.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M335 180q-2 0 -6 2q-86 57 -168.5 145t-139.5 180q-21 30 -21 69q0 9 2 19t4 18t7 18t8.5 16t10.5 17t10 15t12 15.5t11 14.5q184 251 452 365q-110 198 -110 211q0 19 17 29q116 64 128 64q18 0 28 -16l124 -229q92 19 192 19q266 0 497.5 -137.5t378.5 -369.5 q20 -31 20 -69t-20 -69q-91 -142 -218.5 -253.5t-278.5 -175.5q110 -198 110 -211q0 -20 -17 -29q-116 -64 -127 -64q-19 0 -29 16l-124 229l-64 119l-444 820l7 7q-58 -24 -99 -47q3 -5 127 -234t243 -449t119 -223q0 -7 -9 -9q-13 -3 -72 -3q-57 0 -60 7l-456 841 q-39 -28 -82 -68q24 -43 214 -393.5t190 -354.5q0 -10 -11 -10q-14 0 -82.5 22t-72.5 28l-106 197l-224 413q-44 -53 -78 -106q2 -3 18 -25t23 -34l176 -327q0 -10 -10 -10zM1165 282l49 -91q273 111 450 385q-180 277 -459 389q67 -64 103 -148.5t36 -176.5 q0 -106 -47 -200.5t-132 -157.5zM848 896q0 -20 14 -34t34 -14q86 0 147 -61t61 -147q0 -20 14 -34t34 -14t34 14t14 34q0 126 -89 215t-215 89q-20 0 -34 -14t-14 -34zM1214 961l-9 4l7 -7z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1050 430q0 -215 -147 -374q-148 -161 -378 -161q-232 0 -378 161q-147 159 -147 374q0 147 68 270.5t189 196.5t268 73q96 0 182 -31q-32 -62 -39 -126q-66 28 -143 28q-167 0 -280.5 -123t-113.5 -291q0 -170 112.5 -288.5t281.5 -118.5t281 118.5t112 288.5 q0 89 -32 166q66 13 123 49q41 -98 41 -212zM846 619q0 -192 -79.5 -345t-238.5 -253l-14 -1q-29 0 -62 5q83 32 146.5 102.5t99.5 154.5t58.5 189t30 192.5t7.5 178.5q0 69 -3 103q55 -160 55 -326zM791 947v-2q-73 214 -206 440q88 -59 142.5 -186.5t63.5 -251.5z M1035 744q-83 0 -160 75q218 120 290 247q19 37 21 56q-42 -94 -139.5 -166.5t-204.5 -97.5q-35 54 -35 113q0 37 17 79t43 68q46 44 157 74q59 16 106 58.5t74 100.5q74 -105 74 -253q0 -109 -24 -170q-32 -77 -88.5 -130.5t-130.5 -53.5z" />
|
||||
<glyph unicode="" d="M1050 495q0 78 -28 147q-41 -25 -85 -34q22 -50 22 -114q0 -117 -77 -198.5t-193 -81.5t-193.5 81.5t-77.5 198.5q0 115 78 199.5t193 84.5q53 0 98 -19q4 43 27 87q-60 21 -125 21q-154 0 -257.5 -108.5t-103.5 -263.5t103.5 -261t257.5 -106t257.5 106.5t103.5 260.5z M872 850q2 -24 2 -71q0 -63 -5 -123t-20.5 -132.5t-40.5 -130t-68.5 -106t-100.5 -70.5q21 -3 42 -3h10q219 139 219 411q0 116 -38 225zM872 850q-4 80 -44 171.5t-98 130.5q92 -156 142 -302zM1207 955q0 102 -51 174q-41 -86 -124 -109q-69 -19 -109 -53.5t-40 -99.5 q0 -40 24 -77q74 17 140.5 67t95.5 115q-4 -52 -74.5 -111.5t-138.5 -97.5q52 -52 110 -52q51 0 90 37t60 90q17 43 17 117zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1279 388q0 22 -22 27q-67 15 -118 59t-80 108q-7 19 -7 25q0 15 19.5 26t43 17t43 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-12 0 -32 -8t-31 -8q-4 0 -12 2q5 95 5 114q0 79 -17 114q-36 78 -103 121.5t-152 43.5q-199 0 -275 -165q-17 -35 -17 -114q0 -19 5 -114 q-4 -2 -14 -2q-12 0 -32 7.5t-30 7.5q-21 0 -38.5 -12t-17.5 -32q0 -21 19.5 -35.5t43 -20.5t43 -17t19.5 -26q0 -6 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -46 137 -68q2 -5 6 -26t11.5 -30.5t23.5 -9.5q12 0 37.5 4.5t39.5 4.5q35 0 67 -15t54 -32.5t57.5 -32.5 t76.5 -15q43 0 79 15t57.5 32.5t53.5 32.5t67 15q14 0 39.5 -4t38.5 -4q16 0 23 10t11 30t6 25q137 22 137 68zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M848 1408q134 1 240.5 -68.5t163.5 -192.5q27 -58 27 -179q0 -47 -9 -191q14 -7 28 -7q18 0 51 13.5t51 13.5q29 0 56 -18t27 -46q0 -32 -31.5 -54t-69 -31.5t-69 -29t-31.5 -47.5q0 -15 12 -43q37 -82 102.5 -150t144.5 -101q28 -12 80 -23q28 -6 28 -35 q0 -70 -219 -103q-7 -11 -11 -39t-14 -46.5t-33 -18.5q-20 0 -62 6.5t-64 6.5q-37 0 -62 -5q-32 -5 -63 -22.5t-58 -38t-58 -40.5t-76 -33.5t-99 -13.5q-52 0 -96.5 13.5t-75 33.5t-57.5 40.5t-58 38t-62 22.5q-26 5 -63 5q-24 0 -65.5 -7.5t-58.5 -7.5q-25 0 -35 18.5 t-14 47.5t-11 40q-219 33 -219 103q0 29 28 35q52 11 80 23q78 32 144.5 101t102.5 150q12 28 12 43q0 28 -31.5 47.5t-69.5 29.5t-69.5 31.5t-31.5 52.5q0 27 26 45.5t55 18.5q15 0 48 -13t53 -13q18 0 32 7q-9 142 -9 190q0 122 27 180q64 137 172 198t264 63z" />
|
||||
<glyph unicode="" d="M1280 388q0 22 -22 27q-67 14 -118 58t-80 109q-7 14 -7 25q0 15 19.5 26t42.5 17t42.5 20.5t19.5 36.5q0 19 -18.5 31.5t-38.5 12.5q-11 0 -31 -8t-32 -8q-4 0 -12 2q5 63 5 115q0 78 -17 114q-36 78 -102.5 121.5t-152.5 43.5q-198 0 -275 -165q-18 -38 -18 -115 q0 -38 6 -114q-10 -2 -15 -2q-11 0 -31.5 8t-30.5 8q-20 0 -37.5 -12.5t-17.5 -32.5q0 -21 19.5 -35.5t42.5 -20.5t42.5 -17t19.5 -26q0 -11 -7 -25q-64 -138 -198 -167q-22 -5 -22 -27q0 -47 138 -69q2 -5 6 -26t11 -30.5t23 -9.5q13 0 38.5 5t38.5 5q35 0 67.5 -15 t54.5 -32.5t57.5 -32.5t76.5 -15q43 0 79 15t57.5 32.5t54 32.5t67.5 15q13 0 39 -4.5t39 -4.5q15 0 22.5 9.5t11.5 31t5 24.5q138 22 138 69zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960 q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="2304" d="M2304 1536q-69 -46 -125 -92t-89 -81t-59.5 -71.5t-37.5 -57.5t-22 -44.5t-14 -29.5q-10 -18 -35.5 -136.5t-48.5 -164.5q-15 -29 -50 -60.5t-67.5 -50.5t-72.5 -41t-48 -28q-47 -31 -151 -231q-341 14 -630 -158q-92 -53 -303 -179q47 16 86 31t55 22l15 7 q71 27 163 64.5t133.5 53.5t108 34.5t142.5 31.5q186 31 465 -7q1 0 10 -3q11 -6 14 -17t-3 -22l-194 -345q-15 -29 -47 -22q-128 24 -354 24q-146 0 -402 -44.5t-392 -46.5q-82 -1 -149 13t-107 37t-61 40t-33 34l-1 1v2q0 6 6 6q138 0 371 55q192 366 374.5 524t383.5 158 q5 0 14.5 -0.5t38 -5t55 -12t61.5 -24.5t63 -39.5t54 -59t40 -82.5l102 177q2 4 21 42.5t44.5 86.5t61 109.5t84 133.5t100.5 137q66 82 128 141.5t121.5 96.5t92.5 53.5t88 39.5z" />
|
||||
<glyph unicode="" d="M1322 640q0 -45 -5 -76l-236 14l224 -78q-19 -73 -58 -141l-214 103l177 -158q-44 -61 -107 -108l-157 178l103 -215q-61 -37 -140 -59l-79 228l14 -240q-38 -6 -76 -6t-76 6l14 238l-78 -226q-74 19 -140 59l103 215l-157 -178q-59 43 -108 108l178 158l-214 -104 q-39 69 -58 141l224 79l-237 -14q-5 42 -5 76q0 35 5 77l238 -14l-225 79q19 73 58 140l214 -104l-177 159q46 61 107 108l158 -178l-103 215q67 39 140 58l77 -224l-13 236q36 6 75 6q38 0 76 -6l-14 -237l78 225q74 -19 140 -59l-103 -214l158 178q61 -47 107 -108 l-177 -159l213 104q37 -62 58 -141l-224 -78l237 14q5 -31 5 -77zM1352 640q0 160 -78.5 295.5t-213 214t-292.5 78.5q-119 0 -227 -46.5t-186.5 -125t-124.5 -187.5t-46 -229q0 -119 46 -228t124.5 -187.5t186.5 -125t227 -46.5q158 0 292.5 78.5t213 214t78.5 294.5z M1425 1023v-766l-657 -383l-657 383v766l657 383zM768 -183l708 412v823l-708 411l-708 -411v-823zM1536 1088v-896l-768 -448l-768 448v896l768 448z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M339 1318h691l-26 -72h-665q-110 0 -188.5 -79t-78.5 -189v-771q0 -95 60.5 -169.5t153.5 -93.5q23 -5 98 -5v-72h-45q-140 0 -239.5 100t-99.5 240v771q0 140 99.5 240t239.5 100zM1190 1536h247l-482 -1294q-23 -61 -40.5 -103.5t-45 -98t-54 -93.5t-64.5 -78.5 t-79.5 -65t-95.5 -41t-116 -18.5v195q163 26 220 182q20 52 20 105q0 54 -20 106l-285 733h228l187 -585zM1664 978v-1111h-795q37 55 45 73h678v1038q0 85 -49.5 155t-129.5 99l25 67q101 -34 163.5 -123.5t62.5 -197.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M852 1227q0 -29 -17 -52.5t-45 -23.5t-45 23.5t-17 52.5t17 52.5t45 23.5t45 -23.5t17 -52.5zM688 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50 -21.5t-20 -51.5v-114q0 -30 20.5 -52t49.5 -22q30 0 50.5 22t20.5 52zM860 -149v114q0 30 -20 51.5t-50 21.5t-50.5 -21.5 t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22q29 0 49.5 22t20.5 52zM1034 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1208 -149v114q0 30 -20.5 51.5t-50.5 21.5t-50.5 -21.5t-20.5 -51.5v-114 q0 -30 20.5 -52t50.5 -22t50.5 22t20.5 52zM1476 535q-84 -160 -232 -259.5t-323 -99.5q-123 0 -229.5 51.5t-178.5 137t-113 197.5t-41 232q0 88 21 174q-104 -175 -104 -390q0 -162 65 -312t185 -251q30 57 91 57q56 0 86 -50q32 50 87 50q56 0 86 -50q32 50 87 50t87 -50 q30 50 86 50q28 0 52.5 -15.5t37.5 -40.5q112 94 177 231.5t73 287.5zM1326 564q0 75 -72 75q-17 0 -47 -6q-95 -19 -149 -19q-226 0 -226 243q0 86 30 204q-83 -127 -83 -275q0 -150 89 -260.5t235 -110.5q111 0 210 70q13 48 13 79zM884 1223q0 50 -32 89.5t-81 39.5 t-81 -39.5t-32 -89.5q0 -51 31.5 -90.5t81.5 -39.5t81.5 39.5t31.5 90.5zM1513 884q0 96 -37.5 179t-113 137t-173.5 54q-77 0 -149 -35t-127 -94q-48 -159 -48 -268q0 -104 45.5 -157t147.5 -53q53 0 142 19q36 6 53 6q51 0 77.5 -28t26.5 -80q0 -26 -4 -46 q75 68 117.5 165.5t42.5 200.5zM1792 667q0 -111 -33.5 -249.5t-93.5 -204.5q-58 -64 -195 -142.5t-228 -104.5l-4 -1v-114q0 -43 -29.5 -75t-72.5 -32q-56 0 -86 50q-32 -50 -87 -50t-87 50q-30 -50 -86 -50q-55 0 -87 50q-30 -50 -86 -50q-47 0 -75 33.5t-28 81.5 q-90 -68 -198 -68q-118 0 -211 80q54 1 106 20q-113 31 -182 127q32 -7 71 -7q89 0 164 46q-192 192 -240 306q-24 56 -24 160q0 57 9 125.5t31.5 146.5t55 141t86.5 105t120 42q59 0 81 -52q19 29 42 54q2 3 12 13t13 16q10 15 23 38t25 42t28 39q87 111 211.5 177 t260.5 66q35 0 62 -4q59 64 146 64q83 0 140 -57q5 -5 5 -12q0 -5 -6 -13.5t-12.5 -16t-16 -17l-10.5 -10.5q17 -6 36 -18t19 -24q0 -6 -16 -25q157 -138 197 -378q25 30 60 30q45 0 100 -49q90 -80 90 -279z" />
|
||||
<glyph unicode="" d="M917 631q0 33 -6 64h-362v-132h217q-12 -76 -74.5 -120.5t-142.5 -44.5q-99 0 -169 71.5t-70 170.5t70 170.5t169 71.5q93 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585h109v110 h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1536 1024v-839q0 -48 -49 -62q-174 -52 -338 -52q-73 0 -215.5 29.5t-227.5 29.5q-164 0 -370 -48v-338h-160v1368q-63 25 -101 81t-38 124q0 91 64 155t155 64t155 -64t64 -155q0 -68 -38 -124t-101 -81v-68q190 44 343 44q99 0 198 -15q14 -2 111.5 -22.5t149.5 -20.5 q77 0 165 18q11 2 80 21t89 19q26 0 45 -19t19 -45z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
</font>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 382 KiB |
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf
Normal file
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf
Normal file
Binary file not shown.
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff
Normal file
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff
Normal file
Binary file not shown.
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff2
Normal file
BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff2
Normal file
Binary file not shown.
240
_book/gitbook/gitbook-plugin-fontsettings/fontsettings.js
Normal file
240
_book/gitbook/gitbook-plugin-fontsettings/fontsettings.js
Normal file
@ -0,0 +1,240 @@
|
||||
require(['gitbook', 'jquery'], function(gitbook, $) {
|
||||
// Configuration
|
||||
var MAX_SIZE = 4,
|
||||
MIN_SIZE = 0,
|
||||
BUTTON_ID;
|
||||
|
||||
// Current fontsettings state
|
||||
var fontState;
|
||||
|
||||
// Default themes
|
||||
var THEMES = [
|
||||
{
|
||||
config: 'white',
|
||||
text: 'White',
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
config: 'sepia',
|
||||
text: 'Sepia',
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
config: 'night',
|
||||
text: 'Night',
|
||||
id: 2
|
||||
}
|
||||
];
|
||||
|
||||
// Default font families
|
||||
var FAMILIES = [
|
||||
{
|
||||
config: 'serif',
|
||||
text: 'Serif',
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
config: 'sans',
|
||||
text: 'Sans',
|
||||
id: 1
|
||||
}
|
||||
];
|
||||
|
||||
// Return configured themes
|
||||
function getThemes() {
|
||||
return THEMES;
|
||||
}
|
||||
|
||||
// Modify configured themes
|
||||
function setThemes(themes) {
|
||||
THEMES = themes;
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
// Return configured font families
|
||||
function getFamilies() {
|
||||
return FAMILIES;
|
||||
}
|
||||
|
||||
// Modify configured font families
|
||||
function setFamilies(families) {
|
||||
FAMILIES = families;
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
// Save current font settings
|
||||
function saveFontSettings() {
|
||||
gitbook.storage.set('fontState', fontState);
|
||||
update();
|
||||
}
|
||||
|
||||
// Increase font size
|
||||
function enlargeFontSize(e) {
|
||||
e.preventDefault();
|
||||
if (fontState.size >= MAX_SIZE) return;
|
||||
|
||||
fontState.size++;
|
||||
saveFontSettings();
|
||||
}
|
||||
|
||||
// Decrease font size
|
||||
function reduceFontSize(e) {
|
||||
e.preventDefault();
|
||||
if (fontState.size <= MIN_SIZE) return;
|
||||
|
||||
fontState.size--;
|
||||
saveFontSettings();
|
||||
}
|
||||
|
||||
// Change font family
|
||||
function changeFontFamily(configName, e) {
|
||||
if (e && e instanceof Event) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
var familyId = getFontFamilyId(configName);
|
||||
fontState.family = familyId;
|
||||
saveFontSettings();
|
||||
}
|
||||
|
||||
// Change type of color theme
|
||||
function changeColorTheme(configName, e) {
|
||||
if (e && e instanceof Event) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
var $book = gitbook.state.$book;
|
||||
|
||||
// Remove currently applied color theme
|
||||
if (fontState.theme !== 0)
|
||||
$book.removeClass('color-theme-'+fontState.theme);
|
||||
|
||||
// Set new color theme
|
||||
var themeId = getThemeId(configName);
|
||||
fontState.theme = themeId;
|
||||
if (fontState.theme !== 0)
|
||||
$book.addClass('color-theme-'+fontState.theme);
|
||||
|
||||
saveFontSettings();
|
||||
}
|
||||
|
||||
// Return the correct id for a font-family config key
|
||||
// Default to first font-family
|
||||
function getFontFamilyId(configName) {
|
||||
// Search for plugin configured font family
|
||||
var configFamily = $.grep(FAMILIES, function(family) {
|
||||
return family.config == configName;
|
||||
})[0];
|
||||
// Fallback to default font family
|
||||
return (!!configFamily)? configFamily.id : 0;
|
||||
}
|
||||
|
||||
// Return the correct id for a theme config key
|
||||
// Default to first theme
|
||||
function getThemeId(configName) {
|
||||
// Search for plugin configured theme
|
||||
var configTheme = $.grep(THEMES, function(theme) {
|
||||
return theme.config == configName;
|
||||
})[0];
|
||||
// Fallback to default theme
|
||||
return (!!configTheme)? configTheme.id : 0;
|
||||
}
|
||||
|
||||
function update() {
|
||||
var $book = gitbook.state.$book;
|
||||
|
||||
$('.font-settings .font-family-list li').removeClass('active');
|
||||
$('.font-settings .font-family-list li:nth-child('+(fontState.family+1)+')').addClass('active');
|
||||
|
||||
$book[0].className = $book[0].className.replace(/\bfont-\S+/g, '');
|
||||
$book.addClass('font-size-'+fontState.size);
|
||||
$book.addClass('font-family-'+fontState.family);
|
||||
|
||||
if(fontState.theme !== 0) {
|
||||
$book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, '');
|
||||
$book.addClass('color-theme-'+fontState.theme);
|
||||
}
|
||||
}
|
||||
|
||||
function init(config) {
|
||||
// Search for plugin configured font family
|
||||
var configFamily = getFontFamilyId(config.family),
|
||||
configTheme = getThemeId(config.theme);
|
||||
|
||||
// Instantiate font state object
|
||||
fontState = gitbook.storage.get('fontState', {
|
||||
size: config.size || 2,
|
||||
family: configFamily,
|
||||
theme: configTheme
|
||||
});
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
function updateButtons() {
|
||||
// Remove existing fontsettings buttons
|
||||
if (!!BUTTON_ID) {
|
||||
gitbook.toolbar.removeButton(BUTTON_ID);
|
||||
}
|
||||
|
||||
// Create buttons in toolbar
|
||||
BUTTON_ID = gitbook.toolbar.createButton({
|
||||
icon: 'fa fa-font',
|
||||
label: 'Font Settings',
|
||||
className: 'font-settings',
|
||||
dropdown: [
|
||||
[
|
||||
{
|
||||
text: 'A',
|
||||
className: 'font-reduce',
|
||||
onClick: reduceFontSize
|
||||
},
|
||||
{
|
||||
text: 'A',
|
||||
className: 'font-enlarge',
|
||||
onClick: enlargeFontSize
|
||||
}
|
||||
],
|
||||
$.map(FAMILIES, function(family) {
|
||||
family.onClick = function(e) {
|
||||
return changeFontFamily(family.config, e);
|
||||
};
|
||||
|
||||
return family;
|
||||
}),
|
||||
$.map(THEMES, function(theme) {
|
||||
theme.onClick = function(e) {
|
||||
return changeColorTheme(theme.config, e);
|
||||
};
|
||||
|
||||
return theme;
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
// Init configuration at start
|
||||
gitbook.events.bind('start', function(e, config) {
|
||||
var opts = config.fontsettings;
|
||||
|
||||
// Generate buttons at start
|
||||
updateButtons();
|
||||
|
||||
// Init current settings
|
||||
init(opts);
|
||||
});
|
||||
|
||||
// Expose API
|
||||
gitbook.fontsettings = {
|
||||
enlargeFontSize: enlargeFontSize,
|
||||
reduceFontSize: reduceFontSize,
|
||||
setTheme: changeColorTheme,
|
||||
setFamily: changeFontFamily,
|
||||
getThemes: getThemes,
|
||||
setThemes: setThemes,
|
||||
getFamilies: getFamilies,
|
||||
setFamilies: setFamilies
|
||||
};
|
||||
});
|
||||
|
||||
|
291
_book/gitbook/gitbook-plugin-fontsettings/website.css
Normal file
291
_book/gitbook/gitbook-plugin-fontsettings/website.css
Normal file
@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Theme 1
|
||||
*/
|
||||
.color-theme-1 .dropdown-menu {
|
||||
background-color: #111111;
|
||||
border-color: #7e888b;
|
||||
}
|
||||
.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner {
|
||||
border-bottom: 9px solid #111111;
|
||||
}
|
||||
.color-theme-1 .dropdown-menu .buttons {
|
||||
border-color: #7e888b;
|
||||
}
|
||||
.color-theme-1 .dropdown-menu .button {
|
||||
color: #afa790;
|
||||
}
|
||||
.color-theme-1 .dropdown-menu .button:hover {
|
||||
color: #73553c;
|
||||
}
|
||||
/*
|
||||
* Theme 2
|
||||
*/
|
||||
.color-theme-2 .dropdown-menu {
|
||||
background-color: #2d3143;
|
||||
border-color: #272a3a;
|
||||
}
|
||||
.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner {
|
||||
border-bottom: 9px solid #2d3143;
|
||||
}
|
||||
.color-theme-2 .dropdown-menu .buttons {
|
||||
border-color: #272a3a;
|
||||
}
|
||||
.color-theme-2 .dropdown-menu .button {
|
||||
color: #62677f;
|
||||
}
|
||||
.color-theme-2 .dropdown-menu .button:hover {
|
||||
color: #f4f4f5;
|
||||
}
|
||||
.book .book-header .font-settings .font-enlarge {
|
||||
line-height: 30px;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
.book .book-header .font-settings .font-reduce {
|
||||
line-height: 30px;
|
||||
font-size: 1em;
|
||||
}
|
||||
.book.color-theme-1 .book-body {
|
||||
color: #704214;
|
||||
background: #f3eacb;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section {
|
||||
background: #f3eacb;
|
||||
}
|
||||
.book.color-theme-2 .book-body {
|
||||
color: #bdcadb;
|
||||
background: #1c1f2b;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section {
|
||||
background: #1c1f2b;
|
||||
}
|
||||
.book.font-size-0 .book-body .page-inner section {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
.book.font-size-1 .book-body .page-inner section {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
.book.font-size-2 .book-body .page-inner section {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
.book.font-size-3 .book-body .page-inner section {
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
.book.font-size-4 .book-body .page-inner section {
|
||||
font-size: 4rem;
|
||||
}
|
||||
.book.font-family-0 {
|
||||
font-family: Georgia, serif;
|
||||
}
|
||||
.book.font-family-1 {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal {
|
||||
color: #704214;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a {
|
||||
color: inherit;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
|
||||
color: inherit;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 {
|
||||
border-color: inherit;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
|
||||
color: inherit;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr {
|
||||
background-color: inherit;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote {
|
||||
border-color: inherit;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
|
||||
background: #fdf6e3;
|
||||
color: #657b83;
|
||||
border-color: #f8df9c;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight {
|
||||
background-color: inherit;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td {
|
||||
border-color: #f5d06c;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr {
|
||||
color: inherit;
|
||||
background-color: #fdf6e3;
|
||||
border-color: #444444;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
|
||||
background-color: #fbeecb;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal {
|
||||
color: #bdcadb;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a {
|
||||
color: #3eb1d0;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
|
||||
color: #fffffa;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 {
|
||||
border-color: #373b4e;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
|
||||
color: #373b4e;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr {
|
||||
background-color: #373b4e;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote {
|
||||
border-color: #373b4e;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
|
||||
color: #9dbed8;
|
||||
background: #2d3143;
|
||||
border-color: #2d3143;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight {
|
||||
background-color: #282a39;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td {
|
||||
border-color: #3b3f54;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr {
|
||||
color: #b6c2d2;
|
||||
background-color: #2d3143;
|
||||
border-color: #3b3f54;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
|
||||
background-color: #35394b;
|
||||
}
|
||||
.book.color-theme-1 .book-header {
|
||||
color: #afa790;
|
||||
background: transparent;
|
||||
}
|
||||
.book.color-theme-1 .book-header .btn {
|
||||
color: #afa790;
|
||||
}
|
||||
.book.color-theme-1 .book-header .btn:hover {
|
||||
color: #73553c;
|
||||
background: none;
|
||||
}
|
||||
.book.color-theme-1 .book-header h1 {
|
||||
color: #704214;
|
||||
}
|
||||
.book.color-theme-2 .book-header {
|
||||
color: #7e888b;
|
||||
background: transparent;
|
||||
}
|
||||
.book.color-theme-2 .book-header .btn {
|
||||
color: #3b3f54;
|
||||
}
|
||||
.book.color-theme-2 .book-header .btn:hover {
|
||||
color: #fffff5;
|
||||
background: none;
|
||||
}
|
||||
.book.color-theme-2 .book-header h1 {
|
||||
color: #bdcadb;
|
||||
}
|
||||
.book.color-theme-1 .book-body .navigation {
|
||||
color: #afa790;
|
||||
}
|
||||
.book.color-theme-1 .book-body .navigation:hover {
|
||||
color: #73553c;
|
||||
}
|
||||
.book.color-theme-2 .book-body .navigation {
|
||||
color: #383f52;
|
||||
}
|
||||
.book.color-theme-2 .book-body .navigation:hover {
|
||||
color: #fffff5;
|
||||
}
|
||||
/*
|
||||
* Theme 1
|
||||
*/
|
||||
.book.color-theme-1 .book-summary {
|
||||
color: #afa790;
|
||||
background: #111111;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
.book.color-theme-1 .book-summary .book-search {
|
||||
background: transparent;
|
||||
}
|
||||
.book.color-theme-1 .book-summary .book-search input,
|
||||
.book.color-theme-1 .book-summary .book-search input:focus {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.book.color-theme-1 .book-summary ul.summary li.divider {
|
||||
background: #7e888b;
|
||||
box-shadow: none;
|
||||
}
|
||||
.book.color-theme-1 .book-summary ul.summary li i.fa-check {
|
||||
color: #33cc33;
|
||||
}
|
||||
.book.color-theme-1 .book-summary ul.summary li.done > a {
|
||||
color: #877f6a;
|
||||
}
|
||||
.book.color-theme-1 .book-summary ul.summary li a,
|
||||
.book.color-theme-1 .book-summary ul.summary li span {
|
||||
color: #877f6a;
|
||||
background: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
.book.color-theme-1 .book-summary ul.summary li.active > a,
|
||||
.book.color-theme-1 .book-summary ul.summary li a:hover {
|
||||
color: #704214;
|
||||
background: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
/*
|
||||
* Theme 2
|
||||
*/
|
||||
.book.color-theme-2 .book-summary {
|
||||
color: #bcc1d2;
|
||||
background: #2d3143;
|
||||
border-right: none;
|
||||
}
|
||||
.book.color-theme-2 .book-summary .book-search {
|
||||
background: transparent;
|
||||
}
|
||||
.book.color-theme-2 .book-summary .book-search input,
|
||||
.book.color-theme-2 .book-summary .book-search input:focus {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.book.color-theme-2 .book-summary ul.summary li.divider {
|
||||
background: #272a3a;
|
||||
box-shadow: none;
|
||||
}
|
||||
.book.color-theme-2 .book-summary ul.summary li i.fa-check {
|
||||
color: #33cc33;
|
||||
}
|
||||
.book.color-theme-2 .book-summary ul.summary li.done > a {
|
||||
color: #62687f;
|
||||
}
|
||||
.book.color-theme-2 .book-summary ul.summary li a,
|
||||
.book.color-theme-2 .book-summary ul.summary li span {
|
||||
color: #c1c6d7;
|
||||
background: transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.book.color-theme-2 .book-summary ul.summary li.active > a,
|
||||
.book.color-theme-2 .book-summary ul.summary li a:hover {
|
||||
color: #f4f4f5;
|
||||
background: #252737;
|
||||
font-weight: 600;
|
||||
}
|
135
_book/gitbook/gitbook-plugin-highlight/ebook.css
Normal file
135
_book/gitbook/gitbook-plugin-highlight/ebook.css
Normal file
@ -0,0 +1,135 @@
|
||||
pre,
|
||||
code {
|
||||
/* http://jmblog.github.io/color-themes-for-highlightjs */
|
||||
/* Tomorrow Comment */
|
||||
/* Tomorrow Red */
|
||||
/* Tomorrow Orange */
|
||||
/* Tomorrow Yellow */
|
||||
/* Tomorrow Green */
|
||||
/* Tomorrow Aqua */
|
||||
/* Tomorrow Blue */
|
||||
/* Tomorrow Purple */
|
||||
}
|
||||
pre .hljs-comment,
|
||||
code .hljs-comment,
|
||||
pre .hljs-title,
|
||||
code .hljs-title {
|
||||
color: #8e908c;
|
||||
}
|
||||
pre .hljs-variable,
|
||||
code .hljs-variable,
|
||||
pre .hljs-attribute,
|
||||
code .hljs-attribute,
|
||||
pre .hljs-tag,
|
||||
code .hljs-tag,
|
||||
pre .hljs-regexp,
|
||||
code .hljs-regexp,
|
||||
pre .hljs-deletion,
|
||||
code .hljs-deletion,
|
||||
pre .ruby .hljs-constant,
|
||||
code .ruby .hljs-constant,
|
||||
pre .xml .hljs-tag .hljs-title,
|
||||
code .xml .hljs-tag .hljs-title,
|
||||
pre .xml .hljs-pi,
|
||||
code .xml .hljs-pi,
|
||||
pre .xml .hljs-doctype,
|
||||
code .xml .hljs-doctype,
|
||||
pre .html .hljs-doctype,
|
||||
code .html .hljs-doctype,
|
||||
pre .css .hljs-id,
|
||||
code .css .hljs-id,
|
||||
pre .css .hljs-class,
|
||||
code .css .hljs-class,
|
||||
pre .css .hljs-pseudo,
|
||||
code .css .hljs-pseudo {
|
||||
color: #c82829;
|
||||
}
|
||||
pre .hljs-number,
|
||||
code .hljs-number,
|
||||
pre .hljs-preprocessor,
|
||||
code .hljs-preprocessor,
|
||||
pre .hljs-pragma,
|
||||
code .hljs-pragma,
|
||||
pre .hljs-built_in,
|
||||
code .hljs-built_in,
|
||||
pre .hljs-literal,
|
||||
code .hljs-literal,
|
||||
pre .hljs-params,
|
||||
code .hljs-params,
|
||||
pre .hljs-constant,
|
||||
code .hljs-constant {
|
||||
color: #f5871f;
|
||||
}
|
||||
pre .ruby .hljs-class .hljs-title,
|
||||
code .ruby .hljs-class .hljs-title,
|
||||
pre .css .hljs-rules .hljs-attribute,
|
||||
code .css .hljs-rules .hljs-attribute {
|
||||
color: #eab700;
|
||||
}
|
||||
pre .hljs-string,
|
||||
code .hljs-string,
|
||||
pre .hljs-value,
|
||||
code .hljs-value,
|
||||
pre .hljs-inheritance,
|
||||
code .hljs-inheritance,
|
||||
pre .hljs-header,
|
||||
code .hljs-header,
|
||||
pre .hljs-addition,
|
||||
code .hljs-addition,
|
||||
pre .ruby .hljs-symbol,
|
||||
code .ruby .hljs-symbol,
|
||||
pre .xml .hljs-cdata,
|
||||
code .xml .hljs-cdata {
|
||||
color: #718c00;
|
||||
}
|
||||
pre .css .hljs-hexcolor,
|
||||
code .css .hljs-hexcolor {
|
||||
color: #3e999f;
|
||||
}
|
||||
pre .hljs-function,
|
||||
code .hljs-function,
|
||||
pre .python .hljs-decorator,
|
||||
code .python .hljs-decorator,
|
||||
pre .python .hljs-title,
|
||||
code .python .hljs-title,
|
||||
pre .ruby .hljs-function .hljs-title,
|
||||
code .ruby .hljs-function .hljs-title,
|
||||
pre .ruby .hljs-title .hljs-keyword,
|
||||
code .ruby .hljs-title .hljs-keyword,
|
||||
pre .perl .hljs-sub,
|
||||
code .perl .hljs-sub,
|
||||
pre .javascript .hljs-title,
|
||||
code .javascript .hljs-title,
|
||||
pre .coffeescript .hljs-title,
|
||||
code .coffeescript .hljs-title {
|
||||
color: #4271ae;
|
||||
}
|
||||
pre .hljs-keyword,
|
||||
code .hljs-keyword,
|
||||
pre .javascript .hljs-function,
|
||||
code .javascript .hljs-function {
|
||||
color: #8959a8;
|
||||
}
|
||||
pre .hljs,
|
||||
code .hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
color: #4d4d4c;
|
||||
padding: 0.5em;
|
||||
}
|
||||
pre .coffeescript .javascript,
|
||||
code .coffeescript .javascript,
|
||||
pre .javascript .xml,
|
||||
code .javascript .xml,
|
||||
pre .tex .hljs-formula,
|
||||
code .tex .hljs-formula,
|
||||
pre .xml .javascript,
|
||||
code .xml .javascript,
|
||||
pre .xml .vbscript,
|
||||
code .xml .vbscript,
|
||||
pre .xml .css,
|
||||
code .xml .css,
|
||||
pre .xml .hljs-cdata,
|
||||
code .xml .hljs-cdata {
|
||||
opacity: 0.5;
|
||||
}
|
434
_book/gitbook/gitbook-plugin-highlight/website.css
Normal file
434
_book/gitbook/gitbook-plugin-highlight/website.css
Normal file
@ -0,0 +1,434 @@
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code {
|
||||
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
||||
/* Tomorrow Comment */
|
||||
/* Tomorrow Red */
|
||||
/* Tomorrow Orange */
|
||||
/* Tomorrow Yellow */
|
||||
/* Tomorrow Green */
|
||||
/* Tomorrow Aqua */
|
||||
/* Tomorrow Blue */
|
||||
/* Tomorrow Purple */
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-title {
|
||||
color: #8e908c;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
|
||||
color: #c82829;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-number,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-params,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
|
||||
color: #f5871f;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
|
||||
color: #eab700;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-string,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-value,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-header,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
|
||||
color: #718c00;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
|
||||
color: #3e999f;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-function,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
|
||||
color: #4271ae;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
|
||||
color: #8959a8;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .hljs,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
color: #4d4d4c;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .css,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .css,
|
||||
.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
|
||||
.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
|
||||
/*
|
||||
|
||||
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
|
||||
|
||||
*/
|
||||
/* Solarized Green */
|
||||
/* Solarized Cyan */
|
||||
/* Solarized Blue */
|
||||
/* Solarized Yellow */
|
||||
/* Solarized Orange */
|
||||
/* Solarized Red */
|
||||
/* Solarized Violet */
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs {
|
||||
display: block;
|
||||
padding: 0.5em;
|
||||
background: #fdf6e3;
|
||||
color: #657b83;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-template_comment,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-template_comment,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-header,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-header,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-doctype,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-doctype,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pi,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pi,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-string,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-string,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-javadoc,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-javadoc {
|
||||
color: #93a1a1;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-winutils,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-winutils,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .method,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .method,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-tag,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-tag,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-request,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-request,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-status,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-status,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .nginx .hljs-title,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .nginx .hljs-title {
|
||||
color: #859900;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-command,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-command,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag .hljs-value,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-tag .hljs-value,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-rules .hljs-value,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-rules .hljs-value,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-phpdoc,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-phpdoc,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-hexcolor,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-hexcolor,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_url,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_url {
|
||||
color: #2aa198;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-title,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-localvars,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-localvars,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-chunk,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-chunk,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-decorator,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-decorator,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-identifier,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-identifier,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .vhdl .hljs-literal,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .vhdl .hljs-literal,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-id,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-id,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-function,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-function {
|
||||
color: #268bd2;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-body,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-body,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .smalltalk .hljs-number,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .smalltalk .hljs-number,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-constant,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-class .hljs-title,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-class .hljs-title,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-parent,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-parent,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .haskell .hljs-type,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .haskell .hljs-type,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_reference,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_reference {
|
||||
color: #b58900;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor .hljs-keyword,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor .hljs-keyword,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-shebang,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-shebang,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol .hljs-string,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol .hljs-string,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-change,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-change,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-special,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-special,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attr_selector,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attr_selector,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-subst,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-subst,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-cdata,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-cdata,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .clojure .hljs-title,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .clojure .hljs-title,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-header {
|
||||
color: #cb4b16;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-important,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-important {
|
||||
color: #dc322f;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_label,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_label {
|
||||
color: #6c71c4;
|
||||
}
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
|
||||
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula {
|
||||
background: #eee8d5;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
|
||||
/* Tomorrow Night Bright Theme */
|
||||
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
||||
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
||||
/* Tomorrow Comment */
|
||||
/* Tomorrow Red */
|
||||
/* Tomorrow Orange */
|
||||
/* Tomorrow Yellow */
|
||||
/* Tomorrow Green */
|
||||
/* Tomorrow Aqua */
|
||||
/* Tomorrow Blue */
|
||||
/* Tomorrow Purple */
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-title {
|
||||
color: #969896;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
|
||||
color: #d54e53;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-params,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
|
||||
color: #e78c45;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
|
||||
color: #e7c547;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-value,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-header,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
|
||||
color: #b9ca4a;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
|
||||
color: #70c0b1;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-function,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
|
||||
color: #7aa6da;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
|
||||
color: #c397d8;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs {
|
||||
display: block;
|
||||
background: black;
|
||||
color: #eaeaea;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .css,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .css,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
|
||||
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
|
||||
opacity: 0.5;
|
||||
}
|
11
_book/gitbook/gitbook-plugin-livereload/plugin.js
Normal file
11
_book/gitbook/gitbook-plugin-livereload/plugin.js
Normal file
@ -0,0 +1,11 @@
|
||||
(function() {
|
||||
var newEl = document.createElement('script'),
|
||||
firstScriptTag = document.getElementsByTagName('script')[0];
|
||||
|
||||
if (firstScriptTag) {
|
||||
newEl.async = 1;
|
||||
newEl.src = '//' + window.location.hostname + ':35729/livereload.js';
|
||||
firstScriptTag.parentNode.insertBefore(newEl, firstScriptTag);
|
||||
}
|
||||
|
||||
})();
|
7
_book/gitbook/gitbook-plugin-lunr/lunr.min.js
vendored
Normal file
7
_book/gitbook/gitbook-plugin-lunr/lunr.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
59
_book/gitbook/gitbook-plugin-lunr/search-lunr.js
Normal file
59
_book/gitbook/gitbook-plugin-lunr/search-lunr.js
Normal file
@ -0,0 +1,59 @@
|
||||
require([
|
||||
'gitbook',
|
||||
'jquery'
|
||||
], function(gitbook, $) {
|
||||
// Define global search engine
|
||||
function LunrSearchEngine() {
|
||||
this.index = null;
|
||||
this.store = {};
|
||||
this.name = 'LunrSearchEngine';
|
||||
}
|
||||
|
||||
// Initialize lunr by fetching the search index
|
||||
LunrSearchEngine.prototype.init = function() {
|
||||
var that = this;
|
||||
var d = $.Deferred();
|
||||
|
||||
$.getJSON(gitbook.state.basePath+'/search_index.json')
|
||||
.then(function(data) {
|
||||
// eslint-disable-next-line no-undef
|
||||
that.index = lunr.Index.load(data.index);
|
||||
that.store = data.store;
|
||||
d.resolve();
|
||||
});
|
||||
|
||||
return d.promise();
|
||||
};
|
||||
|
||||
// Search for a term and return results
|
||||
LunrSearchEngine.prototype.search = function(q, offset, length) {
|
||||
var that = this;
|
||||
var results = [];
|
||||
|
||||
if (this.index) {
|
||||
results = $.map(this.index.search(q), function(result) {
|
||||
var doc = that.store[result.ref];
|
||||
|
||||
return {
|
||||
title: doc.title,
|
||||
url: doc.url,
|
||||
body: doc.summary || doc.body
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
return $.Deferred().resolve({
|
||||
query: q,
|
||||
results: results.slice(0, length),
|
||||
count: results.length
|
||||
}).promise();
|
||||
};
|
||||
|
||||
// Set gitbook research
|
||||
gitbook.events.bind('start', function(e, config) {
|
||||
var engine = gitbook.search.getEngine();
|
||||
if (!engine) {
|
||||
gitbook.search.setEngine(LunrSearchEngine, config);
|
||||
}
|
||||
});
|
||||
});
|
7
_book/gitbook/gitbook-plugin-search/lunr.min.js
vendored
Normal file
7
_book/gitbook/gitbook-plugin-search/lunr.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
50
_book/gitbook/gitbook-plugin-search/search-engine.js
Normal file
50
_book/gitbook/gitbook-plugin-search/search-engine.js
Normal file
@ -0,0 +1,50 @@
|
||||
require([
|
||||
'gitbook',
|
||||
'jquery'
|
||||
], function(gitbook, $) {
|
||||
// Global search objects
|
||||
var engine = null;
|
||||
var initialized = false;
|
||||
|
||||
// Set a new search engine
|
||||
function setEngine(Engine, config) {
|
||||
initialized = false;
|
||||
engine = new Engine(config);
|
||||
|
||||
init(config);
|
||||
}
|
||||
|
||||
// Initialize search engine with config
|
||||
function init(config) {
|
||||
if (!engine) throw new Error('No engine set for research. Set an engine using gitbook.research.setEngine(Engine).');
|
||||
|
||||
return engine.init(config)
|
||||
.then(function() {
|
||||
initialized = true;
|
||||
gitbook.events.trigger('search.ready');
|
||||
});
|
||||
}
|
||||
|
||||
// Launch search for query q
|
||||
function query(q, offset, length) {
|
||||
if (!initialized) throw new Error('Search has not been initialized');
|
||||
return engine.search(q, offset, length);
|
||||
}
|
||||
|
||||
// Get stats about search
|
||||
function getEngine() {
|
||||
return engine? engine.name : null;
|
||||
}
|
||||
|
||||
function isInitialized() {
|
||||
return initialized;
|
||||
}
|
||||
|
||||
// Initialize gitbook.search
|
||||
gitbook.search = {
|
||||
setEngine: setEngine,
|
||||
getEngine: getEngine,
|
||||
query: query,
|
||||
isInitialized: isInitialized
|
||||
};
|
||||
});
|
35
_book/gitbook/gitbook-plugin-search/search.css
Normal file
35
_book/gitbook/gitbook-plugin-search/search.css
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
This CSS only styled the search results section, not the search input
|
||||
It defines the basic interraction to hide content when displaying results, etc
|
||||
*/
|
||||
#book-search-results .search-results {
|
||||
display: none;
|
||||
}
|
||||
#book-search-results .search-results ul.search-results-list {
|
||||
list-style-type: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
#book-search-results .search-results ul.search-results-list li {
|
||||
margin-bottom: 1.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
/* Highlight results */
|
||||
}
|
||||
#book-search-results .search-results ul.search-results-list li p em {
|
||||
background-color: rgba(255, 220, 0, 0.4);
|
||||
font-style: normal;
|
||||
}
|
||||
#book-search-results .search-results .no-results {
|
||||
display: none;
|
||||
}
|
||||
#book-search-results.open .search-results {
|
||||
display: block;
|
||||
}
|
||||
#book-search-results.open .search-noresults {
|
||||
display: none;
|
||||
}
|
||||
#book-search-results.no-results .search-results .has-results {
|
||||
display: none;
|
||||
}
|
||||
#book-search-results.no-results .search-results .no-results {
|
||||
display: block;
|
||||
}
|
213
_book/gitbook/gitbook-plugin-search/search.js
Normal file
213
_book/gitbook/gitbook-plugin-search/search.js
Normal file
@ -0,0 +1,213 @@
|
||||
require([
|
||||
'gitbook',
|
||||
'jquery'
|
||||
], function(gitbook, $) {
|
||||
var MAX_RESULTS = 15;
|
||||
var MAX_DESCRIPTION_SIZE = 500;
|
||||
|
||||
var usePushState = (typeof history.pushState !== 'undefined');
|
||||
|
||||
// DOM Elements
|
||||
var $body = $('body');
|
||||
var $bookSearchResults;
|
||||
var $searchInput;
|
||||
var $searchList;
|
||||
var $searchTitle;
|
||||
var $searchResultsCount;
|
||||
var $searchQuery;
|
||||
|
||||
// Throttle search
|
||||
function throttle(fn, wait) {
|
||||
var timeout;
|
||||
|
||||
return function() {
|
||||
var ctx = this, args = arguments;
|
||||
if (!timeout) {
|
||||
timeout = setTimeout(function() {
|
||||
timeout = null;
|
||||
fn.apply(ctx, args);
|
||||
}, wait);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function displayResults(res) {
|
||||
$bookSearchResults.addClass('open');
|
||||
|
||||
var noResults = res.count == 0;
|
||||
$bookSearchResults.toggleClass('no-results', noResults);
|
||||
|
||||
// Clear old results
|
||||
$searchList.empty();
|
||||
|
||||
// Display title for research
|
||||
$searchResultsCount.text(res.count);
|
||||
$searchQuery.text(res.query);
|
||||
|
||||
// Create an <li> element for each result
|
||||
res.results.forEach(function(res) {
|
||||
var $li = $('<li>', {
|
||||
'class': 'search-results-item'
|
||||
});
|
||||
|
||||
var $title = $('<h3>');
|
||||
|
||||
var $link = $('<a>', {
|
||||
'href': gitbook.state.basePath + '/' + res.url,
|
||||
'text': res.title
|
||||
});
|
||||
|
||||
var content = res.body.trim();
|
||||
if (content.length > MAX_DESCRIPTION_SIZE) {
|
||||
content = content.slice(0, MAX_DESCRIPTION_SIZE).trim()+'...';
|
||||
}
|
||||
var $content = $('<p>').html(content);
|
||||
|
||||
$link.appendTo($title);
|
||||
$title.appendTo($li);
|
||||
$content.appendTo($li);
|
||||
$li.appendTo($searchList);
|
||||
});
|
||||
}
|
||||
|
||||
function launchSearch(q) {
|
||||
// Add class for loading
|
||||
$body.addClass('with-search');
|
||||
$body.addClass('search-loading');
|
||||
|
||||
// Launch search query
|
||||
throttle(gitbook.search.query(q, 0, MAX_RESULTS)
|
||||
.then(function(results) {
|
||||
displayResults(results);
|
||||
})
|
||||
.always(function() {
|
||||
$body.removeClass('search-loading');
|
||||
}), 1000);
|
||||
}
|
||||
|
||||
function closeSearch() {
|
||||
$body.removeClass('with-search');
|
||||
$bookSearchResults.removeClass('open');
|
||||
}
|
||||
|
||||
function launchSearchFromQueryString() {
|
||||
var q = getParameterByName('q');
|
||||
if (q && q.length > 0) {
|
||||
// Update search input
|
||||
$searchInput.val(q);
|
||||
|
||||
// Launch search
|
||||
launchSearch(q);
|
||||
}
|
||||
}
|
||||
|
||||
function bindSearch() {
|
||||
// Bind DOM
|
||||
$searchInput = $('#book-search-input input');
|
||||
$bookSearchResults = $('#book-search-results');
|
||||
$searchList = $bookSearchResults.find('.search-results-list');
|
||||
$searchTitle = $bookSearchResults.find('.search-results-title');
|
||||
$searchResultsCount = $searchTitle.find('.search-results-count');
|
||||
$searchQuery = $searchTitle.find('.search-query');
|
||||
|
||||
// Launch query based on input content
|
||||
function handleUpdate() {
|
||||
var q = $searchInput.val();
|
||||
|
||||
if (q.length == 0) {
|
||||
closeSearch();
|
||||
}
|
||||
else {
|
||||
launchSearch(q);
|
||||
}
|
||||
}
|
||||
|
||||
// Detect true content change in search input
|
||||
// Workaround for IE < 9
|
||||
var propertyChangeUnbound = false;
|
||||
$searchInput.on('propertychange', function(e) {
|
||||
if (e.originalEvent.propertyName == 'value') {
|
||||
handleUpdate();
|
||||
}
|
||||
});
|
||||
|
||||
// HTML5 (IE9 & others)
|
||||
$searchInput.on('input', function(e) {
|
||||
// Unbind propertychange event for IE9+
|
||||
if (!propertyChangeUnbound) {
|
||||
$(this).unbind('propertychange');
|
||||
propertyChangeUnbound = true;
|
||||
}
|
||||
|
||||
handleUpdate();
|
||||
});
|
||||
|
||||
// Push to history on blur
|
||||
$searchInput.on('blur', function(e) {
|
||||
// Update history state
|
||||
if (usePushState) {
|
||||
var uri = updateQueryString('q', $(this).val());
|
||||
history.pushState({ path: uri }, null, uri);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
gitbook.events.on('page.change', function() {
|
||||
bindSearch();
|
||||
closeSearch();
|
||||
|
||||
// Launch search based on query parameter
|
||||
if (gitbook.search.isInitialized()) {
|
||||
launchSearchFromQueryString();
|
||||
}
|
||||
});
|
||||
|
||||
gitbook.events.on('search.ready', function() {
|
||||
bindSearch();
|
||||
|
||||
// Launch search from query param at start
|
||||
launchSearchFromQueryString();
|
||||
});
|
||||
|
||||
function getParameterByName(name) {
|
||||
var url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'),
|
||||
results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
function updateQueryString(key, value) {
|
||||
value = encodeURIComponent(value);
|
||||
|
||||
var url = window.location.href;
|
||||
var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'),
|
||||
hash;
|
||||
|
||||
if (re.test(url)) {
|
||||
if (typeof value !== 'undefined' && value !== null)
|
||||
return url.replace(re, '$1' + key + '=' + value + '$2$3');
|
||||
else {
|
||||
hash = url.split('#');
|
||||
url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, '');
|
||||
if (typeof hash[1] !== 'undefined' && hash[1] !== null)
|
||||
url += '#' + hash[1];
|
||||
return url;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (typeof value !== 'undefined' && value !== null) {
|
||||
var separator = url.indexOf('?') !== -1 ? '&' : '?';
|
||||
hash = url.split('#');
|
||||
url = hash[0] + separator + key + '=' + value;
|
||||
if (typeof hash[1] !== 'undefined' && hash[1] !== null)
|
||||
url += '#' + hash[1];
|
||||
return url;
|
||||
}
|
||||
else
|
||||
return url;
|
||||
}
|
||||
}
|
||||
});
|
90
_book/gitbook/gitbook-plugin-sharing/buttons.js
Normal file
90
_book/gitbook/gitbook-plugin-sharing/buttons.js
Normal file
@ -0,0 +1,90 @@
|
||||
require(['gitbook', 'jquery'], function(gitbook, $) {
|
||||
var SITES = {
|
||||
'facebook': {
|
||||
'label': 'Facebook',
|
||||
'icon': 'fa fa-facebook',
|
||||
'onClick': function(e) {
|
||||
e.preventDefault();
|
||||
window.open('http://www.facebook.com/sharer/sharer.php?s=100&p[url]='+encodeURIComponent(location.href));
|
||||
}
|
||||
},
|
||||
'twitter': {
|
||||
'label': 'Twitter',
|
||||
'icon': 'fa fa-twitter',
|
||||
'onClick': function(e) {
|
||||
e.preventDefault();
|
||||
window.open('http://twitter.com/home?status='+encodeURIComponent(document.title+' '+location.href));
|
||||
}
|
||||
},
|
||||
'google': {
|
||||
'label': 'Google+',
|
||||
'icon': 'fa fa-google-plus',
|
||||
'onClick': function(e) {
|
||||
e.preventDefault();
|
||||
window.open('https://plus.google.com/share?url='+encodeURIComponent(location.href));
|
||||
}
|
||||
},
|
||||
'weibo': {
|
||||
'label': 'Weibo',
|
||||
'icon': 'fa fa-weibo',
|
||||
'onClick': function(e) {
|
||||
e.preventDefault();
|
||||
window.open('http://service.weibo.com/share/share.php?content=utf-8&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));
|
||||
}
|
||||
},
|
||||
'instapaper': {
|
||||
'label': 'Instapaper',
|
||||
'icon': 'fa fa-instapaper',
|
||||
'onClick': function(e) {
|
||||
e.preventDefault();
|
||||
window.open('http://www.instapaper.com/text?u='+encodeURIComponent(location.href));
|
||||
}
|
||||
},
|
||||
'vk': {
|
||||
'label': 'VK',
|
||||
'icon': 'fa fa-vk',
|
||||
'onClick': function(e) {
|
||||
e.preventDefault();
|
||||
window.open('http://vkontakte.ru/share.php?url='+encodeURIComponent(location.href));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
gitbook.events.bind('start', function(e, config) {
|
||||
var opts = config.sharing;
|
||||
|
||||
// Create dropdown menu
|
||||
var menu = $.map(opts.all, function(id) {
|
||||
var site = SITES[id];
|
||||
|
||||
return {
|
||||
text: site.label,
|
||||
onClick: site.onClick
|
||||
};
|
||||
});
|
||||
|
||||
// Create main button with dropdown
|
||||
if (menu.length > 0) {
|
||||
gitbook.toolbar.createButton({
|
||||
icon: 'fa fa-share-alt',
|
||||
label: 'Share',
|
||||
position: 'right',
|
||||
dropdown: [menu]
|
||||
});
|
||||
}
|
||||
|
||||
// Direct actions to share
|
||||
$.each(SITES, function(sideId, site) {
|
||||
if (!opts[sideId]) return;
|
||||
|
||||
gitbook.toolbar.createButton({
|
||||
icon: site.icon,
|
||||
label: site.text,
|
||||
position: 'right',
|
||||
onClick: site.onClick
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
4
_book/gitbook/gitbook.js
Normal file
4
_book/gitbook/gitbook.js
Normal file
File diff suppressed because one or more lines are too long
BIN
_book/gitbook/images/apple-touch-icon-precomposed-152.png
Normal file
BIN
_book/gitbook/images/apple-touch-icon-precomposed-152.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
_book/gitbook/images/favicon.ico
Normal file
BIN
_book/gitbook/images/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
9
_book/gitbook/style.css
Normal file
9
_book/gitbook/style.css
Normal file
File diff suppressed because one or more lines are too long
4
_book/gitbook/theme.js
Normal file
4
_book/gitbook/theme.js
Normal file
File diff suppressed because one or more lines are too long
28
_book/gulpfile.js
Normal file
28
_book/gulpfile.js
Normal file
@ -0,0 +1,28 @@
|
||||
var gulp = require('gulp');
|
||||
var ts = require('gulp-typescript');
|
||||
|
||||
var tsProject = ts.createProject('tsconfig.json');
|
||||
|
||||
let paths = {
|
||||
pages: ["src/*.html"]
|
||||
};
|
||||
|
||||
gulp.task("copy-html", ()=>{
|
||||
return gulp.src(paths.pages)
|
||||
.pipe(gulp.dest("dist"))
|
||||
});
|
||||
|
||||
gulp.task('tsc', () => {
|
||||
return gulp.src('src/*.ts')
|
||||
.pipe(tsProject())
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
// 这里 watch 里必须使用 gulp.series
|
||||
gulp.task('watch', () => {
|
||||
gulp.watch('src/*.ts', gulp.series('tsc'));
|
||||
});
|
||||
|
||||
|
||||
// 这里必须要有一个 default 任务
|
||||
gulp.task('default', gulp.series('copy-html', 'tsc', 'watch'));
|
BIN
_book/images/a6x09981lks9yco3b8xcqf0.png
Normal file
BIN
_book/images/a6x09981lks9yco3b8xcqf0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
_book/images/btc-qrcode.png
Normal file
BIN
_book/images/btc-qrcode.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
376
_book/index.html
Normal file
376
_book/index.html
Normal file
@ -0,0 +1,376 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>Introduction · GitBook</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="GitBook 3.2.3">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="01_basic_data_types.html" />
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter active" data-level="1.1" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
Introduction
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="01_basic_data_types.html">
|
||||
|
||||
<a href="01_basic_data_types.html">
|
||||
|
||||
|
||||
基本数据类型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="02_variables_declaration.html">
|
||||
|
||||
<a href="02_variables_declaration.html">
|
||||
|
||||
|
||||
变量声明
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="03_classes.html">
|
||||
|
||||
<a href="03_classes.html">
|
||||
|
||||
|
||||
类
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="04_interfaces.html">
|
||||
|
||||
<a href="04_interfaces.html">
|
||||
|
||||
|
||||
接口
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="05_functions.html">
|
||||
|
||||
<a href="05_functions.html">
|
||||
|
||||
|
||||
函数
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="06_generics.html">
|
||||
|
||||
<a href="06_generics.html">
|
||||
|
||||
|
||||
泛型
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="07_enums.html">
|
||||
|
||||
<a href="07_enums.html">
|
||||
|
||||
|
||||
枚举
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.9" data-path="08_type_inference.html">
|
||||
|
||||
<a href="08_type_inference.html">
|
||||
|
||||
|
||||
类型推导
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="divider"></li>
|
||||
|
||||
<li>
|
||||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||||
Published with GitBook
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href="." >Introduction</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="typescript-学习记录">TypeScript 学习记录</h1>
|
||||
<p>ECMAScript 2015 (ES6)已经正式发布,所有浏览器均已支持,同时许多项目,如Angular, Ionic, Electron框架等,均已在往ES6迁移。故需要学习掌握这一新版的Javascript。</p>
|
||||
<h2 id="变更日志">变更日志</h2>
|
||||
<ul>
|
||||
<li>2019-3-27, 重新整理<code>package.json</code>、<code>tsconfig.json</code>与<code>gulpfile.js</code>文件,让<code>.gitignore</code>生效,令到项目大小得以缩小</li>
|
||||
</ul>
|
||||
<h2 id="es6与-javascript">ES6与 Javascript</h2>
|
||||
<p>ES6仍然是Javascript, 只不过是在我们已经熟悉的Javascript上加入了一些新的东西。使得Javascript更为强大,可以应对大型程序的要求。</p>
|
||||
<h2 id="es6的实现">ES6的实现</h2>
|
||||
<p>ES6只是新一代Javascript的规范,几大公司、各个浏览器引擎等都有具体的实现。微软的TypeScript、CoffeeScript等都是ES6的具体实现。</p>
|
||||
<p>参考链接:</p>
|
||||
<ul>
|
||||
<li><a href="https://blog.mariusschulz.com/2017/01/13/typescript-vs-flow" target="_blank">https://blog.mariusschulz.com/2017/01/13/typescript-vs-flow</a></li>
|
||||
<li><a href="http://blog.ionicframework.com/ionic-and-typescript-part-1/" target="_blank">http://blog.ionicframework.com/ionic-and-typescript-part-1/</a></li>
|
||||
</ul>
|
||||
<p>鉴于Angular与Ionic都是使用了微软的TypeScript, 因此在学习ES6时,将学习TypeScript这一实现。</p>
|
||||
<h2 id="关于typescript">关于TypeScript</h2>
|
||||
<p>TypeScript是Javascript的超集,有着以下优势:</p>
|
||||
<ul>
|
||||
<li>可选的静态类型(关键就是这里的“可选”, Optional static typing, the key here is optional)</li>
|
||||
<li>类型推理,此特性在并没有使用到类型的情况下,带来那些类型的诸多益处(Type Inference, which gives some of the benefits of types, without actually using them)</li>
|
||||
<li>可在主流浏览器尚未对ES6/ES7提供支持之前,通过TypeScript用上ES6及ES7的特性</li>
|
||||
<li>TypeScript有着将程序向下编译到所有浏览器都支持的某个Javascript版本的能力</li>
|
||||
<li>IntelliSense提供了极好的工具支持</li>
|
||||
</ul>
|
||||
<p>因为TypeScript带给如你一样的开发者这些不错的特性及巨大优势,Ionic是以TypeScript编写的,而不是ES6(这里就表明了<strong>TypeScript并不是ES6</strong>)。</p>
|
||||
<h3 id="关于可选的静态类型">关于可选的静态类型</h3>
|
||||
<p>可能TypeScript最能打动人心的,就是其所提供到的可选静态类型系统了。将给变量、函数、属性等加上类型。这将帮到编译器,且在app尚未运行时,就给出有关代码中任何潜在错误的警告。在使用到库及框架时,类型也有帮助,这是由于类型可令到开发者准确知悉那些APIs期望何种类型的数据。而关于类型系统,你首先要记住的是它是可选的。TypeScript并不强制要求开发者在他们不想添加的上必须添加类型。但随着应用变得越来越大、越来越复杂,类型确实可以提供到一些很棒的优势。</p>
|
||||
<p>关于 IntelliSense:</p>
|
||||
<blockquote>
|
||||
<p>一种 Microsoft 技术,这种技术通过在光标悬停在函数上时显示类定义和注释,从而让您可以分析源代码。当您在 IDE 中键入函数名时,IntelliSense 还可以完成这些名称。</p>
|
||||
</blockquote>
|
||||
<p>TypeScript的一大优势,就是其代码补全与IntelliSense了。IntelliSense在敲入代码时,提供有用的提示。因为Ionic本身就是用TypeScript写就的,代码编辑器就可以展示出所有可用的方法,以及这些方法所期望的参数。当今所有最好的集成开发环境,比如VScode、Atom、Sublime text,甚至那些诸如Vim/Neovim等命令行的编辑器,都有对代码补全的支持。</p>
|
||||
<p>TypeScript的许多优势,带来了一种好得多的app开发体验。因此,Ionic将全力压注到TypeScript上,而不提供ES6的启动器。</p>
|
||||
<p>摘录自:</p>
|
||||
<blockquote>
|
||||
<p><a href="https://ionicframework.com/docs/developer-resources/typescript/" target="_blank">TypeScript的优势</a></p>
|
||||
</blockquote>
|
||||
<h2 id="本教程特色">本教程特色</h2>
|
||||
<p>针对新特性的详细讨论,并与与实例代码结合。TypeScript是在Javascript的基础上,引入了诸多新特性,本教程将逐一讨论这些新特性,并同时编写相应代码加以验证。</p>
|
||||
<h2 id="捐助此教程">捐助此教程</h2>
|
||||
<p>支付宝:</p>
|
||||
<p><img src="images/a6x09981lks9yco3b8xcqf0.png" alt="Alipay: laxer@gmail.com" title="alipay:laxers@gmail.com"></p>
|
||||
<p>Bitcoin:</p>
|
||||
<p><img src="images/btc-qrcode.png" alt="bitcoin: "></p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="01_basic_data_types.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 基本数据类型">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"基本数据类型","level":"1.2","depth":1,"path":"01_basic_data_types.md","ref":"01_basic_data_types.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"ignoreSpecialCharacters":false,"maxIndexSize":1000000},"sharing":{"weibo":false,"all":["facebook","google","twitter","weibo","instapaper"],"google":false,"twitter":true,"vk":false,"instapaper":false,"facebook":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css","pdf":"styles/pdf.css","epub":"styles/epub.css"}},"file":{"path":"README.md","mtime":"2019-04-03T06:43:16.320Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-04-04T00:04:23.982Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook.js"></script>
|
||||
<script src="gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
4257
_book/package-lock.json
generated
Normal file
4257
_book/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
34
_book/package.json
Normal file
34
_book/package.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "typescript-learnings",
|
||||
"version": "0.1.0",
|
||||
"description": "TypeScript Learning stuffs.",
|
||||
"main": "/dist/main.js",
|
||||
"scripts": {
|
||||
"gulp": "gulp &",
|
||||
"start": "live-server dist/",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gnu4cn/ts-learnings.git"
|
||||
},
|
||||
"keywords": [
|
||||
"TypeScript"
|
||||
],
|
||||
"author": "Peng Hailin, unisko@gmail.com",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/gnu4cn/ts-learnings/issues"
|
||||
},
|
||||
"homepage": "https://github.com/gnu4cn/ts-learnings#readme",
|
||||
"devDependencies": {
|
||||
"@types/reflect-metadata": "^0.1.0",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-sourcemaps": "^2.6.1",
|
||||
"gulp-typescript": "^5.0.1",
|
||||
"gulp-uglify": "^3.0.0",
|
||||
"live-server": "^1.2.0",
|
||||
"typescript": "^3.4.1"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
1
_book/search_index.json
Normal file
1
_book/search_index.json
Normal file
File diff suppressed because one or more lines are too long
23
_book/src/accessor_decorators.ts
Normal file
23
_book/src/accessor_decorators.ts
Normal file
@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
// 访问器装饰器,Accessor Decorator
|
||||
class Point {
|
||||
private _x: number;
|
||||
private _y: number;
|
||||
constructor(x: number, y: number) {
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
}
|
||||
|
||||
@configurable(false)
|
||||
get x() { return this._x; }
|
||||
|
||||
@configurable(false)
|
||||
get y() { return this._y; }
|
||||
}
|
||||
|
||||
function configurable(value: boolean) {
|
||||
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
descriptor.configurable = value;
|
||||
};
|
||||
}
|
35
_book/src/metadata.ts
Normal file
35
_book/src/metadata.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import "reflect-metadata";
|
||||
|
||||
class Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
class Line {
|
||||
private _p0: Point;
|
||||
private _p1: Point;
|
||||
|
||||
@validate
|
||||
set p0(value: Point) { this._p0 = value; }
|
||||
get p0() { return this._p0; }
|
||||
|
||||
|
||||
@validate
|
||||
set p1(value: Point) { this._p1 = value; }
|
||||
get p1() { return this._p1; }
|
||||
}
|
||||
|
||||
function validate<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>) {
|
||||
let set = descriptor.set;
|
||||
descriptor.set = function(value: T) {
|
||||
let type = Reflect.getMetadata("design:type", target, propertyKey);
|
||||
|
||||
if (!(value instanceof type)) {
|
||||
throw new TypeError("无效的类型。");
|
||||
}
|
||||
set(value);
|
||||
}
|
||||
}
|
||||
|
||||
let l1 = new Line();
|
||||
console.log(l1);
|
56
_book/src/mixins_example.ts
Normal file
56
_book/src/mixins_example.ts
Normal file
@ -0,0 +1,56 @@
|
||||
// 一个名为 Disposable 的混入
|
||||
|
||||
class Disposable {
|
||||
isDisposable: boolean;
|
||||
dispose () {
|
||||
this.isDisposable = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 一个名为 Activatable 的混入
|
||||
|
||||
class Activatable {
|
||||
isActive: boolean;
|
||||
|
||||
activate() {
|
||||
this.isActive = true;
|
||||
}
|
||||
|
||||
deactivate() {
|
||||
this.isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
class SmartObject implements Disposable, Activatable {
|
||||
constructor() {
|
||||
setInterval(() => {
|
||||
console.log(`${this.isActive} : ${this.isDisposable}`)
|
||||
}, 500);
|
||||
}
|
||||
|
||||
interact() {
|
||||
this.activate();
|
||||
}
|
||||
|
||||
// Disposable
|
||||
isDisposable: boolean = false;
|
||||
dispose: () => void;
|
||||
|
||||
// Activatable
|
||||
isActive: boolean = false;
|
||||
activate: () => void;
|
||||
deactivate: () => void;
|
||||
}
|
||||
|
||||
applyMixins(SmartObject, [Disposable, Activatable]);
|
||||
|
||||
let smartObj = new SmartObject();
|
||||
setTimeout(() => smartObj.interact(), 1000);
|
||||
|
||||
function applyMixins(derivedCtor: any, baseCtors: any[]) {
|
||||
baseCtors.forEach(baseCtor => {
|
||||
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
||||
derivedCtor.prototype[name] = baseCtor.prototype[name];
|
||||
});
|
||||
});
|
||||
}
|
44
_book/src/parameter_decorators.ts
Normal file
44
_book/src/parameter_decorators.ts
Normal file
@ -0,0 +1,44 @@
|
||||
import "reflect-metadata";
|
||||
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
@validate
|
||||
greet(@required name: string) {
|
||||
return "Hello " + name + ", " + this.greeting;
|
||||
}
|
||||
}
|
||||
|
||||
let requiredMetadataKey: Symbol;
|
||||
|
||||
function required(target: Object, propertyKey: string | symbol, parameterIndex: number) {
|
||||
let existingRequiredParameters: number[] = Reflect.getOwnMetadata(requiredMetadataKey, target, propertyKey) || [];
|
||||
|
||||
existingRequiredParameters.push(parameterIndex);
|
||||
Reflect.defineMetadata(requiredMetadataKey, existingRequiredParameters, target, propertyKey);
|
||||
}
|
||||
|
||||
function validate (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<Function>) {
|
||||
let method = descriptor.value;
|
||||
|
||||
descriptor.value = function () {
|
||||
let requiredParameters: number[] = Reflect.getOwnMetadata(requiredMetadataKey, target, propertyName);
|
||||
|
||||
if(requiredParameters) {
|
||||
for ( let parameterIndex of requiredParameters ) {
|
||||
if (parameterIndex >= arguments.length || arguments[parameterIndex] === undefined) {
|
||||
throw new Error("缺少需要的参数。");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return method.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
let g = new Greeter("早上好");
|
||||
console.log(g.greet("Echo Feng"));
|
29
_book/src/property_decorators.ts
Normal file
29
_book/src/property_decorators.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import "reflect-metadata";
|
||||
|
||||
// 属性装饰器,property decorator
|
||||
class Greeter {
|
||||
@format("Hello, %s")
|
||||
greeting: string;
|
||||
|
||||
constructor (message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
greet () {
|
||||
let formatString = getFormat(this, "greeting");
|
||||
return formatString.replace("%s", this.greeting);
|
||||
}
|
||||
}
|
||||
|
||||
let formatMetadataKey: Symbol;
|
||||
|
||||
function format (formatString: string) {
|
||||
return Reflect.metadata(formatMetadataKey, formatString);
|
||||
}
|
||||
|
||||
function getFormat (target: any, propertyKey: string) {
|
||||
return Reflect.getMetadata(formatMetadataKey, target, propertyKey);
|
||||
}
|
||||
|
||||
let g = new Greeter("彭海林");
|
||||
console.log(g.greet());
|
3
_book/src/reference.lib.ts
Normal file
3
_book/src/reference.lib.ts
Normal file
@ -0,0 +1,3 @@
|
||||
/// <reference lib="es2017.string" />
|
||||
|
||||
console.log("foo".padStart(4));
|
2
_book/src/symbol.ts
Normal file
2
_book/src/symbol.ts
Normal file
@ -0,0 +1,2 @@
|
||||
let a: Symbol;
|
||||
console.log(a);
|
15
_book/tsconfig.json
Normal file
15
_book/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"include": [
|
||||
"src/*.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"noImplicitAny": true,
|
||||
"target": "es5",
|
||||
"outDir": "dist/",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"types": [
|
||||
"reflect-metadata"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user