├── .gitmodules ├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── .gitignore ├── package.json ├── cdn ├── solarized-dark.min.css ├── codetabs.js ├── dissectionAnimation.js ├── vanilla-back-to-top.min.js ├── focus-visible.min.js ├── scrollSpy.js ├── sdk.js ├── codeblocks.js ├── embed.js ├── tabs.js ├── button.js ├── buttons.js ├── docsearch.min.css ├── analytics.js └── widgets.js ├── script ├── data.js └── replace.js └── README.md /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "react-native"] 2 | path = react-native 3 | url = https://github.com/facebook/react-native.git 4 | branch = gh-pages 5 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [jaywcjlove] 4 | custom: https://jaywcjlove.github.io/sponsor.html 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | web 3 | 4 | npm-debug.log* 5 | lerna-debug.log 6 | yarn-error.log 7 | package-lock.json 8 | 9 | .DS_Store 10 | .cache 11 | .vscode 12 | .idea 13 | .env 14 | 15 | *.bak 16 | *.tem 17 | *.temp 18 | #.swp 19 | *.*~ 20 | ~*.* 21 | 22 | # IDEA 23 | *.iml 24 | *.ipr 25 | *.iws 26 | .idea/ -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-doc", 3 | "version": "1.0.0", 4 | "description": "React Native Doc", 5 | "main": "index.js", 6 | "scripts": { 7 | "server": "sgo -d web --fallback index.html", 8 | "start": "node ./script/replace.js", 9 | "deploy": "gh-pages -d web" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "ISC", 14 | "devDependencies": { 15 | "fs-extra": "^8.1.0", 16 | "gh-pages": "^2.1.1", 17 | "sgo": "^2.1.4" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /cdn/solarized-dark.min.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:0.5em;background:#002b36;color:#839496}.hljs-comment,.hljs-quote{color:#586e75}.hljs-keyword,.hljs-selector-tag,.hljs-addition{color:#859900}.hljs-number,.hljs-string,.hljs-meta .hljs-meta-string,.hljs-literal,.hljs-doctag,.hljs-regexp{color:#2aa198}.hljs-title,.hljs-section,.hljs-name,.hljs-selector-id,.hljs-selector-class{color:#268bd2}.hljs-attribute,.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-class .hljs-title,.hljs-type{color:#b58900}.hljs-symbol,.hljs-bullet,.hljs-subst,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-link{color:#cb4b16}.hljs-built_in,.hljs-deletion{color:#dc322f}.hljs-formula{background:#073642}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} -------------------------------------------------------------------------------- /cdn/codetabs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // Turn off ESLint for this file because it's sent down to users as-is. 9 | /* eslint-disable */ 10 | window.addEventListener('load', function() { 11 | // add event listener for all tab 12 | document.querySelectorAll('.nav-link').forEach(function(el) { 13 | el.addEventListener('click', function(e) { 14 | const groupId = e.target.getAttribute('data-group'); 15 | document 16 | .querySelectorAll(`.nav-link[data-group=${groupId}]`) 17 | .forEach(function(el) { 18 | el.classList.remove('active'); 19 | }); 20 | document 21 | .querySelectorAll(`.tab-pane[data-group=${groupId}]`) 22 | .forEach(function(el) { 23 | el.classList.remove('active'); 24 | }); 25 | e.target.classList.add('active'); 26 | document 27 | .querySelector(`#${e.target.getAttribute('data-tab')}`) 28 | .classList.add('active'); 29 | }); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Build and Deploy react-native-doc 2 | on: 3 | push: 4 | branches: 5 | - master 6 | tags: 7 | - v* 8 | jobs: 9 | build-deploy: 10 | runs-on: ubuntu-18.04 11 | steps: 12 | - uses: actions/checkout@master 13 | - name: Checkout Submodules 14 | shell: bash 15 | run: | 16 | auth_header="$(git config --local --get http.https://github.com/.extraheader)" 17 | git submodule sync --recursive 18 | cat .gitmodules 19 | git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --remote --force --recursive --checkout react-native 20 | 21 | - name: Setup Node 22 | uses: actions/setup-node@v1 23 | with: 24 | node-version: '10.x' 25 | 26 | # - name: Cache dependencies 27 | # uses: actions/cache@v1 28 | # with: 29 | # path: ~/.npm 30 | # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 31 | # restore-keys: | 32 | # ${{ runner.os }}-node- 33 | 34 | - run: npm install 35 | - run: npm run start 36 | - run: rm -rf ./web/CNAME 37 | 38 | - name: Build and Deploy 39 | uses: peaceiris/actions-gh-pages@v2 40 | env: 41 | ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} 42 | PUBLISH_BRANCH: gh-pages 43 | PUBLISH_DIR: ./web 44 | with: 45 | emptyCommits: false 46 | -------------------------------------------------------------------------------- /cdn/dissectionAnimation.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', () => { 2 | const section = document.querySelector('.NativeDevelopment'); 3 | const dissection = document.querySelector('.NativeDevelopment .dissection'); 4 | const images = dissection.children; 5 | const numImages = images.length; 6 | 7 | const fadeDistance = 40; 8 | const navbarHeight = 60; 9 | 10 | function clamp(val, min, max) { 11 | return Math.min(max, Math.max(min, val)); 12 | } 13 | 14 | // Scale the percent so that `min` goes to 0% and `max` goes to 100% 15 | function scalePercent(percent, min, max) { 16 | const scale = max - min; 17 | return clamp((percent - min) / scale, 0, 1); 18 | } 19 | 20 | // Get the percentage that the image should be on the screen given 21 | // how much the entire container is scrolled 22 | // so we can fine-tune at what screen % the animation starts and stops 23 | function getImagePercent(index, scrollPercent) { 24 | const start = index / numImages; 25 | return clamp((scrollPercent - start) * numImages, 0, 1); 26 | } 27 | 28 | window.addEventListener('scroll', () => { 29 | const elPos = section.getBoundingClientRect().top - navbarHeight; 30 | const height = window.innerHeight; 31 | const screenPercent = 1 - clamp(elPos / height, 0, 1); 32 | const scaledPercent = scalePercent(screenPercent, 0.2, 0.9); 33 | for (let i = 0; i < numImages; i++) { 34 | const imgPercent = getImagePercent(i, scaledPercent); 35 | images[i].style.opacity = imgPercent; 36 | 37 | const translation = fadeDistance * (1 - imgPercent); 38 | images[i].style.left = `${translation}px`; 39 | } 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /script/data.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | // ["https://platform.twitter.com/widgets.js", ''], 3 | ['src="/react-native/', 'src="/'], 4 | ['href="/react-native/', 'href="/'], 5 | ['', ''], 6 | [``, ''], 8 | ["https://connect.facebook.net/en_US/sdk.js", "/cdn/sdk.js"], 9 | ["https://facebook.github.io/react-native/blog/atom.xml", "/blog/atom.xml"], 10 | ["https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css", '/cdn/docsearch.min.css'], 11 | ["//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-dark.min.css", '/cdn/solarized-dark.min.css'], 12 | ["https://platform.twitter.com/widgets.js", "/cdn/widgets.js"], 13 | ["https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js", '/cdn/docsearch.min.js'], 14 | ["https://cdn.jsdelivr.net/npm/focus-visible@5.0.2/dist/focus-visible.min.js", '/cdn/focus-visible.min.js'], 15 | ["https://snack.expo.io/embed.js", '/cdn/embed.js'], 16 | ["https://facebook.github.io/react-native/js/codeblocks.js", "/cdn/codeblocks.js"], 17 | ["https://facebook.github.io/react-native/js/tabs.js", "/cdn/tabs.js"], 18 | ["https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js", "/cdn/vanilla-back-to-top.min.js"], 19 | ["https://facebook.github.io/react-native/js/scrollSpy.js", "/cdn/scrollSpy.js"], 20 | ["https://facebook.github.io/react-native/js/codetabs.js", "/cdn/codetabs.js"], 21 | ["https://facebook.github.io/react-native/js/dissectionAnimation.js", "/cdn/dissectionAnimation.js"], 22 | ["https://www.google-analytics.com/analytics.js", "/cdn/analytics.js"], 23 | ] -------------------------------------------------------------------------------- /script/replace.js: -------------------------------------------------------------------------------- 1 | const data = require("./data"); 2 | const fs = require("fs-extra"); 3 | const path = require("path"); 4 | 5 | const rnPath = path.join(process.cwd(), 'react-native'); 6 | const webPath = path.join(process.cwd(), 'web'); 7 | const cdnPath = path.join(process.cwd(), 'cdn'); 8 | const webCdnPath = path.join(process.cwd(), 'web/cdn'); 9 | 10 | async function format(dir) { 11 | const pathArr = await fs.readdir(dir); 12 | pathArr.forEach(async (fileName) => { 13 | const pathTo = path.join(dir, fileName); 14 | const stat = await fs.stat(pathTo); 15 | if (stat.isFile() && /.html$/.test(fileName)) { 16 | let htmlStr = await fs.readFile(pathTo); 17 | htmlStr = htmlStr.toString(); 18 | let isReplace = false; 19 | data.forEach((htmlArr) => { 20 | if (htmlStr.indexOf(htmlArr[0])) { 21 | isReplace = true; 22 | } 23 | htmlStr = htmlStr.replace(new RegExp(htmlArr[0], 'g'), htmlArr[1] || ''); 24 | }); 25 | await fs.writeFile(pathTo, htmlStr); 26 | console.log(`${isReplace ? '√' : ''}::>`, pathTo); 27 | } else if(stat.isDirectory()){ 28 | await format(pathTo); 29 | } 30 | }); 31 | } 32 | 33 | ;(async () => { 34 | try { 35 | await fs.ensureDir(webPath); 36 | await fs.emptyDir(webPath); 37 | await fs.copy(rnPath, webPath, { 38 | filter: (src) => !regDocPath().test(src) && !regGitPath().test(src) && /(\.circleci|)$/g.test(src) 39 | }); 40 | await fs.copy(cdnPath, webCdnPath); 41 | await format(webPath); 42 | } catch (error) { 43 | console.log('error:', error); 44 | } 45 | })(); 46 | 47 | function regGitPath() { 48 | return /\/react\-native\/(\.git)(?=(\/|$))/; 49 | } 50 | 51 | function regDocPath() { 52 | return /\/react\-native\/docs\/(0.5|0.6|0.7|0.8|0.9|0.10|0.11|0.12|0.13|0.14|0.15|0.16|0.17|0.18|0.19|0.20|0.21|0.22|0.23|0.24|0.25|0.26|0.27|0.28|0.29|0.30|0.31|0.32|0.33|0.34|0.35|0.36|0.37|0.38|0.39|0.40|0.41|0.42|0.43|0.44|0.45|0.46|0.47|0.48|0.49|0.50|0.51|0.52|0.53|0.54|0.55|0.56|0.57|0.58|0.59)(?=(\/|$))/; 53 | } 54 | -------------------------------------------------------------------------------- /cdn/vanilla-back-to-top.min.js: -------------------------------------------------------------------------------- 1 | "use strict";function addBackToTop(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.id,e=void 0===t?"back-to-top":t,n=o.showWhenScrollTopIs,i=void 0===n?1:n,r=o.onClickScrollTo,d=void 0===r?0:r,c=o.scrollDuration,a=void 0===c?100:c,s=o.innerHTML,l=void 0===s?'':s,u=o.diameter,m=void 0===u?56:u,p=o.size,b=void 0===p?m:p,h=o.cornerOffset,v=void 0===h?20:h,f=o.backgroundColor,x=void 0===f?"#000":f,w=o.textColor,g=void 0===w?"#fff":w,k=o.zIndex,y=void 0===k?1:k;!function(){var o=Math.round(.43*b),t=Math.round(.29*b),n="#"+e+"{background:"+x+";-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;bottom:"+v+"px;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);-moz-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);box-shadow:0 2px 5px 0 rgba(0,0,0,.26);color:"+g+";cursor:pointer;display:block;height:"+b+"px;opacity:1;outline:0;position:fixed;right:"+v+"px;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-transition:bottom .2s,opacity .2s;-o-transition:bottom .2s,opacity .2s;-moz-transition:bottom .2s,opacity .2s;transition:bottom .2s,opacity .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:"+b+"px;z-index:"+y+"}#"+e+" svg{display:block;fill:currentColor;height:"+o+"px;margin:"+t+"px auto 0;width:"+o+"px}#"+e+".hidden{bottom:-"+b+"px;opacity:0}",i=document.createElement("style");i.appendChild(document.createTextNode(n)),document.head.insertAdjacentElement("afterbegin",i)}();var T=function(){var o=document.createElement("div");return o.id=e,o.className="hidden",o.innerHTML=l,o.addEventListener("click",function(o){o.preventDefault(),function(){var o=window,t=o.performance,e=o.requestAnimationFrame;if(a<=0||void 0===t||void 0===e)return C(d);var n=t.now(),i=M(),r=i-d;e(function o(t){var d=t-n,c=Math.min(d/a,1);C(i-Math.round(c*r)),c<1&&e(o)})}()}),document.body.appendChild(o),o}(),E=!0;window.addEventListener("scroll",z),z();function z(){M()>=i?function(){if(!E)return;T.className="",E=!1}():function(){if(E)return;T.className="hidden",E=!0}()}function M(){return document.body.scrollTop||document.documentElement&&document.documentElement.scrollTop||0}function C(o){document.body.scrollTop=o,document.documentElement&&(document.documentElement.scrollTop=o)}} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | React Native Doc 2 | === 3 | 4 | ![Build and Deploy react-native-doc](https://github.com/jaywcjlove/react-native-doc/workflows/Build%20and%20Deploy%20react-native-doc/badge.svg) [![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/react-native?label=@wcjiang/react-native)](https://hub.docker.com/r/wcjiang/react-native) [![Docker Stars](https://img.shields.io/docker/stars/wcjiang/react-native)](https://hub.docker.com/r/wcjiang/react-native) 5 | 6 | 这里是本地离线预览 [React Native](https://github.com/facebook/react-native/) 官方文档的方法,解决因官网 CDN 资源导致无法打开官方文档网站,已经将处理好的 HTML 存放在 [gh-pages](https://github.com/jaywcjlove/react-native-doc/tree/gh-pages) 分支,只需克隆配合 [sgo](https://github.com/jaywcjlove/sgo) 工具预览即可。 7 | 8 | ## Docker 部署 9 | 10 | > Port: `60005` - [react-native-doc](https://facebook.github.io/react-native/) [@jaywcjlove/docs/react-native](https://github.com/jaywcjlove/docs) 11 | 12 | ```shell 13 | docker pull wcjiang/react-native:latest 14 | ``` 15 | 16 | Run Server 17 | 18 | ```shell 19 | docker run --name react-native -p 60005:60005 --restart=always -d wcjiang/react-native:latest 20 | ``` 21 | 22 | ## 下载工程 23 | 24 | ```bash 25 | # 克隆并下载带有 submodule 的项目 26 | git clone https://github.com/jaywcjlove/react-native-doc.git --depth=1 --recurse-submodules 27 | ``` 28 | 29 | 参数 `--recurse-submodules` 会克隆太久 `react-native`。 30 | 31 | ```bash 32 | # 克隆项目 33 | git clone https://github.com/jaywcjlove/react-native-doc.git --depth=1 34 | # 初始化 submodule 子项目 35 | git submodule update --depth 1 --init --recursive 36 | # 更新 submodule 子项目 37 | git submodule update --recursive --remote 38 | ``` 39 | 40 | 参数 `--depth` 只有 [git@2.23.0-rc2](https://github.com/git/git/commit/275cd184d52b5b81cb89e4ec33e540fb2ae61c1f) 支持 41 | 42 | ## 安装依赖 43 | 44 | ```bash 45 | npm install 46 | ``` 47 | 48 | ## 替换 CDN 资源 49 | 50 | 通过下面命令批量替换 CDN 资源,运行之前确保 `react-native` 目录下载完成,使用编辑器替换,内容太多会让编辑器卡死。替换内容在这里 [`script/data.js`](script/data.js) 51 | 52 | ```bash 53 | npm run start 54 | ``` 55 | 56 | 更新 React Native 主文档仓库 57 | 58 | ```bash 59 | # 进入 React Native 仓库 60 | cd react-native/ 61 | # 放弃本地修改内容 62 | git reset --hard 63 | cd ../ 64 | # 更新 submodule 子项目 65 | git submodule update --recursive --remote 66 | ``` 67 | 68 | ## 启动服务 69 | 70 | ``` 71 | npm run server 72 | ``` 73 | 74 | ## 注意 75 | 76 | 虽然本地预览静态服务,但仍有很多链接是走 `CDN`,通过运行脚本来替换 77 | 78 | ## Links 79 | 80 | - [@jaywcjlove/docs](https://github.com/jaywcjlove/docs) 81 | - [@jaywcjlove/react-native-doc](https://github.com/jaywcjlove/react-native-doc) 82 | - [Docker Repository.](https://hub.docker.com/r/wcjiang/react-native) 83 | -------------------------------------------------------------------------------- /cdn/focus-visible.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){var t=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function u(e){t=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0)},!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",function(e){"hidden"==document.visibilityState&&(n&&(t=!0),a())},!0),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"==(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"==u&&!n.readOnly||n.isContentEditable))&&s(e.target)},!0),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1,window.clearTimeout(o)},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}); 2 | //# sourceMappingURL=focus-visible.min.js.map -------------------------------------------------------------------------------- /cdn/scrollSpy.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | /* eslint-disable prefer-arrow-callback */ 9 | (function scrollSpy() { 10 | const OFFSET = 10; 11 | let timer; 12 | let headingsCache; 13 | const findHeadings = function findHeadings() { 14 | return headingsCache || document.querySelectorAll('.toc-headings > li > a'); 15 | }; 16 | const onScroll = function onScroll() { 17 | if (timer) { 18 | // throttle 19 | return; 20 | } 21 | timer = setTimeout(function() { 22 | timer = null; 23 | let activeNavFound = false; 24 | const headings = findHeadings(); // toc nav anchors 25 | /** 26 | * On every call, try to find header right after <-- next header 27 | * the one whose content is on the current screen <-- highlight this 28 | */ 29 | for (let i = 0; i < headings.length; i++) { 30 | // headings[i] is current element 31 | // if an element is already active, then current element is not active 32 | // if no element is already active, then current element is active 33 | let currNavActive = !activeNavFound; 34 | /** 35 | * Enter the following check up only when an active nav header is not yet found 36 | * Then, check the bounding rectangle of the next header 37 | * The headers that are scrolled passed will have negative bounding rect top 38 | * So the first one with positive bounding rect top will be the nearest next header 39 | */ 40 | if (currNavActive && i < headings.length - 1) { 41 | const heading = headings[i + 1]; 42 | const next = decodeURIComponent(heading.href.split('#')[1]); 43 | const nextHeader = document.getElementById(next); 44 | 45 | if (nextHeader) { 46 | const top = nextHeader.getBoundingClientRect().top; 47 | currNavActive = top > OFFSET; 48 | } else { 49 | console.error('Can not find header element', { 50 | id: next, 51 | heading, 52 | }); 53 | } 54 | } 55 | /** 56 | * Stop searching once a first such header is found, 57 | * this makes sure the highlighted header is the most current one 58 | */ 59 | if (currNavActive) { 60 | activeNavFound = true; 61 | headings[i].classList.add('active'); 62 | } else { 63 | headings[i].classList.remove('active'); 64 | } 65 | } 66 | }, 100); 67 | }; 68 | 69 | document.addEventListener('scroll', onScroll); 70 | document.addEventListener('resize', onScroll); 71 | document.addEventListener('DOMContentLoaded', function() { 72 | // Cache the headings once the page has fully loaded. 73 | headingsCache = findHeadings(); 74 | onScroll(); 75 | }); 76 | })(); 77 | -------------------------------------------------------------------------------- /cdn/sdk.js: -------------------------------------------------------------------------------- 1 | /*1565764635,,JIT Construction: v1001055920,en_US*/ 2 | 3 | /** 4 | * Copyright (c) 2017-present, Facebook, Inc. All rights reserved. 5 | * 6 | * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 7 | * copy, modify, and distribute this software in source code or binary form for use 8 | * in connection with the web services and APIs provided by Facebook. 9 | * 10 | * As with any software that integrates with the Facebook platform, your use of 11 | * this software is subject to the Facebook Platform Policy 12 | * [http://developers.facebook.com/policy/]. This copyright notice shall be 13 | * included in all copies or substantial portions of the software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | (function _(a, b, c, d, e) { var f = window.console; f && Math.floor(new Date().getTime() / 1e3) - b > 7 * 24 * 60 * 60 && f.warn("The Facebook JSSDK is more than 7 days old."); if (window[c]) return; if (!window.JSON) return; var g = window[c] = { __buffer: { replay: function () { var a = this, b = function (d) { var b = window[c]; a.calls[d][0].split(".").forEach(function (a) { return b = b[a] }); b.apply(null, a.calls[d][1]) }; for (var d = 0; d < this.calls.length; d++)b(d); this.calls = [] }, calls: [], opts: null }, getUserID: function () { return "" }, getAuthResponse: function () { return null }, getAccessToken: function () { return null }, init: function (a) { g.__buffer.opts = a } }; for (var b = 0; b < d.length; b++) { f = d[b]; if (f in g) continue; var h = f.split("."), i = h.pop(), j = g; for (var k = 0; k < h.length; k++)j = j[h[k]] || (j[h[k]] = {}); j[i] = function (a) { if (a === "init") return; return function () { g.__buffer.calls.push([a, Array.prototype.slice.call(arguments)]) } }(f) } k = a; h = /Chrome\/(\d+)/.exec(navigator.userAgent); h && Number(h[1]) >= 55 && "assign" in Object && "findIndex" in [] && (k += "&ua=modern_es6"); j = document.createElement("script"); j.src = k; j.async = !0; e && (j.crossOrigin = "anonymous"); i = document.getElementsByTagName("script")[0]; i.parentNode && i.parentNode.insertBefore(j, i) })("https:\/\/connect.facebook.net\/en_US\/sdk.js?hash=0ccaaa40544e745bb71b2094bb7a8e02", 1565764635, "FB", ["AppEvents.EventNames", "AppEvents.ParameterNames", "AppEvents.activateApp", "AppEvents.clearAppVersion", "AppEvents.clearUserID", "AppEvents.getAppVersion", "AppEvents.getUserID", "AppEvents.logEvent", "AppEvents.logPageView", "AppEvents.logPurchase", "AppEvents.setAppVersion", "AppEvents.setUserID", "AppEvents.updateUserProperties", "Canvas.Plugin.showPluginElement", "Canvas.Plugin.hidePluginElement", "Canvas.Prefetcher.addStaticResource", "Canvas.Prefetcher.setCollectionMode", "Canvas.getPageInfo", "Canvas.scrollTo", "Canvas.setAutoGrow", "Canvas.setDoneLoading", "Canvas.setSize", "Canvas.setUrlHandler", "Canvas.startTimer", "Canvas.stopTimer", "Event.subscribe", "Event.unsubscribe", "XFBML.parse", "addFriend", "api", "getAccessToken", "getAuthResponse", "getLoginStatus", "getUserID", "init", "login", "logout", "publish", "share", "ui"], true); -------------------------------------------------------------------------------- /cdn/codeblocks.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2013-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | /* eslint-disable module-strict */ 9 | 10 | (function() { 11 | 'use strict'; 12 | if (typeof document === 'undefined') { 13 | // Not on browser 14 | return; 15 | } 16 | 17 | document.addEventListener('DOMContentLoaded', init); 18 | 19 | function init() { 20 | var mobile = isMobile(); 21 | 22 | var webPlayerList = document.querySelectorAll('.web-player'); 23 | 24 | // Either show interactive or static code block, depending on desktop or mobile 25 | for (var i = 0; i < webPlayerList.length; ++i) { 26 | webPlayerList[i].classList.add(mobile ? 'mobile' : 'desktop'); 27 | 28 | if (!mobile) { 29 | // Determine location to look up required assets 30 | var assetRoot = encodeURIComponent( 31 | document.location.origin + '/react-native' 32 | ); 33 | 34 | // Set iframe src. Do this dynamically so the iframe never loads on mobile. 35 | var iframe = webPlayerList[i].querySelector('iframe'); 36 | iframe.src = 37 | iframe.getAttribute('data-src') + '&assetRoot=' + assetRoot; 38 | } 39 | } 40 | 41 | window.ExpoSnack && window.ExpoSnack.initialize(); 42 | 43 | var snackPlayerList = document.querySelectorAll('.snack-player'); 44 | 45 | // Either show interactive or static code block, depending on desktop or mobile 46 | for (var i = 0; i < snackPlayerList.length; ++i) { 47 | var snackPlayer = snackPlayerList[i]; 48 | var snackDesktopPlayer = snackPlayer.querySelectorAll( 49 | '.desktop-friendly-snack' 50 | )[0]; 51 | var plainCodeExample = snackPlayer.querySelectorAll( 52 | '.mobile-friendly-snack' 53 | )[0]; 54 | 55 | if (mobile) { 56 | snackDesktopPlayer.remove(); 57 | plainCodeExample.style.display = 'block'; 58 | } else { 59 | plainCodeExample.remove(); 60 | } 61 | } 62 | 63 | var backdrop = document.querySelector('.modal-backdrop'); 64 | if (!backdrop) { 65 | return; 66 | } 67 | 68 | var modalButtonOpenList = document.querySelectorAll('.modal-button-open'); 69 | var modalButtonClose = document.querySelector('.modal-button-close'); 70 | 71 | backdrop.addEventListener('click', hideModal); 72 | modalButtonClose.addEventListener('click', hideModal); 73 | 74 | // Bind event to NodeList items 75 | for (var i = 0; i < modalButtonOpenList.length; ++i) { 76 | modalButtonOpenList[i].addEventListener('click', showModal); 77 | } 78 | } 79 | 80 | function showModal(e) { 81 | var backdrop = document.querySelector('.modal-backdrop'); 82 | if (!backdrop) { 83 | return; 84 | } 85 | 86 | var modal = document.querySelector('.modal'); 87 | 88 | backdrop.classList.add('modal-open'); 89 | modal.classList.add('modal-open'); 90 | } 91 | 92 | function hideModal(e) { 93 | var backdrop = document.querySelector('.modal-backdrop'); 94 | if (!backdrop) { 95 | return; 96 | } 97 | 98 | var modal = document.querySelector('.modal'); 99 | 100 | backdrop.classList.remove('modal-open'); 101 | modal.classList.remove('modal-open'); 102 | } 103 | 104 | // Primitive mobile detection 105 | function isMobile() { 106 | return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( 107 | navigator.userAgent 108 | ); 109 | } 110 | })(); 111 | -------------------------------------------------------------------------------- /cdn/embed.js: -------------------------------------------------------------------------------- 1 | 2 | (function() { 3 | if (window.ExpoSnack) { 4 | return; 5 | } 6 | 7 | var ExpoSnack = { 8 | append: function(container, options) { 9 | options = options || {}; 10 | options.id = options.id || container.dataset.snackId || container.dataset.sketchId; 11 | options.platform = options.platform || container.dataset.snackPlatform || container.dataset.sketchPlatform; 12 | options.preview = options.preview || container.dataset.snackPreview || container.dataset.sketchPreview; 13 | options.sdkVersion = options.sdkVersion || container.dataset.snackSdkVersion; 14 | options.name = options.name || container.dataset.snackName; 15 | options.description = options.description || container.dataset.snackDescription; 16 | options.theme = options.theme || container.dataset.snackTheme; 17 | options.appetizePayerCode = options.appetizePayerCode || container.dataset.snackAppetizePayerCode; 18 | 19 | if (!options.code && container.dataset.snackCode) { 20 | options.code = decodeURIComponent(container.dataset.snackCode); 21 | } 22 | 23 | if (container.querySelector('iframe[data-snack-iframe]')) { 24 | return; 25 | } 26 | 27 | if (!options.id && !options.code) { 28 | return; 29 | } 30 | 31 | var iframeId = Math.random().toString(36).substr(2, 10); 32 | var iframe = document.createElement('iframe'); 33 | 34 | var iframeQueryParams = '?preview=' + options.preview 35 | + '&platform=' + options.platform 36 | + '&iframeId=' + iframeId; 37 | 38 | if (options.sdkVersion) { 39 | iframeQueryParams += '&sdkVersion=' + options.sdkVersion; 40 | } 41 | if (options.name) { 42 | iframeQueryParams += '&name=' + options.name; 43 | } 44 | if (options.description) { 45 | iframeQueryParams += '&description=' + options.description; 46 | } 47 | if (options.theme) { 48 | iframeQueryParams += '&theme=' + options.theme; 49 | } 50 | if (options.appetizePayerCode) { 51 | iframeQueryParams += '&appetizePayerCode=' + options.appetizePayerCode 52 | } 53 | 54 | if (options.id) { 55 | iframe.src = 'https://snack.expo.io/embedded/' + options.id + iframeQueryParams; 56 | } else { 57 | iframe.src = 'https://snack.expo.io/embedded' + iframeQueryParams + '&waitForData=true'; 58 | } 59 | iframe.style = 'display: block'; 60 | iframe.height = '100%'; 61 | iframe.width = '100%'; 62 | iframe.frameBorder = '0'; 63 | iframe.allowTransparency = true; 64 | iframe.dataset.snackIframe = true; 65 | 66 | container.appendChild(iframe); 67 | 68 | if (options.code) { 69 | window.addEventListener('message', function(event) { 70 | var eventName = event.data[0]; 71 | var data = event.data[1]; 72 | if (eventName === 'expoFrameLoaded' && data.iframeId === iframeId) { 73 | iframe.contentWindow.postMessage(['expoDataEvent', { 74 | iframeId: iframeId, 75 | code: options.code, 76 | }], '*') 77 | } 78 | }); 79 | } 80 | }, 81 | 82 | remove: function(container) { 83 | var iframe = container.querySelector('iframe[data-snack-iframe]'); 84 | 85 | if (iframe) { 86 | iframe.parentNode.removeChild(iframe); 87 | } 88 | }, 89 | 90 | initialize: function() { 91 | document.querySelectorAll('[data-sketch-id], [data-snack-id], [data-snack-code]').forEach(function(element) { 92 | ExpoSnack.append(element); 93 | }); 94 | } 95 | } 96 | 97 | if (document.readyState === "complete") { 98 | ExpoSnack.initialize(); 99 | } else { 100 | document.addEventListener('readystatechange', function() { 101 | if (document.readyState === "complete") { 102 | ExpoSnack.initialize(); 103 | } 104 | }); 105 | } 106 | 107 | window.ExpoSnack = ExpoSnack; 108 | window.ExpoSketch = ExpoSnack; 109 | })(); 110 | -------------------------------------------------------------------------------- /cdn/tabs.js: -------------------------------------------------------------------------------- 1 | const currentTabs = {}; 2 | 3 | function isActiveBlock(block) { 4 | for (let tab of Object.values(currentTabs)) { 5 | if (!block.classList.contains(tab)) { 6 | return false; 7 | } 8 | } 9 | return true; 10 | } 11 | 12 | function displayTab(type, value) { 13 | const list = document.getElementById(`toggle-${type}`); 14 | // short circuit if there is no toggle for this tab type 15 | if (!list) { 16 | return; 17 | } 18 | currentTabs[type] = value; 19 | [...list.children].forEach(child => { 20 | if (child.classList.contains(`button-${value}`)) { 21 | child.classList.add('active'); 22 | child.setAttribute('aria-selected', true); 23 | } else { 24 | child.classList.remove('active'); 25 | child.setAttribute('aria-selected', false); 26 | } 27 | }); 28 | 29 | var container = document.getElementsByTagName('block')[0].parentNode; 30 | [...container.children].forEach(child => { 31 | if (child.tagName !== 'BLOCK') { 32 | return; 33 | } 34 | if (isActiveBlock(child)) { 35 | child.classList.add('active'); 36 | } else { 37 | child.classList.remove('active'); 38 | } 39 | }); 40 | } 41 | function convertBlocks() { 42 | // Convert
......
43 | // Into
......
44 | var blocks = document.querySelectorAll('block'); 45 | for (var i = 0; i < blocks.length; ++i) { 46 | var block = blocks[i]; 47 | var span = blocks[i].parentNode; 48 | var container = span.parentNode; 49 | container.insertBefore(block, span); 50 | container.removeChild(span); 51 | } 52 | // Convert
...content...
53 | // Into
...content...
54 | blocks = document.querySelectorAll('block'); 55 | for (var i = 0; i < blocks.length; ++i) { 56 | var block = blocks[i]; 57 | while (block.nextSibling && block.nextSibling.tagName !== 'BLOCK') { 58 | block.appendChild(block.nextSibling); 59 | } 60 | } 61 | } 62 | function guessPlatformAndOS() { 63 | if (!document.querySelector('block')) { 64 | return; 65 | } 66 | // If we are coming to the page with a hash in it (i.e. from a search, for example), try to get 67 | // us as close as possible to the correct platform and dev os using the hashtag and block walk up. 68 | var foundHash = false; 69 | if (window.location.hash !== '' && window.location.hash !== 'content') { 70 | // content is default 71 | var hashLinks = document.querySelectorAll('a.hash-link'); 72 | for (var i = 0; i < hashLinks.length && !foundHash; ++i) { 73 | if (hashLinks[i].hash === window.location.hash) { 74 | var parent = hashLinks[i].parentElement; 75 | while (parent) { 76 | if (parent.tagName === 'BLOCK') { 77 | // Could be more than one target os and dev platform, but just choose some sort of order 78 | // of priority here. 79 | // Dev OS 80 | if (parent.className.indexOf('mac') > -1) { 81 | displayTab('os', 'mac'); 82 | foundHash = true; 83 | } else if (parent.className.indexOf('linux') > -1) { 84 | displayTab('os', 'linux'); 85 | foundHash = true; 86 | } else if (parent.className.indexOf('windows') > -1) { 87 | displayTab('os', 'windows'); 88 | foundHash = true; 89 | } else { 90 | break; 91 | } 92 | // Target Platform 93 | if (parent.className.indexOf('ios') > -1) { 94 | displayTab('platform', 'ios'); 95 | foundHash = true; 96 | } else if (parent.className.indexOf('android') > -1) { 97 | displayTab('platform', 'android'); 98 | foundHash = true; 99 | } else { 100 | break; 101 | } 102 | // Guide 103 | if (parent.className.indexOf('native') > -1) { 104 | displayTab('guide', 'native'); 105 | foundHash = true; 106 | } else if (parent.className.indexOf('quickstart') > -1) { 107 | displayTab('guide', 'quickstart'); 108 | foundHash = true; 109 | } else { 110 | break; 111 | } 112 | break; 113 | } 114 | parent = parent.parentElement; 115 | } 116 | } 117 | } 118 | } 119 | // Do the default if there is no matching hash 120 | if (!foundHash) { 121 | var isMac = navigator.platform === 'MacIntel'; 122 | var isWindows = navigator.platform === 'Win32'; 123 | displayTab('platform', isMac ? 'ios' : 'android'); 124 | displayTab('os', isMac ? 'mac' : isWindows ? 'windows' : 'linux'); 125 | displayTab('guide', 'quickstart'); 126 | displayTab('language', 'objc'); 127 | } 128 | } 129 | 130 | document.addEventListener('DOMContentLoaded', () => { 131 | convertBlocks(); 132 | guessPlatformAndOS(); 133 | }); 134 | -------------------------------------------------------------------------------- /cdn/button.js: -------------------------------------------------------------------------------- 1 | (window.__twttrll = window.__twttrll || []).push([[3], { 166: function (t, e, a) { var r = a(37), n = a(170), s = a(7); (r = Object.create(r)).build = s(r.build, null, n), t.exports = r }, 167: function (t, e, a) { var r = a(36), n = a(33), s = a(35), i = a(0), o = a(7), u = a(32), c = a(4), l = a(174); t.exports = function (t) { t.params({ partner: { fallback: o(u.val, u, "partner") } }), t.define("scribeItems", function () { return {} }), t.define("scribeNamespace", function () { return { client: "tfw" } }), t.define("scribeData", function () { return { widget_origin: s.rootDocumentLocation(), widget_frame: s.isFramed() && s.currentDocumentLocation(), widget_partner: this.params.partner, widget_site_screen_name: l(u.val("site")), widget_site_user_id: c.asNumber(u.val("site:id")), widget_creator_screen_name: l(u.val("creator")), widget_creator_user_id: c.asNumber(u.val("creator:id")) } }), t.define("scribe", function (t, e, a) { t = i.aug(this.scribeNamespace(), t || {}), e = i.aug(this.scribeData(), e || {}), r.scribe(t, e, !1, a) }), t.define("scribeInteraction", function (t, e, a) { var r = n.extractTermsFromDOM(t.target); r.action = t.type, "url" === r.element && (r.element = n.clickEventElement(t.target)), this.scribe(r, e, a) }) } }, 169: function (t, e, a) { var r = a(4), n = a(0); t.exports = function (t) { t.define("widgetDataAttributes", function () { return {} }), t.define("setDataAttributes", function () { var t = this.sandbox.sandboxEl; n.forIn(this.widgetDataAttributes(), function (e, a) { r.hasValue(a) && t.setAttribute("data-" + e, a) }) }), t.after("render", function () { this.setDataAttributes() }) } }, 170: function (t, e, a) { var r = a(38), n = a(0), s = a(171); function i() { r.apply(this, arguments), this.Widget = this.Component } i.prototype = Object.create(r.prototype), n.aug(i.prototype, { factory: s, build: function () { return r.prototype.build.apply(this, arguments) }, selectors: function (t) { var e = this.Widget.prototype.selectors; t = t || {}, this.Widget.prototype.selectors = n.aug({}, t, e) } }), t.exports = i }, 171: function (t, e, a) { var r = a(6), n = a(34), s = a(39), i = a(0), o = a(7), u = a(172), c = "twitter-widget-"; t.exports = function () { var t = s(); function e(e, a) { t.apply(this, arguments), this.id = c + u(), this.sandbox = a } return e.prototype = Object.create(t.prototype), i.aug(e.prototype, { selectors: {}, hydrate: function () { return r.resolve() }, prepForInsertion: function () { }, render: function () { return r.resolve() }, show: function () { return r.resolve() }, resize: function () { return r.resolve() }, select: function (t, e) { return 1 === arguments.length && (e = t, t = this.el), t ? (e = this.selectors[e] || e, i.toRealArray(t.querySelectorAll(e))) : [] }, selectOne: function () { return this.select.apply(this, arguments)[0] }, selectLast: function () { return this.select.apply(this, arguments).pop() }, on: function (t, e, a) { var r, s = this.el; this.el && (t = (t || "").split(/\s+/), 2 === arguments.length ? a = e : r = e, r = this.selectors[r] || r, a = o(a, this), t.forEach(r ? function (t) { n.delegate(s, t, r, a) } : function (t) { s.addEventListener(t, a, !1) })) } }), e } }, 172: function (t, e) { var a = 0; t.exports = function () { return String(a++) } }, 174: function (t, e) { t.exports = function (t) { return t && "@" === t[0] ? t.substr(1) : t } }, 212: function (t, e) { var a = /\{\{([\w_]+)\}\}/g; t.exports = function (t, e) { return t.replace(a, function (t, a) { return void 0 !== e[a] ? e[a] : t }) } }, 216: function (t, e, a) { var r = a(6), n = a(166), s = a(32), i = a(19), o = a(212), u = a(0), c = a(11), l = a(7), p = a(70), h = a(68), m = p.followButtonHtmlPath, f = "Twitter Follow Button", d = "twitter-follow-button"; function g(t) { return "large" === t ? "l" : "m" } t.exports = n.couple(a(167), a(169), function (t) { t.params({ screenName: { required: !0 }, lang: { required: !0, transform: h.matchLanguage, fallback: "en" }, size: { fallback: "medium", transform: g }, showScreenName: { fallback: !0 }, showCount: { fallback: !0 }, partner: { fallback: l(s.val, s, "partner") }, count: {}, preview: {} }), t.define("getUrlParams", function () { return u.compact({ id: this.id, lang: this.params.lang, size: this.params.size, screen_name: this.params.screenName, show_count: "none" !== this.params.count && this.params.showCount, show_screen_name: this.params.showScreenName, preview: this.params.preview, partner: this.params.partner, dnt: i.enabled(), time: +new Date }) }), t.around("widgetDataAttributes", function (t) { return u.aug({ "screen-name": this.params.screenName }, t()) }), t.around("scribeNamespace", function (t) { return u.aug(t(), { page: "button", section: "follow" }) }), t.define("scribeImpression", function () { this.scribe({ action: "impression" }, { language: this.params.lang, message: [this.params.size, "none" === this.params.count ? "nocount" : "withcount"].join(":") + ":" }) }), t.override("render", function () { var t = o(m, { lang: this.params.lang }), e = c.encode(this.getUrlParams()), a = p.resourceBaseUrl + t + "#" + e; return this.scribeImpression(), r.all([this.sandbox.setTitle(f), this.sandbox.addClass(d), this.sandbox.loadDocument(a)]) }) }) }, 250: function (t, e, a) { var r = a(6), n = a(5), s = a(8), i = a(32), o = a(19), u = a(212), c = a(76), l = a(0), p = a(11), h = a(3), m = a(166), f = a(7), d = a(70), g = a(68), b = d.tweetButtonHtmlPath, w = "Twitter Tweet Button", v = "twitter-tweet-button", y = "twitter-share-button", _ = "twitter-hashtag-button", x = "twitter-mention-button", N = ["share", "hashtag", "mention"]; function D(t) { return "large" === t ? "l" : "m" } function k(t) { return l.contains(N, t) } function z(t) { return h.hashTag(t, !1) } function A(t) { return /\+/.test(t) && !/ /.test(t) ? t.replace(/\+/g, " ") : t } t.exports = m.couple(a(167), a(169), function (t) { t.params({ lang: { required: !0, transform: g.matchLanguage, fallback: "en" }, size: { fallback: "medium", transform: D }, type: { fallback: "share", validate: k }, text: { transform: A }, screenName: { transform: h.screenName }, buttonHashtag: { transform: z }, partner: { fallback: f(i.val, i, "partner") }, via: {}, related: {}, hashtags: {}, url: {} }), t.define("getUrlParams", function () { var t = this.params.text, e = this.params.url, a = this.params.via, r = this.params.related, i = c.getScreenNameFromPage(); return "share" === this.params.type ? (t = t || n.title, e = e || c.getCanonicalURL() || s.href, a = a || i) : i && (r = r ? i + "," + r : i), l.compact({ id: this.id, lang: this.params.lang, size: this.params.size, type: this.params.type, text: t, url: e, via: a, related: r, button_hashtag: this.params.buttonHashtag, screen_name: this.params.screenName, hashtags: this.params.hashtags, partner: this.params.partner, original_referer: s.href, dnt: o.enabled(), time: +new Date }) }), t.around("widgetDataAttributes", function (t) { return "mention" == this.params.type ? l.aug({ "screen-name": this.params.screenName }, t()) : "hashtag" == this.params.type ? l.aug({ hashtag: this.params.buttonHashtag }, t()) : l.aug({ url: this.params.url }, t()) }), t.around("scribeNamespace", function (t) { return l.aug(t(), { page: "button", section: this.params.type }) }), t.define("scribeImpression", function () { this.scribe({ action: "impression" }, { language: this.params.lang, message: [this.params.size, "nocount"].join(":") + ":" }) }), t.override("render", function () { var t, e = u(b, { lang: this.params.lang }), a = p.encode(this.getUrlParams()), n = d.resourceBaseUrl + e + "#" + a; switch (this.params.type) { case "hashtag": t = _; break; case "mention": t = x; break; default: t = y }return this.scribeImpression(), r.all([this.sandbox.setTitle(w), this.sandbox.addClass(v), this.sandbox.addClass(t), this.sandbox.loadDocument(n)]) }) }) }, 85: function (t, e, a) { var r = a(166); t.exports = r.build([a(216)]) }, 90: function (t, e, a) { var r = a(166); t.exports = r.build([a(250)]) } }]); -------------------------------------------------------------------------------- /cdn/buttons.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * github-buttons v2.2.10 3 | * (c) 2019 なつき 4 | * @license BSD-2-Clause 5 | */ 6 | !function(){"use strict";var e=window.document,t=e.location,o=window.encodeURIComponent,r=window.decodeURIComponent,n=window.Math,a=window.HTMLElement,i=window.XMLHttpRequest,l="https://buttons.github.io/buttons.html",c=i&&i.prototype&&"withCredentials"in i.prototype,d=c&&a&&a.prototype.attachShadow&&!a.prototype.attachShadow.prototype,s=function(e,t,o){e.addEventListener?e.addEventListener(t,o):e.attachEvent("on"+t,o)},u=function(e,t,o){e.removeEventListener?e.removeEventListener(t,o):e.detachEvent("on"+t,o)},h=function(e,t,o){var r=function(n){return u(e,t,r),o(n)};s(e,t,r)},f=function(e,t,o){var r=function(n){if(t.test(e.readyState))return u(e,"readystatechange",r),o(n)};s(e,"readystatechange",r)},p=function(e){return function(t,o,r){var n=e.createElement(t);if(o)for(var a in o){var i=o[a];null!=i&&(null!=n[a]?n[a]=i:n.setAttribute(a,i))}if(r)for(var l=0,c=r.length;l'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}},w={},x=function(e,t,o){var r=p(e.ownerDocument),n=e.appendChild(r("style",{type:"text/css"}));n.styleSheet?n.styleSheet.cssText=m:n.appendChild(e.ownerDocument.createTextNode(m));var a,l,d=r("a",{className:"btn",href:t.href,target:"_blank",innerHTML:(a=t["data-icon"],l=/^large$/i.test(t["data-size"])?16:14,a=(""+a).toLowerCase().replace(/^octicon-/,""),{}.hasOwnProperty.call(v,a)||(a="mark-github"),'"),"aria-label":t["aria-label"]||void 0},[" ",r("span",{},[t["data-text"]||""])]);/\.github\.com$/.test("."+d.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(d.href)&&(d.target="_top"):(d.href="#",d.target="_self");var u,h,g,x,y=e.appendChild(r("div",{className:"widget"+(/^large$/i.test(t["data-size"])?" lg":"")},[d]));/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===d.hostname&&(u=d.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!u[6]?(u[2]?(h="/repos/"+u[1]+"/"+u[2],u[3]?(x="subscribers_count",g="watchers"):u[4]?(x="forks_count",g="network"):u[5]?(x="open_issues_count",g="issues"):(x="stargazers_count",g="stargazers")):(h="/users/"+u[1],g=x="followers"),function(e,t){var o=w[e]||(w[e]=[]);if(!(o.push(t)>1)){var r=b(function(){for(delete w[e];t=o.shift();)t.apply(null,arguments)});if(c){var n=new i;s(n,"abort",r),s(n,"error",r),s(n,"load",function(){var e;try{e=JSON.parse(n.responseText)}catch(e){return void r(e)}r(200!==n.status,e)}),n.open("GET",e),n.send()}else{var a=this||window;a._=function(e){a._=null,r(200!==e.meta.status,e.data)};var l=p(a.document)("script",{async:!0,src:e+(/\?/.test(e)?"&":"?")+"callback=_"}),d=function(){a._&&a._({meta:{}})};s(l,"load",d),s(l,"error",d),l.readyState&&f(l,/de|m/,d),a.document.getElementsByTagName("head")[0].appendChild(l)}}}.call(this,"https://api.github.com"+h,function(e,t){if(!e){var n=t[x];y.appendChild(r("a",{className:"social-count",href:t.html_url+"/"+g,target:"_blank","aria-label":n+" "+x.replace(/_count$/,"").replace("_"," ").slice(0,n<2?-1:void 0)+" on GitHub"},[r("b"),r("i"),r("span",{},[(""+n).replace(/\B(?=(\d{3})+(?!\d))/g,",")])]))}o&&o(y)})):o&&o(y)},y=window.devicePixelRatio||1,C=function(e){return(y>1?n.ceil(n.round(e*y)/y*2)/2:n.ceil(e))||0},F=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},k=function(t,r){if(null!=t&&null!=r)if(t.getAttribute&&(t=function(e){for(var t={href:e.href,title:e.title,"aria-label":e.getAttribute("aria-label")},o=["icon","text","size","show-count"],r=0,n=o.length;r");background-repeat:no-repeat;background-size:contain;vertical-align:middle;padding:0!important}@media (min-width:568px){.aa-dropdown-menu{min-width:400px}.algolia-docsearch-suggestion--text{display:block;font-size:.9em;padding:2px 0}}@media (min-width:768px){.aa-dropdown-menu{min-width:600px}.algolia-docsearch-suggestion{display:table;width:100%}.algolia-docsearch-suggestion__secondary{border-top:1px solid #606060}.algolia-docsearch-suggestion--subcategory-column{border-right:1px solid #606060;background:#f1f3f5;color:#555;display:table-cell;overflow:hidden;padding:5px 7px 5px 5px;text-align:right;text-overflow:ellipsis;vertical-align:top;width:135px;max-width:135px;min-width:135px}.algolia-docsearch-suggestion--subcategory-column-text{display:none}.algolia-docsearch-suggestion__secondary .algolia-docsearch-suggestion--subcategory-column-text{display:block}.algolia-docsearch-suggestion--content{display:table-cell;padding:5px 10px}.algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-docsearch-suggestion--title{font-weight:600}.algolia-docsearch-suggestion--text{display:block;font-weight:400;padding:2px}} -------------------------------------------------------------------------------- /cdn/analytics.js: -------------------------------------------------------------------------------- 1 | (function(){var k=this||self,l=function(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b};var n=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},p=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};var q=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;var r=window,u=document,v=function(a,b){u.addEventListener?u.addEventListener(a,b,!1):u.attachEvent&&u.attachEvent("on"+a,b)};var w={},x=function(){w.TAGGING=w.TAGGING||[];w.TAGGING[1]=!0};var y=/:[0-9]+$/,A=function(a,b){b&&(b=String(b).toLowerCase());if("protocol"===b||"port"===b)a.protocol=z(a.protocol)||z(r.location.protocol);"port"===b?a.port=String(Number(a.hostname?a.port:r.location.port)||("http"==a.protocol?80:"https"==a.protocol?443:"")):"host"===b&&(a.hostname=(a.hostname||r.location.hostname).replace(y,"").toLowerCase());var c=z(a.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":b="";a&&a.href&&(b=a.href.indexOf("#"),b=0>b?a.href:a.href.substr(0, 2 | b));a=b;break;case "protocol":a=c;break;case "host":a=a.hostname.replace(y,"").toLowerCase();break;case "port":a=String(Number(a.port)||("http"==c?80:"https"==c?443:""));break;case "path":a.pathname||a.hostname||x();a="/"==a.pathname.substr(0,1)?a.pathname:"/"+a.pathname;a=a.split("/");a:if(b=a[a.length-1],c=[],Array.prototype.indexOf)b=c.indexOf(b),b="number"==typeof b?b:-1;else{for(var d=0;d>2;g=(g&3)<<4|f>>4;f=(f&15)<<2|h>>6;h&=63;e||(h=64,d||(f=64));b.push(D[m],D[g],D[f],D[h])}return b.join("")},H=function(a){function b(m){for(;d>4);64!=f&&(c+=String.fromCharCode(g<<4&240|f>>2),64!=h&&(c+=String.fromCharCode(f<<6&192|h)))}};var I;function J(a,b){if(!a||b===u.location.hostname)return!1;for(var c=0;cc;c++){for(var d=c,e=0;8>e;e++)d=d&1?d>>>1^3988292384:d>>>1;b[c]=d}}I=b;b=4294967295;for(c=0;c>>8^I[(b^a.charCodeAt(c))&255];return((b^-1)>>>0).toString(36)},ba=function(a){return function(b){var c=B(r.location.href),d=c.search.replace("?","");a:{var e=d.split("&");for(var g=0;gc;++c){var d=P.exec(a);if(d){var e=d;break a}a=decodeURIComponent(a)}e=void 0}if(e&&"1"===e[1]){var g=e[2],f=e[3];a:{for(e=0;e>21:b}return b};var $c=function(a){this.w=a||[]};$c.prototype.set=function(a){this.w[a]=!0};$c.prototype.encode=function(){for(var a=[],b=0;b=b.length)wc(a,b,c);else if(8192>=b.length)x(a,b,c)||wd(a,b,c)||wc(a,b,c);else throw ge("len",b.length),new Da(b.length);},pe=function(a,b,c,d){d=d||ua;wd(a+"?"+b,"",d,c)},wc=function(a,b,c){var d=ta(a+"?"+b);d.onload=d.onerror=function(){d.onload=null;d.onerror=null;c()}},wd=function(a,b,c, 26 | d){var e=O.XMLHttpRequest;if(!e)return!1;var g=new e;if(!("withCredentials"in g))return!1;a=a.replace(/^http:/,"https:");g.open("POST",a,!0);g.withCredentials=!0;g.setRequestHeader("Content-Type","text/plain");g.onreadystatechange=function(){if(4==g.readyState){if(d)try{var ca=g.responseText;if(1>ca.length)ge("xhr","ver","0"),c();else if("1"!=ca.charAt(0))ge("xhr","ver",String(ca.length)),c();else if(3=100*R(a,Ka))throw"abort";}function Ma(a){if(G(P(a,Na)))throw"abort";}function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw"abort";} 29 | function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withCredentials"in new O.XMLHttpRequest&&J(40)}catch(c){}a.set(ld,Td(a),!0);a.set(Ac,R(a,Ac)+1);var b=[];ue.map(function(c,d){d.F&&(c=a.get(c),void 0!=c&&c!=d.defaultValue&&("boolean"==typeof c&&(c*=1),b.push(d.F+"="+K(""+c))))});b.push("z="+Bd());a.set(Ra,b.join("&"),!0)} 30 | function Sa(a){var b=P(a,fa);!b&&a.get(Vd)&&(b="beacon");var c=P(a,gd),d=P(a,oe),e=c||(d?d+"/3":bd(!1)+"/collect");switch(P(a,ad)){case "d":e=c||(d?d+"/32":bd(!1)+"/j/collect");b=a.get(qe)||void 0;pe(e,P(a,Ra),b,a.Z(Ia));break;case "b":e=c||(d?d+"/31":bd(!1)+"/r/collect");default:b?(c=P(a,Ra),d=(d=a.Z(Ia))||ua,"image"==b?wc(e,c,d):"xhr"==b&&wd(e,c,d)||"beacon"==b&&x(e,c,d)||ba(e,c,d)):ba(e,P(a,Ra),a.Z(Ia))}e=P(a,Na);e=h(e);b=e.hitcount;e.hitcount=b?b+1:1;e=P(a,Na);delete h(e).pending_experiments; 31 | a.set(Ia,ua,!0)}function Hc(a){qc().expId&&a.set(Nc,qc().expId);qc().expVar&&a.set(Oc,qc().expVar);var b=P(a,Na);if(b=h(b).pending_experiments){var c=[];for(d in b)b.hasOwnProperty(d)&&b[d]&&c.push(encodeURIComponent(d)+"."+encodeURIComponent(b[d]));var d=c.join("!")}else d=void 0;d&&a.set(m,d,!0)}function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"abort";}function yd(a){var b=O.gaDevIds;ka(b)&&0!=b.length&&a.set("&did",b.join(","),!0)} 32 | function vb(a){if(!a.get(Na))throw"abort";};var hd=function(){return Math.round(2147483647*Math.random())},Bd=function(){try{var a=new Uint32Array(1);O.crypto.getRandomValues(a);return a[0]&2147483647}catch(b){return hd()}};function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction"!=c&&"item"!=c){c=R(a,Wa);var d=(new Date).getTime(),e=R(a,Xa);0==e&&a.set(Xa,d);e=Math.round(2*(d-e)/1E3);0=c)throw"abort";a.set(Wa,--c)}a.set(Ua,++b)};var Ya=function(){this.data=new ee};Ya.prototype.get=function(a){var b=$a(a),c=this.data.get(a);b&&void 0==c&&(c=ea(b.defaultValue)?b.defaultValue():b.defaultValue);return b&&b.Z?b.Z(this,a,c):c};var P=function(a,b){a=a.get(b);return void 0==a?"":""+a},R=function(a,b){a=a.get(b);return void 0==a||""===a?0:Number(a)};Ya.prototype.Z=function(a){return(a=this.get(a))&&ea(a)?a:ua}; 33 | Ya.prototype.set=function(a,b,c){if(a)if("object"==typeof a)for(var d in a)a.hasOwnProperty(d)&&ab(this,d,a[d],c);else ab(this,a,b,c)};var ab=function(a,b,c,d){if(void 0!=c)switch(b){case Na:wb.test(c)}var e=$a(b);e&&e.o?e.o(a,b,c,d):a.data.set(b,c,d)};var ue=new ee,ve=[],bb=function(a,b,c,d,e){this.name=a;this.F=b;this.Z=d;this.o=e;this.defaultValue=c},$a=function(a){var b=ue.get(a);if(!b)for(var c=0;c=b?!1:!0},gc=function(a){var b={};if(Ec(b)||Fc(b)){var c=b[Eb];void 0==c||Infinity==c||isNaN(c)||(0c)a[b]=void 0},Fd=function(a){return function(b){if("pageview"==b.get(Va)&&!a.I){a.I=!0;var c=aa(b),d=0a.length)J(12);else{for(var d=[],e=0;e=a&&d.push({hash:ca[0],R:e[g],O:ca})}if(0!=d.length)return 1==d.length?d[0]:Zc(b,d)||Zc(c,d)||Zc(null,d)||d[0]}function Zc(a,b){if(null==a)var c=a=1;else c=La(a),a=La(D(a,".")?a.substring(1):"."+a);for(var d=0;d=ca[0]||0>=ca[1]?"":ca.join("x");a.set(rb,c);a.set(tb,fc());a.set(ob,M.characterSet||M.charset);a.set(sb,b&&"function"===typeof b.javaEnabled&&b.javaEnabled()||!1);a.set(nb,(b&&(b.language||b.browserLanguage)||"").toLowerCase());a.data.set(ce,be("gclid",!0));a.data.set(ie,be("gclsrc",!0));a.data.set(fe, 63 | Math.round((new Date).getTime()/1E3));if(d&&a.get(cc)&&(b=M.location.hash)){b=b.split(/[?&#]+/);d=[];for(c=0;carguments.length)){if("string"===typeof arguments[0]){var b=arguments[0];var c=[].slice.call(arguments,1)}else b=arguments[0]&&arguments[0][Va],c=arguments;b&&(c=za(me[b]||[],c),c[Va]=b,this.b.set(c,void 0,!0),this.filters.D(this.b),this.b.data.m={})}};pc.prototype.ma=function(a,b){var c=this;u(a,c,b)||(v(a,function(){u(a,c,b)}),y(String(c.get(V)),a,void 0,b,!0))};var rc=function(a){if("prerender"==M.visibilityState)return!1;a();return!0},z=function(a){if(!rc(a)){J(16);var b=!1,c=function(){if(!b&&rc(a)){b=!0;var d=c,e=M;e.removeEventListener?e.removeEventListener("visibilitychange",d,!1):e.detachEvent&&e.detachEvent("onvisibilitychange",d)}};L(M,"visibilitychange",c)}};var te=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,sc=function(a){if(ea(a[0]))this.u=a[0];else{var b=te.exec(a[0]);null!=b&&4==b.length&&(this.c=b[1]||"t0",this.K=b[2]||"",this.C=b[3],this.a=[].slice.call(a,1),this.K||(this.A="create"==this.C,this.i="require"==this.C,this.g="provide"==this.C,this.ba="remove"==this.C),this.i&&(3<=this.a.length?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(qa(this.a[1])?this.X=this.a[1]:this.W=this.a[1])));b=a[1];a=a[2];if(!this.C)throw"abort";if(this.i&&(!qa(b)||""==b))throw"abort"; 65 | if(this.g&&(!qa(b)||""==b||!ea(a)))throw"abort";if(ud(this.c)||ud(this.K))throw"abort";if(this.g&&"t0"!=this.c)throw"abort";}};function ud(a){return 0<=a.indexOf(".")||0<=a.indexOf(":")};var Yd,Zd,$d,A;Yd=new ee;$d=new ee;A=new ee;Zd={ec:45,ecommerce:46,linkid:47}; 66 | var u=function(a,b,c){b==N||b.get(V);var d=Yd.get(a);if(!ea(d))return!1;b.plugins_=b.plugins_||new ee;if(b.plugins_.get(a))return!0;b.plugins_.set(a,new d(b,c||{}));return!0},y=function(a,b,c,d,e){if(!ea(Yd.get(b))&&!$d.get(b)){Zd.hasOwnProperty(b)&&J(Zd[b]);a=N.j(a);if(p.test(b)){J(52);if(!a)return!0;c=d||{};d={id:b,B:c.dataLayer||"dataLayer",ia:!!a.get("anonymizeIp"),sync:e,G:!1};a.get(">m")==b&&(d.G=!0);var g=String(a.get("name"));"t0"!=g&&(d.target=g);G(String(a.get("trackingId")))||(d.clientId= 67 | String(a.get(Q)),d.ka=Number(a.get(n)),c=c.palindrome?r:q,c=(c=M.cookie.replace(/^|(; +)/g,";").match(c))?c.sort().join("").substring(1):void 0,d.la=c,d.qa=E(a.b.get(kb)||"","gclid"));c=d.B;g=(new Date).getTime();O[c]=O[c]||[];g={"gtm.start":g};e||(g.event="gtm.js");O[c].push(g);c=t(d)}!c&&Zd.hasOwnProperty(b)?(J(39),c=b+".js"):J(43);if(c){if(a){var ca=a.get(oe);qa(ca)||(ca=void 0)}c&&0<=c.indexOf("/")||(c=(ca?ca+"/34":bd(!1)+"/plugins/ua/")+c);ca=ae(c);a=ca.protocol;d=M.location.protocol;if(("https:"== 68 | a||a==d||("http:"!=a?0:"http:"==d))&&B(ca)){if(ca=ca.url)a=(a=M.querySelector&&M.querySelector("script[nonce]")||null)?a.nonce||a.getAttribute&&a.getAttribute("nonce")||"":"",e?(e="",a&&Nd.test(a)&&(e=' nonce="'+a+'"'),f.test(ca)&&M.write("\x3c/script>')):(e=M.createElement("script"),e.type="text/javascript",e.async=!0,e.src=ca,a&&e.setAttribute("nonce",a),ca=M.getElementsByTagName("script")[0],ca.parentNode.insertBefore(e,ca));$d.set(b,!0)}}}},v=function(a,b){var c=A.get(a)|| 69 | [];c.push(b);A.set(a,c)},C=function(a,b){Yd.set(a,b);b=A.get(a)||[];for(var c=0;ca.split("/")[0].indexOf(":")&&(a=ca+e[2].substring(0,e[2].lastIndexOf("/"))+"/"+a);c.href=a; 71 | d=b(c);return{protocol:(c.protocol||"").toLowerCase(),host:d[0],port:d[1],path:d[2],query:c.search||"",url:a||""}};var Z={ga:function(){Z.f=[]}};Z.ga();Z.D=function(a){var b=Z.J.apply(Z,arguments);b=Z.f.concat(b);for(Z.f=[];0c;c++){var d=b[c].src;if(d&&0==d.indexOf(bd(!0)+ 74 | "/analytics")){b=!0;break a}}b=!1}b&&(Ba=!0)}(O.gaplugins=O.gaplugins||{}).Linker=Dc;b=Dc.prototype;C("linker",Dc);X("decorate",b,b.ca,20);X("autoLink",b,b.S,25);C("displayfeatures",fd);C("adfeatures",fd);a=a&&a.q;ka(a)?Z.D.apply(N,a):J(50)}};N.da=function(){for(var a=N.getAll(),b=0;b-1},forIn:i,isObject:s,isEmptyObject:a,toType:o,isType:function(t,e){return t==o(e)},toRealArray:u}},function(t,e){t.exports=window},function(t,e,n){var r=n(6);t.exports=function(){var t=this;this.promise=new r(function(e,n){t.resolve=e,t.reject=n})}},function(t,e,n){var r=n(11),i=/(?:^|(?:https?:)?\/\/(?:www\.)?twitter\.com(?::\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+)(?:\?|&|$)/i,o=/(?:^|(?:https?:)?\/\/(?:www\.)?twitter\.com(?::\d+)?\/(?:#!\/)?[\w_]+\/status(?:es)?\/)(\d+)/i,s=/^http(s?):\/\/(\w+\.)*twitter\.com([:/]|$)/i,a=/^http(s?):\/\/pbs\.twimg\.com\//,u=/^#?([^.,<>!\s/#\-()'"]+)$/,c=/twitter\.com(?::\d{2,4})?\/intent\/(\w+)/,d=/^https?:\/\/(?:www\.)?twitter\.com\/\w+\/timelines\/(\d+)/i,l=/^https?:\/\/(?:www\.)?twitter\.com\/i\/moments\/(\d+)/i,f=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/(?:likes|favorites)/i,h=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/lists\/([\w-%]+)/i,p=/^https?:\/\/(?:www\.)?twitter\.com\/i\/live\/(\d+)/i,m=/^https?:\/\/syndication\.twitter\.com\/settings/i,v=/^https?:\/\/(localhost|platform)\.twitter\.com(?::\d+)?\/widgets\/widget_iframe\.(.+)/i,g=/^https?:\/\/(?:www\.)?twitter\.com\/search\?q=(\w+)/i;function w(t){return"string"==typeof t&&i.test(t)&&RegExp.$1.length<=20}function y(t){if(w(t))return RegExp.$1}function b(t,e){var n=r.decodeURL(t);if(e=e||!1,n.screen_name=y(t),n.screen_name)return r.url("https://twitter.com/intent/"+(e?"follow":"user"),n)}function _(t){return"string"==typeof t&&u.test(t)}function E(t){return"string"==typeof t&&o.test(t)}t.exports={isHashTag:_,hashTag:function(t,e){if(e=void 0===e||e,_(t))return(e?"#":"")+RegExp.$1},isScreenName:w,screenName:y,isStatus:E,status:function(t){return E(t)&&RegExp.$1},intentForProfileURL:b,intentForFollowURL:function(t){return b(t,!0)},isTwitterURL:function(t){return s.test(t)},isTwimgURL:function(t){return a.test(t)},isIntentURL:function(t){return c.test(t)},isSettingsURL:function(t){return m.test(t)},isWidgetIframeURL:function(t){return v.test(t)},isSearchUrl:function(t){return g.test(t)},regexen:{profile:i},momentId:function(t){return l.test(t)&&RegExp.$1},collectionId:function(t){return d.test(t)&&RegExp.$1},intentType:function(t){return c.test(t)&&RegExp.$1},likesScreenName:function(t){return f.test(t)&&RegExp.$1},listScreenNameAndSlug:function(t){var e,n,r;if(h.test(t)){e=RegExp.$1,n=RegExp.$2;try{r=decodeURIComponent(n)}catch(t){}return{ownerScreenName:e,slug:r||n}}return!1},eventId:function(t){return p.test(t)&&RegExp.$1}}},function(t,e,n){var r=n(0),i=[!0,1,"1","on","ON","true","TRUE","yes","YES"],o=[!1,0,"0","off","OFF","false","FALSE","no","NO"];function s(t){return void 0!==t&&null!==t&&""!==t}function a(t){return c(t)&&t%1==0}function u(t){return c(t)&&!a(t)}function c(t){return s(t)&&!isNaN(t)}function d(t){return r.contains(o,t)}function l(t){return r.contains(i,t)}t.exports={hasValue:s,isInt:a,isFloat:u,isNumber:c,isString:function(t){return"string"===r.toType(t)},isArray:function(t){return s(t)&&"array"==r.toType(t)},isTruthValue:l,isFalseValue:d,asInt:function(t){if(a(t))return parseInt(t,10)},asFloat:function(t){if(u(t))return t},asNumber:function(t){if(c(t))return t},asBoolean:function(t){return!(!s(t)||!l(t)&&(d(t)||!t))}}},function(t,e){t.exports=document},function(t,e,n){var r=n(1),i=n(20),o=n(45);i.hasPromiseSupport()||(r.Promise=o),t.exports=r.Promise},function(t,e,n){var r=n(0);t.exports=function(t,e){var n=Array.prototype.slice.call(arguments,2);return function(){var i=r.toRealArray(arguments);return t.apply(e,n.concat(i))}}},function(t,e){t.exports=location},function(t,e,n){var r=n(47);t.exports=new r("__twttr")},function(t,e,n){var r=n(0),i=/\b([\w-_]+)\b/g;function o(t){return new RegExp("\\b"+t+"\\b","g")}function s(t,e){t.classList?t.classList.add(e):o(e).test(t.className)||(t.className+=" "+e)}function a(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(o(e)," ")}function u(t,e){return t.classList?t.classList.contains(e):r.contains(c(t),e)}function c(t){return r.toRealArray(t.classList?t.classList:t.className.match(i))}t.exports={add:s,remove:a,replace:function(t,e,n){if(t.classList&&u(t,e))return a(t,e),void s(t,n);t.className=t.className.replace(o(e),n)},toggle:function(t,e,n){return void 0===n&&t.classList&&t.classList.toggle?t.classList.toggle(e,n):(n?s(t,e):a(t,e),n)},present:u,list:c}},function(t,e,n){var r=n(4),i=n(0);function o(t){return encodeURIComponent(t).replace(/\+/g,"%2B").replace(/'/g,"%27")}function s(t){return decodeURIComponent(t)}function a(t){var e=[];return i.forIn(t,function(t,n){var s=o(t);i.isType("array",n)||(n=[n]),n.forEach(function(t){r.hasValue(t)&&e.push(s+"="+o(t))})}),e.sort().join("&")}function u(t){var e={};return t?(t.split("&").forEach(function(t){var n=t.split("="),r=s(n[0]),o=s(n[1]);if(2==n.length){if(!i.isType("array",e[r]))return r in e?(e[r]=[e[r]],void e[r].push(o)):void(e[r]=o);e[r].push(o)}}),e):{}}t.exports={url:function(t,e){return a(e).length>0?i.contains(t,"?")?t+"&"+a(e):t+"?"+a(e):t},decodeURL:function(t){var e=t&&t.split("?");return 2==e.length?u(e[1]):{}},decode:u,encode:a,encodePart:o,decodePart:s}},function(t,e,n){var r=n(8),i=n(1),o=n(0),s={},a=o.contains(r.href,"tw_debug=true");function u(){}function c(){}function d(){return i.performance&&+i.performance.now()||+new Date}function l(t,e){if(i.console&&i.console[t])switch(e.length){case 1:i.console[t](e[0]);break;case 2:i.console[t](e[0],e[1]);break;case 3:i.console[t](e[0],e[1],e[2]);break;case 4:i.console[t](e[0],e[1],e[2],e[3]);break;case 5:i.console[t](e[0],e[1],e[2],e[3],e[4]);break;default:0!==e.length&&i.console.warn&&i.console.warn("too many params passed to logger."+t)}}t.exports={devError:u,devInfo:c,devObject:function(t,e){},publicError:function(){l("error",o.toRealArray(arguments))},publicLog:function(){l("info",o.toRealArray(arguments))},time:function(t){a&&(s[t]=d())},timeEnd:function(t){a&&s[t]&&(d(),s[t])}}},function(t,e,n){var r=n(19),i=n(4),o=n(11),s=n(0),a=n(116);t.exports=function(t){var e=t.href&&t.href.split("?")[1],n=e?o.decode(e):{},u={lang:a(t),width:t.getAttribute("data-width")||t.getAttribute("width"),height:t.getAttribute("data-height")||t.getAttribute("height"),related:t.getAttribute("data-related"),partner:t.getAttribute("data-partner")};return i.asBoolean(t.getAttribute("data-dnt"))&&r.setOn(),s.forIn(u,function(t,e){var r=n[t];n[t]=i.hasValue(r)?r:e}),s.compact(n)}},function(t,e,n){var r=n(79),i=n(22);t.exports=function(){var t="data-twitter-extracted-"+i.generate();return function(e,n){return r(e,n).filter(function(e){return!e.hasAttribute(t)}).map(function(e){return e.setAttribute(t,"true"),e})}}},function(t,e){function n(t,e,n,r,i,o){this.factory=t,this.Sandbox=e,this.srcEl=o,this.targetEl=i,this.parameters=r,this.className=n}n.prototype.destroy=function(){this.srcEl=this.targetEl=null},t.exports=n},function(t,e,n){var r=n(6),i=n(49),o=n(19),s=n(4),a=n(0);t.exports=function(t,e,n){var u;return t=t||[],e=e||{},u="ƒ("+t.join(", ")+", target, [options]);",function(){var c,d,l,f,h=Array.prototype.slice.apply(arguments,[0,t.length]),p=Array.prototype.slice.apply(arguments,[t.length]);return p.forEach(function(t){t&&(t.nodeType!==Node.ELEMENT_NODE?a.isType("function",t)?c=t:a.isType("object",t)&&(d=t):l=t)}),h.length!==t.length||0===p.length?(c&&a.async(function(){c(!1)}),r.reject(new Error("Not enough parameters. Expected: "+u))):l?(d=a.aug({},d||{},e),t.forEach(function(t){d[t]=h.shift()}),s.asBoolean(d.dnt)&&o.setOn(),f=i.addWidget(n(d,l)),c&&f.then(c,function(){c(!1)}),f):(c&&a.async(function(){c(!1)}),r.reject(new Error("No target element specified. Expected: "+u)))}}},function(t,e,n){var r=n(99),i=n(2),o=n(0);function s(t,e){return function(){try{e.resolve(t.call(this))}catch(t){e.reject(t)}}}t.exports={sync:function(t,e){t.call(e)},read:function(t,e){var n=new i;return r.read(s(t,n),e),n.promise},write:function(t,e){var n=new i;return r.write(s(t,n),e),n.promise},defer:function(t,e,n){var a=new i;return o.isType("function",t)&&(n=e,e=t,t=1),r.defer(t,s(e,a),n),a.promise}}},function(t,e,n){var r=n(9),i=["https://syndication.twitter.com","https://cdn.syndication.twimg.com","https://localhost.twitter.com:8444"],o=["https://syndication.twitter.com","https://localhost.twitter.com:8445"],s=function(t,e){return t.indexOf(e)>-1},a=function(){var t=r.get("backendHost");return t&&s(i,t)?t:"https://cdn.syndication.twimg.com"},u=function(){var t=r.get("settingsSvcHost");return t&&s(o,t)?t:"https://syndication.twitter.com"};function c(t,e){var n=[t];return e.forEach(function(t){n.push(function(t){var e=(t||"").toString(),n="/"===e.slice(0,1)?1:0,r=function(t){return"/"===t.slice(-1)}(e)?-1:void 0;return e.slice(n,r)}(t))}),n.join("/")}t.exports={cookieConsent:function(t){var e=t||[];return e.unshift("cookie/consent"),c(u(),e)},eventVideo:function(t){var e=t||[];return e.unshift("video/event"),c(a(),e)},grid:function(t){var e=t||[];return e.unshift("grid/collection"),c(a(),e)},moment:function(t){var e=t||[];return e.unshift("moments"),c(a(),e)},settings:function(t){var e=t||[];return e.unshift("settings"),c(u(),e)},timeline:function(t){var e=t||[];return e.unshift("timeline"),c(a(),e)},tweetBatch:function(t){var e=t||[];return e.unshift("tweets.json"),c(a(),e)},video:function(t){var e=t||[];return e.unshift("widgets/video"),c(a(),e)}}},function(t,e,n){var r=n(5),i=n(8),o=n(35),s=n(77),a=n(4),u=n(32),c=!1,d=/https?:\/\/([^/]+).*/i;t.exports={setOn:function(){c=!0},enabled:function(t,e){return!!(c||a.asBoolean(u.val("dnt"))||s.isUrlSensitive(e||i.host)||o.isFramed()&&s.isUrlSensitive(o.rootDocumentLocation())||(t=d.test(t||r.referrer)&&RegExp.$1)&&s.isUrlSensitive(t))}}},function(t,e,n){var r=n(5),i=n(12),o=n(92),s=n(1),a=n(0),u=o.userAgent;function c(t){return/(Trident|MSIE|Edge[/ ]?\d)/.test(t=t||u)}t.exports={retina:function(t){return(t=t||s).devicePixelRatio?t.devicePixelRatio>=1.5:!!t.matchMedia&&t.matchMedia("only screen and (min-resolution: 144dpi)").matches},anyIE:c,ie9:function(t){return/MSIE 9/.test(t=t||u)},ie10:function(t){return/MSIE 10/.test(t=t||u)},ios:function(t){return/(iPad|iPhone|iPod)/.test(t=t||u)},android:function(t){return/^Mozilla\/5\.0 \(Linux; (U; )?Android/.test(t=t||u)},canPostMessage:function(t,e){return t=t||s,e=e||u,t.postMessage&&!(c(e)&&t.opener)},touch:function(t,e,n){return t=t||s,e=e||o,n=n||u,"ontouchstart"in t||/Opera Mini/.test(n)||e.msMaxTouchPoints>0},cssTransitions:function(){var t=r.body.style;return void 0!==t.transition||void 0!==t.webkitTransition||void 0!==t.mozTransition||void 0!==t.oTransition||void 0!==t.msTransition},hasPromiseSupport:function(){return!!(s.Promise&&s.Promise.resolve&&s.Promise.reject&&s.Promise.all&&s.Promise.race&&(new s.Promise(function(e){t=e}),a.isType("function",t)));var t},hasIntersectionObserverSupport:function(){return!!s.IntersectionObserver},hasPerformanceInformation:function(){return s.performance&&s.performance.getEntriesByType},hasLocalStorageSupport:function(){try{return s.localStorage.setItem("local_storage_support_test","true"),void 0!==s.localStorage}catch(t){return i.devError("window.localStorage is not supported:",t),!1}}}},function(t,e,n){var r=n(6),i=n(2);function o(t,e){return t.then(e,e)}function s(t){return t instanceof r}t.exports={always:o,allResolved:function(t){var e;return void 0===t?r.reject(new Error("undefined is not an object")):Array.isArray(t)?(e=t.length)?new r(function(n,r){var i=0,o=[];function a(){(i+=1)===e&&(0===o.length?r():n(o))}function u(t){o.push(t),a()}t.forEach(function(t){s(t)?t.then(u,a):u(t)})}):r.resolve([]):r.reject(new Error("Type error"))},some:function(t){var e;return e=(t=t||[]).length,t=t.filter(s),e?e!==t.length?r.reject("non-Promise passed to .some"):new r(function(e,n){var r=0;function i(){(r+=1)===t.length&&n()}t.forEach(function(t){t.then(e,i)})}):r.reject("no promises passed to .some")},isPromise:s,allSettled:function(t){function e(){}return r.all((t||[]).map(function(t){return o(t,e)}))},timeout:function(t,e){var n=new i;return setTimeout(function(){n.reject(new Error("Promise timed out"))},e),t.then(function(t){n.resolve(t)},function(t){n.reject(t)}),n.promise}}},function(t,e){var n="i",r=0,i=0;t.exports={generate:function(){return n+String(+new Date)+Math.floor(1e5*Math.random())+r++},deterministic:function(){return n+String(i++)}}},function(t,e,n){var r=n(46),i=n(48),o=n(0);t.exports=o.aug(r.get("events")||{},i.Emitter)},function(t,e,n){var r=n(25),i=n(107);t.exports=r.build([i])},function(t,e,n){var r=n(37),i=n(104),o=n(7);(r=Object.create(r)).build=o(r.build,null,i),t.exports=r},function(t,e,n){var r=n(37),i=n(38),o=n(7);(r=Object.create(r)).build=o(r.build,null,i),t.exports=r},function(t,e,n){var r=n(81),i=n(73),o=n(82),s=n(8),a=n(68),u=n(72),c=n(19),d=n(4),l=n(22),f=n(0);function h(t){if(!t||!t.headers)throw new Error("unexpected response schema");return{html:t.body,config:t.config,pollInterval:1e3*parseInt(t.headers.xPolling,10)||null,maxCursorPosition:t.headers.maxPosition,minCursorPosition:t.headers.minPosition}}function p(t){if(t&&t.headers)throw new Error(t.headers.status);throw t instanceof Error?t:new Error(t)}t.exports=function(t){t.params({instanceId:{required:!0,fallback:l.deterministic},lang:{required:!0,transform:a.matchLanguage,fallback:"en"},tweetLimit:{transform:d.asInt}}),t.defineProperty("endpoint",{get:function(){throw new Error("endpoint not specified")}}),t.defineProperty("pollEndpoint",{get:function(){return this.endpoint}}),t.define("cbId",function(t){var e=t?"_new":"_old";return"tl_"+this.params.instanceId+"_"+this.id+e}),t.define("queryParams",function(){return{lang:this.params.lang,tz:u.getTimezoneOffset(),t:r(),domain:s.host,tweet_limit:this.params.tweetLimit,dnt:c.enabled()}}),t.define("fetch",function(){return i.fetch(this.endpoint,this.queryParams(),o,this.cbId()).then(h,p)}),t.define("poll",function(t,e){var n,r;return n={since_id:(t=t||{}).sinceId,max_id:t.maxId,min_position:t.minPosition,max_position:t.maxPosition},r=f.aug(this.queryParams(),n),i.fetch(this.pollEndpoint,r,o,this.cbId(e)).then(h,p)})}},function(t,e,n){var r=n(48).makeEmitter();t.exports={emitter:r,START:"start",ALL_WIDGETS_RENDER_START:"all_widgets_render_start",ALL_WIDGETS_RENDER_END:"all_widgets_render_end",ALL_WIDGETS_AND_IMAGES_LOADED:"all_widgets_and_images_loaded"}},function(t,e,n){var r=n(5),i=n(0);t.exports=function(t,e,n){var o;if(n=n||r,t=t||{},e=e||{},t.name){try{o=n.createElement('')}catch(e){(o=n.createElement("iframe")).name=t.name}delete t.name}else o=n.createElement("iframe");return t.id&&(o.id=t.id,delete t.id),o.allowtransparency="true",o.scrolling="no",o.setAttribute("frameBorder",0),o.setAttribute("allowTransparency",!0),i.forIn(t,function(t,e){o.setAttribute(t,e)}),i.forIn(e,function(t,e){o.style[t]=e}),o}},function(t,e,n){var r=n(1).JSON;t.exports={stringify:r.stringify||r.encode,parse:r.parse||r.decode}},function(t,e,n){var r=n(0),i=n(40);t.exports={closest:function t(e,n,o){var s;if(n)return o=o||n&&n.ownerDocument,s=r.isType("function",e)?e:function(t){return function(e){return!!e.tagName&&i(e,t)}}(e),n===o?s(n)?n:void 0:s(n)?n:t(s,n.parentNode,o)}}},function(t,e,n){var r,i=n(5);function o(t){var e,n,o,s=0;for(r={},e=(t=t||i).getElementsByTagName("meta");e[s];s++){if(n=e[s],/^twitter:/.test(n.getAttribute("name")))o=n.getAttribute("name").replace(/^twitter:/,"");else{if(!/^twitter:/.test(n.getAttribute("property")))continue;o=n.getAttribute("property").replace(/^twitter:/,"")}r[o]=n.getAttribute("content")||n.getAttribute("value")}}o(),t.exports={init:o,val:function(t){return r[t]}}},function(t,e,n){var r=n(5),i=n(30),o=n(19),s=n(0),a=n(41),u=n(9),c=n(3),d=n(31),l=a.version,f=u.get("clientEventEndpoint")||"https://syndication.twitter.com/i/jot",h=1;function p(t){return s.aug({client:"tfw"},t||{})}function m(t,e,n){return e=e||{},s.aug({},e,{_category_:t,triggered_on:e.triggered_on||+new Date,dnt:o.enabled(n)})}t.exports={extractTermsFromDOM:function t(e,n){var r;return n=n||{},e&&e.nodeType===Node.ELEMENT_NODE?((r=e.getAttribute("data-scribe"))&&r.split(" ").forEach(function(t){var e=t.trim().split(":"),r=e[0],i=e[1];r&&i&&!n[r]&&(n[r]=i)}),t(e.parentNode,n)):n},clickEventElement:function(t){var e=d.closest("[data-expanded-url]",t),n=e&&e.getAttribute("data-expanded-url");return n&&c.isTwitterURL(n)?"twitter_url":"url"},flattenClientEventPayload:function(t,e){return s.aug({},e,{event_namespace:t})},formatGenericEventData:m,formatClientEventData:function(t,e,n){var i=t&&t.widget_origin||r.referrer;return(t=m("tfw_client_event",t,i)).client_version=l,t.format_version=void 0!==n?n:1,e||(t.widget_origin=i),t},formatClientEventNamespace:p,formatTweetAssociation:function(t,e){var n={};return(e=e||{}).association_namespace=p(t),n[h]=e,n},noticeSeen:function(t){return"notice"===t.element&&"seen"===t.action},splitLogEntry:function(t){var e,n,r,i,o;return t.item_ids&&t.item_ids.length>1?(e=Math.floor(t.item_ids.length/2),n=t.item_ids.slice(0,e),r={},i=t.item_ids.slice(e),o={},n.forEach(function(e){r[e]=t.item_details[e]}),i.forEach(function(e){o[e]=t.item_details[e]}),[s.aug({},t,{item_ids:n,item_details:r}),s.aug({},t,{item_ids:i,item_details:o})]):[t]},stringify:function(t){var e,n=Array.prototype.toJSON;return delete Array.prototype.toJSON,e=i.stringify(t),n&&(Array.prototype.toJSON=n),e},AUDIENCE_ENDPOINT:"https://syndication.twitter.com/i/jot/syndication",CLIENT_EVENT_ENDPOINT:f,RUFOUS_REDIRECT:"https://platform.twitter.com/jot.html"}},function(t,e,n){var r=n(10),i={},o=-1,s={};function a(t){var e=t.getAttribute("data-twitter-event-id");return e||(t.setAttribute("data-twitter-event-id",++o),o)}function u(t,e,n){var r=0,i=t&&t.length||0;for(r=0;r0&&(n=n.slice(0,1),o.canFlushOneItem(n[0])||(n[0].input.data.message=""),c(n)),a&&(u(a)?c:function(t){i.init(),t.forEach(function(t){var e=t.input.namespace,n=t.input.data,r=t.input.offsite,o=t.input.version;i.clientEvent(e,n,r,o)}),i.flush().then(function(){t.forEach(function(t){t.taskDoneDeferred.resolve()})},function(){t.forEach(function(t){t.taskDoneDeferred.reject()})})})(a)}});function u(t){return 1===t.length&&o.canFlushOneItem(t[0])}function c(t){t.forEach(function(t){var e=t.input.namespace,n=t.input.data,r=t.input.offsite,i=t.input.version;o.clientEvent(e,n,r,i),t.taskDoneDeferred.resolve()})}t.exports={scribe:function(t,e,n,r){return a.add({namespace:t,data:e,offsite:n,version:r})},pause:function(){a.pause()},resume:function(){a.resume()}}},function(t,e,n){var r=n(102),i=n(103),o=n(0);t.exports={couple:function(){return o.toRealArray(arguments)},build:function(t,e,n){var o=new t;return(e=i(r(e||[]))).forEach(function(t){t.call(null,o)}),o.build(n)}}},function(t,e,n){var r=n(105),i=n(0),o=n(39);function s(){this.Component=this.factory(),this._adviceArgs=[],this._lastArgs=[]}i.aug(s.prototype,{factory:o,build:function(t){var e=this;return this.Component,i.aug(this.Component.prototype.boundParams,t),this._adviceArgs.concat(this._lastArgs).forEach(function(t){(function(t,e,n){var r=this[e];if(!r)throw new Error(e+" does not exist");this[e]=t(r,n)}).apply(e.Component.prototype,t)}),delete this._lastArgs,delete this._adviceArgs,this.Component},params:function(t){var e=this.Component.prototype.paramConfigs;t=t||{},this.Component.prototype.paramConfigs=i.aug({},t,e)},define:function(t,e){if(t in this.Component.prototype)throw new Error(t+" has previously been defined");this.override(t,e)},defineStatic:function(t,e){this.Component[t]=e},override:function(t,e){this.Component.prototype[t]=e},defineProperty:function(t,e){if(t in this.Component.prototype)throw new Error(t+" has previously been defined");this.overrideProperty(t,e)},overrideProperty:function(t,e){var n=i.aug({configurable:!0},e);Object.defineProperty(this.Component.prototype,t,n)},before:function(t,e){this._adviceArgs.push([r.before,t,e])},after:function(t,e){this._adviceArgs.push([r.after,t,e])},around:function(t,e){this._adviceArgs.push([r.around,t,e])},last:function(t,e){this._lastArgs.push([r.after,t,e])}}),t.exports=s},function(t,e,n){var r=n(0);function i(){return!0}function o(t){return t}t.exports=function(){function t(t){var e=this;t=t||{},this.params=Object.keys(this.paramConfigs).reduce(function(n,s){var a=[],u=e.boundParams,c=e.paramConfigs[s],d=c.validate||i,l=c.transform||o;if(s in u&&a.push(u[s]),s in t&&a.push(t[s]),a="fallback"in c?a.concat(c.fallback):a,n[s]=function(t,e,n){var i=null;return t.some(function(t){if(t=r.isType("function",t)?t():t,e(t))return i=n(t),!0}),i}(a,d,l),c.required&&null==n[s])throw new Error(s+" is a required parameter");return n},{}),this.initialize()}return r.aug(t.prototype,{paramConfigs:{},boundParams:{},initialize:function(){}}),t}},function(t,e,n){var r=n(1).HTMLElement,i=r.prototype.matches||r.prototype.matchesSelector||r.prototype.webkitMatchesSelector||r.prototype.mozMatchesSelector||r.prototype.msMatchesSelector||r.prototype.oMatchesSelector;t.exports=function(t,e){if(i)return i.call(t,e)}},function(t){t.exports={version:"bbec9cd:1564009982483"}},function(t,e,n){var r,i=n(10),o=n(5),s=n(1),a=n(32),u=n(50),c=n(4),d=n(22),l="csptest";t.exports={inlineStyle:function(){var t=l+d.generate(),e=o.createElement("div"),n=o.createElement("style"),f="."+t+" { visibility: hidden; }";return!!o.body&&(c.asBoolean(a.val("widgets:csp"))&&(r=!1),void 0!==r?r:(e.style.display="none",i.add(e,t),n.type="text/css",n.appendChild(o.createTextNode(f)),o.body.appendChild(n),o.body.appendChild(e),r="hidden"===s.getComputedStyle(e).visibility,u(e),u(n),r))}}},function(t,e,n){var r=n(1);t.exports=function(t,e,n){var i,o=0;return n=n||null,function s(){var a=n||this,u=arguments,c=+new Date;if(r.clearTimeout(i),c-o>e)return o=c,void t.apply(a,u);i=r.setTimeout(function(){s.apply(a,u)},e)}}},function(t,e){t.exports=function(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}},function(t,e,n){ 2 | /*! 3 | * @overview es6-promise - a tiny implementation of Promises/A+. 4 | * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) 5 | * @license Licensed under MIT license 6 | * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE 7 | * @version v4.2.5+7f2b526d 8 | */var r;r=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,r=void 0,i=void 0,o=function(t,e){f[n]=t,f[n+1]=e,2===(n+=2)&&(i?i(h):w())},s="undefined"!=typeof window?window:void 0,a=s||{},u=a.MutationObserver||a.WebKitMutationObserver,c="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function l(){var t=setTimeout;return function(){return t(h,1)}}var f=new Array(1e3);function h(){for(var t=0;t=0&&this._handlers[t].splice(n,1):this._handlers[t]=[])},trigger:function(t,e){var n=this._handlers&&this._handlers[t];(e=e||{}).type=t,n&&n.forEach(function(t){r.async(i(t,this,e))})}};t.exports={Emitter:o,makeEmitter:function(){return r.aug(function(){},o)}}},function(t,e,n){var r=n(98),i=n(74),o=n(6),s=n(21),a=n(7),u=n(0),c=new i(function(t){var e=function(t){return t.reduce(function(t,e){return t[e.className]=t[e.className]||[],t[e.className].push(e),t},{})}(t.map(r.fromRawTask));u.forIn(e,function(t,e){s.allSettled(e.map(function(t){return t.initialize()})).then(function(){e.forEach(function(t){o.all([t.hydrate(),t.insertIntoDom()]).then(a(t.render,t)).then(a(t.success,t),a(t.fail,t))})})})});t.exports={addWidget:function(t){return c.add(t)}}},function(t,e,n){var r=n(17);t.exports=function(t){return r.write(function(){t&&t.parentNode&&t.parentNode.removeChild(t)})}},function(t,e,n){n(12),t.exports={log:function(t,e){}}},function(t,e,n){var r=n(1);function i(t){return(t=t||r).getSelection&&t.getSelection()}t.exports={getSelection:i,getSelectedText:function(t){var e=i(t);return e?e.toString():""}}},function(t,e,n){var r=n(5),i=n(1),o=n(2),s=2e4;t.exports=function(t){var e=new o,n=r.createElement("img");return n.onload=n.onerror=function(){i.setTimeout(e.resolve,50)},n.src=t,i.setTimeout(e.reject,s),e.promise}},function(t,e,n){var r=n(108);t.exports=function(t){t.define("createElement",r),t.define("createFragment",r),t.define("htmlToElement",r),t.define("hasSelectedText",r),t.define("addRootClass",r),t.define("removeRootClass",r),t.define("hasRootClass",r),t.define("prependStyleSheet",r),t.define("appendStyleSheet",r),t.define("prependCss",r),t.define("appendCss",r),t.define("makeVisible",r),t.define("injectWidgetEl",r),t.define("matchHeightToContent",r),t.define("matchWidthToContent",r)}},function(t,e){t.exports=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments))}}},function(t,e,n){var r=n(15),i=n(117),o=n(57);t.exports=function(t,e,n){return new r(i,o,"twitter-dm-button",t,e,n)}},function(t,e,n){var r=n(58),i=n(24);t.exports=r.isSupported()?r:i},function(t,e,n){var r=n(25),i=n(118);t.exports=r.build([i])},function(t,e,n){var r=n(15),i=n(121),o=n(60);t.exports=function(t,e,n){return new r(i,o,"twitter-follow-button",t,e,n)}},function(t,e,n){var r=n(25),i=n(122);t.exports=r.build([i])},function(t,e,n){var r=n(15),i=n(129),o=n(24);t.exports=function(t,e,n){return new r(i,o,"twitter-moment",t,e,n)}},function(t,e,n){var r=n(15),i=n(131),o=n(24);t.exports=function(t,e,n){return new r(i,o,"periscope-on-air",t,e,n)}},function(t,e,n){var r=n(80),i=n(133),o=n(137),s=n(139),a=n(141),u=n(143),c={collection:i,event:o,likes:s,list:a,profile:u,url:l},d=[u,s,i,a,o];function l(t){return r(d,function(e){try{return new e(t)}catch(t){}})}t.exports=function(t){return t?function(t){var e,n;return e=(t.sourceType+"").toLowerCase(),(n=c[e])?new n(t):null}(t)||l(t):null}},function(t,e,n){var r=n(15),i=n(145),o=n(24);t.exports=function(t,e,n){return new r(i,o,"twitter-timeline",t,e,n)}},function(t,e,n){var r=n(15),i=n(147),o=n(57);t.exports=function(t,e,n){return new r(i,o,"twitter-tweet",t,e,n)}},function(t,e,n){var r=n(15),i=n(149),o=n(60);t.exports=function(t,e,n){var s=t&&t.type||"share";return new r(i,o,"hashtag"==s?"twitter-hashtag-button":"mention"==s?"twitter-mention-button":"twitter-share-button",t,e,n)}},function(t,e,n){var r=n(36),i=n(35),o=n(0);t.exports=function(t){var e={widget_origin:i.rootDocumentLocation(),widget_frame:i.isFramed()?i.currentDocumentLocation():null,duration_ms:t.duration,item_ids:t.widgetIds||[]},n=o.aug(t.namespace,{page:"page",component:"performance"});r.scribe(n,e)}},function(t,e,n){var r=n(0),i=n(134),o=["ar","fa","he","ur"];t.exports={isRtlLang:function(t){return t=String(t).toLowerCase(),r.contains(o,t)},matchLanguage:function(t){return t=(t=(t||"").toLowerCase()).replace("_","-"),i(t)?t:(t=t.replace(/-.*/,""),i(t)?t:"en")}}},function(t,e,n){var r=n(110),i=n(113);function o(t){return r.settingsLoaded().then(function(e){return e[t]})}function s(){return o("experiments")}t.exports={shouldObtainCookieConsent:function(){return o("shouldObtainCookieConsent")},getExperiments:s,getExperiment:function(t){return s().then(function(e){if(!e[t])throw new Error("Experiment not found");return e[t]})},getActiveExperimentDataString:function(){return s().then(function(t){var e=Object.keys(t).reduce(function(e,n){var r;return t[n].version&&(r=n.split("_").slice(-1)[0],e.push(r+";"+t[n].bucket)),e},[]);return i(e.join(","))})},getExperimentKeys:function(){return s().then(function(t){return Object.keys(t)})},load:function(){r.load()}}},function(t){t.exports={tweetButtonHtmlPath:"/widgets/tweet_button.0639d67d95b7680840758b6833f06d87.{{lang}}.html",followButtonHtmlPath:"/widgets/follow_button.0639d67d95b7680840758b6833f06d87.{{lang}}.html",hubHtmlPath:"/widgets/hub.html",widgetIframeHtmlPath:"/widgets/widget_iframe.0639d67d95b7680840758b6833f06d87.html",resourceBaseUrl:"https://platform.twitter.com"}},function(t,e,n){var r=n(3),i=n(95),o=n(23),s=n(11),a={favorite:["favorite","like"],follow:["follow"],like:["favorite","like"],retweet:["retweet"],tweet:["tweet"]};function u(t){this.srcEl=[],this.element=t}u.open=function(t,e,n){var u=(r.intentType(t)||"").toLowerCase();r.isTwitterURL(t)&&(function(t,e){i.open(t,{},e)}(t,n),e&&o.trigger("click",{target:e,region:"intent",type:"click",data:{}}),e&&a[u]&&a[u].forEach(function(n){o.trigger(n,{target:e,region:"intent",type:n,data:function(t,e){var n=s.decodeURL(e);switch(t){case"favorite":case"like":return{tweet_id:n.tweet_id};case"follow":return{screen_name:n.screen_name,user_id:n.user_id};case"retweet":return{source_tweet_id:n.tweet_id};default:return{}}}(u,t)})}))},t.exports=u},function(t,e){t.exports={getTimezoneOffset:function(){var t=(new Date).toString().match(/(GMT[+-]?\d+)/);return t&&t[0]||"GMT"}}},function(t,e,n){var r=n(5),i=n(9),o=n(2),s=n(0),a=n(11),u="cb",c=0;t.exports={fetch:function(t,e,n,d){var l,f,h;return d=function(t){if(t)return t.replace(/[^\w$]/g,"_")}(d||u+c++),l=i.fullPath(["callbacks",d]),f=r.createElement("script"),h=new o,e=s.aug({},e,{callback:l,suppress_response_codes:!0}),i.set(["callbacks",d],function(t){var e;t=(e=n(t||!1)).resp,e.success?h.resolve(t):h.reject(t),f.onload=f.onreadystatechange=null,f.parentNode&&f.parentNode.removeChild(f),i.unset(["callbacks",d])}),f.onerror=function(){h.reject(new Error("failed to fetch "+f.src))},f.src=a.url(t,e),f.async="async",r.body.appendChild(f),h.promise}}},function(t,e,n){var r=n(2),i=n(100),o=n(7);function s(t){this._inputsQueue=[],this._task=t,this._hasFlushBeenScheduled=!1}s.prototype.add=function(t){var e=new r;return this._inputsQueue.push({input:t,taskDoneDeferred:e}),this._hasFlushBeenScheduled||(this._hasFlushBeenScheduled=!0,i(o(this._flush,this))),e.promise},s.prototype._flush=function(){try{this._task.call(null,this._inputsQueue)}catch(t){this._inputsQueue.forEach(function(e){e.taskDoneDeferred.reject(t)})}this._inputsQueue=[],this._hasFlushBeenScheduled=!1},t.exports=s},function(t,e){t.exports=function(t,e){return t.reduce(function(t,n){var r=e(n);return t[r]=t[r]||[],t[r].push(n),t},{})}},function(t,e,n){var r=n(5),i=n(8),o=n(3);function s(t,e){var n,r;return e=e||i,/^https?:\/\//.test(t)?t:/^\/\//.test(t)?e.protocol+t:(n=e.host+(e.port.length?":"+e.port:""),0!==t.indexOf("/")&&((r=e.pathname.split("/")).pop(),r.push(t),t="/"+r.join("/")),[e.protocol,"//",n,t].join(""))}t.exports={absolutize:s,getCanonicalURL:function(){for(var t,e=r.getElementsByTagName("link"),n=0;e[n];n++)if("canonical"==(t=e[n]).rel)return s(t.href)},getScreenNameFromPage:function(){for(var t,e,n,i=[r.getElementsByTagName("a"),r.getElementsByTagName("link")],s=0,a=0,u=/\bme\b/;t=i[s];s++)for(a=0;e=t[a];a++)if(u.test(e.rel)&&(n=o.screenName(e.href)))return n}}},function(t,e,n){var r=n(8),i=/^[^#?]*\.(gov|mil)(:\d+)?([#?].*)?$/i,o={};function s(t){return t in o?o[t]:o[t]=i.test(t)}t.exports={isUrlSensitive:s,isHostPageSensitive:function(){return s(r.host)}}},function(t,e,n){var r=n(19),i=n(51),o=n(11),s=n(33),a=n(0),u=n(9).get("scribeCallback"),c=2083,d=[],l=o.url(s.CLIENT_EVENT_ENDPOINT,{dnt:0,l:""}),f=encodeURIComponent(l).length;function h(t,e,n,r){var i=!a.isObject(t),o=!!e&&!a.isObject(e);i||o||(u&&u(arguments),p(s.formatClientEventNamespace(t),s.formatClientEventData(e,n,r),s.CLIENT_EVENT_ENDPOINT))}function p(t,e,n){var r,u;n&&a.isObject(t)&&a.isObject(e)&&(i.log(t,e),r=s.flattenClientEventPayload(t,e),u={l:s.stringify(r)},s.noticeSeen(t)&&(u.notice_seen=!0),r.dnt&&(u.dnt=1),w(o.url(n,u)))}function m(t,e,n,r){var i=!a.isObject(t),o=!!e&&!a.isObject(e);if(!i&&!o)return v(s.flattenClientEventPayload(s.formatClientEventNamespace(t),s.formatClientEventData(e,n,r)))}function v(t){return d.push(t),d}function g(t){return encodeURIComponent(t).length+3}function w(t){return(new Image).src=t}t.exports={canFlushOneItem:function(t){var e=g(s.stringify(t));return f+e1&&m({page:"widgets_js",component:"scribe_pixel",action:"batch_log"},{}),t=d,d=[],t.reduce(function(e,n,r){var i=e.length,o=i&&e[i-1];return r+1==t.length&&n.event_namespace&&"batch_log"==n.event_namespace.action&&(n.message=["entries:"+r,"requests:"+i].join("/")),function t(e){return Array.isArray(e)||(e=[e]),e.reduce(function(e,n){var r,i=s.stringify(n),o=g(i);return f+o1&&(e=e.concat(t(r))),e},[])}(n).forEach(function(t){var n=g(t);(!o||o.urlLength+n>c)&&(o={urlLength:f,items:[]},e.push(o)),o.urlLength+=n,o.items.push(t)}),e},[]).map(function(t){var e={l:t.items};return r.enabled()&&(e.dnt=1),w(o.url(s.CLIENT_EVENT_ENDPOINT,e))})},interaction:function(t,e,n,r){var i=s.extractTermsFromDOM(t.target||t.srcElement);i.action=r||"click",h(i,e,n)}}},function(t,e,n){var r=n(0),i=n(40);t.exports=function(t,e){return i(t,e)?[t]:r.toRealArray(t.querySelectorAll(e))}},function(t,e){t.exports=function(t,e,n){for(var r,i=0;ie?{coordinate:0,size:e}:{coordinate:n(e)-n(t),size:t}}function v(t,e,n){var i,o;e=r.parse(e),n=n||{},i=m(e.width,n.width||h),e.left=i.coordinate,e.width=i.size,o=m(e.height,n.height||p),e.top=o.coordinate,e.height=o.size,this.win=t,this.features=function(t){var e=[];return l.forIn(t,function(t,n){e.push(t+"="+n)}),e.join(",")}(e)}r=(new o).defaults({width:550,height:520,personalbar:"0",toolbar:"0",location:"1",scrollbars:"1",resizable:"1"}),v.prototype.open=function(t,e){var n=e&&"click"==e.type&&a.closest("a",e.target),r=e&&(e.altKey||e.metaKey||e.shiftKey),i=n&&(u.ios()||u.android());if(c.isTwitterURL(t))return r||i?this:(this.name=f+d.generate(),this.popup=this.win.open(t,this.name,this.features),e&&s.preventDefault(e),this)},v.open=function(t,e,n){return new v(i,e).open(t,n)},t.exports=v},function(t,e,n){var r=n(4),i=n(0);function o(){this.assertions=[],this._defaults={}}o.prototype.assert=function(t,e){return this.assertions.push({fn:t,msg:e||"assertion failed"}),this},o.prototype.defaults=function(t){return this._defaults=t||this._defaults,this},o.prototype.require=function(t){var e=this;return(t=Array.isArray(t)?t:i.toRealArray(arguments)).forEach(function(t){e.assert(function(t){return function(e){return r.hasValue(e[t])}}(t),"required: "+t)}),this},o.prototype.parse=function(t){var e,n;if(e=i.aug({},this._defaults,t||{}),(n=this.assertions.reduce(function(t,n){return n.fn(e)||t.push(n.msg),t},[])).length>0)throw new Error(n.join("\n"));return e},t.exports=o},function(t,e,n){var r=n(5),i=n(6),o=n(21),s=n(49),a=n(32),u=n(9),c=n(36),d=n(23),l=n(4),f=n(0),h=n(69),p=n(114),m=n(28);function v(){var t=a.val("widgets:autoload")||!0;return!l.isFalseValue(t)&&(l.isTruthValue(t)?r.body:r.querySelectorAll(t))}function g(t){var e,n;return t=(t=t||r.body).length?f.toRealArray(t):[t],c.pause(),n=t.reduce(function(t,e){return t.concat(p.reduce(function(t,n){return t.concat(n(e))},[]))},[]),m.emitter.trigger(m.ALL_WIDGETS_RENDER_START,{widgets:n}),e=o.allResolved(n.map(function(t){return s.addWidget(t)})).then(function(t){d.trigger("loaded",{widgets:t}),t&&t.length&&m.emitter.trigger(m.ALL_WIDGETS_RENDER_END,{widgets:t})}),o.always(e,function(){c.resume()}),e}t.exports={load:g,loadPage:function(){var t=v();return h.load(),!1===t?i.resolve():(u.set("widgets.loaded",!0),g(t))},_getPageLoadTarget:v}},function(t,e,n){var r=n(10),i=n(17),o=n(23),s=n(50),a=n(6),u=n(21);function c(t,e){this._widget=null,this._sandbox=null,this._hydrated=!1,this._insertedIntoDom=!1,this._Sandbox=t.Sandbox,this._factory=t.factory,this._widgetParams=t.parameters,this._resolve=e,this._className=t.className,this._renderedClassName=t.className+"-rendered",this._errorClassName=t.className+"-error",this._srcEl=t.srcEl,this._targetGlobal=function(t){return(t.srcEl||t.targetEl).ownerDocument.defaultView}(t),this._insertionStrategy=function(e){var n=t.srcEl,r=t.targetEl;n?r.insertBefore(e,n):r.appendChild(e)}}c.fromRawTask=function(t){return new c(t.input,t.taskDoneDeferred.resolve)},c.prototype.initialize=function(){var t=this,e=new this._Sandbox(this._targetGlobal);return this._factory(this._widgetParams,e).then(function(n){return t._widget=n,t._sandbox=e,n})},c.prototype.insertIntoDom=function(){var t=this;return this._widget?this._sandbox.insert(this._widget.id,{class:[this._className,this._renderedClassName].join(" ")},null,this._insertionStrategy).then(function(){t._insertedIntoDom=!0}):a.reject(new Error("cannot insert widget into DOM before it is initialized"))},c.prototype.hydrate=function(){var t=this;return this._widget?this._widget.hydrate().then(function(){t._hydrated=!0}):a.reject(new Error("cannot hydrate widget before it is initialized"))},c.prototype.render=function(){var t=this;function e(e){return s(t._sandbox.sandboxEl).then(function(){return a.reject(e)})}return this._hydrated?this._insertedIntoDom?t._widget.render(t._sandbox).then(function(){return t._sandbox.onResize(function(){return t._widget.resize().then(function(){o.trigger("resize",{target:t._sandbox.sandboxEl})})}),t._widget.show()}).then(function(){return s(t._srcEl).then(function(){return t._sandbox.sandboxEl})},e):e(new Error("cannot render widget before DOM insertion")):e(new Error("cannot render widget before hydration"))},c.prototype.fail=function(){var t=this;return this._srcEl?u.always(i.write(function(){r.add(t._srcEl,t._errorClassName)}),function(){o.trigger("rendered",{target:t._srcEl}),t._resolve(t._srcEl)}):(t._resolve(),a.resolve())},c.prototype.success=function(){o.trigger("rendered",{target:this._sandbox.sandboxEl}),this._resolve(this._sandbox.sandboxEl)},t.exports=c},function(t,e,n){var r;!function(){"use strict";var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)};function o(){this.frames=[],this.lastId=0,this.raf=i,this.batch={hash:{},read:[],write:[],mode:null}}o.prototype.read=function(t,e){var n=this.add("read",t,e),r=n.id;return this.batch.read.push(n.id),"reading"===this.batch.mode||this.batch.scheduled?r:(this.scheduleBatch(),r)},o.prototype.write=function(t,e){var n=this.add("write",t,e),r=this.batch.mode,i=n.id;return this.batch.write.push(n.id),"writing"===r||"reading"===r||this.batch.scheduled?i:(this.scheduleBatch(),i)},o.prototype.defer=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=1);var r=this,i=t-1;return this.schedule(i,function(){r.run({fn:e,ctx:n})})},o.prototype.clear=function(t){if("function"==typeof t)return this.clearFrame(t);t=Number(t);var e=this.batch.hash[t];if(e){var n=this.batch[e.type],r=n.indexOf(t);delete this.batch.hash[t],~r&&n.splice(r,1)}},o.prototype.clearFrame=function(t){var e=this.frames.indexOf(t);~e&&this.frames.splice(e,1)},o.prototype.scheduleBatch=function(){var t=this;this.schedule(0,function(){t.batch.scheduled=!1,t.runBatch()}),this.batch.scheduled=!0},o.prototype.uniqueId=function(){return++this.lastId},o.prototype.flush=function(t){for(var e;e=t.shift();)this.run(this.batch.hash[e])},o.prototype.runBatch=function(){try{this.batch.mode="reading",this.flush(this.batch.read),this.batch.mode="writing",this.flush(this.batch.write),this.batch.mode=null}catch(t){throw this.runBatch(),t}},o.prototype.add=function(t,e,n){var r=this.uniqueId();return this.batch.hash[r]={id:r,fn:e,ctx:n,type:t}},o.prototype.run=function(t){var e=t.ctx||this,n=t.fn;if(delete this.batch.hash[t.id],!this.onError)return n.call(e);try{n.call(e)}catch(t){this.onError(t)}},o.prototype.loop=function(){var t,e=this,n=this.raf,r=!1;function i(){var t=e.frames.shift();e.frames.length?n(i):e.looping=!1,t&&t()}this.looping||(t=setTimeout(function(){r=!0,i()},500),n(function(){r||(clearTimeout(t),i())}),this.looping=!0)},o.prototype.schedule=function(t,e){return this.frames[t]?this.schedule(t+1,e):(this.loop(),this.frames[t]=e)};var s=new o;void 0!==t&&t.exports?t.exports=s:void 0===(r=function(){return s}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){var r=n(45).Promise;t.exports=r._asap},function(t,e,n){var r,i,o,s=n(5),a=n(1),u=n(29),c=n(19),d=n(2),l=n(6),f=n(51),h=n(33),p=n(0),m=n(24),v=n(9).get("scribeCallback"),g=Math.floor(1e3*Math.random())+"_",w="rufous-frame-"+g+"-",y="rufous-form-"+g+"-",b=0,_=!1,E=new d;function x(){var t=o.createElement("form"),e=o.createElement("input"),n=o.createElement("input");return b++,t.action=h.CLIENT_EVENT_ENDPOINT,t.method="POST",t.target=w+b,t.id=y+b,e.type="hidden",e.name="dnt",e.value=c.enabled(),n.type="hidden",n.name="tfw_redirect",n.value=h.RUFOUS_REDIRECT,t.appendChild(e),t.appendChild(n),t}function A(){var t=w+b;return u({id:t,name:t,width:0,height:0,border:0},{display:"none"},o.doc)}t.exports={clientEvent:function(t,e,n,i){(function(t,e){var n=!p.isObject(t),r=!!e&&!p.isObject(e),i=n||r;return i})(t,e)||(v&&v(arguments),E.promise.then(function(){!function(t,e){var n,i,s;p.isObject(t)&&p.isObject(e)&&(f.log(t,e),s=h.flattenClientEventPayload(t,e),(n=r.firstChild).value=+(+n.value||s.dnt||0),(i=o.createElement("input")).type="hidden",i.name="l",i.value=h.stringify(s),r.appendChild(i))}(h.formatClientEventNamespace(t),h.formatClientEventData(e,n,i))}))},flush:function(){return E.promise.then(function(){var t;return r.children.length<=2?l.reject():(t=l.all([o.doc.body.appendChild(r),o.doc.body.appendChild(i)]).then(function(t){var e=t[0],n=t[1];return n.addEventListener("load",function(){!function(t,e){return function(){var n=t.parentNode;n&&(n.removeChild(t),n.removeChild(e))}}(e,n)()}),e.submit(),t}),r=x(),i=A(),t)})},init:function(){return _?E.promise:((o=new m(a)).insert("rufous-sandbox",null,{display:"none"},function(t){s.body.appendChild(t)}).then(function(){o.setTitle("Twitter analytics iframe"),r=x(),i=A(),E.resolve([r,i])}),_=!0,E.promise)}}},function(t,e,n){var r=n(0);t.exports=function t(e){var n=[];return e.forEach(function(e){var i=r.isType("array",e)?t(e):[e];n=n.concat(i)}),n}},function(t,e){t.exports=function(t){return t.filter(function(e,n){return t.indexOf(e)===n})}},function(t,e,n){var r=n(38),i=n(0),o=n(106);function s(){r.apply(this,arguments)}s.prototype=Object.create(r.prototype),i.aug(s.prototype,{factory:o}),t.exports=s},function(t,e,n){var r=n(21),i=n(0),o=n(7);t.exports={before:function(t,e){return function(){var n,i=this,o=arguments;return n=e.apply(this,arguments),r.isPromise(n)?n.then(function(){return t.apply(i,o)}):t.apply(this,arguments)}},after:function(t,e){return function(){var n,i=this,o=arguments;function s(t,e){return r.isPromise(e)?e.then(function(){return t}):t}return n=t.apply(this,arguments),r.isPromise(n)?n.then(function(t){return s(t,e.apply(i,o))}):s(n,e.apply(this,arguments))}},around:function(t,e){return function(){var n=i.toRealArray(arguments);return n.unshift(o(t,this)),e.apply(this,n)}}}},function(t,e,n){var r=n(10),i=n(17),o=n(39),s=n(6),a=n(0);t.exports=function(){var t=o();function e(e){t.apply(this,arguments),Object.defineProperty(this,"targetGlobal",{value:e})}return e.prototype=Object.create(t.prototype),a.aug(e.prototype,{id:null,initialized:!1,width:0,height:0,sandboxEl:null,insert:function(){return s.reject()},onResize:function(){},addClass:function(t){var e=this.sandboxEl;return t=Array.isArray(t)?t:[t],i.write(function(){t.forEach(function(t){r.add(e,t)})})},removeClass:function(t){var e=this.sandboxEl;return t=Array.isArray(t)?t:[t],i.write(function(){t.forEach(function(t){r.remove(e,t)})})},styleSelf:function(t){var e=this;return i.write(function(){a.forIn(t,function(t,n){e.sandboxEl.style[t]=n})})}}),e}},function(t,e,n){var r=n(5),i=n(10),o=n(17),s=n(52),a=n(25),u=n(53),c=n(42),d=n(43),l=n(29),f=n(12),h=n(44),p=n(2),m=n(6),v=n(0),g=n(9),w=n(22),y=n(7),b={allowfullscreen:"true"},_={position:"absolute",visibility:"hidden",display:"block",width:"0px",height:"0px",padding:"0",border:"none"},E={position:"static",visibility:"visible"},x="SandboxRoot",A=".SandboxRoot { display: none; }",T=50;function S(t,e,n,r){return e=v.aug({id:t},b,e),n=v.aug({},_,n),l(e,n,r)}function R(t,e,n,i,s){var a=new p,u=w.generate(),c=S(t,e,n,s);return g.set(["sandbox",u],function(){var t=c.contentWindow.document;o.write(function(){t.write("")}).then(function(){t.close(),a.resolve(c)})}),c.src=["javascript:",'document.write("");',"try { window.parent.document; }",'catch (e) { document.domain="'+r.domain+'"; }',"window.parent."+g.fullPath(["sandbox",u])+"();"].join(""),c.addEventListener("error",a.reject,!1),o.write(function(){i.parentNode.replaceChild(c,i)}),a.promise}t.exports=a.couple(n(54),function(t){t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this.win}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this.iframeEl}}),t.defineProperty("iframeEl",{get:function(){return this._iframe}}),t.defineProperty("rootEl",{get:function(){return this.doc&&this.doc.documentElement}}),t.defineProperty("widgetEl",{get:function(){return this.doc&&this.doc.body.firstElementChild}}),t.defineProperty("win",{get:function(){return this.iframeEl&&this.iframeEl.contentWindow}}),t.defineProperty("doc",{get:function(){return this.win&&this.win.document}}),t.define("_updateCachedDimensions",function(){var t=this;return o.read(function(){var e,n=h(t.sandboxEl);"visible"==t.sandboxEl.style.visibility?t._width=n.width:(e=h(t.sandboxEl.parentElement).width,t._width=Math.min(n.width,e)),t._height=n.height})}),t.define("_setTargetToBlank",function(){var t=this.createElement("base");t.target="_blank",this.doc.head.appendChild(t)}),t.define("_didResize",function(){var t=this,e=this._resizeHandlers.slice(0);return this._updateCachedDimensions().then(function(){e.forEach(function(e){e(t)})})}),t.define("setTitle",function(t){this.iframeEl.title=t}),t.override("createElement",function(t){return this.doc.createElement(t)}),t.override("createFragment",function(){return this.doc.createDocumentFragment()}),t.override("htmlToElement",function(t){var e;return(e=this.createElement("div")).innerHTML=t,e.firstElementChild}),t.override("hasSelectedText",function(){return!!s.getSelectedText(this.win)}),t.override("addRootClass",function(t){var e=this.rootEl;return t=Array.isArray(t)?t:[t],this.initialized?o.write(function(){t.forEach(function(t){i.add(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("removeRootClass",function(t){var e=this.rootEl;return t=Array.isArray(t)?t:[t],this.initialized?o.write(function(){t.forEach(function(t){i.remove(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("hasRootClass",function(t){return i.present(this.rootEl,t)}),t.define("addStyleSheet",function(t,e){var n,r=new p;return this.initialized?((n=this.createElement("link")).type="text/css",n.rel="stylesheet",n.href=t,n.addEventListener("load",r.resolve,!1),n.addEventListener("error",r.reject,!1),o.write(y(e,null,n)).then(function(){return u(t).then(r.resolve,r.reject),r.promise})):m.reject(new Error("sandbox not initialized"))}),t.override("prependStyleSheet",function(t){var e=this.doc;return this.addStyleSheet(t,function(t){var n=e.head.firstElementChild;return n?e.head.insertBefore(t,n):e.head.appendChild(t)})}),t.override("appendStyleSheet",function(t){var e=this.doc;return this.addStyleSheet(t,function(t){return e.head.appendChild(t)})}),t.define("addCss",function(t,e){var n;return c.inlineStyle()?((n=this.createElement("style")).type="text/css",n.appendChild(this.doc.createTextNode(t)),o.write(y(e,null,n))):(f.devError("CSP enabled; cannot embed inline styles"),m.resolve())}),t.override("prependCss",function(t){var e=this.doc;return this.addCss(t,function(t){var n=e.head.firstElementChild;return n?e.head.insertBefore(t,n):e.head.appendChild(t)})}),t.override("appendCss",function(t){var e=this.doc;return this.addCss(t,function(t){return e.head.appendChild(t)})}),t.override("makeVisible",function(){var t=this;return this.styleSelf(E).then(function(){t._updateCachedDimensions()})}),t.override("injectWidgetEl",function(t){var e=this;return this.initialized?this.widgetEl?m.reject(new Error("widget already injected")):o.write(function(){e.doc.body.appendChild(t)}):m.reject(new Error("sandbox not initialized"))}),t.override("matchHeightToContent",function(){var t,e=this;return o.read(function(){t=e.widgetEl?h(e.widgetEl).height:0}),o.write(function(){e.sandboxEl.style.height=t+"px"}).then(function(){return e._updateCachedDimensions()})}),t.override("matchWidthToContent",function(){var t,e=this;return o.read(function(){t=e.widgetEl?h(e.widgetEl).width:0}),o.write(function(){e.sandboxEl.style.width=t+"px"}).then(function(){return e._updateCachedDimensions()})}),t.after("initialize",function(){this._iframe=null,this._width=this._height=0,this._resizeHandlers=[]}),t.override("insert",function(t,e,n,r){var i=this,s=new p,a=this.targetGlobal.document,u=S(t,e,n,a);return o.write(y(r,null,u)),u.addEventListener("load",function(){(function(t){try{t.contentWindow.document}catch(t){return m.reject(t)}return m.resolve(t)})(u).then(null,y(R,null,t,e,n,u,a)).then(s.resolve,s.reject)},!1),u.addEventListener("error",s.reject,!1),s.promise.then(function(t){var e=d(i._didResize,T,i);return i._iframe=t,i.win.addEventListener("resize",e,!1),m.all([i._setTargetToBlank(),i.addRootClass(x),i.prependCss(A)])})}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("styleSelf",function(){return this._updateCachedDimensions()})})},function(t,e){t.exports=function(){throw new Error("unimplemented method")}},function(t,e,n){var r=n(2),i=n(7),o=100,s=3e3;function a(t,e){this._inputsQueue=[],this._task=t,this._isPaused=!1,this._flushDelay=e&&e.flushDelay||o,this._pauseLength=e&&e.pauseLength||s,this._flushTimeout=void 0}a.prototype.add=function(t){var e=new r;return this._inputsQueue.push({input:t,taskDoneDeferred:e}),this._scheduleFlush(),e.promise},a.prototype._scheduleFlush=function(){this._isPaused||(clearTimeout(this._flushTimeout),this._flushTimeout=setTimeout(i(this._flush,this),this._flushDelay))},a.prototype._flush=function(){try{this._task.call(null,this._inputsQueue)}catch(t){this._inputsQueue.forEach(function(e){e.taskDoneDeferred.reject(t)})}this._inputsQueue=[],this._flushTimeout=void 0},a.prototype.pause=function(t){clearTimeout(this._flushTimeout),this._isPaused=!0,!t&&this._pauseLength&&setTimeout(i(this.resume,this),this._pauseLength)},a.prototype.resume=function(){this._isPaused=!1,this._scheduleFlush()},t.exports=a},function(t,e,n){var r,i=n(70),o=n(29),s=n(2),a=n(5),u=n(18),c=n(20),d=n(30),l=n(8),f=n(12),h=n(111),p=n(55),m=n(9),v=n(11),g=n(112),w=n(0),y=n(1),b=p(function(){return new s});function _(t){var e=t||{should_obtain_cookie_consent:!0,experiments:{}};return new g(e.should_obtain_cookie_consent,e.experiments)}t.exports={load:function(){var t,e,n,s;if(c.ie9()||c.ie10()||"http:"!==l.protocol&&"https:"!==l.protocol)return f.devError("Using default settings due to unsupported browser or protocol."),r=_(),void b().resolve();t={origin:l.origin},u.settings().indexOf("localhost")>-1&&(t.localSettings=!0),e=v.url(i.resourceBaseUrl+i.widgetIframeHtmlPath,t),n=function(t){var n;if(e.substr(0,t.origin.length)===t.origin)try{(n="string"==typeof t.data?d.parse(t.data):t.data).namespace===h.settings&&(r=_(n.settings),b().resolve())}catch(t){f.devError(t)}},y.addEventListener("message",n),s=o({src:e,title:"Twitter settings iframe"},{display:"none"}),a.body.appendChild(s)},settingsLoaded:function(){var t,e,n;return t=new s,e=m.get("experimentOverride"),b().promise.then(function(){e&&e.name&&e.assignment&&((n={})[e.name]={bucket:e.assignment},r.experiments=w.aug(r.experiments,n)),t.resolve(r)}).catch(function(e){t.reject(e)}),t.promise}}},function(t,e){t.exports={settings:"twttr.settings"}},function(t,e){t.exports=function(t,e){this.shouldObtainCookieConsent=t,this.experiments=e||{}}},function(t,e){t.exports=function(t){return t.split("").map(function(t){return t.charCodeAt(0).toString(16)}).join("")}},function(t,e,n){t.exports=[n(115),n(120),n(128),n(130),n(132),n(146),n(148)]},function(t,e,n){var r=n(11),i=n(4),o=n(0),s=n(13),a=n(14)(),u=n(56),c="a.twitter-dm-button";t.exports=function(t){return a(t,c).map(function(t){return u(function(t){var e=t.getAttribute("data-show-screen-name"),n=s(t),a=t.getAttribute("href"),u=t.getAttribute("data-screen-name"),c=e?i.asBoolean(e):null,d=t.getAttribute("data-size"),l=r.decodeURL(a),f=l.recipient_id,h=t.getAttribute("data-text")||l.text,p=t.getAttribute("data-welcome-message-id")||l.welcomeMessageId;return o.aug(n,{screenName:u,showScreenName:c,size:d,text:h,userId:f,welcomeMessageId:p})}(t),t.parentNode,t)})}},function(t,e,n){var r=n(0);t.exports=function t(e){var n;if(e)return n=e.lang||e.getAttribute("data-lang"),r.isType("string",n)?n:t(e.parentElement)}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(2).then(function(r){var o;try{o=n(84),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(119),i=n(1),o=n(10),s=n(34),a=n(17),u=n(52),c=n(25),d=n(53),l=n(42),f=n(44),h=n(7),p=n(43),m=n(6),v=n(0),g=50,w={position:"absolute",visibility:"hidden",display:"block",transform:"rotate(0deg)"},y={position:"static",visibility:"visible"},b="twitter-widget",_="open",E="SandboxRoot",x=".SandboxRoot { display: none; max-height: 10000px; }";t.exports=c.couple(n(54),function(t){t.defineStatic("isSupported",function(){return!!i.HTMLElement.prototype.attachShadow&&l.inlineStyle()}),t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this._shadowHost}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this._shadowHost}}),t.define("_updateCachedDimensions",function(){var t=this;return a.read(function(){var e,n=f(t.sandboxEl);"visible"==t.sandboxEl.style.visibility?t._width=n.width:(e=f(t.sandboxEl.parentElement).width,t._width=Math.min(n.width,e)),t._height=n.height})}),t.define("_didResize",function(){var t=this,e=this._resizeHandlers.slice(0);return this._updateCachedDimensions().then(function(){e.forEach(function(e){e(t)})})}),t.override("createElement",function(t){return this.targetGlobal.document.createElement(t)}),t.override("createFragment",function(){return this.targetGlobal.document.createDocumentFragment()}),t.override("htmlToElement",function(t){var e;return(e=this.createElement("div")).innerHTML=t,e.firstElementChild}),t.override("hasSelectedText",function(){return!!u.getSelectedText(this.targetGlobal)}),t.override("addRootClass",function(t){var e=this._shadowRootBody;return t=Array.isArray(t)?t:[t],this.initialized?a.write(function(){t.forEach(function(t){o.add(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("removeRootClass",function(t){var e=this._shadowRootBody;return t=Array.isArray(t)?t:[t],this.initialized?a.write(function(){t.forEach(function(t){o.remove(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("hasRootClass",function(t){return o.present(this._shadowRootBody,t)}),t.override("addStyleSheet",function(t,e){return this.addCss('@import url("'+t+'");',e).then(function(){return d(t)})}),t.override("prependStyleSheet",function(t){var e=this._shadowRoot;return this.addStyleSheet(t,function(t){var n=e.firstElementChild;return n?e.insertBefore(t,n):e.appendChild(t)})}),t.override("appendStyleSheet",function(t){var e=this._shadowRoot;return this.addStyleSheet(t,function(t){return e.appendChild(t)})}),t.override("addCss",function(t,e){var n;return this.initialized?l.inlineStyle()?((n=this.createElement("style")).type="text/css",n.appendChild(this.targetGlobal.document.createTextNode(t)),a.write(h(e,null,n))):m.resolve():m.reject(new Error("sandbox not initialized"))}),t.override("prependCss",function(t){var e=this._shadowRoot;return this.addCss(t,function(t){var n=e.firstElementChild;return n?e.insertBefore(t,n):e.appendChild(t)})}),t.override("appendCss",function(t){var e=this._shadowRoot;return this.addCss(t,function(t){return e.appendChild(t)})}),t.override("makeVisible",function(){return this.styleSelf(y)}),t.override("injectWidgetEl",function(t){var e=this;return this.initialized?this._shadowRootBody.firstElementChild?m.reject(new Error("widget already injected")):a.write(function(){e._shadowRootBody.appendChild(t)}).then(function(){return e._updateCachedDimensions()}).then(function(){var t=p(e._didResize,g,e);new r(e._shadowRootBody,t)}):m.reject(new Error("sandbox not initialized"))}),t.override("matchHeightToContent",function(){return m.resolve()}),t.override("matchWidthToContent",function(){return m.resolve()}),t.override("insert",function(t,e,n,r){var i=this.targetGlobal.document,o=this._shadowHost=i.createElement(b),u=this._shadowRoot=o.attachShadow({mode:_}),c=this._shadowRootBody=i.createElement("div");return v.forIn(e||{},function(t,e){o.setAttribute(t,e)}),o.id=t,u.appendChild(c),s.delegate(c,"click","A",function(t,e){e.hasAttribute("target")||e.setAttribute("target","_blank")}),m.all([this.styleSelf(w),this.addRootClass(E),this.prependCss(x),a.write(r.bind(null,o))])}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("initialize",function(){this._shadowHost=this._shadowRoot=this._shadowRootBody=null,this._width=this._height=0,this._resizeHandlers=[]}),t.after("styleSelf",function(){return this._updateCachedDimensions()})})},function(t,e){var n;(n=function(t,e){function r(t,e){if(t.resizedAttached){if(t.resizedAttached)return void t.resizedAttached.add(e)}else t.resizedAttached=new function(){var t,e;this.q=[],this.add=function(t){this.q.push(t)},this.call=function(){for(t=0,e=this.q.length;t
',t.appendChild(t.resizeSensor),{fixed:1,absolute:1}[function(t,e){return t.currentStyle?t.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(t,null).getPropertyValue(e):t.style[e]}(t,"position")]||(t.style.position="relative");var i,o,s=t.resizeSensor.childNodes[0],a=s.childNodes[0],u=t.resizeSensor.childNodes[1],c=(u.childNodes[0],function(){a.style.width=s.offsetWidth+10+"px",a.style.height=s.offsetHeight+10+"px",s.scrollLeft=s.scrollWidth,s.scrollTop=s.scrollHeight,u.scrollLeft=u.scrollWidth,u.scrollTop=u.scrollHeight,i=t.offsetWidth,o=t.offsetHeight});c();var d=function(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener(e,n)},l=function(){t.offsetWidth==i&&t.offsetHeight==o||t.resizedAttached&&t.resizedAttached.call(),c()};d(s,"scroll",l),d(u,"scroll",l)}var i=Object.prototype.toString.call(t),o="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements;if(o)for(var s=0,a=t.length;s0;return this.updateCachedDimensions().then(function(){e&&t._resizeHandlers.forEach(function(e){e(t)})})}),t.define("loadDocument",function(t){var e=new a;return this.initialized?this.iframeEl.src?u.reject(new Error("widget already loaded")):(this.iframeEl.addEventListener("load",e.resolve,!1),this.iframeEl.addEventListener("error",e.reject,!1),this.iframeEl.src=t,e.promise):u.reject(new Error("sandbox not initialized"))}),t.after("initialize",function(){this._iframe=null,this._width=this._height=0,this._resizeHandlers=[]}),t.override("insert",function(t,e,n,i){var a=this;return e=d.aug({id:t},e),n=d.aug({},l,n),this._iframe=s(e,n),h[t]=this,this.onResize(o(function(){a.makeVisible()})),r.write(c(i,null,this._iframe))}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("styleSelf",function(){return this.updateCachedDimensions()})}},function(t,e,n){var r=n(1),i=n(124),o=n(126),s=n(23),a=n(4),u=n(127);t.exports=function(t){(new i).attachReceiver(new o.Receiver(r,"twttr.button")).bind("twttr.private.trigger",function(t,e){var n=u(this);s.trigger(t,{target:n,region:e,type:t,data:{}})}).bind("twttr.private.resizeButton",function(e){var n=u(this),r=n&&n.id,i=a.asInt(e.width),o=a.asInt(e.height);r&&void 0!==i&&void 0!==o&&t(r,i,o)})}},function(t,e,n){var r=n(30),i=n(125),o=n(0),s=n(6),a=n(21),u="2.0";function c(t){this.registry=t||{}}function d(t){var e,n;return e=o.isType("string",t),n=o.isType("number",t),e||n||null===t}function l(t,e){return{jsonrpc:u,id:d(t)?t:null,error:e}}c.prototype._invoke=function(t,e){var n,r,i;n=this.registry[t.method],r=t.params||[],r=o.isType("array",r)?r:[r];try{i=n.apply(e.source||null,r)}catch(t){i=s.reject(t.message)}return a.isPromise(i)?i:s.resolve(i)},c.prototype._processRequest=function(t,e){var n,r;return function(t){var e,n,r;return!!o.isObject(t)&&(e=t.jsonrpc===u,n=o.isType("string",t.method),r=!("id"in t)||d(t.id),e&&n&&r)}(t)?(n="params"in t&&(r=t.params,!o.isObject(r)||o.isType("function",r))?s.resolve(l(t.id,i.INVALID_PARAMS)):this.registry[t.method]?this._invoke(t,{source:e}).then(function(e){return n=t.id,{jsonrpc:u,id:n,result:e};var n},function(){return l(t.id,i.INTERNAL_ERROR)}):s.resolve(l(t.id,i.METHOD_NOT_FOUND)),null!=t.id?n:s.resolve()):s.resolve(l(t.id,i.INVALID_REQUEST))},c.prototype.attachReceiver=function(t){return t.attachTo(this),this},c.prototype.bind=function(t,e){return this.registry[t]=e,this},c.prototype.receive=function(t,e){var n,a,u,c=this;try{u=t,t=o.isType("string",u)?r.parse(u):u}catch(t){return s.resolve(l(null,i.PARSE_ERROR))}return e=e||null,a=((n=o.isType("array",t))?t:[t]).map(function(t){return c._processRequest(t,e)}),n?function(t){return s.all(t).then(function(t){return(t=t.filter(function(t){return void 0!==t})).length?t:void 0})}(a):a[0]},t.exports=c},function(t){t.exports={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INTERNAL_ERROR:{code:-32603,message:"Internal error"}}},function(t,e,n){var r=n(8),i=n(1),o=n(30),s=n(2),a=n(20),u=n(0),c=n(3),d=n(7),l=a.ie9();function f(t,e,n){var r;t&&t.postMessage&&(l?r=(n||"")+o.stringify(e):n?(r={})[n]=e:r=e,t.postMessage(r,"*"))}function h(t){return u.isType("string",t)?t:"JSONRPC"}function p(t,e){return e?u.isType("string",t)&&0===t.indexOf(e)?t.substring(e.length):t&&t[e]?t[e]:void 0:t}function m(t,e){var n=t.document;this.filter=h(e),this.server=null,this.isTwitterFrame=c.isTwitterURL(n.location.href),t.addEventListener("message",d(this._onMessage,this),!1)}function v(t,e){this.pending={},this.target=t,this.isTwitterHost=c.isTwitterURL(r.href),this.filter=h(e),i.addEventListener("message",d(this._onMessage,this),!1)}u.aug(m.prototype,{_onMessage:function(t){var e,n=this;this.server&&(this.isTwitterFrame&&!c.isTwitterURL(t.origin)||(e=p(t.data,this.filter))&&this.server.receive(e,t.source).then(function(e){e&&f(t.source,e,n.filter)}))},attachTo:function(t){this.server=t},detach:function(){this.server=null}}),u.aug(v.prototype,{_processResponse:function(t){var e=this.pending[t.id];e&&(e.resolve(t),delete this.pending[t.id])},_onMessage:function(t){var e;if((!this.isTwitterHost||c.isTwitterURL(t.origin))&&(e=p(t.data,this.filter))){if(u.isType("string",e))try{e=o.parse(e)}catch(t){return}(e=u.isType("array",e)?e:[e]).forEach(d(this._processResponse,this))}},send:function(t){var e=new s;return t.id?this.pending[t.id]=e:e.resolve(),f(this.target,t,this.filter),e.promise}}),t.exports={Receiver:m,Dispatcher:v,_stringifyPayload:function(t){return arguments.length>0&&(l=!!t),l}}},function(t,e,n){var r=n(5);t.exports=function(t){for(var e,n=r.getElementsByTagName("iframe"),i=0;n[i];i++)if((e=n[i]).contentWindow===t)return e}},function(t,e,n){var r=n(4),i=n(0),o=n(3),s=n(13),a=n(14)(),u=n(61),c="a.twitter-moment";t.exports=function(t){return a(t,c).map(function(t){return u(function(t){var e=s(t),n={momentId:o.momentId(t.href),chrome:t.getAttribute("data-chrome"),limit:t.getAttribute("data-limit")};return i.forIn(n,function(t,n){var i=e[t];e[t]=r.hasValue(i)?i:n}),e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(4)]).then(function(r){var o;try{o=n(86),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(0),i=n(13),o=n(14)(),s=n(62),a="a.periscope-on-air",u=/^https?:\/\/(?:www\.)?(?:periscope|pscp)\.tv\/@?([a-zA-Z0-9_]+)\/?$/i;t.exports=function(t){return o(t,a).map(function(t){return s(function(t){var e=i(t),n=t.getAttribute("href"),o=t.getAttribute("data-size"),s=u.exec(n)[1];return r.aug(e,{username:s,size:o})}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(5).then(function(r){var o;try{o=n(87),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(4),i=n(0),o=n(63),s=n(13),a=n(14)(),u=n(64),c=n(3),d=n(12),l="a.twitter-timeline,div.twitter-timeline,a.twitter-grid",f="Embedded Search timelines have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295.",h="You may have been affected by an update to settings in embedded timelines. See https://twittercommunity.com/t/deprecating-widget-settings/102295.",p="Embedded grids have been deprecated and will now render as timelines. Please update your embed code to use the twitter-timeline class. More info: https://twittercommunity.com/t/update-on-the-embedded-grid-display-type/119564.";t.exports=function(t){return a(t,l).map(function(t){return u(function(t){var e=s(t),n=t.getAttribute("data-show-replies"),a={isPreconfigured:!!t.getAttribute("data-widget-id"),chrome:t.getAttribute("data-chrome"),tweetLimit:t.getAttribute("data-tweet-limit")||t.getAttribute("data-limit"),ariaLive:t.getAttribute("data-aria-polite"),theme:t.getAttribute("data-theme"),linkColor:t.getAttribute("data-link-color"),borderColor:t.getAttribute("data-border-color"),showReplies:n?r.asBoolean(n):null,profileScreenName:t.getAttribute("data-screen-name"),profileUserId:t.getAttribute("data-user-id"),favoritesScreenName:t.getAttribute("data-favorites-screen-name"),favoritesUserId:t.getAttribute("data-favorites-user-id"),likesScreenName:t.getAttribute("data-likes-screen-name"),likesUserId:t.getAttribute("data-likes-user-id"),listOwnerScreenName:t.getAttribute("data-list-owner-screen-name"),listOwnerUserId:t.getAttribute("data-list-owner-id"),listId:t.getAttribute("data-list-id"),listSlug:t.getAttribute("data-list-slug"),customTimelineId:t.getAttribute("data-custom-timeline-id"),staticContent:t.getAttribute("data-static-content"),url:t.href};return a.isPreconfigured&&(c.isSearchUrl(a.url)?d.publicError(f,t):d.publicLog(h,t)),"twitter-grid"===t.className&&d.publicLog(p,t),(a=i.aug(a,e)).dataSource=o(a),a.id=a.dataSource&&a.dataSource.id,a}(t),t.parentNode,t)})}},function(t,e,n){var r=n(26);t.exports=r.build([n(27),n(136)])},function(t,e,n){var r=n(0),i=n(135);t.exports=function(t){return"en"===t||r.contains(i,t)}},function(t,e){t.exports=["hi","zh-cn","fr","zh-tw","msa","fil","fi","sv","pl","ja","ko","de","it","pt","es","ru","id","tr","da","no","nl","hu","fa","ar","ur","he","th","cs","uk","vi","ro","bn","el","en-gb","gu","kn","mr","ta","bg","ca","hr","sr","sk"]},function(t,e,n){var r=n(3),i=n(0),o=n(18),s="collection:";function a(t,e){return r.collectionId(t)||e}t.exports=function(t){t.params({id:{},url:{}}),t.overrideProperty("id",{get:function(){var t=a(this.params.url,this.params.id);return s+t}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["collection"])}}),t.around("queryParams",function(t){return i.aug(t(),{collection_id:a(this.params.url,this.params.id)})}),t.before("initialize",function(){if(!a(this.params.url,this.params.id))throw new Error("one of url or id is required")})}},function(t,e,n){var r=n(26);t.exports=r.build([n(27),n(138)])},function(t,e,n){var r=n(3),i=n(0),o=n(18),s="event:";function a(t,e){return r.eventId(t)||e}t.exports=function(t){t.params({id:{},url:{}}),t.overrideProperty("id",{get:function(){var t=a(this.params.url,this.params.id);return s+t}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["event"])}}),t.around("queryParams",function(t){return i.aug(t(),{event_id:a(this.params.url,this.params.id)})}),t.before("initialize",function(){if(!a(this.params.url,this.params.id))throw new Error("one of url or id is required")})}},function(t,e,n){var r=n(26);t.exports=r.build([n(27),n(140)])},function(t,e,n){var r=n(3),i=n(0),o=n(18),s="likes:";function a(t){return r.likesScreenName(t.url)||t.screenName}t.exports=function(t){t.params({screenName:{},userId:{},url:{}}),t.overrideProperty("id",{get:function(){var t=a(this.params)||this.params.userId;return s+t}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["likes"])}}),t.define("_getLikesQueryParam",function(){var t=a(this.params);return t?{screen_name:t}:{user_id:this.params.userId}}),t.around("queryParams",function(t){return i.aug(t(),this._getLikesQueryParam())}),t.before("initialize",function(){if(!a(this.params)&&!this.params.userId)throw new Error("screen name or user id is required")})}},function(t,e,n){var r=n(26);t.exports=r.build([n(27),n(142)])},function(t,e,n){var r=n(3),i=n(0),o=n(18),s="list:";function a(t){var e=r.listScreenNameAndSlug(t.url)||t;return i.compact({screen_name:e.ownerScreenName,user_id:e.ownerUserId,list_slug:e.slug})}t.exports=function(t){t.params({id:{},ownerScreenName:{},ownerUserId:{},slug:{},url:{}}),t.overrideProperty("id",{get:function(){var t,e,n;return this.params.id?s+this.params.id:(e=(t=a(this.params))&&t.list_slug.replace(/-/g,"_"),n=t&&(t.screen_name||t.user_id),s+(n+":")+e)}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["list"])}}),t.define("_getListQueryParam",function(){return this.params.id?{list_id:this.params.id}:a(this.params)}),t.around("queryParams",function(t){return i.aug(t(),this._getListQueryParam())}),t.before("initialize",function(){var t=a(this.params);if(i.isEmptyObject(t)&&!this.params.id)throw new Error("qualified slug or list id required")})}},function(t,e,n){var r=n(26);t.exports=r.build([n(27),n(144)])},function(t,e,n){var r=n(3),i=n(4),o=n(0),s=n(18),a="profile:";function u(t,e){return r.screenName(t)||e}t.exports=function(t){t.params({showReplies:{fallback:!1,transform:i.asBoolean},screenName:{},userId:{},url:{}}),t.overrideProperty("id",{get:function(){var t=u(this.params.url,this.params.screenName);return a+(t||this.params.userId)}}),t.overrideProperty("endpoint",{get:function(){return s.timeline(["profile"])}}),t.define("_getProfileQueryParam",function(){var t=u(this.params.url,this.params.screenName),e=t?{screen_name:t}:{user_id:this.params.userId};return o.aug(e,{with_replies:this.params.showReplies?"true":"false"})}),t.around("queryParams",function(t){return o.aug(t(),this._getProfileQueryParam())}),t.before("initialize",function(){if(!u(this.params.url,this.params.screenName)&&!this.params.userId)throw new Error("screen name or user id is required")})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(6)]).then(function(r){var o;try{o=n(88),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(10),i=n(3),o=n(0),s=n(13),a=n(14)(),u=n(65),c="blockquote.twitter-tweet, blockquote.twitter-video",d=/\btw-align-(left|right|center)\b/;t.exports=function(t){return a(t,c).map(function(t){return u(function(t){var e=s(t),n=t.getElementsByTagName("A"),a=n&&n[n.length-1],u=a&&i.status(a.href),c=t.getAttribute("data-conversation"),l="none"==c||"hidden"==c||r.present(t,"tw-hide-thread"),f=t.getAttribute("data-cards"),h="none"==f||"hidden"==f||r.present(t,"tw-hide-media"),p=t.getAttribute("data-align")||t.getAttribute("align"),m=t.getAttribute("data-link-color"),v=t.getAttribute("data-theme");return!p&&d.test(t.className)&&(p=RegExp.$1),o.aug(e,{tweetId:u,hideThread:l,hideCard:h,align:p,linkColor:m,theme:v,id:u})}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(7)]).then(function(r){var o;try{o=n(89),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(10),i=n(0),o=n(13),s=n(14)(),a=n(66),u=n(4),c="a.twitter-share-button, a.twitter-mention-button, a.twitter-hashtag-button",d="twitter-hashtag-button",l="twitter-mention-button";t.exports=function(t){return s(t,c).map(function(t){return a(function(t){var e=o(t),n={screenName:t.getAttribute("data-button-screen-name"),text:t.getAttribute("data-text"),type:t.getAttribute("data-type"),size:t.getAttribute("data-size"),url:t.getAttribute("data-url"),hashtags:t.getAttribute("data-hashtags"),via:t.getAttribute("data-via"),buttonHashtag:t.getAttribute("data-button-hashtag")};return i.forIn(n,function(t,n){var r=e[t];e[t]=u.hasValue(r)?r:n}),e.screenName=e.screenName||e.screen_name,e.buttonHashtag=e.buttonHashtag||e.button_hashtag||e.hashtag,r.present(t,d)&&(e.type="hashtag"),r.present(t,l)&&(e.type="mention"),e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(3).then(function(r){var o;try{o=n(90),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(0);t.exports=r.aug({},n(151),n(152),n(153),n(154),n(155),n(156),n(157))},function(t,e,n){var r=n(56),i=n(16)(["userId"],{},r);t.exports={createDMButton:i}},function(t,e,n){var r=n(59),i=n(16)(["screenName"],{},r);t.exports={createFollowButton:i}},function(t,e,n){var r=n(61),i=n(16)(["momentId"],{},r);t.exports={createMoment:i}},function(t,e,n){var r=n(62),i=n(16)(["username"],{},r);t.exports={createPeriscopeOnAirButton:i}},function(t,e,n){var r=n(8),i=n(12),o=n(3),s=n(0),a=n(4),u=n(63),c=n(64),d=n(16)([],{},c),l=n(6),f="Embedded grids have been deprecated. Please use twttr.widgets.createTimeline instead. More info: https://twittercommunity.com/t/update-on-the-embedded-grid-display-type/119564.",h={createTimeline:p,createGridFromCollection:function(t){var e=s.toRealArray(arguments).slice(1),n={sourceType:"collection",id:t};return e.unshift(n),i.publicLog(f),p.apply(this,e)}};function p(t){var e,n=s.toRealArray(arguments).slice(1);return a.isString(t)||a.isNumber(t)?l.reject("Embedded timelines with widget settings have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295."):s.isObject(t)?(t=t||{},n.forEach(function(t){s.isType("object",t)&&function(t){t.ariaLive=t.ariaPolite}(e=t)}),e||(e={},n.push(e)),t.lang=e.lang,t.tweetLimit=e.tweetLimit,t.showReplies=e.showReplies,e.dataSource=u(t),d.apply(this,n)):l.reject("data source must be an object.")}o.isTwitterURL(r.href)&&(h.createTimelinePreview=function(t,e,n){var r={previewParams:t,useLegacyDefaults:!0,isPreviewTimeline:!0};return r.dataSource=u(r),d(e,r,n)}),t.exports=h},function(t,e,n){var r,i=n(0),o=n(65),s=n(16),a=(r=s(["tweetId"],{},o),function(){return i.toRealArray(arguments).slice(1).forEach(function(t){i.isType("object",t)&&(t.hideCard="none"==t.cards||"hidden"==t.cards,t.hideThread="none"==t.conversation||"hidden"==t.conversation)}),r.apply(this,arguments)});t.exports={createTweet:a,createTweetEmbed:a,createVideo:a}},function(t,e,n){var r=n(0),i=n(66),o=n(16),s=o(["url"],{type:"share"},i),a=o(["buttonHashtag"],{type:"hashtag"},i),u=o(["screenName"],{type:"mention"},i);function c(t){return function(){return r.toRealArray(arguments).slice(1).forEach(function(t){r.isType("object",t)&&(t.screenName=t.screenName||t.screen_name,t.buttonHashtag=t.buttonHashtag||t.button_hashtag||t.hashtag)}),t.apply(this,arguments)}}t.exports={createShareButton:c(s),createHashtagButton:c(a),createMentionButton:c(u)}},function(t,e,n){var r,i,o,s=n(5),a=n(1),u=0,c=[],d=s.createElement("a");function l(){var t,e;for(u=1,t=0,e=c.length;t