├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── feature-request.md │ └── support-question.md ├── dependabot.yml ├── stale.yml └── workflows │ ├── composer-normalize.yml │ ├── markdown-normalize.yml │ ├── run-tests.yml │ └── stale-issues.yml ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── banner.jpg ├── composer.json ├── dist ├── tab.css └── tab.js ├── package.json ├── resources ├── js │ ├── components │ │ └── Tab.vue │ └── tab.js └── sass │ └── tab.scss ├── src ├── StackOverflowSolutionProvider.php ├── Tab.php └── TabServiceProvider.php └── webpack.mix.js /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F41E Bug report" 3 | about: Create a bug report to help us improve 4 | title: "" 5 | labels: bug 6 | assignees: "" 7 | --- 8 | 9 | **Describe the bug** 10 | A clear and concise description of what the bug is. 11 | 12 | **To Reproduce** 13 | Things needed to reproduce the error. 14 | eg: Configuration, Migration, Model, Controller/Command 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem. 21 | 22 | **Versions (please complete the following information)** 23 | 24 | - PHP: 25 | - Database: 26 | - Laravel: 27 | - Package: 28 | 29 | **Additional context** 30 | Add any other context about the problem here. 31 | 32 | **Exception** 33 | The thrown exception message. 34 | 35 | **Stack Trace** 36 | The full stack trace of the thrown exception. 37 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F680 Feature request" 3 | about: Suggest an idea for this project 4 | title: "" 5 | labels: feature 6 | assignees: "" 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | **Describe the solution you'd like** 13 | A clear and concise description of what you want to happen. 14 | 15 | **Describe alternatives you've considered** 16 | A clear and concise description of any alternative solutions or features you've considered. 17 | 18 | **Additional context** 19 | Add any other context or screenshots about the feature request here. 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/support-question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F4AC Support Question" 3 | about: General questions related to this package 4 | title: "" 5 | labels: question 6 | assignees: "" 7 | --- 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: composer 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | - package-ecosystem: npm 9 | directory: "/" 10 | schedule: 11 | interval: daily 12 | open-pull-requests-limit: 10 13 | ignore: 14 | - dependency-name: tailwindcss 15 | versions: 16 | - 2.0.3 17 | - 2.0.4 18 | - 2.1.1 19 | - dependency-name: axios 20 | versions: 21 | - 0.21.1 22 | - dependency-name: cross-env 23 | versions: 24 | - 7.0.3 25 | - dependency-name: prettier 26 | versions: 27 | - 2.2.1 28 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 14 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 28 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - next release 8 | - next major release 9 | - help wanted 10 | # Label to use when marking an issue as stale 11 | staleLabel: stale 12 | # Comment to post when marking an issue as stale. Set to `false` to disable 13 | markComment: > 14 | This issue has been automatically marked as stale because it has not had recent activity. 15 | It will be closed if no further activity occurs. 16 | Thank you for your contributions. 17 | # Comment to post when closing a stale issue. Set to `false` to disable 18 | closeComment: > 19 | This issue has been automatically closed because it has not had recent activity. 20 | Thank you for your contributions. 21 | -------------------------------------------------------------------------------- /.github/workflows/composer-normalize.yml: -------------------------------------------------------------------------------- 1 | name: normalize composer.json 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'composer.json' 7 | 8 | jobs: 9 | normalize: 10 | timeout-minutes: 1 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Git checkout 14 | uses: actions/checkout@v2 15 | 16 | - name: Validate Composer configuration 17 | run: composer validate --strict 18 | 19 | - name: Normalize composer.json 20 | run: | 21 | composer global require ergebnis/composer-normalize 22 | composer normalize --indent-style=space --indent-size=4 --no-check-lock --no-update-lock --no-interaction --ansi 23 | 24 | - uses: stefanzweifel/git-auto-commit-action@v4.0.0 25 | with: 26 | commit_message: normalize composer.json 27 | -------------------------------------------------------------------------------- /.github/workflows/markdown-normalize.yml: -------------------------------------------------------------------------------- 1 | name: normalize markdown 2 | 3 | on: 4 | push: 5 | paths: 6 | - '*.md' 7 | 8 | jobs: 9 | normalize: 10 | timeout-minutes: 1 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Git checkout 14 | uses: actions/checkout@v2 15 | 16 | - name: Prettify markdown 17 | uses: creyD/prettier_action@v3.0 18 | with: 19 | prettier_options: --write **/*.md 20 | -------------------------------------------------------------------------------- /.github/workflows/run-tests.yml: -------------------------------------------------------------------------------- 1 | name: run-tests 2 | 3 | on: 4 | push: 5 | schedule: 6 | - cron: '0 0 * * *' 7 | 8 | jobs: 9 | test: 10 | runs-on: ubuntu-latest 11 | 12 | strategy: 13 | fail-fast: true 14 | matrix: 15 | php: ["8.0", "7.4", "7.3", "7.2"] 16 | laravel: [8.*, 7.*, 6.*, 5.8.*] 17 | dependency-version: [prefer-lowest, prefer-stable] 18 | include: 19 | - laravel: 8.* 20 | testbench: 6.* 21 | - laravel: 7.* 22 | testbench: 5.* 23 | - laravel: 6.* 24 | testbench: 4.* 25 | - laravel: 5.8.* 26 | testbench: 3.8.* 27 | exclude: 28 | - php: 8.0 29 | laravel: 5.8.* 30 | - php: 8.0 31 | laravel: 6.0 32 | - php: 7.4 33 | laravel: 5.8.* 34 | - php: 7.2 35 | laravel: 8.* 36 | 37 | name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} 38 | 39 | steps: 40 | - name: Checkout code 41 | uses: actions/checkout@v2 42 | 43 | - name: Cache dependencies 44 | uses: actions/cache@v1 45 | with: 46 | path: ~/.composer/cache/files 47 | key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} 48 | keys: | 49 | dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer- 50 | dependencies-laravel-${{ matrix.laravel }}-php- 51 | dependencies-laravel- 52 | 53 | - name: Setup PHP 54 | uses: shivammathur/setup-php@v1 55 | with: 56 | php-version: ${{ matrix.php }} 57 | extensions: dom, curl, libxml, mbstring, zip 58 | 59 | - name: Install dependencies 60 | run: | 61 | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update 62 | composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest 63 | 64 | - name: Execute tests 65 | run: vendor/bin/phpunit 66 | -------------------------------------------------------------------------------- /.github/workflows/stale-issues.yml: -------------------------------------------------------------------------------- 1 | name: "Close stale issues" 2 | on: 3 | schedule: 4 | - cron: "0 0 * * *" 5 | 6 | jobs: 7 | default: 8 | timeout-minutes: 1 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/stale@v2.0.0 12 | with: 13 | repo-token: ${{ secrets.GITHUB_TOKEN }} 14 | stale-issue-message: 'This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days' 15 | stale-issue-label: 'stale' 16 | exempt-issue-labels: 'bug,enhancement,documentation,help wanted,next release,next major release' 17 | days-before-stale: 21 18 | days-before-close: 7 19 | 20 | invalid: 21 | timeout-minutes: 1 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/stale@v2.0.0 25 | with: 26 | repo-token: ${{ secrets.GITHUB_TOKEN }} 27 | stale-issue-message: 'This issue is stale because it has been labeled as invalid.' 28 | stale-issue-label: 'stale' 29 | only-labels: 'invalid' 30 | days-before-stale: 1 31 | days-before-close: 2 32 | 33 | duplicate: 34 | timeout-minutes: 1 35 | runs-on: ubuntu-latest 36 | steps: 37 | - uses: actions/stale@v2.0.0 38 | with: 39 | repo-token: ${{ secrets.GITHUB_TOKEN }} 40 | stale-issue-message: 'This issue is stale because it has been labeled as duplicate.' 41 | stale-issue-label: 'stale' 42 | only-labels: 'duplicate' 43 | days-before-stale: 1 44 | days-before-close: 2 45 | 46 | wontfix: 47 | timeout-minutes: 1 48 | runs-on: ubuntu-latest 49 | steps: 50 | - uses: actions/stale@v2.0.0 51 | with: 52 | repo-token: ${{ secrets.GITHUB_TOKEN }} 53 | stale-issue-message: 'This issue is stale because it has been labeled as wontfix.' 54 | stale-issue-label: 'stale' 55 | only-labels: 'wontfix' 56 | days-before-stale: 1 57 | days-before-close: 2 58 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to `ignition-stackoverflow` will be documented in this file 4 | 5 | ## 1.7.0 - 2021-02-05 6 | 7 | - add explicit PHP 8.0 support 8 | - remove `base_path()` from search query - [#20](https://github.com/Astrotomic/ignition-stackoverflow/pull/20) 9 | 10 | ## 1.6.0 - 2020-09-14 11 | 12 | - add Laravel 8 support 13 | 14 | ## 1.5.0 - 2020-03-07 15 | 16 | - add Laravel 7 support 17 | 18 | ## 1.4.0 - 2019-09-09 19 | 20 | - reduce file sizes 21 | - add site select field 22 | 23 | ## 1.3.0 - 2019-09-02 24 | 25 | - add `StackOverflowSolutionProvider` to show a nice solution card for the top 5 answered questions 26 | 27 | ## 1.2.0 - 2019-09-01 28 | 29 | - update styling 30 | 31 | ## 1.1.0 - 2019-08-31 32 | 33 | - refactor UI & design 34 | - add pagination 35 | 36 | ## 1.0.0 - 2019-08-31 37 | 38 | - initial release 39 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Astrotomic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | 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, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Ignition StackOverflow Tab 2 | 3 | ## A tab that fetches stackoverflow questions 4 | 5 | [![Latest Version](http://img.shields.io/packagist/v/astrotomic/ignition-stackoverflow.svg?label=Release&style=for-the-badge)](https://packagist.org/packages/astrotomic/ignition-stackoverflow) 6 | [![MIT License](https://img.shields.io/github/license/Astrotomic/ignition-stackoverflow.svg?label=License&color=blue&style=for-the-badge)](https://github.com/Astrotomic/ignition-stackoverflow/blob/master/LICENSE.md) 7 | [![Offset Earth](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-green?style=for-the-badge)](https://plant.treeware.earth/Astrotomic/ignition-stackoverflow) 8 | [![Larabelles](https://img.shields.io/badge/Larabelles-%F0%9F%A6%84-lightpink?style=for-the-badge)](https://www.larabelles.com/) 9 | 10 | [![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/ignition-stackoverflow.svg?label=Downloads&style=flat-square&cacheSeconds=600)](https://packagist.org/packages/astrotomic/ignition-stackoverflow) 11 | [![StyleCI](https://styleci.io/repos/205465094/shield)](https://styleci.io/repos/205465094) 12 | 13 | This package adds a tab to your ignition screen which shows matching StackOverflow questions - including a search field. 14 | 15 | ![StackOverflow Tab](banner.jpg) 16 | 17 | ## Installation 18 | 19 | You can install the package in to a Laravel app that uses [Ignition](https://github.com/facade/ignition) via composer: 20 | 21 | ```bash 22 | composer require astrotomic/ignition-stackoverflow --dev 23 | ``` 24 | 25 | ## Usage 26 | 27 | Click on the "Stack Overflow" tab on your Ignition screen to see a list of matching StackOverflow questions. 28 | 29 | ### Testing 30 | 31 | ```bash 32 | composer test 33 | ``` 34 | 35 | ### Changelog 36 | 37 | Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. 38 | 39 | ## Contributing 40 | 41 | Please see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md). 42 | 43 | ### Security 44 | 45 | If you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it. 46 | 47 | ## Credits 48 | 49 | - [Tom Witkowski](https://github.com/Gummibeer) 50 | 51 | ## License 52 | 53 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 54 | 55 | ## Treeware 56 | 57 | You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree. 58 | 59 | It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats. 60 | 61 | You can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/ignition-stackoverflow) 62 | 63 | Read more about Treeware at [treeware.earth](https://treeware.earth) 64 | -------------------------------------------------------------------------------- /banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Astrotomic/ignition-stackoverflow/19b83d33a2546acdb1fd815e840af34a22b05671/banner.jpg -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "astrotomic/ignition-stackoverflow", 3 | "description": "A tab that fetches stackoverflow questions", 4 | "keywords": [ 5 | "laravel", 6 | "flare", 7 | "ignition" 8 | ], 9 | "homepage": "https://astrotomic.info", 10 | "license": "MIT", 11 | "authors": [ 12 | { 13 | "name": "Tom Witkowski", 14 | "email": "gummibeer@astrotomic.info", 15 | "homepage": "https://gummibeer.de", 16 | "role": "Developer" 17 | } 18 | ], 19 | "require": { 20 | "php": "^7.2 || ^8.0", 21 | "ext-curl": "*", 22 | "ext-json": "*", 23 | "facade/ignition": "^1.0 || ^2.3.2", 24 | "facade/ignition-contracts": "^1.0", 25 | "illuminate/support": "5.8.* || ^6.0 || ^7.0 || ^8.0" 26 | }, 27 | "require-dev": { 28 | "orchestra/testbench": "3.8.* || ^4.0 || ^5.0 || ^6.0", 29 | "phpunit/phpunit": "^8.3 || ^9.0" 30 | }, 31 | "config": { 32 | "sort-packages": true 33 | }, 34 | "extra": { 35 | "laravel": { 36 | "providers": [ 37 | "Astrotomic\\IgnitionStackOverflowTab\\TabServiceProvider" 38 | ] 39 | } 40 | }, 41 | "autoload": { 42 | "psr-4": { 43 | "Astrotomic\\IgnitionStackOverflowTab\\": "src/" 44 | } 45 | }, 46 | "autoload-dev": { 47 | "psr-4": { 48 | "Astrotomic\\IgnitionStackOverflowTab\\Tests\\": "tests" 49 | } 50 | }, 51 | "prefer-stable": true, 52 | "scripts": { 53 | "test": "vendor/bin/phpunit", 54 | "test-coverage": "vendor/bin/phpunit --coverage-html=build" 55 | }, 56 | "support": { 57 | "email": "dev@astrotomic.info", 58 | "issues": "https://github.com/Astrotomic/ignition-stackoverflow/issues", 59 | "source": "https://github.com/Astrotomic/ignition-stackoverflow" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /dist/tab.css: -------------------------------------------------------------------------------- 1 | #astrotomic-stackoverflow-tab .bg-gray-100{background-color:#f7fafc}#astrotomic-stackoverflow-tab .bg-gray-200{background-color:#edf2f7}#astrotomic-stackoverflow-tab .bg-orange-100{background-color:#fffaf0}#astrotomic-stackoverflow-tab .bg-green-400{background-color:#68d391}#astrotomic-stackoverflow-tab .hover\:bg-orange-500:hover{background-color:#ed8936}#astrotomic-stackoverflow-tab .border-transparent{border-color:transparent}#astrotomic-stackoverflow-tab .border-gray-400{border-color:#cbd5e0}#astrotomic-stackoverflow-tab .border-orange-400{border-color:#f6ad55}#astrotomic-stackoverflow-tab .border-green-400{border-color:#68d391}#astrotomic-stackoverflow-tab .hover\:border-orange-400:hover{border-color:#f6ad55}#astrotomic-stackoverflow-tab .hover\:border-orange-500:hover{border-color:#ed8936}#astrotomic-stackoverflow-tab .hover\:border-orange-800:hover{border-color:#9c4221}#astrotomic-stackoverflow-tab .focus\:border-orange-500:focus{border-color:#ed8936}#astrotomic-stackoverflow-tab .rounded{border-radius:.25rem}#astrotomic-stackoverflow-tab .border{border-width:1px}#astrotomic-stackoverflow-tab .border-b-2{border-bottom-width:2px}#astrotomic-stackoverflow-tab .border-l-8{border-left-width:8px}#astrotomic-stackoverflow-tab .cursor-pointer{cursor:pointer}#astrotomic-stackoverflow-tab .block{display:block}#astrotomic-stackoverflow-tab .inline-block{display:inline-block}#astrotomic-stackoverflow-tab .flex{display:-webkit-box;display:-ms-flexbox;display:flex}#astrotomic-stackoverflow-tab .flex-grow{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}#astrotomic-stackoverflow-tab .font-mono{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}#astrotomic-stackoverflow-tab .font-medium{font-weight:500}#astrotomic-stackoverflow-tab .font-semibold{font-weight:600}#astrotomic-stackoverflow-tab .font-bold{font-weight:700}#astrotomic-stackoverflow-tab .my-2{margin-top:.5rem;margin-bottom:.5rem}#astrotomic-stackoverflow-tab .mt-1{margin-top:.25rem}#astrotomic-stackoverflow-tab .mr-1{margin-right:.25rem}#astrotomic-stackoverflow-tab .mb-1{margin-bottom:.25rem}#astrotomic-stackoverflow-tab .mb-2{margin-bottom:.5rem}#astrotomic-stackoverflow-tab .ml-2{margin-left:.5rem}#astrotomic-stackoverflow-tab .mr-3{margin-right:.75rem}#astrotomic-stackoverflow-tab .p-2{padding:.5rem}#astrotomic-stackoverflow-tab .py-1{padding-top:.25rem;padding-bottom:.25rem}#astrotomic-stackoverflow-tab .px-1{padding-left:.25rem;padding-right:.25rem}#astrotomic-stackoverflow-tab .py-2{padding-top:.5rem;padding-bottom:.5rem}#astrotomic-stackoverflow-tab .px-2{padding-left:.5rem;padding-right:.5rem}#astrotomic-stackoverflow-tab .py-px{padding-top:1px;padding-bottom:1px}#astrotomic-stackoverflow-tab .text-center{text-align:center}#astrotomic-stackoverflow-tab .text-white{color:#fff}#astrotomic-stackoverflow-tab .text-gray-400{color:#cbd5e0}#astrotomic-stackoverflow-tab .text-gray-500{color:#a0aec0}#astrotomic-stackoverflow-tab .text-red-400{color:#fc8181}#astrotomic-stackoverflow-tab .text-orange-400{color:#f6ad55}#astrotomic-stackoverflow-tab .text-green-400{color:#68d391}#astrotomic-stackoverflow-tab .text-blue-400{color:#63b3ed}#astrotomic-stackoverflow-tab .hover\:text-white:hover{color:#fff}#astrotomic-stackoverflow-tab .hover\:text-orange-500:hover{color:#ed8936}#astrotomic-stackoverflow-tab .hover\:text-blue-500:hover{color:#4299e1}#astrotomic-stackoverflow-tab .text-xs{font-size:.75rem}#astrotomic-stackoverflow-tab .text-lg{font-size:1.125rem} -------------------------------------------------------------------------------- /dist/tab.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=9)}([function(e,t,n){"use strict";var r=n(1),s=n(23),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(i)}),e.exports=u}).call(t,n(28))},function(e,t,n){"use strict";var r=n(0),s=n(30),i=n(2),o=n(32),a=n(33),u=n(6);e.exports=function(e){return new Promise(function(t,c){var l=e.data,d=e.headers;r.isFormData(l)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password||"";d.Authorization="Basic "+btoa(h+":"+m)}if(f.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};s(t,c,r),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var p=n(34),_=(e.withCredentials||a(e.url))&&e.xsrfCookieName?p.read(e.xsrfCookieName):void 0;_&&(d[e.xsrfHeaderName]=_)}if("setRequestHeader"in f&&r.forEach(d,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)}),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){f&&(f.abort(),c(e),f=null)}),void 0===l&&(l=null),f.send(l)})}},function(e,t,n){"use strict";var r=n(31);e.exports=function(e,t,n,s,i){var o=new Error(e);return r(o,t,n,s,i)}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],function(e){void 0!==t[e]&&(n[e]=t[e])}),r.forEach(["headers","auth","proxy"],function(s){r.isObject(t[s])?n[s]=r.deepMerge(e[s],t[s]):void 0!==t[s]?n[s]=t[s]:r.isObject(e[s])?n[s]=r.deepMerge(e[s]):void 0!==e[s]&&(n[s]=e[s])}),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){n(10),e.exports=n(40)},function(e,t,n){Ignition.registerTab(function(e){e.use(n(11)),e.component("ignition-stackoverflow",n(13))})},function(e,t,n){(function(e){(function(t){"use strict";var n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function r(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var s,i=(function(e,t){var s,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};s=n,i=function(){var t,n;function s(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[];for(n=0;n>>0,r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,G={},I={};function q(e,t,n,r){var s=r;"string"==typeof r&&(s=function(){return this[r]()}),e&&(I[e]=s),t&&(I[t[0]]=function(){return F(s.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function z(e,t){return e.isValid()?(t=B(t,e.localeData()),G[t]=G[t]||function(e){var t,n,r,s=e.match(H);for(t=0,n=s.length;t=0&&V.test(e);)e=e.replace(V,r),V.lastIndex=0,n-=1;return e}var Z=/\d/,$=/\d\d/,J=/\d{3}/,X=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,ee=/\d\d\d\d?/,te=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,re=/\d{1,4}/,se=/[+-]?\d{1,6}/,ie=/\d+/,oe=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,ue=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,le={};function de(e,t,n){le[e]=P(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return f(le,e)?le[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,s){return t||n||r||s})))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var me={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=x(e)}),n=0;n68?1900:2e3)};var Te,Ce=Pe("FullYear",!0);function Pe(e,t){return function(n){return null!=n?(Ne(this,e,n),s.updateOffset(this,t),this):Re(this,e)}}function Re(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ne(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Oe(e.year())?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ue(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ue(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Oe(e)?29:28:31-r%7%2}Te=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ie(e,t,n){var r=7+t-n;return-((7+Ge(e,0,r).getUTCDay()-t)%7)+r-1}function qe(e,t,n,r,s){var i,o,a=1+7*(t-1)+(7+n-r)%7+Ie(e,r,s);return a<=0?o=Ye(i=e-1)+a:a>Ye(e)?(i=e+1,o=a-Ye(e)):(i=e,o=a),{year:i,dayOfYear:o}}function ze(e,t,n){var r,s,i=Ie(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Be(s=e.year()-1,t,n):o>Be(e.year(),t,n)?(r=o-Be(e.year(),t,n),s=e.year()+1):(s=e.year(),r=o),{week:r,year:s}}function Be(e,t,n){var r=Ie(e,t,n),s=Ie(e+1,t,n);return(Ye(e)-r+s)/7}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),A("week",5),A("isoWeek",5),de("w",K),de("ww",K,$),de("W",K),de("WW",K,$),_e(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=x(e)});q("d",0,"do","day"),q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),de("d",K),de("e",K),de("E",K),de("dd",function(e,t){return t.weekdaysMinRegex(e)}),de("ddd",function(e,t){return t.weekdaysShortRegex(e)}),de("dddd",function(e,t){return t.weekdaysRegex(e)}),_e(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),_e(["d","e","E"],function(e,t,n,r){t[r]=x(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Je="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Xe=ce;var Qe=ce;var Ke=ce;function et(){function e(e,t){return t.length-e.length}var t,n,r,s,i,o=[],a=[],u=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=this.weekdaysMin(n,""),s=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),a.push(s),u.push(i),c.push(r),c.push(s),c.push(i);for(o.sort(e),a.sort(e),u.sort(e),c.sort(e),t=0;t<7;t++)a[t]=he(a[t]),u[t]=he(u[t]),c[t]=he(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function tt(){return this.hours()%12||12}function nt(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,tt),q("k",["kk",2],0,function(){return this.hours()||24}),q("hmm",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)}),q("hmmss",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),nt("a",!0),nt("A",!1),j("hour","h"),A("hour",13),de("a",rt),de("A",rt),de("H",K),de("h",K),de("k",K),de("HH",K,$),de("hh",K,$),de("kk",K,$),de("hmm",ee),de("hmmss",te),de("Hmm",ee),de("Hmmss",te),pe(["H","HH"],Se),pe(["k","kk"],function(e,t,n){var r=x(e);t[Se]=24===r?0:r}),pe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),pe(["h","hh"],function(e,t,n){t[Se]=x(e),p(n).bigHour=!0}),pe("hmm",function(e,t,n){var r=e.length-2;t[Se]=x(e.substr(0,r)),t[ke]=x(e.substr(r)),p(n).bigHour=!0}),pe("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Se]=x(e.substr(0,r)),t[ke]=x(e.substr(r,2)),t[be]=x(e.substr(s)),p(n).bigHour=!0}),pe("Hmm",function(e,t,n){var r=e.length-2;t[Se]=x(e.substr(0,r)),t[ke]=x(e.substr(r))}),pe("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Se]=x(e.substr(0,r)),t[ke]=x(e.substr(r,2)),t[be]=x(e.substr(s))});var st,it=Pe("Hours",!0),ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Le,monthsShort:We,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:Je,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},at={},ut={};function ct(e){return e?e.toLowerCase().replace("_","-"):e}function lt(t){var n=null;if(!at[t]&&e&&e.exports)try{n=st._abbr,r("./locale/"+t),dt(n)}catch(e){}return at[t]}function dt(e,t){var n;return e&&(n=u(t)?ht(e):ft(e,t))&&(st=n),st._abbr}function ft(e,t){if(null!==t){var n=ot;if(t.abbr=e,null!=at[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=at[e]._config;else if(null!=t.parentLocale){if(null==at[t.parentLocale])return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;n=at[t.parentLocale]._config}return at[e]=new N(R(n,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),dt(e),at[e]}return delete at[e],null}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return st;if(!i(e)){if(t=lt(e))return t;e=[e]}return function(e){for(var t,n,r,s,i=0;i0;){if(r=lt(s.slice(0,t).join("-")))return r;if(n&&n.length>=t&&M(s,n,!0)>=t-1)break;t--}i++}return null}(e)}function mt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[ve]<0||n[ve]>11?ve:n[we]<1||n[we]>Ue(n[ge],n[ve])?we:n[Se]<0||n[Se]>24||24===n[Se]&&(0!==n[ke]||0!==n[be]||0!==n[xe])?Se:n[ke]<0||n[ke]>59?ke:n[be]<0||n[be]>59?be:n[xe]<0||n[xe]>999?xe:-1,p(e)._overflowDayOfYear&&(twe)&&(t=we),p(e)._overflowWeeks&&-1===t&&(t=Me),p(e)._overflowWeekday&&-1===t&&(t=De),p(e).overflow=t),e}function pt(e,t,n){return null!=e?e:null!=t?t:n}function _t(e){var t,n,r,i,o=[];if(!e._d){for(r=function(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[ve]&&function(e){var t,n,r,s,i,o,a,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,n=pt(t.GG,e._a[ge],ze(Pt(),1,4).year),r=pt(t.W,1),((s=pt(t.E,1))<1||s>7)&&(u=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var c=ze(Pt(),i,o);n=pt(t.gg,e._a[ge],c.year),r=pt(t.w,c.week),null!=t.d?((s=t.d)<0||s>6)&&(u=!0):null!=t.e?(s=t.e+i,(t.e<0||t.e>6)&&(u=!0)):s=i}r<1||r>Be(n,i,o)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(a=qe(n,r,s,i,o),e._a[ge]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(i=pt(e._a[ge],r[ge]),(e._dayOfYear>Ye(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Ge(i,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[we]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Se]&&0===e._a[ke]&&0===e._a[be]&&0===e._a[xe]&&(e._nextDay=!0,e._a[Se]=0),e._d=(e._useUTC?Ge:function(e,t,n,r,s,i,o){var a=new Date(e,t,n,r,s,i,o);return e<100&&e>=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}).apply(null,o),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Se]=24),e._w&&void 0!==e._w.d&&e._w.d!==e._d.getDay()&&(p(e).weekdayMismatch=!0)}}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/Z|[+-]\d\d(?::?\d\d)?/,wt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],St=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kt=/^\/?Date\((\-?\d+)/i;function bt(e){var t,n,r,s,i,o,a=e._i,u=yt.exec(a)||gt.exec(a);if(u){for(p(e).iso=!0,t=0,n=wt.length;t0&&p(e).unusedInput.push(o),a=a.slice(a.indexOf(n)+n.length),c+=n.length),I[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),ye(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=u-c,a.length>0&&p(e).unusedInput.push(a),e._a[Se]<=12&&!0===p(e).bigHour&&e._a[Se]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[Se]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[Se],e._meridiem),_t(e),mt(e)}else Yt(e);else bt(e)}function Tt(e){var t=e._i,n=e._f;return e._locale=e._locale||ht(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new S(mt(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,s,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(s=0;sthis?this:e:y()});function Ut(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Pt();for(n=t[0],r=1;r(i=Be(e,r,s))&&(t=i),function(e,t,n,r,s){var i=qe(e,t,n,r,s),o=Ge(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,e,t,n,r,s))}q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),de("G",oe),de("g",oe),de("GG",K,$),de("gg",K,$),de("GGGG",re,X),de("gggg",re,X),de("GGGGG",se,Q),de("ggggg",se,Q),_e(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=x(e)}),_e(["gg","GG"],function(e,t,n,r){t[r]=s.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),j("quarter","Q"),A("quarter",7),de("Q",Z),pe("Q",function(e,t){t[ve]=3*(x(e)-1)}),q("D",["DD",2],"Do","date"),j("date","D"),A("date",9),de("D",K),de("DD",K,$),de("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),pe(["D","DD"],we),pe("Do",function(e,t){t[we]=x(e.match(K)[0])});var an=Pe("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),A("dayOfYear",4),de("DDD",ne),de("DDDD",J),pe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=x(e)}),q("m",["mm",2],0,"minute"),j("minute","m"),A("minute",14),de("m",K),de("mm",K,$),pe(["m","mm"],ke);var un=Pe("Minutes",!1);q("s",["ss",2],0,"second"),j("second","s"),A("second",15),de("s",K),de("ss",K,$),pe(["s","ss"],be);var cn,ln=Pe("Seconds",!1);for(q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),j("millisecond","ms"),A("millisecond",16),de("S",ne,Z),de("SS",ne,$),de("SSS",ne,J),cn="SSSS";cn.length<=9;cn+="S")de(cn,ie);function dn(e,t){t[xe]=x(1e3*("0."+e))}for(cn="S";cn.length<=9;cn+="S")pe(cn,dn);var fn=Pe("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var hn=S.prototype;function mn(e){return e}hn.add=Qt,hn.calendar=function(e,t){var n=e||Pt(),r=Vt(n,this).startOf("day"),i=s.calendarFormat(this,r)||"sameElse",o=t&&(P(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Pt(n)))},hn.clone=function(){return new S(this)},hn.diff=function(e,t,n){var r,s,i;if(!this.isValid())return NaN;if(!(r=Vt(e,this)).isValid())return NaN;switch(s=6e4*(r.utcOffset()-this.utcOffset()),t=L(t)){case"year":i=en(this,r)/12;break;case"month":i=en(this,r);break;case"quarter":i=en(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-s)/864e5;break;case"week":i=(this-r-s)/6048e5;break;default:i=this-r}return n?i:b(i)},hn.endOf=function(e){return void 0===(e=L(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},hn.format=function(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)},hn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Pt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.fromNow=function(e){return this.from(Pt(),e)},hn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Pt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},hn.toNow=function(e){return this.to(Pt(),e)},hn.get=function(e){return P(this[e=L(e)])?this[e]():this},hn.invalidAt=function(){return p(this).overflow},hn.isAfter=function(e,t){var n=k(e)?e:Pt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=L(u(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?z(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):P(Date.prototype.toISOString)?this.toDate().toISOString():z(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},hn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+s)},hn.toJSON=function(){return this.isValid()?this.toISOString():null},hn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hn.unix=function(){return Math.floor(this.valueOf()/1e3)},hn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hn.year=Ce,hn.isLeapYear=function(){return Oe(this.year())},hn.weekYear=function(e){return on.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},hn.isoWeekYear=function(e){return on.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},hn.quarter=hn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},hn.month=Ae,hn.daysInMonth=function(){return Ue(this.year(),this.month())},hn.week=hn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},hn.isoWeek=hn.isoWeeks=function(e){var t=ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},hn.weeksInYear=function(){var e=this.localeData()._week;return Be(this.year(),e.dow,e.doy)},hn.isoWeeksInYear=function(){return Be(this.year(),1,4)},hn.date=an,hn.day=hn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},hn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},hn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},hn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},hn.hour=hn.hours=it,hn.minute=hn.minutes=un,hn.second=hn.seconds=ln,hn.millisecond=hn.milliseconds=fn,hn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ht(ue,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Gt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Xt(this,Bt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},hn.utc=function(e){return this.utcOffset(0,e)},hn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},hn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ht(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},hn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Pt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},hn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=It,hn.isUTC=It,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=Y("dates accessor is deprecated. Use date instead.",an),hn.months=Y("months accessor is deprecated. Use month instead",Ae),hn.years=Y("years accessor is deprecated. Use year instead",Ce),hn.zone=Y("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),hn.isDSTShifted=Y("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=Tt(e))._a){var t=e._isUTC?m(e._a):Pt(e._a);this._isDSTShifted=this.isValid()&&M(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var pn=N.prototype;function _n(e,t,n,r){var s=ht(),i=m().set(r,t);return s[n](i,e)}function yn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return _n(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=_n(e,r,n,"month");return s}function gn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var s,i=ht(),o=e?i._week.dow:0;if(null!=n)return _n(t,(n+o)%7,r,"day");var a=[];for(s=0;s<7;s++)a[s]=_n(t,(s+o)%7,r,"day");return a}pn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return P(r)?r.call(t,n):r},pn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},pn.invalidDate=function(){return this._invalidDate},pn.ordinal=function(e){return this._ordinal.replace("%d",e)},pn.preparse=mn,pn.postformat=mn,pn.relativeTime=function(e,t,n,r){var s=this._relativeTime[n];return P(s)?s(e,t,n,r):s.replace(/%d/i,e)},pn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return P(n)?n(t):n.replace(/%s/i,t)},pn.set=function(e){var t,n;for(n in e)P(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},pn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||je).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},pn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[je.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pn.monthsParse=function(e,t,n){var r,s,i;if(this._monthsParseExact)return function(e,t,n){var r,s,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(s=Te.call(this._shortMonthsParse,o))?s:null:-1!==(s=Te.call(this._longMonthsParse,o))?s:null:"MMM"===t?-1!==(s=Te.call(this._shortMonthsParse,o))?s:-1!==(s=Te.call(this._longMonthsParse,o))?s:null:-1!==(s=Te.call(this._longMonthsParse,o))?s:-1!==(s=Te.call(this._shortMonthsParse,o))?s:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},pn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Ve.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},pn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||Ve.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},pn.week=function(e){return ze(e,this._week.dow,this._week.doy).week},pn.firstDayOfYear=function(){return this._week.doy},pn.firstDayOfWeek=function(){return this._week.dow},pn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},pn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},pn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},pn.weekdaysParse=function(e,t,n){var r,s,i;if(this._weekdaysParseExact)return function(e,t,n){var r,s,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(s=Te.call(this._weekdaysParse,o))?s:null:"ddd"===t?-1!==(s=Te.call(this._shortWeekdaysParse,o))?s:null:-1!==(s=Te.call(this._minWeekdaysParse,o))?s:null:"dddd"===t?-1!==(s=Te.call(this._weekdaysParse,o))?s:-1!==(s=Te.call(this._shortWeekdaysParse,o))?s:-1!==(s=Te.call(this._minWeekdaysParse,o))?s:null:"ddd"===t?-1!==(s=Te.call(this._shortWeekdaysParse,o))?s:-1!==(s=Te.call(this._weekdaysParse,o))?s:-1!==(s=Te.call(this._minWeekdaysParse,o))?s:null:-1!==(s=Te.call(this._minWeekdaysParse,o))?s:-1!==(s=Te.call(this._weekdaysParse,o))?s:-1!==(s=Te.call(this._shortWeekdaysParse,o))?s:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},pn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},pn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},pn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},dt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===x(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),s.lang=Y("moment.lang is deprecated. Use moment.locale instead.",dt),s.langData=Y("moment.langData is deprecated. Use moment.localeData instead.",ht);var vn=Math.abs;function wn(e,t,n,r){var s=Bt(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function Sn(e){return e<0?Math.floor(e):Math.ceil(e)}function kn(e){return 4800*e/146097}function bn(e){return 146097*e/4800}function xn(e){return function(){return this.as(e)}}var Mn=xn("ms"),Dn=xn("s"),Yn=xn("m"),On=xn("h"),Tn=xn("d"),Cn=xn("w"),Pn=xn("M"),Rn=xn("y");function Nn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Un=Nn("milliseconds"),jn=Nn("seconds"),Ln=Nn("minutes"),Wn=Nn("hours"),En=Nn("days"),An=Nn("months"),Fn=Nn("years");var Hn=Math.round,Vn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function In(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,r=Gn(this._days),s=Gn(this._months);t=b((e=b(n/60))/60),n%=60,e%=60;var i=b(s/12),o=s%=12,a=r,u=t,c=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",h=In(this._months)!==In(d)?"-":"",m=In(this._days)!==In(d)?"-":"",p=In(this._milliseconds)!==In(d)?"-":"";return f+"P"+(i?h+i+"Y":"")+(o?h+o+"M":"")+(a?m+a+"D":"")+(u||c||l?"T":"")+(u?p+u+"H":"")+(c?p+c+"M":"")+(l?p+l+"S":"")}var zn=Lt.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},zn.add=function(e,t){return wn(this,e,t,1)},zn.subtract=function(e,t){return wn(this,e,t,-1)},zn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=L(e))||"year"===e)return t=this._days+r/864e5,n=this._months+kn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(bn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},zn.asMilliseconds=Mn,zn.asSeconds=Dn,zn.asMinutes=Yn,zn.asHours=On,zn.asDays=Tn,zn.asWeeks=Cn,zn.asMonths=Pn,zn.asYears=Rn,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},zn._bubble=function(){var e,t,n,r,s,i=this._milliseconds,o=this._days,a=this._months,u=this._data;return i>=0&&o>=0&&a>=0||i<=0&&o<=0&&a<=0||(i+=864e5*Sn(bn(a)+o),o=0,a=0),u.milliseconds=i%1e3,e=b(i/1e3),u.seconds=e%60,t=b(e/60),u.minutes=t%60,n=b(t/60),u.hours=n%24,a+=s=b(kn(o+=b(n/24))),o-=Sn(bn(s)),r=b(a/12),a%=12,u.days=o,u.months=a,u.years=r,this},zn.clone=function(){return Bt(this)},zn.get=function(e){return e=L(e),this.isValid()?this[e+"s"]():NaN},zn.milliseconds=Un,zn.seconds=jn,zn.minutes=Ln,zn.hours=Wn,zn.days=En,zn.weeks=function(){return b(this.days()/7)},zn.months=An,zn.years=Fn,zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Bt(e).abs(),s=Hn(r.as("s")),i=Hn(r.as("m")),o=Hn(r.as("h")),a=Hn(r.as("d")),u=Hn(r.as("M")),c=Hn(r.as("y")),l=s<=Vn.ss&&["s",s]||s0,l[4]=n,function(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},zn.toISOString=qn,zn.toString=qn,zn.toJSON=qn,zn.locale=tn,zn.localeData=rn,zn.toIsoString=Y("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),zn.lang=nn,q("X",0,0,"unix"),q("x",0,0,"valueOf"),de("x",oe),de("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),pe("x",function(e,t,n){n._d=new Date(x(e))}),s.version="2.19.1",t=Pt,s.fn=hn,s.min=function(){return Ut("isBefore",[].slice.call(arguments,0))},s.max=function(){return Ut("isAfter",[].slice.call(arguments,0))},s.now=function(){return Date.now?Date.now():+new Date},s.utc=m,s.unix=function(e){return Pt(1e3*e)},s.months=function(e,t){return yn(e,t,"months")},s.isDate=l,s.locale=dt,s.invalid=y,s.duration=Bt,s.isMoment=k,s.weekdays=function(e,t,n){return gn(e,t,n,"weekdays")},s.parseZone=function(){return Pt.apply(null,arguments).parseZone()},s.localeData=ht,s.isDuration=Wt,s.monthsShort=function(e,t){return yn(e,t,"monthsShort")},s.weekdaysMin=function(e,t,n){return gn(e,t,n,"weekdaysMin")},s.defineLocale=ft,s.updateLocale=function(e,t){if(null!=t){var n,r=ot;null!=at[e]&&(r=at[e]._config),(n=new N(t=R(r,t))).parentLocale=at[e],at[e]=n,dt(e)}else null!=at[e]&&(null!=at[e].parentLocale?at[e]=at[e].parentLocale:null!=at[e]&&delete at[e]);return at[e]},s.locales=function(){return O(at)},s.weekdaysShort=function(e,t,n){return gn(e,t,n,"weekdaysShort")},s.normalizeUnits=L,s.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},s.relativeTimeThreshold=function(e,t){return void 0!==Vn[e]&&(void 0===t?Vn[e]:(Vn[e]=t,"s"===e&&(Vn.ss=t-1),!0))},s.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},s.prototype=hn,s},"object"===o(t)?e.exports=i():s.moment=i()}(s={exports:{}},s.exports),s.exports),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tn.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(s=0;s1)for(var n=1;n=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o):o}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function s(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=s(window.location.href),function(t){var n=r.isString(t)?s(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,s,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(s)&&a.push("path="+s),r.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(8);function s(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.source=function(){var e;return{token:new s(function(t){e=t}),cancel:e}},e.exports=s},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tab-content",attrs:{id:"astrotomic-stackoverflow-tab"}},[n("div",{staticClass:"layout-col py-2"},[n("div",{staticClass:"my-2"},[n("div",{staticClass:"flex mb-1"},[n("select",{directives:[{name:"model",rawName:"v-model",value:e.site,expression:"site"}],staticClass:"inline-block mr-3 p-2 rounded border-b-2 border-gray-400 bg-gray-100 focus:border-orange-500 hover:border-orange-400",on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.site=t.target.multiple?n:n[0]},e.newSearch]}},[n("option",{attrs:{value:"stackoverflow"}},[e._v("stackoverflow.com")]),e._v(" "),n("option",{attrs:{value:"pt.stackoverflow"}},[e._v("pt.stackoverflow.com")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.trim",value:e.query,expression:"query",modifiers:{trim:!0}}],staticClass:"block flex-grow mr-3 p-2 rounded border-b-2 border-gray-400 bg-gray-100 focus:border-orange-500 hover:border-orange-400",attrs:{type:"search"},domProps:{value:e.query},on:{change:e.newSearch,input:function(t){t.target.composing||(e.query=t.target.value.trim())},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("a",{staticClass:"inline-block p-2 rounded border-b-2 border-orange-400 hover:border-orange-800 bg-orange-100 hover:text-white hover:bg-orange-500",attrs:{href:e.url,target:"_blank"}},[n("i",{staticClass:"fab fa-stack-overflow mr-1"}),e._v("\n StackOverflow\n ")])]),e._v(" "),n("a",{staticClass:"text-orange-400 hover:text-orange-500",attrs:{href:"https://stackoverflow.com/help/searching",target:"_blank"}},[e._v("\n advanced search tips\n ")])]),e._v(" "),n("section",[e.is_loading?n("div",{staticClass:"text-center py-2"},[n("i",{staticClass:"fas fa-spinner fa-spin fa-3x text-orange-400"})]):e._e(),e._v(" "),e.is_loading||e.questions.length?e._e():n("div",{staticClass:"text-gray-500 py-2"},[e._v('\n No questions found for your query "'+e._s(this.query)+'".\n ')]),e._v(" "),e._l(e.questions,function(t){return!e.is_loading&&e.questions.length?n("article",{staticClass:"mb-2 p-2 border-l-8 border-gray-400 hover:border-orange-500 rounded bg-gray-100"},[n("div",{staticClass:"flex"},[n("div",{staticClass:"flex-grow"},[n("a",{staticClass:"block hover:text-orange-500",attrs:{href:t.link,target:"_blank"}},[n("h3",{staticClass:"font-bold",domProps:{innerHTML:e._s(t.title)}})]),e._v(" "),n("div",{staticClass:"text-gray-400"},[e._v("\n asked by\n "),n("a",{staticClass:"font-semibold text-blue-400 hover:text-blue-500",attrs:{href:t.owner.link,target:"_blank"}},[e._v("\n "+e._s(t.owner.display_name)+"\n ")]),e._v("\n at\n "),n("time",{staticClass:"font-medium text-gray-500",attrs:{datetime:e._f("moment")(t.creation_date,"YYYY-MM-DD HH:mm:ss")}},[e._v("\n "+e._s(e._f("moment")(t.creation_date,"YYYY-MM-DD"))+"\n ")])]),e._v(" "),n("div",{staticClass:"font-mono text-xs mt-1"},e._l(t.tags,function(t){return n("span",{staticClass:"mr-1 px-1 py-px bg-gray-200 text-gray-500 rounded"},[e._v(e._s(t))])}),0)]),e._v(" "),n("div",{staticClass:"ml-2"},[n("div",{staticClass:"p-2 text-center border border-transparent",class:{"text-gray-400":0==t.score,"text-red-400":t.score<0,"text-gray-500":t.score>0}},[n("span",{staticClass:"block text-lg"},[e._v(e._s(t.score))]),e._v(" "),n("span",[e._v("votes")])])]),e._v(" "),n("div",{staticClass:"ml-2"},[n("div",{staticClass:"p-2 text-center border border-green-400 rounded",class:{"text-green-400":!t.is_answered,"text-white bg-green-400":t.is_answered}},[n("span",{staticClass:"block text-lg"},[e._v(e._s(t.answer_count))]),e._v(" "),n("span",[e._v("answers")])])])])]):e._e()})],2),e._v(" "),!e.is_loading&&e.questions.length?n("footer",{staticClass:"flex"},[e.page>1?n("span",{staticClass:"cursor-pointer px-2 py-1 rounded inline-block border border-gray-400 hover:border-orange-500 hover:text-orange-500",on:{click:e.prevPage}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v("\n prev\n ")]):e._e(),e._v(" "),n("span",{staticClass:"py-1 text-center flex-grow"},[e._v("\n page: "+e._s(e.page)+"\n ")]),e._v(" "),e.has_next?n("span",{staticClass:"cursor-pointer px-2 py-1 rounded inline-block border border-gray-400 hover:border-orange-500 hover:text-orange-500",on:{click:e.nextPage}},[e._v("\n next\n "),n("i",{staticClass:"fas fa-angle-double-right"})]):e._e()]):e._e()])])},staticRenderFns:[]}},function(e,t){}]); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 11 | "format": "prettier --single-quote --write 'resources/**/*.{css,js,vue}'" 12 | }, 13 | "devDependencies": { 14 | "cross-env": "^5.0.0", 15 | "laravel-mix": "^2.0", 16 | "laravel-mix-purgecss": "^1.0", 17 | "prettier": "^1.14.0" 18 | }, 19 | "dependencies": { 20 | "axios": "^0.19.0", 21 | "tailwindcss": "^1.1.2", 22 | "vue": "^2.5.0", 23 | "vue-moment": "^4.0.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/js/components/Tab.vue: -------------------------------------------------------------------------------- 1 | 99 | 100 | 161 | 162 | 164 | -------------------------------------------------------------------------------- /resources/js/tab.js: -------------------------------------------------------------------------------- 1 | Ignition.registerTab((Vue) => { 2 | Vue.use(require('vue-moment')); 3 | Vue.component('ignition-stackoverflow', require('./components/Tab')) 4 | }); 5 | -------------------------------------------------------------------------------- /resources/sass/tab.scss: -------------------------------------------------------------------------------- 1 | #astrotomic-stackoverflow-tab { 2 | @import "~tailwindcss/dist/utilities"; 3 | } 4 | -------------------------------------------------------------------------------- /src/StackOverflowSolutionProvider.php: -------------------------------------------------------------------------------- 1 | getUrl($throwable); 22 | 23 | $response = $this->getResponse($url); 24 | 25 | $questions = $this->getQuestionsByResponse($response); 26 | 27 | return array_filter(array_map([$this, 'getSolutionByQuestion'], $questions)); 28 | } catch (Exception $exception) { 29 | return []; 30 | } 31 | } 32 | 33 | protected function getSolutionByQuestion(array $question): ?BaseSolution 34 | { 35 | if (empty($question['title'])) { 36 | return null; 37 | } 38 | 39 | if (empty($question['body_markdown'])) { 40 | return null; 41 | } 42 | 43 | if (empty($question['link'])) { 44 | return null; 45 | } 46 | 47 | $title = html_entity_decode($question['title'], ENT_QUOTES); 48 | $description = Str::words(html_entity_decode($question['body_markdown'], ENT_QUOTES), 50, ' ...'); 49 | $link = $question['link']; 50 | 51 | return BaseSolution::create($title) 52 | ->setSolutionDescription($description) 53 | ->setDocumentationLinks([$title => $link]); 54 | } 55 | 56 | protected function getQuestionsByResponse(?string $response): array 57 | { 58 | if ($response === null) { 59 | return []; 60 | } 61 | 62 | $data = json_decode($response, true); 63 | 64 | if (json_last_error() !== JSON_ERROR_NONE) { 65 | return []; 66 | } 67 | 68 | return $data['items'] ?? []; 69 | } 70 | 71 | protected function getResponse(string $url): ?string 72 | { 73 | $curl = curl_init($url); 74 | 75 | curl_setopt($curl, CURLOPT_ENCODING, 'gzip'); 76 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 77 | curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, 500); 78 | curl_setopt($curl, CURLOPT_TIMEOUT_MS, 1000); 79 | 80 | $response = curl_exec($curl); 81 | 82 | curl_close($curl); 83 | 84 | if (empty($response)) { 85 | return null; 86 | } 87 | 88 | return $response; 89 | } 90 | 91 | protected function getUrl(Throwable $throwable): string 92 | { 93 | $query = $throwable->getMessage(); 94 | 95 | if (empty($query)) { 96 | $query = get_class($throwable); 97 | } 98 | 99 | if (Str::contains($query, base_path())) { 100 | $query = str_replace(base_path(), '', $query); 101 | } 102 | 103 | $query = http_build_query([ 104 | 'page' => 1, 105 | 'pagesize' => 5, 106 | 'order' => 'desc', 107 | 'sort' => 'relevance', 108 | 'site' => 'stackoverflow', 109 | 'accepted' => 'True', 110 | 'filter' => '!9YdnSJ*_T', 111 | 'q' => urlencode($query), 112 | ]); 113 | 114 | return 'https://api.stackexchange.com/2.2/search/advanced?'.urldecode($query); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/Tab.php: -------------------------------------------------------------------------------- 1 | script($this->component(), __DIR__.'/../dist/tab.js'); 22 | $this->style($this->component(), __DIR__.'/../dist/tab.css'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/TabServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->make(SolutionProviderRepositoryContract::class)->registerSolutionProvider(StackOverflowSolutionProvider::class); 21 | } 22 | 23 | /** 24 | * Register any application services. 25 | * 26 | * @return void 27 | */ 28 | public function register() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | require('laravel-mix-purgecss'); 3 | 4 | mix 5 | .setPublicPath('dist') 6 | .js('resources/js/tab.js', '') 7 | .sass('resources/sass/tab.scss', '') 8 | .options({ 9 | processCssUrls: false, 10 | }) 11 | .purgeCss() 12 | ; 13 | --------------------------------------------------------------------------------