From a9c0e90825b1c54a65dad35904589bdbe2c2c8d7 Mon Sep 17 00:00:00 2001 From: mogmarsh Date: Thu, 3 Oct 2024 16:26:03 +0000 Subject: [PATCH] Built changes for v0.6.0 from production f79db82499282b6535e88a247503f4528628cd13 --- .deployignore | 21 - .github/dependabot.yml | 25 - .github/workflows/built-branch.yml | 12 - .github/workflows/built-release.yml | 14 - .github/workflows/code-quality.yml | 18 - .github/workflows/dependabot-auto-approve.yml | 11 - .github/workflows/dependabot-auto-merge.yml | 10 - .github/workflows/node-tests.yml | 17 - .github/workflows/unit-test.yml | 15 - .github/workflows/update-changelog.yml | 28 - .../workflows/upgrade-wordpress-plugin.yml | 18 - .gitignore | 21 +- .phpcs.xml | 51 -- .phpcs/.gitkeep | 0 client/build/assetMap.json | 1 + .../blockEditor.34b43fe6.bundle.asset.php | 1 + client/build/blockEditor.34b43fe6.bundle.js | 42 ++ client/build/blockEditor.34b43fe6.min.css | 1 + client/build/main.b0805fcc.bundle.asset.php | 1 + client/build/main.b0805fcc.bundle.js | 2 + .../build/main.b0805fcc.bundle.js.LICENSE.txt | 5 + client/build/main.b0805fcc.min.css | 1 + tests/bootstrap.php | 135 ---- .../controllers/test-authors-controller.php | 44 -- .../test-hydrate-profiles-controller.php | 50 -- .../controllers/test-users-controller.php | 44 -- tests/feature/test-bylines-template-tags.php | 612 ------------------ tests/feature/test-core-filters.php | 290 --------- tests/feature/test-profile-byline-sync.php | 60 -- tests/feature/test-profile-user-sync.php | 96 --- tests/testcases/class-test-controller.php | 40 -- vendor/autoload.php | 25 + vendor/composer/ClassLoader.php | 579 +++++++++++++++++ vendor/composer/InstalledVersions.php | 359 ++++++++++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 10 + vendor/composer/autoload_namespaces.php | 9 + vendor/composer/autoload_psr4.php | 9 + vendor/composer/autoload_real.php | 36 ++ vendor/composer/autoload_static.php | 20 + vendor/composer/installed.json | 5 + vendor/composer/installed.php | 23 + 42 files changed, 1163 insertions(+), 1619 deletions(-) delete mode 100644 .deployignore delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/built-branch.yml delete mode 100644 .github/workflows/built-release.yml delete mode 100644 .github/workflows/code-quality.yml delete mode 100644 .github/workflows/dependabot-auto-approve.yml delete mode 100644 .github/workflows/dependabot-auto-merge.yml delete mode 100644 .github/workflows/node-tests.yml delete mode 100644 .github/workflows/unit-test.yml delete mode 100644 .github/workflows/update-changelog.yml delete mode 100644 .github/workflows/upgrade-wordpress-plugin.yml delete mode 100644 .phpcs.xml delete mode 100644 .phpcs/.gitkeep create mode 100644 client/build/assetMap.json create mode 100644 client/build/blockEditor.34b43fe6.bundle.asset.php create mode 100644 client/build/blockEditor.34b43fe6.bundle.js create mode 100644 client/build/blockEditor.34b43fe6.min.css create mode 100644 client/build/main.b0805fcc.bundle.asset.php create mode 100644 client/build/main.b0805fcc.bundle.js create mode 100644 client/build/main.b0805fcc.bundle.js.LICENSE.txt create mode 100644 client/build/main.b0805fcc.min.css delete mode 100755 tests/bootstrap.php delete mode 100644 tests/feature/controllers/test-authors-controller.php delete mode 100644 tests/feature/controllers/test-hydrate-profiles-controller.php delete mode 100644 tests/feature/controllers/test-users-controller.php delete mode 100644 tests/feature/test-bylines-template-tags.php delete mode 100644 tests/feature/test-core-filters.php delete mode 100755 tests/feature/test-profile-byline-sync.php delete mode 100644 tests/feature/test-profile-user-sync.php delete mode 100644 tests/testcases/class-test-controller.php create mode 100644 vendor/autoload.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/InstalledVersions.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/composer/installed.php diff --git a/.deployignore b/.deployignore deleted file mode 100644 index e215dfaf..00000000 --- a/.deployignore +++ /dev/null @@ -1,21 +0,0 @@ -.DS_Store -Thumbs.db -wp-cli.local.yml -node_modules/ -*.sql -*.tar.gz -*.zip -.phpunit.result.cache -Dockerfile -output.log -.github -tests -bin -composer.lock -.phpcs.xml -phpunit.xml -configure.php -DOCKER_ENV -phpunit.xml -.phpcs -Makefile diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 115b12e2..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "composer" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" - day: "saturday" - time: "09:00" - timezone: "America/New_York" - ignore: - - dependency-name: "@wordpress/*" diff --git a/.github/workflows/built-branch.yml b/.github/workflows/built-branch.yml deleted file mode 100644 index 5e575f31..00000000 --- a/.github/workflows/built-branch.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Create a -built branch - -on: - push: - branches: - - production - -jobs: - built-branch: - uses: alleyinteractive/.github/.github/workflows/built-branch.yml@main - with: - node: 20 diff --git a/.github/workflows/built-release.yml b/.github/workflows/built-release.yml deleted file mode 100644 index 14b40559..00000000 --- a/.github/workflows/built-release.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Built Release - -on: - push: - branches: - - develop - - main - - production - -jobs: - built-release: - uses: alleyinteractive/.github/.github/workflows/built-release.yml@main - with: - node: 20 diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml deleted file mode 100644 index 14ae1bda..00000000 --- a/.github/workflows/code-quality.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Code Quality - -on: - push: - branches: - - production - pull_request: - schedule: - - cron: '0 0 * * *' - -jobs: - coding-quality: - uses: alleyinteractive/.github/.github/workflows/php-composer-command.yml@main - with: - php: 8.1 - command: | - phpcs - phpstan diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-approve.yml deleted file mode 100644 index e2119dec..00000000 --- a/.github/workflows/dependabot-auto-approve.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: dependabot-auto-approve -on: - pull_request: - -permissions: - pull-requests: write - contents: write - -jobs: - dependabot: - uses: alleyinteractive/.github/.github/workflows/dependabot-auto-approve.yml@main diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml deleted file mode 100644 index aaed13d4..00000000 --- a/.github/workflows/dependabot-auto-merge.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: dependabot-auto-merge -on: pull_request_target - -permissions: - pull-requests: write - contents: write - -jobs: - dependabot: - uses: alleyinteractive/.github/.github/workflows/dependabot-auto-merge.yml@main diff --git a/.github/workflows/node-tests.yml b/.github/workflows/node-tests.yml deleted file mode 100644 index e2d5b6b2..00000000 --- a/.github/workflows/node-tests.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Node Tests - -on: - push: - branches: - - production - pull_request: - schedule: - - cron: '0 0 * * *' - -jobs: - node-tests: - uses: alleyinteractive/.github/.github/workflows/node-tests.yml@main - with: - run-audit: true - ci: true - node: 20 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml deleted file mode 100644 index 99f051f3..00000000 --- a/.github/workflows/unit-test.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Testing Suite - -on: - pull_request: - -jobs: - unit-tests: - strategy: - matrix: - php: [8.0, 8.1] - wordpress: [5.9, "latest"] - uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main - with: - php: ${{ matrix.php }} - wordpress: ${{ matrix.wordpress }} diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml deleted file mode 100644 index 0cdea233..00000000 --- a/.github/workflows/update-changelog.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Update Changelog" - -on: - release: - types: [released] - -jobs: - update: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: main - - - name: Update Changelog - uses: stefanzweifel/changelog-updater-action@v1 - with: - latest-version: ${{ github.event.release.name }} - release-notes: ${{ github.event.release.body }} - - - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v5 - with: - branch: main - commit_message: Update CHANGELOG - file_pattern: CHANGELOG.md diff --git a/.github/workflows/upgrade-wordpress-plugin.yml b/.github/workflows/upgrade-wordpress-plugin.yml deleted file mode 100644 index ffa4c6a3..00000000 --- a/.github/workflows/upgrade-wordpress-plugin.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Update WordPress Plugin - -on: - schedule: - - cron: '0 */6 * * *' - -permissions: - contents: write - pull-requests: write - -jobs: - update-plugin: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: alleyinteractive/action-update-wordpress-plugin@v2.0.0 - with: - plugin-file: 'byline-manager.php' diff --git a/.gitignore b/.gitignore index 3074daaf..e215dfaf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,21 @@ .DS_Store -.vscode -.npm Thumbs.db wp-cli.local.yml node_modules/ -composer.lock *.sql *.tar.gz *.zip -.phpcs/*.json .phpunit.result.cache - -# Client build files -client/build/ -/vendor +Dockerfile +output.log +.github +tests +bin +composer.lock +.phpcs.xml +phpunit.xml +configure.php +DOCKER_ENV +phpunit.xml +.phpcs +Makefile diff --git a/.phpcs.xml b/.phpcs.xml deleted file mode 100644 index 37c4fa05..00000000 --- a/.phpcs.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - PHP_CodeSniffer standard for byline-manager. - - - - - - - - - - - - - - - - - - - - - - - - tests/ - build/ - vendor/ - - - - - - - - - - - - - - - - - diff --git a/.phpcs/.gitkeep b/.phpcs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/client/build/assetMap.json b/client/build/assetMap.json new file mode 100644 index 00000000..7dd9d1b4 --- /dev/null +++ b/client/build/assetMap.json @@ -0,0 +1 @@ +{"hash":"469b2720ff58045e520d","mode":"production","main":{"css":{"path":"main.b0805fcc.min.css","hash":"566381b80137883c50db"},"js":{"path":"main.b0805fcc.bundle.js","hash":"b02d75616cf009c704b4"},"php":{"path":"main.b0805fcc.bundle.asset.php","hash":"469b2720ff58045e520d"}},"blockEditor":{"css":{"path":"blockEditor.34b43fe6.min.css","hash":"566381b80137883c50db"},"js":{"path":"blockEditor.34b43fe6.bundle.js","hash":"fcedd43d93af44e57eb1"},"php":{"path":"blockEditor.34b43fe6.bundle.asset.php","hash":"469b2720ff58045e520d"}}} \ No newline at end of file diff --git a/client/build/blockEditor.34b43fe6.bundle.asset.php b/client/build/blockEditor.34b43fe6.bundle.asset.php new file mode 100644 index 00000000..7a3d30cb --- /dev/null +++ b/client/build/blockEditor.34b43fe6.bundle.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => '39ff2f25d6e25f0f7f15'); diff --git a/client/build/blockEditor.34b43fe6.bundle.js b/client/build/blockEditor.34b43fe6.bundle.js new file mode 100644 index 00000000..3e2e5325 --- /dev/null +++ b/client/build/blockEditor.34b43fe6.bundle.js @@ -0,0 +1,42 @@ +!function(){var e={"./node_modules/@alleyinteractive/block-editor-tools/build/index.bundle.min.js":function(e){var t;self,t=()=>(()=>{var e={6484:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";n.d(t,{c:()=>s});var r=n(2876),o=n.n(r),i=n(1849),a=n.n(i)()(o());a.push([e.id,".alley-scripts-post-picker__post-list{display:flex;flex-wrap:wrap;float:left;height:calc(70vh - 200px);justify-content:flex-start;overflow-y:auto;padding:8px;width:100%}.alley-scripts-post-picker__post{border:1px solid #eee;height:auto;justify-content:center;margin:0 8px 8px 0;transition:background-color .2s ease-in-out;width:calc((100% - 40px)/3)}@media(min-width: 780px){.alley-scripts-post-picker__post{width:calc((100% - 40px)/5)}}.alley-scripts-post-picker__post:hover{background-color:#f0f0f0}.alley-scripts-post-picker__post.is-selected{background-color:#f0f0f0}.alley-scripts-post-picker__load-more{clear:both;float:left;text-align:center;width:100%}","",{version:3,sources:["webpack://./src/components/post-picker/post-list.scss"],names:[],mappings:"AAAA,sCACE,YAAA,CACA,cAAA,CACA,UAAA,CACA,yBAAA,CACA,0BAAA,CACA,eAAA,CACA,WAAA,CACA,UAAA,CAGF,iCACE,qBAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAAA,CACA,2CAAA,CACA,2BAAA,CAGA,yBATF,iCAUI,2BAAA,CAAA,CAGF,uCACE,wBAAA,CAGF,6CACE,wBAAA,CAIJ,sCACE,UAAA,CACA,UAAA,CACA,iBAAA,CACA,UAAA",sourcesContent:[".alley-scripts-post-picker__post-list {\n display: flex;\n flex-wrap: wrap;\n float: left;\n height: calc(70vh - 200px);\n justify-content: flex-start;\n overflow-y: auto;\n padding: 8px;\n width: 100%;\n}\n\n.alley-scripts-post-picker__post {\n border: 1px solid #eee;\n height: auto;\n justify-content: center;\n margin: 0 8px 8px 0;\n transition: background-color 0.2s ease-in-out;\n width: calc((100% - 40px) / 3);\n\n\n @media (min-width: 780px) {\n width: calc((100% - 40px) / 5);\n }\n\n &:hover {\n background-color: #f0f0f0;\n }\n\n &.is-selected {\n background-color: #f0f0f0;\n }\n}\n\n.alley-scripts-post-picker__load-more {\n clear: both;\n float: left;\n text-align: center;\n width: 100%;\n}\n"],sourceRoot:""}]);const s=a},9680:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var r=n(2876),o=n.n(r),i=n(1849),a=n.n(i)()(o());a.push([e.id,".alley-scripts-post-picker__modal .components-modal__content{width:90vw}.alley-scripts-post-picker__buttons{clear:both;display:block;text-align:right;width:100%}.alley-scripts-post-picker__buttons button{margin:5px}","",{version:3,sources:["webpack://./src/components/post-picker/search-modal.scss"],names:[],mappings:"AACE,6DACE,UAAA,CAIJ,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".alley-scripts-post-picker__modal {\n .components-modal__content {\n width: 90vw;\n }\n}\n\n.alley-scripts-post-picker__buttons {\n clear: both;\n display: block;\n text-align: right;\n width: 100%;\n\n button {\n margin: 5px;\n }\n}\n"],sourceRoot:""}]);const s=a},3800:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var r=n(2876),o=n.n(r),i=n(1849),a=n.n(i)()(o());a.push([e.id,".post-picker-notice{margin:0 0 .5rem 0}","",{version:3,sources:["webpack://./src/components/post-picker/style.scss"],names:[],mappings:"AAAA,oBACE,kBAAA",sourcesContent:[".post-picker-notice {\n margin: 0 0 0.5rem 0;\n}\n"],sourceRoot:""}]);const s=a},5500:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var r=n(2876),o=n.n(r),i=n(1849),a=n.n(i)()(o());a.push([e.id,'.edit-post-sidebar .autocomplete__component,.editor-styles-wrapper .autocomplete__component{margin-bottom:20px}.edit-post-sidebar .autocomplete-base-control,.editor-styles-wrapper .autocomplete-base-control{position:relative}.edit-post-sidebar .autocomplete-text-control__input,.editor-styles-wrapper .autocomplete-text-control__input{margin:0}.edit-post-sidebar .autocomplete__selection-list,.editor-styles-wrapper .autocomplete__selection-list{list-style-type:none;margin:0 0 6px;padding:0}.edit-post-sidebar .autocomplete__selection-list--item,.editor-styles-wrapper .autocomplete__selection-list--item{display:inline-block;list-style:none}.edit-post-sidebar .autocomplete__selection-list--item--button,.editor-styles-wrapper .autocomplete__selection-list--item--button{margin-bottom:4px;margin-right:3px}.edit-post-sidebar .autocomplete__selection-list--item--button::after,.editor-styles-wrapper .autocomplete__selection-list--item--button::after{content:"×";font-size:16px;line-height:20px;margin-left:5px}.edit-post-sidebar .autocomplete__dropdown,.editor-styles-wrapper .autocomplete__dropdown{background-color:#fff;border-color:rgba(0,0,0,0) #e2e4e7 #e2e4e7;border-radius:0 0 4px 4px;border-style:solid;border-width:0 1px 1px;left:0;max-height:0;overflow-y:hidden;position:absolute;top:calc(100% + 1px);visibility:hidden;width:100%;z-index:10}.edit-post-sidebar .autocomplete__dropdown--is-open,.editor-styles-wrapper .autocomplete__dropdown--is-open{box-shadow:0 3px 30px rgba(25,30,35,.1);max-height:225px;overflow-y:scroll;visibility:visible}.edit-post-sidebar .autocomplete__dropdown--notice,.editor-styles-wrapper .autocomplete__dropdown--notice{padding:15px}.edit-post-sidebar .autocomplete__dropdown--results,.editor-styles-wrapper .autocomplete__dropdown--results{list-style:none;margin:0;padding:0}.edit-post-sidebar .autocomplete__list--item,.editor-styles-wrapper .autocomplete__list--item{list-style:none}.edit-post-sidebar .autocomplete__list--item>button,.editor-styles-wrapper .autocomplete__list--item>button{background:rgba(0,0,0,0);border-color:#e2e4e7;border-style:solid;border-width:0 0 1px;height:100%;line-height:1.25;text-align:left;white-space:inherit;width:100%}.edit-post-sidebar .autocomplete__list--item:last-child>button,.editor-styles-wrapper .autocomplete__list--item:last-child>button{border-bottom:0}',"",{version:3,sources:["webpack://./src/components/selector/styles.scss"],names:[],mappings:"AAAA,4FAgBI,kBACE,CAAA,gGAMF,iBACE,CAAA,8GAMF,QACE,CAAA,sGAMF,oBACE,CAAA,cACA,CAAA,SACA,CAAA,kHAEA,oBACE,CAAA,eACA,CAAA,kIAEA,iBACE,CAAA,gBACA,CAAA,gJAEA,WACE,CAAA,cACA,CAAA,gBACA,CAAA,eACA,CAAA,0FASR,qBACE,CAAA,0CACA,CAAA,yBACA,CAAA,kBACA,CAAA,sBACA,CAAA,MACA,CAAA,YACA,CAAA,iBACA,CAAA,iBACA,CAAA,oBACA,CAAA,iBACA,CAAA,UACA,CAAA,UACA,CAAA,4GAGA,uCACE,CAAA,gBACA,CAAA,iBACA,CAAA,kBACA,CAAA,0GAIF,YACE,CAAA,4GAIF,eACE,CAAA,QACA,CAAA,SACA,CAAA,8FAOJ,eACE,CAAA,4GAEA,wBACE,CAAA,oBACA,CAAA,kBACA,CAAA,oBACA,CAAA,WACA,CAAA,gBACA,CAAA,eACA,CAAA,mBACA,CAAA,UACA,CAAA,kIAGF,eACE",sourcesContent:["//--------------------------------------------------------------\n// AutoComplete Styles\n//--------------------------------------------------------------\n\n/* stylelint-disable max-nesting-depth */\n\n//-----------------------------------------\n// Accommodate editor well, or the sidebar.\n//-----------------------------------------\n.edit-post-sidebar,\n.editor-styles-wrapper {\n .autocomplete {\n\n //-----------------------------------------\n // Parent form wrapper.\n //-----------------------------------------\n &__component {\n margin-bottom: 20px;\n }\n\n //-----------------------------------------\n // Wrapper\n //-----------------------------------------\n &-base-control {\n position: relative;\n }\n\n //-----------------------------------------\n // Input\n //-----------------------------------------\n &-text-control__input {\n margin: 0;\n }\n\n //-----------------------------------------\n // Selected buttons.\n //-----------------------------------------\n &__selection-list {\n list-style-type: none;\n margin: 0 0 6px;\n padding: 0;\n\n &--item {\n display: inline-block;\n list-style: none;\n\n &--button {\n margin-bottom: 4px;\n margin-right: 3px;\n\n &::after {\n content: '×';\n font-size: 16px;\n line-height: 20px;\n margin-left: 5px;\n }\n }\n }\n }\n\n //-----------------------------------------\n // Results\n //-----------------------------------------\n &__dropdown {\n background-color: #fff;\n border-color: transparent #e2e4e7 #e2e4e7;\n border-radius: 0 0 4px 4px;\n border-style: solid;\n border-width: 0 1px 1px;\n left: 0;\n max-height: 0;\n overflow-y: hidden;\n position: absolute;\n top: calc(100% + 1px); // Offset focus border.\n visibility: hidden;\n width: 100%;\n z-index: 10;\n\n // Container is open.\n &--is-open {\n box-shadow: 0 3px 30px rgba(25, 30, 35, 0.1);\n max-height: 225px;\n overflow-y: scroll;\n visibility: visible;\n }\n\n // Notice handler.\n &--notice {\n padding: 15px;\n }\n\n // Results container.\n &--results {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n }\n\n //-----------------------------------------\n // List/Results\n //-----------------------------------------\n &__list--item {\n list-style: none;\n\n > button {\n background: transparent;\n border-color: #e2e4e7;\n border-style: solid;\n border-width: 0 0 1px;\n height: 100%;\n line-height: 1.25;\n text-align: left;\n white-space: inherit;\n width: 100%;\n }\n\n &:last-child > button {\n border-bottom: 0;\n }\n }\n }\n}\n"],sourceRoot:""}]);const s=a},1849:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},2876:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),i="/*# ".concat(o," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},6595:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:a,create:s}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const d=_(Array.prototype.forEach),u=_(Array.prototype.pop),p=_(Array.prototype.push),f=_(String.prototype.toLowerCase),h=_(String.prototype.toString),m=_(String.prototype.match),y=_(String.prototype.replace),g=_(String.prototype.indexOf),b=_(String.prototype.trim),v=_(RegExp.prototype.test),A=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function S(t){const n=s(null);for(const[r,i]of e(t))void 0!==o(t,r)&&(n[r]=i);return n}function C(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const k=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),E=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),T=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),j=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=i(["#text"]),O=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),N=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),D=a(/<%[\w\W]*|[\w\W]*%>/gm),M=a(/\${[\w\W]*}/gm),U=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),F=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=a(/^(?:\w+script|data):/i),W=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:G,ERB_EXPR:D,TMPLIT_EXPR:M,DATA_ATTR:U,ARIA_ATTR:B,IS_ALLOWED_URI:F,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:W,DOCTYPE_NAME:q});return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=e=>t(e);if(r.version="3.0.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const a=o,l=a.currentScript,{DocumentFragment:c,HTMLTemplateElement:x,Node:_,Element:G,NodeFilter:D,NamedNodeMap:M=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:U,DOMParser:B,trustedTypes:z}=n,W=G.prototype,Y=C(W,"cloneNode"),V=C(W,"nextSibling"),K=C(W,"childNodes"),X=C(W,"parentNode");if("function"==typeof x){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let J,Q="";const{implementation:Z,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=o,{importNode:re}=a;let oe={};r.isSupported="function"==typeof e&&"function"==typeof X&&Z&&void 0!==Z.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:ae,TMPLIT_EXPR:se,DATA_ATTR:le,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:ue}=$;let{IS_ALLOWED_URI:pe}=$,fe=null;const he=w({},[...k,...E,...R,...T,...I]);let me=null;const ye=w({},[...O,...P,...H,...N]);let ge=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,ve=null,Ae=!0,xe=!0,_e=!1,we=!0,Se=!1,Ce=!1,ke=!1,Ee=!1,Re=!1,Le=!1,Te=!1,je=!0,Ie=!1,Oe=!0,Pe=!1,He={},Ne=null;const Ge=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let De=null;const Me=w({},["audio","video","img","source","image","track"]);let Ue=null;const Be=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Fe="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let qe=We,$e=!1,Ye=null;const Ve=w({},[Fe,ze,We],h);let Ke=null;const Xe=["application/xhtml+xml","text/html"];let Je=null,Qe=null;const Ze=o.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Qe||Qe!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ke=Ke=-1===Xe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Je="application/xhtml+xml"===Ke?h:f,fe="ALLOWED_TAGS"in e?w({},e.ALLOWED_TAGS,Je):he,me="ALLOWED_ATTR"in e?w({},e.ALLOWED_ATTR,Je):ye,Ye="ALLOWED_NAMESPACES"in e?w({},e.ALLOWED_NAMESPACES,h):Ve,Ue="ADD_URI_SAFE_ATTR"in e?w(S(Be),e.ADD_URI_SAFE_ATTR,Je):Be,De="ADD_DATA_URI_TAGS"in e?w(S(Me),e.ADD_DATA_URI_TAGS,Je):Me,Ne="FORBID_CONTENTS"in e?w({},e.FORBID_CONTENTS,Je):Ge,be="FORBID_TAGS"in e?w({},e.FORBID_TAGS,Je):{},ve="FORBID_ATTR"in e?w({},e.FORBID_ATTR,Je):{},He="USE_PROFILES"in e&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Se=e.SAFE_FOR_TEMPLATES||!1,Ce=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,Te=e.RETURN_TRUSTED_TYPE||!1,Ee=e.FORCE_BODY||!1,je=!1!==e.SANITIZE_DOM,Ie=e.SANITIZE_NAMED_PROPS||!1,Oe=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||F,qe=e.NAMESPACE||We,ge=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ge.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ge.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ge.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(xe=!1),Le&&(Re=!0),He&&(fe=w({},[...I]),me=[],!0===He.html&&(w(fe,k),w(me,O)),!0===He.svg&&(w(fe,E),w(me,P),w(me,N)),!0===He.svgFilters&&(w(fe,R),w(me,P),w(me,N)),!0===He.mathMl&&(w(fe,T),w(me,H),w(me,N))),e.ADD_TAGS&&(fe===he&&(fe=S(fe)),w(fe,e.ADD_TAGS,Je)),e.ADD_ATTR&&(me===ye&&(me=S(me)),w(me,e.ADD_ATTR,Je)),e.ADD_URI_SAFE_ATTR&&w(Ue,e.ADD_URI_SAFE_ATTR,Je),e.FORBID_CONTENTS&&(Ne===Ge&&(Ne=S(Ne)),w(Ne,e.FORBID_CONTENTS,Je)),Oe&&(fe["#text"]=!0),Ce&&w(fe,["html","head","body"]),fe.table&&(w(fe,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(z,l)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),Qe=e}},nt=w({},["mi","mo","mn","ms","mtext"]),rt=w({},["foreignobject","desc","title","annotation-xml"]),ot=w({},["title","style","font","a","script"]),it=w({},E);w(it,R),w(it,L);const at=w({},T);w(at,j);const st=function(e){p(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},lt=function(e,t){try{p(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!me[e])if(Re||Le)try{st(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ct=function(e){let t=null,n=null;if(Ee)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ke&&qe===We&&(e=''+e+"");const r=J?J.createHTML(e):e;if(qe===We)try{t=(new B).parseFromString(r,Ke)}catch(e){}if(!t||!t.documentElement){t=Z.createDocument(qe,"template",null);try{t.documentElement.innerHTML=$e?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),qe===We?ne.call(t,Ce?"html":"body")[0]:Ce?t.documentElement:i},dt=function(e){return ee.call(e.ownerDocument||e,e,D.SHOW_ELEMENT|D.SHOW_COMMENT|D.SHOW_TEXT,null)},ut=function(e){return"function"==typeof _&&e instanceof _},pt=function(e,t,n){oe[e]&&d(oe[e],(e=>{e.call(r,t,n,Qe)}))},ft=function(e){let t=null;if(pt("beforeSanitizeElements",e,null),(n=e)instanceof U&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof M)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return st(e),!0;var n;const o=Je(e.nodeName);if(pt("uponSanitizeElement",e,{tagName:o,allowedTags:fe}),e.hasChildNodes()&&!ut(e.firstElementChild)&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return st(e),!0;if(!fe[o]||be[o]){if(!be[o]&&mt(o)){if(ge.tagNameCheck instanceof RegExp&&v(ge.tagNameCheck,o))return!1;if(ge.tagNameCheck instanceof Function&&ge.tagNameCheck(o))return!1}if(Oe&&!Ne[o]){const t=X(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Y(n[r],!0),V(e))}return st(e),!0}return e instanceof G&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:qe,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===ze?t.namespaceURI===We?"svg"===n:t.namespaceURI===Fe?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(it[n]):e.namespaceURI===Fe?t.namespaceURI===We?"math"===n:t.namespaceURI===ze?"math"===n&&rt[r]:Boolean(at[n]):e.namespaceURI===We?!(t.namespaceURI===ze&&!rt[r])&&!(t.namespaceURI===Fe&&!nt[r])&&!at[n]&&(ot[n]||!it[n]):!("application/xhtml+xml"!==Ke||!Ye[e.namespaceURI]))}(e)?(st(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,d([ie,ae,se],(e=>{t=y(t,e," ")})),e.textContent!==t&&(p(r.removed,{element:e.cloneNode()}),e.textContent=t)),pt("afterSanitizeElements",e,null),!1):(st(e),!0)},ht=function(e,t,n){if(je&&("id"===t||"name"===t)&&(n in o||n in Ze))return!1;if(xe&&!ve[t]&&v(le,t));else if(Ae&&v(ce,t));else if(!me[t]||ve[t]){if(!(mt(e)&&(ge.tagNameCheck instanceof RegExp&&v(ge.tagNameCheck,e)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(e))&&(ge.attributeNameCheck instanceof RegExp&&v(ge.attributeNameCheck,t)||ge.attributeNameCheck instanceof Function&&ge.attributeNameCheck(t))||"is"===t&&ge.allowCustomizedBuiltInElements&&(ge.tagNameCheck instanceof RegExp&&v(ge.tagNameCheck,n)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(n))))return!1}else if(Ue[t]);else if(v(pe,y(n,ue,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==g(n,"data:")||!De[e])if(_e&&!v(de,y(n,ue,"")));else if(n)return!1;return!0},mt=function(e){return e.indexOf("-")>0},yt=function(e){pt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:me};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,c=Je(a);let p="value"===a?l:b(l);if(n.attrName=c,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,pt("uponSanitizeAttribute",e,n),p=n.attrValue,n.forceKeepAttr)continue;if(lt(a,e),!n.keepAttr)continue;if(!we&&v(/\/>/i,p)){lt(a,e);continue}Se&&d([ie,ae,se],(e=>{p=y(p,e," ")}));const f=Je(e.nodeName);if(ht(f,c,p)){if(!Ie||"id"!==c&&"name"!==c||(lt(a,e),p="user-content-"+p),J&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(s);else switch(z.getAttributeType(f,c)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}try{s?e.setAttributeNS(s,a,p):e.setAttribute(a,p),u(r.removed)}catch(e){}}}pt("afterSanitizeAttributes",e,null)},gt=function e(t){let n=null;const r=dt(t);for(pt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)pt("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof c&&e(n.content),yt(n));pt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,i=null,s=null;if($e=!e,$e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ut(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!r.isSupported)return e;if(ke||tt(t),r.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=Je(e.nodeName);if(!fe[t]||be[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)n=ct("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Re&&!Se&&!Ce&&-1===e.indexOf("<"))return J&&Te?J.createHTML(e):e;if(n=ct(e),!n)return Re?null:Te?Q:""}n&&Ee&&st(n.firstChild);const l=dt(Pe?e:n);for(;i=l.nextNode();)ft(i)||(i.content instanceof c&>(i.content),yt(i));if(Pe)return e;if(Re){if(Le)for(s=te.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(me.shadowroot||me.shadowrootmode)&&(s=re.call(a,s,!0)),s}let u=Ce?n.outerHTML:n.innerHTML;return Ce&&fe["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&v(q,n.ownerDocument.doctype.name)&&(u="\n"+u),Se&&d([ie,ae,se],(e=>{u=y(u,e," ")})),J&&Te?J.createHTML(u):u},r.setConfig=function(){tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ke=!0},r.clearConfig=function(){Qe=null,ke=!1},r.isValidAttribute=function(e,t,n){Qe||tt({});const r=Je(e),o=Je(t);return ht(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],p(oe[e],t))},r.removeHook=function(e){if(oe[e])return u(oe[e])},r.removeHooks=function(e){oe[e]&&(oe[e]=[])},r.removeAllHooks=function(){oe={}},r}()}()},2232:function(e,t){var n,r;n=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=t.IS_PAPA_WORKER||!1,o={},i=0,a={parse:function(n,r){var s=(r=r||{}).dynamicTyping||!1;if(x(s)&&(r.dynamicTypingFunction=s,s={}),r.dynamicTyping=s,r.transform=!!x(r.transform)&&r.transform,r.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var n,r,s=(n=t.URL||t.webkitURL||null,r=e.toString(),a.BLOB_URL||(a.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(s);return l.onmessage=y,l.id=i++,o[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=x(r.step),r.chunk=x(r.chunk),r.complete=x(r.complete),r.error=x(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return a.NODE_STREAM_INPUT,"string"==typeof n?(n=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(n),f=r.download?new c(r):new u(r)):!0===n.readable&&x(n.read)&&x(n.on)?f=new p(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new d(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",i="\r\n",s='"',l=s+s,c=!1,d=null,u=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(u=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var p=new RegExp(h(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,c);if("object"==typeof e[0])return f(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function f(e,t,n){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:s,workerId:a.WORKER_ID,finished:c});else if(x(this._config.chunk)&&!n){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!c||!x(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){x(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=A(this._chunkLoaded,this),t.onerror=A(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function d(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=A(this._chunkLoaded,this),t.onerror=A(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function p(e){l.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=A((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=A((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=A((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=A((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,n,r,o=Math.pow(2,53),i=-o,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,d=0,u=0,p=!1,f=!1,y=[],g={data:[],errors:[],meta:{}};if(x(e.step)){var b=e.step;e.step=function(t){if(g=t,w())_();else{if(_(),0===g.data.length)return;d+=t.data.length,e.preview&&d>e.preview?n.abort():(g.data=g.data[0],b(g,c))}}}function A(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function _(){return g&&r&&(C("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(g.data=g.data.filter((function(e){return!A(e)}))),w()&&function(){if(g)if(Array.isArray(g.data[0])){for(var t=0;w()&&t=y.length?"__parsed_extra":y[r]),e.transform&&(a=e.transform(a,i)),a=S(i,a),"__parsed_extra"===i?(o[i]=o[i]||[],o[i].push(a)):o[i]=a}return e.header&&(r>y.length?C("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+r,u+n):r=r.length/2?"\r\n":"\r"}(o,l)),r=!1,e.delimiter)x(e.delimiter)&&(e.delimiter=e.delimiter(o),g.meta.delimiter=e.delimiter);else{var c=function(t,n,r,o,i){var s,l,c,d;i=i||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var u=0;u=s)return $(!0)}else for(M=d,d++;;){if(-1===(M=a.indexOf(t,M+1)))return f||_.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:A.length,index:d}),W();if(M===m-1)return W(a.substring(d,M).replace(D,t));if(t!==c||a[M+1]!==c){if(t===c||0===M||a[M-1]!==c){-1!==N&&N=s)return $(!0);break}_.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:A.length,index:d}),M++}}else M++}return W();function F(e){A.push(e),S=d}function z(e){var t=0;if(-1!==e){var n=a.substring(M+1,e);n&&""===n.trim()&&(t=n.length)}return t}function W(e){return f||(void 0===e&&(e=a.substring(d)),w.push(e),d=m,F(w),v&&Y()),$()}function q(e){d=e,F(w),w=[],G=a.indexOf(r,d)}function $(e){return{data:A,errors:_,meta:{delimiter:n,linebreak:r,aborted:u,truncated:!!e,cursor:S+(p||0)}}}function Y(){i($()),A=[],_=[]}},this.abort=function(){u=!0},this.getCharIndex=function(){return d}}function y(e){var t=e.data,n=o[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,g(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(x(n.userStep)){for(var a=0;a{"use strict";var r=n(7200);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},900:(e,t,n)=>{e.exports=n(7336)()},7200:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4108:(e,t,n)=>{"use strict";var r=n(1280),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,d=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:d,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},7e3:(e,t,n)=>{"use strict";e.exports=n(4108)},3736:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},2940:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},9516:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7020:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9296:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3376:(e,t,n)=>{"use strict";n.d(t,{cp:()=>Gt});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||W(H)>3?"":" "}function Y(e,t){for(;--t&&U()&&!(H<48||H>102||H>57&&H<65||H>70&&H<97););return z(e,F()+(t<6&&32==B()&&32==U()))}function V(e){for(;U();)switch(H){case e:return P;case 34:case 39:34!==e&&39!==e&&V(H);break;case 40:41===e&&V(e);break;case 92:U()}return P}function K(e,t){for(;U()&&e+H!==57&&(e+H!==84||47!==B()););return"/*"+z(t,P-1)+"*"+v(47===e?e:U())}function X(e){for(;!W(B());)U();return z(e,P)}function J(e,t){for(var n="",r=0;r6)switch(C(e,t+1)){case 109:if(45!==C(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+u+"$2-$3$1"+d+(108==C(e,t+3)?"$3":"$2-$3"))+e;case 115:return~S(e,"stretch")?Z(w(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,i,a,s){return c+n+":"+r+s+(o?c+n+"-span:"+(i?a:+a-+r)+s:"")+e}));case 4949:if(121===C(e,t+6))return w(e,":",":"+u)+e;break;case 6444:switch(C(e,45===C(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+u+(45===C(e,14)?"inline-":"")+"box$3$1"+u+"$2$3$1"+c+"$2box$3")+e;case 100:return w(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function ee(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=Z(e.value,e.length,n));case y:return J([D(e,{value:w(e.value,"@","@"+u)})],r);case f:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(_(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":M(D(e,{props:[w(t,/:(read-\w+)/,":"+d+"$1")]})),M(D(e,{props:[t]})),A(e,{props:T(n,r)});break;case"::placeholder":M(D(e,{props:[w(t,/:(plac\w+)/,":"+u+"input-$1")]})),M(D(e,{props:[w(t,/:(plac\w+)/,":"+d+"$1")]})),M(D(e,{props:[w(t,/:(plac\w+)/,c+"input-$1")]})),M(D(e,{props:[t]})),A(e,{props:T(n,r)})}return""}))}}function te(e){return function(e){return N="",e}(ne("",null,null,null,[""],e=function(e){return j=I=1,O=E(N=e),P=0,[]}(e),0,[0],e))}function ne(e,t,n,r,o,i,a,s,l){for(var c=0,d=0,u=a,p=0,f=0,h=0,m=1,y=1,g=1,b=0,A="",x=o,_=i,k=r,R=A;y;)switch(h=b,b=U()){case 40:if(108!=h&&58==C(R,u-1)){-1!=S(R+=w(q(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:R+=q(b);break;case 9:case 10:case 13:case 32:R+=$(h);break;case 92:R+=Y(F()-1,7);continue;case 47:switch(B()){case 42:case 47:L(oe(K(U(),F()),t,n,l),l);break;default:R+="/"}break;case 123*m:s[c++]=E(R)*g;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+d:-1==g&&(R=w(R,/\f/g,"")),f>0&&E(R)-u&&L(f>32?ie(R+";",r,n,u-1,l):ie(w(R," ","")+";",r,n,u-2,l),l);break;case 59:R+=";";default:if(L(k=re(R,t,n,c,d,o,s,A,x=[],_=[],u,i),i),123===b)if(0===d)ne(R,t,k,k,x,i,u,s,_);else switch(99===p&&110===C(R,3)?100:p){case 100:case 108:case 109:case 115:ne(e,k,k,r&&L(re(e,k,k,0,0,o,s,A,o,x=[],u,_),_),o,_,u,s,r?x:_);break;default:ne(R,k,k,k,[""],_,0,s,_)}}c=d=f=0,m=g=1,A=R="",u=a;break;case 58:u=1+E(R),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==(H=P>0?C(N,--P):0,I--,10===H&&(I=1,j--),H))continue;switch(R+=v(b),b*m){case 38:g=d>0?1:(R+="\f",-1);break;case 44:s[c++]=(E(R)-1)*g,g=1;break;case 64:45===B()&&(R+=q(U())),p=B(),d=u=E(A=R+=X(F())),b++;break;case 45:45===h&&2==E(R)&&(m=0)}}return i}function re(e,t,n,r,o,i,a,s,l,c,d,u){for(var p=o-1,h=0===o?i:[""],m=R(h),y=0,g=0,v=0;y0?h[A]+" "+_:w(_,/&\f/g,h[A])))&&(l[v++]=S);return G(e,t,n,0===o?f:s,l,c,d,u)}function oe(e,t,n,r){return G(e,t,n,p,v(H),k(e,2,-2),0,r)}function ie(e,t,n,r,o){return G(e,t,n,h,k(e,0,r),k(e,r+1,-1),r,o)}const ae={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var se="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",le="undefined"!=typeof window&&"HTMLElement"in window,ce=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),de=(new Set,Object.freeze([])),ue=Object.freeze({}),pe=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),fe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,he=/(^-|-$)/g;function me(e){return e.replace(fe,"-").replace(he,"")}var ye=/(a)(d)/gi,ge=function(e){return String.fromCharCode(e+(e>25?39:97))};function be(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ge(t%52)+n;return(ge(t%52)+n).replace(ye,"$1-$2")}var ve,Ae=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},xe=function(e){return Ae(5381,e)};function _e(e){return"string"==typeof e&&!0}var we="function"==typeof Symbol&&Symbol.for,Se=we?Symbol.for("react.memo"):60115,Ce=we?Symbol.for("react.forward_ref"):60112,ke={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ee={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Re={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Le=((ve={})[Ce]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ve[Se]=Re,ve);function Te(e){return("type"in(t=e)&&t.type.$$typeof)===Se?Re:"$$typeof"in e?Le[e.$$typeof]:ke;var t}var je=Object.defineProperty,Ie=Object.getOwnPropertyNames,Oe=Object.getOwnPropertySymbols,Pe=Object.getOwnPropertyDescriptor,He=Object.getPrototypeOf,Ne=Object.prototype;function Ge(e,t,n){if("string"!=typeof t){if(Ne){var r=He(t);r&&r!==Ne&&Ge(e,r,n)}var o=Ie(t);Oe&&(o=o.concat(Oe(t)));for(var i=Te(e),a=Te(t),s=0;s0?" Args: ".concat(t.join(", ")):""))}var $e=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw qe(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},i=0;i0?".".concat(t):e},d=l.slice();d.push((function(e){e.type===f&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(dt,n).replace(r,c))})),a.prefix&&d.push(ee),d.push(Q);var u=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(ut,""),c=te(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=pt(c,a.namespace));var u,p,f,h=[];return J(c,(u=d.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),p=R(u),function(e,t,n,r){for(var o="",i=0;i="A"&&e<="Z"};function _t(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=Ue(r,i),this.staticRulesId=i}else{for(var s=Ae(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,n(l,".".concat(p),void 0,this.componentId)),r=Ue(r,p)}}return r},e}(),Lt=a().createContext(void 0);Lt.Consumer;var Tt={};function jt(e,t,n){var o=Me(e),s=e,l=!_e(e),c=t.attrs,d=void 0===c?de:c,u=t.componentId,p=void 0===u?function(e,t){var n="string"!=typeof e?"sc":me(e);Tt[n]=(Tt[n]||0)+1;var r="".concat(n,"-").concat(function(e){return be(xe(e)>>>0)}("6.1.1"+n+Tt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):u,f=t.displayName,h=void 0===f?function(e){return _e(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):f,m=t.displayName&&t.componentId?"".concat(me(t.displayName),"-").concat(t.componentId):t.componentId||p,y=o&&s.attrs?s.attrs.concat(d).filter(Boolean):d,g=t.shouldForwardProp;if(o&&s.shouldForwardProp){var b=s.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;g=function(e,t){return b(e,t)&&v(e,t)}}else g=b}var A=new Rt(n,m,o?s.componentStyle:void 0);function x(e,t){return function(e,t,n){var o=e.attrs,s=e.componentStyle,l=e.defaultProps,c=e.foldedComponentIds,d=e.styledComponentId,u=e.target,p=a().useContext(Lt),f=bt(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var o,i=r(r({},t),{className:void 0,theme:n}),a=0;a2&&ct.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=nt(),r=Be([n&&'nonce="'.concat(n,'"'),"".concat(se,'="true"'),"".concat("data-styled-version",'="').concat("6.1.1",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw qe(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw qe(2);var n=((t={})[se]="",t["data-styled-version"]="6.1.1",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=nt();return o&&(n.nonce=o),[a().createElement("style",r({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ct({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw qe(2);return a().createElement(vt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw qe(3)}}(),"__sc-".concat(se,"__")},4928:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(7e3),o=n(900),i=n.n(o),a=n(3376),s=n(7720);const l=a.cp.div` + height: auto; + width: 100%; +`,c=({src:e})=>(0,r.jsx)(l,{children:(0,r.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:e})});c.propTypes={src:i().string.isRequired};const d=({className:e,onReset:t,onUpdate:n,onUpdateURL:o,value:i,valueURL:a})=>(0,r.jsx)(s.MediaPicker,{allowedTypes:["audio"],className:e,icon:"format-audio",onReset:t,onUpdate:n,onUpdateURL:o,preview:c,value:i,valueURL:a});d.defaultProps={className:"",onUpdateURL:null,valueURL:""},d.propTypes={className:i().string,onReset:i().func.isRequired,onUpdate:i().func.isRequired,onUpdateURL:i().func,value:i().number.isRequired,valueURL:i().string};const u=d},2312:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(7e3),o=n(900),i=n.n(o),a=n(7287);const s=({label:e,value:t,options:n,onChange:o})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.BaseControl,{label:e}),n.map((e=>(0,r.jsx)(a.CheckboxControl,{label:e.label,checked:t.includes(e.value),onChange:n=>{o(n?[...t,e.value]:[...t.filter((t=>t!==e.value))])}})))]});s.propTypes={label:i().string.isRequired,value:i().arrayOf(i().string).isRequired,options:i().arrayOf(i().shape({label:i().string.isRequired,value:i().string.isRequired})).isRequired,onChange:i().func.isRequired};const l=s},8312:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var r=n(7e3),o=n(1280),i=n.n(o),a=n(3396),s=n(900),l=n.n(s),c=n(5328);class d extends i().PureComponent{static handleSubmit(e){e.preventDefault()}constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.state={error:"",success:""}}handleChange(e){const{attributeName:t,callback:n,setAttributes:r}=this.props;e.target.files&&e.target.files[0]&&(0,c.parseCSVFile)(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,a.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,a.__)("Could not map CSV data. Please check the source file to ensure that it has the correct structure.","alley-scripts"),success:""})})).catch((e=>{this.setState({error:e,success:""})}))}render(){const{error:e="",success:t=""}=this.state;return(0,r.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,r.jsx)("h2",{children:(0,a.__)("Upload CSV","alley-scripts")}),(0,r.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==e?(0,r.jsxs)("div",{style:{color:"#c00"},children:[(0,r.jsx)("strong",{children:(0,a.__)("Error:","alley-scripts")})," ",e]}):null,""!==t?(0,r.jsxs)("div",{style:{color:"#0c0"},children:[(0,r.jsx)("strong",{children:(0,a.__)("Success:","alley-scripts")})," ",t]}):null,(0,r.jsx)("div",{children:(0,r.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,r.jsx)("p",{children:(0,a.__)("Select a file to load data.","alley-scripts")}),(0,r.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}d.defaultProps={callback:null},d.propTypes={attributeName:l().string.isRequired,callback:l().func,setAttributes:l().func.isRequired}},8348:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(7e3),o=n(3396),i=n(900),a=n.n(i),s=n(3376),l=n(7720);const c=s.cp.div` + box-sizing: border-box; + flex-shrink: 0; + height: auto; + max-height: 1450px; + max-width: 1450px; + min-height: 20px; + min-width: 20px; + position: relative; + width: auto; +`,d=({src:e})=>(0,r.jsx)(c,{children:(0,r.jsx)("img",{alt:(0,o.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:e,title:(0,o.__)("Edit image","alley-scripts")})});d.propTypes={src:a().string.isRequired};const u=({className:e,imageSize:t,displayControlsInToolbar:n,onReset:o,onUpdate:i,onUpdateURL:a,value:s,valueURL:c})=>(0,r.jsx)(l.MediaPicker,{allowedTypes:["image"],className:e,icon:"format-image",imageSize:t,displayControlsInToolbar:n,onReset:o,onUpdate:i,onUpdateURL:a,preview:d,value:s,valueURL:c});u.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},u.propTypes={className:a().string,imageSize:a().string,displayControlsInToolbar:a().bool,onReset:a().func.isRequired,onUpdate:a().func.isRequired,onUpdateURL:a().func,value:a().number.isRequired,valueURL:a().string};const p=u},7720:(e,t,n)=>{"use strict";n.d(t,{AudioPicker:()=>r.default,CSVUploader:()=>i.default,Checkboxes:()=>o.default,ImagePicker:()=>a.default,MediaPicker:()=>s.default,PostPicker:()=>c.default,PostSelector:()=>d.default,SafeHtml:()=>l.default,Selector:()=>u.default,Sortable:()=>p.default,SortableItem:()=>f.default,TermSelector:()=>h.default,VideoPicker:()=>m.default});var r=n(4928),o=n(2312),i=n(8312),a=n(8348),s=n(5680),l=n(9160),c=n(4808),d=n(8800),u=n(9064),p=n(8504),f=n(1917),h=n(668),m=n(5316)},5680:(e,t,n)=>{"use strict";n.d(t,{default:()=>m});var r=n(7e3),o=n(900),i=n.n(o),a=n(3376),s=n(9528),l=n(7287),c=n(7752),d=n(3396),u=n(5328);const p=a.cp.div` + display: block; + position: relative; +`,f=a.cp.div` + background: white; + border: 1px solid black; + padding: 1em; +`,h=({allowedTypes:e,className:t,icon:n,imageSize:o,displayControlsInToolbar:i,onReset:a,onUpdate:h,onUpdateURL:m,preview:y,value:g,valueURL:b})=>{const{media:v}=(0,c.useSelect)((e=>({media:g?e("core").getMedia(g):void 0})),[g]);if(0!==g&&null===v)return(0,r.jsx)(l.Spinner,{});const A=v?(0,u.getMediaUrl)(v,o):b;return A?(0,r.jsxs)(p,{className:t,children:[y?(0,r.jsx)(y,{src:A}):(0,r.jsxs)(f,{className:"alley-scripts-media-picker__preview",children:[(0,r.jsx)("p",{children:(0,d.__)("Selected file:","alley-scripts")}),(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:A,children:A})})]}),i?(0,r.jsx)(s.BlockControls,{group:"other",children:(0,r.jsx)(s.MediaReplaceFlow,{name:(0,d.__)("Edit Media","alley-scripts"),mediaId:g,mediaURL:A,allowedTypes:e,onSelect:h,onSelectURL:m,children:(0,r.jsx)(l.ToolbarButton,{isDestructive:!0,text:(0,d.__)("Remove","alley-scripts"),onClick:a})})}):(0,r.jsx)(l.Button,{variant:"primary",onClick:a,children:(0,d.__)("Reset","alley-scripts")})]}):(0,r.jsx)(p,{className:t,children:(0,r.jsx)(s.MediaPlaceholder,{allowedTypes:e,disableMediaButtons:!!b,icon:(0,r.jsx)(s.BlockIcon,{icon:n}),onSelect:h,onSelectURL:m,value:{id:g,src:A}})})};h.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},h.propTypes={allowedTypes:i().arrayOf(i().string),className:i().string,icon:i().string,imageSize:i().string,displayControlsInToolbar:i().bool,onReset:i().func.isRequired,onUpdate:i().func.isRequired,onUpdateURL:i().func,preview:i().element,value:i().number.isRequired,valueURL:i().string};const m=h},4808:(e,t,n)=>{"use strict";n.d(t,{default:()=>U});var r=n(7e3),o=n(1280),i=n(3376),a=n(7287),s=n(3396),l=n(7204),c=n(2e3),d=n(2108),u=n.n(d),p=n(7020),f=n.n(p),h=n(7240),m=n.n(h),y=n(9516),g=n.n(y),b=n(2940),v=n.n(b),A=n(9296),x=n.n(A),_=n(9680),w={};w.styleTagTransform=x(),w.setAttributes=g(),w.insert=m().bind(null,"head"),w.domAPI=f(),w.insertStyleElement=v(),u()(_.c,w),_.c&&_.c.locals&&_.c.locals;var S=n(4632),C=n.n(S),k=n(6484),E=n.n(k),R=n(7424),L={};L.styleTagTransform=x(),L.setAttributes=g(),L.insert=m().bind(null,"head"),L.domAPI=f(),L.insertStyleElement=v(),u()(R.c,L),R.c&&R.c.locals&&R.c.locals;const T=window.wp.htmlEntities;var j=n(9160);const I=i.cp.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,O=({title:e,postType:t,attachmentID:n})=>{const o=(0,c.useMedia)(n),i=o?.media_details?.sizes?.thumbnail?.source_url,a=o?.alt_text??"";return(0,r.jsxs)(I,{children:[i?(0,r.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:i,alt:a}):null,(0,r.jsx)(j.default,{html:(0,T.decodeEntities)(e),className:"post-picker-result-title",tag:"strong"}),(0,s.sprintf)(" (%s)",t)]})},P=({baseUrl:e,searchRender:t,selected:n,setSelected:i,suppressPostIds:c=[]})=>{const[d,u]=(0,o.useState)(!1),[p,f]=(0,o.useState)([]),[h,m]=(0,o.useState)(!1),[y,g]=(0,o.useState)(0),[b,v]=(0,o.useState)({searchValue:"",page:1}),A=(0,o.useCallback)((async(t,n=!1)=>{if(t.searchValue&&t.searchValue.length<=2)return;const r=function(){let n=(0,l.addQueryArgs)(e,{page:t.page,_embed:1,exclude:c.join(",")});return t.searchValue&&t.searchValue.length>2&&(n=(0,l.addQueryArgs)(n,{search:t.searchValue})),n}();u(!0);const o=await C()({path:r,parse:!1});g(parseInt(o.headers.get("X-WP-TotalPages"),10));const i=await o.json();let a=i;t.page>1&&(a=[...p,...i]),n||(f(a),u(!1))}),[p,e,c]);return(0,o.useEffect)((()=>{let e=!1;return h||(m(!0),A(b,e)),()=>{e=!0}}),[A,h,b]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.TextControl,{value:b.searchValue,placeholder:(0,s.__)("Search...","alley-scripts"),label:(0,s.__)("Search","alley-scripts"),onChange:e=>{const t={...b,searchValue:e,page:1};v(t),A(t)}}),(0,r.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[p?p.map((e=>(0,r.jsx)(a.Button,{className:E()({"alley-scripts-post-picker__post":!0,"is-selected":e.id===n}),onClick:()=>i(e.id),children:t?t(e):(0,r.jsx)(O,{title:e.title,postType:e.subtype,attachmentID:e?._embedded?.self[0]?.featured_media})},e.id))):null,d?(0,r.jsx)(a.Spinner,{}):null,y>0&&b.page{const e={...b,page:b.page+1};v(e),A(e)},children:(0,s.__)("Load More","alley-scripts")})}):null]})]})},H=({baseUrl:e,closeModal:t,modalTitle:n,onUpdate:i,searchRender:l,suppressPostIds:c=[]})=>{const[d,u]=(0,o.useState)();return(0,r.jsxs)(a.Modal,{className:"alley-scripts-post-picker__modal",isDismissible:!0,title:n,onRequestClose:t,closeButtonLabel:"Close",children:[(0,r.jsx)(P,{baseUrl:e,selected:d??0,setSelected:u,searchRender:l,suppressPostIds:c}),(0,r.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,r.jsx)(a.Button,{variant:"secondary",onClick:t,children:(0,s.__)("Cancel","alley-scripts")}),(0,r.jsx)(a.Button,{variant:"primary",onClick:()=>{d&&(i(d),t())},disabled:!d,children:(0,s.__)("Select","alley-scripts")})]})]})};var N=n(3800),G={};G.styleTagTransform=x(),G.setAttributes=g(),G.insert=m().bind(null,"head"),G.domAPI=f(),G.insertStyleElement=v(),u()(N.c,G),N.c&&N.c.locals&&N.c.locals;const D=i.cp.div` + display: block; + position: relative; +`,M=i.cp.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,U=({allowedTypes:e,className:t,getPostType:n,modalTitle:i=(0,s.__)("Select Post","alley-scripts"),onReset:d,onUpdate:u,params:p={},previewLookup:f,previewRender:h,replaceText:m=(0,s.__)("Replace","alley-scripts"),resetText:y=(0,s.__)("Reset","alley-scripts"),searchEndpoint:g="/wp/v2/search",searchRender:b,selectText:v=(0,s.__)("Select","alley-scripts"),suppressPostIds:A=[],title:x="",value:_=0})=>{const[w,S]=(0,o.useState)(!1),C=(0,l.addQueryArgs)(g,{type:"post",subtype:e??"any",...p}),k=f?f(_):(0,c.usePostById)(_,n),{featured_media:E,title:{rendered:R=""}={},type:L=""}=k||{},T=()=>{S(!0)},j=()=>(0,r.jsxs)(a.ButtonGroup,{children:[(0,r.jsx)(a.Button,{variant:"secondary",onClick:d,style:{margin:"0 4px"},children:y}),(0,r.jsx)(a.Button,{variant:"secondary",onClick:T,style:{margin:"0 4px"},children:m})]});return 0!==_&&null===k?(0,r.jsx)(a.Spinner,{}):(0,r.jsxs)(D,{className:t,children:[x?(0,r.jsx)("h4",{children:x}):null,0!==_&&void 0===k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"post-picker-notice",children:(0,r.jsx)("p",{children:(0,s.sprintf)((0,s.__)("Post %d is no longer available; it has been unpublished or deleted","alley-scripts"),_)})}),j()]}):null,0!==_&&void 0!==k?(0,r.jsxs)(r.Fragment,{children:[void 0!==h?h(k):(0,r.jsx)(M,{children:(0,r.jsx)(O,{title:R,postType:L,attachmentID:E})}),j()]}):null,0===_?(0,r.jsx)(a.Button,{onClick:T,variant:"secondary",children:v}):null,w?(0,r.jsx)(H,{closeModal:()=>{S(!1)},baseUrl:C,modalTitle:i,onUpdate:u,searchRender:b,suppressPostIds:A}):null]})}},8800:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(7e3),o=n(900),i=n.n(o),a=n(3396),s=n(7720);const l=({className:e,emptyLabel:t,label:n,maxPages:o,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:d,threshold:u})=>(0,r.jsx)(s.Selector,{type:"post",className:e,emptyLabel:t,label:n,maxPages:o,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:d,threshold:u});l.defaultProps={className:"",emptyLabel:(0,a.__)("No posts found","alley-scripts"),label:(0,a.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,a.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},l.propTypes={className:i().string,emptyLabel:i().string,label:i().string,maxPages:i().number,multiple:i().bool,onSelect:i().func.isRequired,placeholder:i().string,subTypes:i().arrayOf(i().string),selected:i().arrayOf([i().shape({id:i().number,title:i().string})]),threshold:i().number};const c=l},9160:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(7e3),o=n(6595),i=n.n(o),a=n(900),s=n.n(a);const l=({className:e,html:t,tag:n})=>(0,r.jsx)(n,{className:e,dangerouslySetInnerHTML:{__html:i().sanitize(t)}});l.defaultProps={className:""},l.propTypes={className:s().string,html:s().string.isRequired,tag:s().string.isRequired};const c=l},9064:(e,t,n)=>{"use strict";n.d(t,{default:()=>D});var r=n(7e3),o=n(900),i=n.n(o),a=n(1280),s=n(4632),l=n.n(s),c=n(6484),d=n.n(c),u=n(7287),p=n(3396),f=n(7204);const h={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let m;const y=new Uint8Array(16);function g(){if(!m&&(m="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!m))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return m(y)}const b=[];for(let e=0;e<256;++e)b.push((e+256).toString(16).slice(1));const v=function(e,t,n){if(h.randomUUID&&!t&&!e)return h.randomUUID();const r=(e=e||{}).random||(e.rng||g)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+"-"+b[e[t+4]]+b[e[t+5]]+"-"+b[e[t+6]]+b[e[t+7]]+"-"+b[e[t+8]]+b[e[t+9]]+"-"+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]}(r)};var A=n(2e3);const x=({emptyLabel:e,error:t,id:n,isOpen:o,labelledbyId:i,loading:a,onSelect:s,options:l,selectedItems:c,threshold:f,value:h})=>{if(!a&&(""===h||f>h.length))return null;let m="",y="";return a?(m="loading",y=(0,p.__)("Loading...","alley-scripts")):t?(m="error",y=t):a||0!==l.length||(m="no-posts",y=e),a||!a&&(h&&0===l.length||t)?(0,r.jsx)("div",{"aria-busy":!0,className:d()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,r.jsx)("div",{className:d()("autocomplete__dropdown--notice",`autocomplete__${m}`),children:y})}):(0,r.jsx)("div",{className:d()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,r.jsx)("ul",{role:"listbox","aria-labelledby":i,id:n,className:d()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((e=>(0,r.jsx)("li",{className:"autocomplete__list--item",children:(0,r.jsx)(u.Button,{onClick:()=>s(e),type:"button",disabled:c.some((t=>t.id===e.id)),isTertiary:!0,children:e.title})},e.id)))})})};x.propTypes={emptyLabel:i().string.isRequired,error:i().string.isRequired,id:i().string.isRequired,isOpen:i().bool.isRequired,labelledbyId:i().string.isRequired,loading:i().bool.isRequired,options:i().arrayOf(i().shape({label:i().string,value:i().string})).isRequired,onSelect:i().func.isRequired,selectedItems:i().shape([]).isRequired,threshold:i().number.isRequired,value:i().string.isRequired};const _=x;var w=n(2108),S=n.n(w),C=n(7020),k=n.n(C),E=n(7240),R=n.n(E),L=n(9516),T=n.n(L),j=n(2940),I=n.n(j),O=n(9296),P=n.n(O),H=n(5500),N={};N.styleTagTransform=P(),N.setAttributes=T(),N.insert=R().bind(null,"head"),N.domAPI=k(),N.insertStyleElement=I(),S()(H.c,N),H.c&&H.c.locals&&H.c.locals;const G=({type:e,className:t,emptyLabel:n,label:o,maxPages:i,multiple:s,onSelect:c,placeholder:p,subTypes:h,selected:m,threshold:y})=>{const g=v(),[b,x]=(0,a.useState)(""),[w,S]=(0,a.useState)([]),[C,k]=(0,a.useState)(!1),[E,R]=(0,a.useState)(!1),[L,T]=(0,a.useState)(""),[j,I]=(0,a.useState)([]),O=(0,a.useRef)(),P=(0,A.useDebounce)(L,750),H=(0,a.useCallback)((async(t=1)=>{if(P.length0?h.join(","):"any",type:e});await l()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>i?i:t,e.json()})).then((e=>{S((t=>[...t,...e])),R(!1),(n&&n>t||t>=1&&s&&j.length>0)&&H(t+1)})).catch((e=>x(e.message)))}),[P,e,i,s,h,j.length,y]);(0,a.useEffect)((()=>{I(m)}),[m]),(0,a.useEffect)((()=>{P&&y<=P.length?H():S([])}),[P,H,y]);const N=e=>{k(O.current.contains(e.target))},G=e=>{"Escape"===e.key&&k(!1)};(0,a.useEffect)((()=>(document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)))),(0,a.useEffect)((()=>(O&&document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N))));const D=e=>{let t=[];if(j.some((t=>t.id===e.id))){const n=j.findIndex((t=>t.id===e.id));t=[...j.slice(0,n),...j.slice(n+1,j.length)]}else s?t=[...j,e]:(t=[e],k(!1));I(t),c(t)};return(0,r.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,r.jsxs)("div",{className:d()("components-base-control","autocomplete-base-control",t),ref:O,children:[(0,r.jsxs)("div",{"aria-expanded":C,"aria-haspopup":"listbox","aria-owns":`listbox-${g}`,className:d()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,r.jsx)("label",{className:d()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${g}`,children:(0,r.jsx)("div",{children:o})}),j.length>0?(0,r.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${g}`,id:`selected-items-${g}`,className:d()("autocomplete__selection--results","autocomplete__selection-list"),children:j.map((e=>(0,r.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,r.jsx)(u.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>D(e),type:"button",children:e.title})},e.title)))}):null,(0,r.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:d()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":C}),id:`autocomplete-${g}`,onChange:e=>T(e.target.value),onFocus:()=>k(!0),placeholder:p,type:"text",value:L})]}),(0,r.jsx)(_,{emptyLabel:n,error:b,labelledById:`autocomplete-${g}`,id:`listbox-${g}`,isOpen:C,loading:E&&P,onSelect:D,options:w,selectedItems:j,threshold:y,value:P})]})})};G.defaultProps={type:"post",className:"",emptyLabel:(0,p.__)("No items found","alley-scripts"),label:(0,p.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,p.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},G.propTypes={type:i().string,className:i().string,emptyLabel:i().string,label:i().string,maxPages:i().number,multiple:i().bool,onSelect:i().func.isRequired,placeholder:i().string,subTypes:i().arrayOf(i().string),selected:i().arrayOf([i().shape({id:i().number,title:i().string})]),threshold:i().number};const D=G},1917:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var r=n(7e3),o=n(7287),i=n(3396);function a({children:e,index:t,list:n,setList:a}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(o.Button,{disabled:0===t,icon:"arrow-up-alt2",label:(0,i.__)("Move up","alley-scripts"),onClick:()=>{const e=[...n];e.splice(t-1,0,e.splice(t,1)[0]),a(e)}}),(0,r.jsx)(o.Button,{disabled:t===n.length-1,icon:"arrow-down-alt2",label:(0,i.__)("Move down","alley-scripts"),onClick:()=>{const e=[...n];e.splice(t+1,0,e.splice(t,1)[0]),a(e)}}),(0,r.jsx)(o.Button,{icon:"trash",label:(0,i.__)("Remove","alley-scripts"),onClick:()=>{const e=[...n];e.splice(t,1),a(e)}})]}),(0,r.jsx)("div",{children:e})]})}},8504:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var r=n(7e3),o=n(7287),i=n(3396);function a({children:e,emptyItem:t,list:n,setList:a}){return(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)("div",{style:{margin:"1em 0"},children:(0,r.jsx)(o.Button,{icon:"plus",onClick:()=>a([...n,t]),variant:"primary",children:(0,i.__)("Add Item","alley-scripts")})})]})}},668:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(7e3),o=n(900),i=n.n(o),a=n(3396),s=n(7720);const l=({className:e,emptyLabel:t,label:n,maxPages:o,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:d,threshold:u})=>(0,r.jsx)(s.Selector,{type:"term",className:e,emptyLabel:t,label:n,maxPages:o,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:d,threshold:u});l.defaultProps={className:"",emptyLabel:(0,a.__)("No terms found","alley-scripts"),label:(0,a.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,a.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},l.propTypes={className:i().string,emptyLabel:i().string,label:i().string,maxPages:i().number,multiple:i().bool,onSelect:i().func.isRequired,placeholder:i().string,subTypes:i().arrayOf(i().string),selected:i().arrayOf([i().shape({id:i().number,title:i().string})]),threshold:i().number};const c=l},5316:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(7e3),o=n(900),i=n.n(o),a=n(3376),s=n(7720);const l=a.cp.div` + height: auto; + width: 100%; +`,c=({src:e})=>(0,r.jsx)(l,{children:(0,r.jsx)("video",{className:"edit-video-preview",controls:!0,src:e})});c.propTypes={src:i().string.isRequired};const d=({className:e,onReset:t,onUpdate:n,onUpdateURL:o,value:i,valueURL:a})=>(0,r.jsx)(s.MediaPicker,{allowedTypes:["video"],className:e,icon:"format-video",onReset:t,onUpdate:n,onUpdateURL:o,preview:c,value:i,valueURL:a});d.defaultProps={className:"",onUpdateURL:null,valueURL:""},d.propTypes={className:i().string,onReset:i().func.isRequired,onUpdate:i().func.isRequired,onUpdateURL:i().func,value:i().number.isRequired,valueURL:i().string};const u=d},2e3:(e,t,n)=>{"use strict";n.d(t,{useCurrentPostId:()=>r.default,useCurrentTheme:()=>o.default,useDebounce:()=>i.default,useHasInnerBlocks:()=>a.default,useInnerBlocks:()=>s.default,useInnerBlocksAttributes:()=>l.default,useInnerBlocksCount:()=>c.default,useInnerBlocksIndex:()=>d.default,useMedia:()=>u.default,useOption:()=>p.default,useParentBlock:()=>f.default,useParentBlockAttributes:()=>h.default,usePost:()=>m.default,usePostById:()=>y.default,usePostMeta:()=>g.default,usePostMetaValue:()=>b.default,usePosts:()=>v.default,usePreviewLink:()=>A.default,useTerm:()=>x.default,useTerms:()=>_.default});var r=n(9695),o=n(5904),i=n(7112),a=n(6980),s=n(864),l=n(8512),c=n(1344),d=n(6644),u=n(592),p=n(7188),f=n(224),h=n(8004),m=n(1744),y=n(9480),g=n(6504),b=n(3772),v=n(4704),A=n(7532),x=n(7712),_=n(1848)},9695:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=()=>(0,r.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[])},5904:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=()=>(0,r.useSelect)((e=>{const t=e("core");return t?t.getCurrentTheme()?.stylesheet:null}),[])},7112:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(1280);const o=(e,t)=>{const[n,o]=(0,r.useState)(e);return(0,r.useEffect)((()=>{const n=setTimeout((()=>{o(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n}},6980:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(2e3);const o=e=>(0,r.useInnerBlocksCount)(e)>0},6644:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(2e3);const o=e=>{const t=(0,r.useParentBlock)(e),n=(0,r.useInnerBlocks)(t);return n?n.findIndex((t=>t.clientId===e)):-1}},8512:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(2e3);const o=e=>(0,r.useInnerBlocks)(e).map((e=>e.attributes))},1344:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(2e3);const o=e=>(0,r.useInnerBlocks)(e).length},864:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(9528),o=n(7752);const i=e=>(0,o.useSelect)((t=>t(r.store).getBlocks(e)),[e])},592:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=e=>(0,r.useSelect)((t=>t("core").getMedia(e)),[e])},7188:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=function(e){const t=(0,r.useSelect)((t=>{const{getEditedEntityRecord:n,getEntityRecordEdits:r,isSavingEntityRecord:o}=t("core"),i=n("root","site"),a=r("root","site");return{value:i?.[e],isEdited:!!a?.[e],isSaving:o("root","site")}}),[]),{editEntityRecord:n,saveEntityRecord:o}=(0,r.useDispatch)("core");return{...t,onChange:function(t){n("root","site",void 0,{[e]:t})},onSave:async function(){await o("root","site",{[e]:t.value})}}}},8004:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(9528),o=n(7752);const i=e=>(0,o.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:o}=t(r.store),i=o(e);return i?n(i):null}),[e])},224:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(9528),o=n(7752);const i=e=>(0,o.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:o}=t(r.store),i=o(e);return i?n(i):null}),[e])},9480:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(1280),o=n(4632),i=n.n(o),a=n(7204),s=n(1744);const l=(e,t=null,n={context:"view"})=>{const[o,l]=(0,r.useState)({}),[c,d]=(0,r.useState)(!0);(0,r.useEffect)((()=>{d(!0),e&&!o[e]?(async()=>{if(t){const n=await t(e);n?l((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,a.addQueryArgs)("/wp/v2/search",{include:e}),n=await i()({path:t});n.length>0&&l((t=>({...t,[e]:n[0]?.subtype})))}d(!1)})():e&&o[e]&&d(!1)}),[e]);const u=(0,s.default)(e,o[e]??"",n);return c||!u&&o[e]?null:u}},3772:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(2e3);const o=(e,t=null,n=null)=>{const[o,i]=(0,r.usePostMeta)(t,n);return[o[e],t=>i({...o,[e]:t})]}},6504:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(3048),o=n(7752);const i=(e=null,t=null)=>{const n=(0,o.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[i,a]=(0,r.useEntityProp)("postType",n,"meta",t),s="function"==typeof a?a:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof i?i:{},e=>s({...e})]}},1744:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=(e,t="post",n={context:"view"})=>(0,r.useSelect)((r=>r("core").getEntityRecord("postType",t,e,n)),[e,t])},4704:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=(e,t="post")=>(0,r.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t])},7532:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=()=>(0,r.useSelect)((e=>e("core").getEditedPostPreviewLink()),[])},7712:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(7752);const o=(e,t="category",n={context:"view"})=>(0,r.useSelect)((r=>r("core").getEntityRecord("taxonomy",t,e,n)),[e,t])},1848:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(3048),o=n(7752);const i=(e=null,t=null,n="categories")=>{const i=(0,o.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[a,s]=(0,r.useEntityProp)("postType",i,n,t);return[a,e=>s(e)]}},5328:(e,t,n)=>{"use strict";n.d(t,{getMediaUrl:()=>a.c,parseCSVFile:()=>i});var r=n(2232),o=n.n(r);const i=e=>new Promise(((t,n)=>{o().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})}));var a=n(6199)},6199:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});const r=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:o=""}={},full:{url:i=""}={}}={},source_url:a="",url:s=""}=e;return o||n||i||r||s||a||""}},1280:e=>{"use strict";e.exports=window.React},4632:e=>{"use strict";e.exports=window.wp.apiFetch},9528:e=>{"use strict";e.exports=window.wp.blockEditor},7287:e=>{"use strict";e.exports=window.wp.components},3048:e=>{"use strict";e.exports=window.wp.coreData},7752:e=>{"use strict";e.exports=window.wp.data},3396:e=>{"use strict";e.exports=window.wp.i18n},7204:e=>{"use strict";e.exports=window.wp.url}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{AudioPicker:()=>e.AudioPicker,CSVUploader:()=>e.CSVUploader,Checkboxes:()=>e.Checkboxes,ImagePicker:()=>e.ImagePicker,MediaPicker:()=>e.MediaPicker,PostPicker:()=>e.PostPicker,PostSelector:()=>e.PostSelector,SafeHtml:()=>e.SafeHtml,Selector:()=>e.Selector,Sortable:()=>e.Sortable,SortableItem:()=>e.SortableItem,TermSelector:()=>e.TermSelector,VideoPicker:()=>e.VideoPicker,getMediaUrl:()=>o.getMediaUrl,parseCSVFile:()=>o.parseCSVFile,useCurrentPostId:()=>t.useCurrentPostId,useCurrentTheme:()=>t.useCurrentTheme,useDebounce:()=>t.useDebounce,useHasInnerBlocks:()=>t.useHasInnerBlocks,useInnerBlocks:()=>t.useInnerBlocks,useInnerBlocksAttributes:()=>t.useInnerBlocksAttributes,useInnerBlocksCount:()=>t.useInnerBlocksCount,useInnerBlocksIndex:()=>t.useInnerBlocksIndex,useMedia:()=>t.useMedia,useOption:()=>t.useOption,useParentBlock:()=>t.useParentBlock,useParentBlockAttributes:()=>t.useParentBlockAttributes,usePost:()=>t.usePost,usePostById:()=>t.usePostById,usePostMeta:()=>t.usePostMeta,usePostMetaValue:()=>t.usePostMetaValue,usePosts:()=>t.usePosts,usePreviewLink:()=>t.usePreviewLink,useTerm:()=>t.useTerm,useTerms:()=>t.useTerms});var e=n(7720),t=n(2e3),o=n(5328)})(),r})(),e.exports=t()},"./client/src/block-editor.js":function(e,t,n){"use strict";var r,o,i,a=n("@wordpress/i18n"),s=window.wp.plugins,l=n("./client/src/containers/provider/index.jsx"),c=n("./client/src/containers/container/index.jsx"),d=n("./client/src/containers/panel/index.jsx"),u=("undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature,n("./client/src/store/index.js"));function p(){return React.createElement(d.A,null,React.createElement("p",null,React.createElement("strong",null,(0,a.__)("Byline","byline-manager"))),React.createElement(c.A,{store:u.A}))}e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature,(0,s.registerPlugin)("byline-manager-panel-info-provider",{render:l.A}),(0,s.registerPlugin)("byline-manager",{render:p}),(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&o.register(p,"BylineManagerSlotFill","/home/runner/work/byline-manager/byline-manager/client/src/block-editor.js"),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&i(e)},"./client/src/components/byline-freeform/index.jsx":function(e,t,n){"use strict";var r,o=n("./node_modules/prop-types/index.js"),i=n.n(o),a=n("@wordpress/components"),s=n("@wordpress/element");function l(e){let{id:t,addFreeformLabel:n,addFreeformPlaceholder:r,addFreeformButtonLabel:o,onUpdate:i}=e;const[l,c]=(0,s.useState)("");return React.createElement("div",{className:"freeform-controls components-base-control__field",style:{marginTop:15}},React.createElement("label",{className:"components-base-control__label",htmlFor:t},n),React.createElement("div",{className:"freeformInputGrp"},React.createElement("input",{className:"components-text-control__input",id:t,name:t,onChange:e=>{c(e.target.value)},placeholder:r,type:"text",value:l}),React.createElement(a.Button,{label:o,className:"button",size:"small",variant:"secondary",disabled:!l,onClick:e=>{e.preventDefault(),i({id:("text",`text-${(new Date).getTime()}`),name:l}),c("")}},o)))}e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(l,"useState{[textByline, setTextByline]('')}"),l.defaultProps={id:"byline_freeform"},l.propTypes={id:i().string,addFreeformLabel:i().string.isRequired,addFreeformPlaceholder:i().string.isRequired,addFreeformButtonLabel:i().string.isRequired,onUpdate:i().func.isRequired};const c=l;var d,u;t.A=c,(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(d.register(l,"BylineFreeform","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-freeform/index.jsx"),d.register(c,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-freeform/index.jsx")),(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&u(e)},"./client/src/components/byline-list-item/index.jsx":function(e,t,n){"use strict";var r,o=n("./node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js"),i=n("@wordpress/components"),a=n("@wordpress/i18n");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const s=(0,o.Zj)((e=>{let{name:t,image:n,removeItem:r,removeAuthorLabel:o}=e;return React.createElement(i.__experimentalItem,{className:"byline-list-item"},n?React.createElement("img",{src:n,alt:t}):null,React.createElement("span",null,t),React.createElement(i.Button,{label:o,isDestructive:!0,variant:"secondary",size:"small",onClick:e=>{e.preventDefault(),r()}},(0,a.__)("Remove","byline-manager")))})),l=s;var c,d;t.A=l,(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(c.register(s,"BylineListItem","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-list-item/index.jsx"),c.register(l,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-list-item/index.jsx")),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},"./client/src/components/byline-list/index.jsx":function(e,t,n){"use strict";var r,o=n("./node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js"),i=n("@wordpress/components"),a=n("./client/src/components/byline-list-item/index.jsx");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const s=(0,o.q6)((e=>{let{profiles:t,removeItem:n,removeAuthorLabel:r}=e;return React.createElement(i.__experimentalItemGroup,{style:{margin:"15px 0 0"}},t.map(((e,t)=>React.createElement(a.A,{key:`item-${e.id}`,index:t,count:t,bylineId:e.byline_id||0,name:e.name||"",image:e.image||"",removeItem:()=>n(e.id),removeAuthorLabel:r}))))})),l=s;var c,d;t.A=l,(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(c.register(s,"BylineList","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-list/index.jsx"),c.register(l,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-list/index.jsx")),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},"./client/src/components/byline-postpicker/index.jsx":function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r,o=n("@wordpress/api-fetch"),i=n.n(o),a=window.wp.url,s=n("react"),l=n("./node_modules/@alleyinteractive/block-editor-tools/build/index.bundle.min.js"),c=n("./node_modules/prop-types/index.js"),d=n.n(c);function u(e){let{addAuthorLabel:t,id:n,onUpdate:r,profilesApiUrl:o}=e;const c=(0,s.useCallback)((e=>{i()({url:(0,a.addQueryArgs)(o,{id:e})}).then((e=>{r(e[0])}))}),[o,r]);return React.createElement(React.Fragment,null,React.createElement("label",{className:"components-base-control__label",htmlFor:n},t),React.createElement(l.PostPicker,{allowedTypes:["profile"],onUpdate:e=>c(e)}))}e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(u,"useCallback{doProfileSearch}"),u.defaultProps={id:"profiles_postpicker"},u.propTypes={addAuthorLabel:d().string.isRequired,id:d().string,onUpdate:d().func.isRequired,profilesApiUrl:d().string.isRequired};const p=u;var f,h,m=p;(f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(f.register(u,"BylinePostpicker","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-postpicker/index.jsx"),f.register(p,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-postpicker/index.jsx")),(h="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&h(e)},"./client/src/components/byline-slot-wrapper/index.jsx":function(e,t,n){"use strict";var r,o=n("./node_modules/prop-types/index.js"),i=n.n(o),a=n("@wordpress/components"),s=n("@wordpress/element"),l=n("./client/src/components/byline-freeform/index.jsx"),c=n("./client/src/components/byline-list/index.jsx"),d=n("./client/src/components/byline-postpicker/index.jsx");function u(e){let{addAuthorLabel:t,addFreeformButtonLabel:n,addFreeformLabel:r,addFreeformPlaceholder:o,addProfile:i,freeformInputId:u,profiles:p,profilesApiUrl:f,removeAuthorLabel:h,removeProfile:m,reorderProfile:y}=e;return React.createElement("div",{className:"components-base-control"},null===p?React.createElement("div",{style:{textAlign:"center"}},React.createElement(a.Spinner,null)):React.createElement(s.Fragment,null,React.createElement(d.A,{addAuthorLabel:t||bylineData.addAuthorLabel,onUpdate:i,profilesApiUrl:f||bylineData.profilesApiUrl}),React.createElement(l.A,{id:u,onUpdate:i,addFreeformLabel:r||bylineData.addFreeformLabel,addFreeformPlaceholder:o||bylineData.addFreeformPlaceholder,addFreeformButtonLabel:n||bylineData.addFreeformButtonLabel}),0!==p.length?React.createElement(c.A,{profiles:p,onSortEnd:y,lockAxis:"y",helperClass:"byline-list-item",removeItem:m,removeAuthorLabel:h||bylineData.removeAuthorLabel}):null))}e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature,u.defaultProps={addAuthorLabel:null,addFreeformButtonLabel:null,addFreeformLabel:null,addFreeformPlaceholder:null,freeformInputId:"byline_freeform",profiles:[],profilesApiUrl:null,removeAuthorLabel:null},u.propTypes={addAuthorLabel:i().string,addFreeformButtonLabel:i().string,addFreeformLabel:i().string,addFreeformPlaceholder:i().string,addProfile:i().func.isRequired,freeformInputId:i().string,profiles:i().arrayOf(i().shape({id:i().oneOfType([i().number,i().string]),byline_id:i().number,name:i().string,image:i().oneOfType([i().bool,i().string])})),profilesApiUrl:i().string,removeAuthorLabel:i().string,removeProfile:i().func.isRequired,reorderProfile:i().func.isRequired};const p=u;var f,h;t.A=p,(f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(f.register(u,"BylineSlotWrapper","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-slot-wrapper/index.jsx"),f.register(p,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-slot-wrapper/index.jsx")),(h="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&h(e)},"./client/src/containers/container/index.jsx":function(e,t,n){"use strict";var r,o=n("./node_modules/prop-types/index.js"),i=n.n(o),a=n("@wordpress/data"),s=n("@wordpress/element"),l=n("./client/src/utils/set-byline.js"),c=n("./client/src/components/byline-slot-wrapper/index.jsx");function d(e){let{metaKey:t,store:n}=e;const r=(0,a.useSelect)((e=>e(n).getProfiles()),[]),{actionAddProfile:o,actionRemoveProfile:i,actionReorderProfile:d}=(0,a.useDispatch)(n),u=(0,s.useCallback)((0,l.A)(a.dispatch,t),[t]);return(0,s.useEffect)((()=>{null!==r&&u(r)}),[r,u]),React.createElement(c.A,{profiles:r,addProfile:o,removeProfile:i,reorderProfile:d})}e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(d,"useSelect{profiles}\nuseDispatch{{\n actionAddProfile: addProfile,\n actionRemoveProfile: removeProfile,\n actionReorderProfile: reorderProfile,\n }}\nuseCallback{saveByline}\nuseEffect{}",(()=>[a.useSelect,a.useDispatch])),d.defaultProps={metaKey:"byline"},d.propTypes={metaKey:i().string,store:i().string.isRequired};const u=d;var p,f;t.A=u,(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(d,"BylineSlotContainer","/home/runner/work/byline-manager/byline-manager/client/src/containers/container/index.jsx"),p.register(u,"default","/home/runner/work/byline-manager/byline-manager/client/src/containers/container/index.jsx")),(f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&f(e)},"./client/src/containers/panel/index.jsx":function(e,t,n){"use strict";n.d(t,{A:function(){return h}});var r,o=n("./node_modules/prop-types/index.js"),i=n.n(o),a=window.wp.editPost,s=n("@wordpress/components");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const{Fill:l,Slot:c}=(0,s.createSlotFill)("BylineManagerPanelInfo");function d(e){let{children:t}=e;return React.createElement(l,null,React.createElement(a.PluginPostStatusInfo,null,React.createElement("div",{style:{width:"100%"}},React.createElement(s.__experimentalDivider,null),t)))}d.Slot=c,d.propTypes={children:i().node.isRequired};const u=d;var p,f,h=u;(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(l,"Fill","/home/runner/work/byline-manager/byline-manager/client/src/containers/panel/index.jsx"),p.register(c,"Slot","/home/runner/work/byline-manager/byline-manager/client/src/containers/panel/index.jsx"),p.register(d,"BylineManagerPanelInfo","/home/runner/work/byline-manager/byline-manager/client/src/containers/panel/index.jsx"),p.register(u,"default","/home/runner/work/byline-manager/byline-manager/client/src/containers/panel/index.jsx")),(f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&f(e)},"./client/src/containers/provider/index.jsx":function(e,t,n){"use strict";var r,o=n("@wordpress/element"),i=n("./client/src/containers/panel/index.jsx");function a(){return React.createElement(i.A.Slot,null,(e=>React.createElement(o.Fragment,null,e)))}e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const s=a;var l,c;t.A=s,(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(l.register(a,"BylineManagerPanelInfoProvider","/home/runner/work/byline-manager/byline-manager/client/src/containers/provider/index.jsx"),l.register(s,"default","/home/runner/work/byline-manager/byline-manager/client/src/containers/provider/index.jsx")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./client/src/store/actions-types/hydrate-action-types.js":function(e,t,n){"use strict";var r;e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const o={HYDRATE_PROFILES:"byline-manager/hydrate/HYDRATE_PROFILES",RECEIVE_HYDRATED_PROFILES:"byline-manager/hydrate/RECEIVE_HYDRATED_PROFILES"},i=o;var a,s;t.A=i,(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(a.register(o,"HYDRATE_ACTION_TYPES","/home/runner/work/byline-manager/byline-manager/client/src/store/actions-types/hydrate-action-types.js"),a.register(i,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/actions-types/hydrate-action-types.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},"./client/src/store/actions-types/index.js":function(e,t,n){"use strict";n.d(t,{G:function(){return o.A},J:function(){return r.A}});var r=n("./client/src/store/actions-types/hydrate-action-types.js"),o=n("./client/src/store/actions-types/modify-action-types.js");"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature},"./client/src/store/actions-types/modify-action-types.js":function(e,t,n){"use strict";var r;e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const o={ADD_PROFILE:"byline-manager/modify/ADD_PROFILE",REMOVE_PROFILE:"byline-manager/modify/REMOVE_PROFILE",REORDER_PROFILE:"byline-manager/modify/REORDER_PROFILE"},i=o;var a,s;t.A=i,(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(a.register(o,"MODIFY_ACTION_TYPES","/home/runner/work/byline-manager/byline-manager/client/src/store/actions-types/modify-action-types.js"),a.register(i,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/actions-types/modify-action-types.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},"./client/src/store/actions/hydrate-actions.js":function(e,t,n){"use strict";n.d(t,{A:function(){return a},v:function(){return i}});var r,o=n("./client/src/store/actions-types/index.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const i=e=>({type:o.J.RECEIVE_HYDRATED_PROFILES,payload:e}),a=e=>({type:o.J.HYDRATE_PROFILES,payload:e});var s,l;(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(i,"actionReceiveHydratedProfiles","/home/runner/work/byline-manager/byline-manager/client/src/store/actions/hydrate-actions.js"),s.register(a,"actionHydrateProfiles","/home/runner/work/byline-manager/byline-manager/client/src/store/actions/hydrate-actions.js")),(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&l(e)},"./client/src/store/actions/index.js":function(e,t,n){"use strict";n.r(t),n.d(t,{actionAddProfile:function(){return o.P6},actionHydrateProfiles:function(){return r.A},actionReceiveHydratedProfiles:function(){return r.v},actionRemoveProfile:function(){return o.EX},actionReorderProfile:function(){return o.fE}});var r=n("./client/src/store/actions/hydrate-actions.js"),o=n("./client/src/store/actions/modify-actions.js");"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature},"./client/src/store/actions/modify-actions.js":function(e,t,n){"use strict";n.d(t,{EX:function(){return a},P6:function(){return i},fE:function(){return s}});var r,o=n("./client/src/store/actions-types/index.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const i=e=>({type:o.G.ADD_PROFILE,payload:e}),a=e=>({type:o.G.REMOVE_PROFILE,payload:e}),s=e=>({type:o.G.REORDER_PROFILE,payload:e});var l,c;(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(l.register(i,"actionAddProfile","/home/runner/work/byline-manager/byline-manager/client/src/store/actions/modify-actions.js"),l.register(a,"actionRemoveProfile","/home/runner/work/byline-manager/byline-manager/client/src/store/actions/modify-actions.js"),l.register(s,"actionReorderProfile","/home/runner/work/byline-manager/byline-manager/client/src/store/actions/modify-actions.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./client/src/store/constants.js":function(e,t,n){"use strict";var r;e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const o="byline-manager",i=o;var a,s;t.A=i,(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(a.register(o,"STORE_KEY","/home/runner/work/byline-manager/byline-manager/client/src/store/constants.js"),a.register(i,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/constants.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},"./client/src/store/controls.js":function(e,t,n){"use strict";var r,o=n("./client/src/store/actions-types/index.js"),i=n("./client/src/utils/get-hydrate-profiles.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const a={[o.J.HYDRATE_PROFILES]:async e=>(0,i.A)(e.payload)};var s,l;t.A=a,(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&s.register(a,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/controls.js"),(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&l(e)},"./client/src/store/creator.js":function(e,t,n){"use strict";var r,o=n("@wordpress/data"),i=n("./client/src/store/actions/index.js"),a=n("./client/src/store/resolvers.js"),s=n("./client/src/store/selectors.js"),l=n("./client/src/store/reducer.js"),c=n("./client/src/store/controls.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"byline";const n=(0,o.createReduxStore)(e,{reducer:l.A,actions:i,selectors:{getProfiles:s.A},controls:c.A,resolvers:{getProfiles:()=>(0,a.A)(e,t)}});(0,o.register)(n)},u=d;var p,f;t.A=u,(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(p.register(d,"creator","/home/runner/work/byline-manager/byline-manager/client/src/store/creator.js"),p.register(u,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/creator.js")),(f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&f(e)},"./client/src/store/index.js":function(e,t,n){"use strict";var r,o=n("./client/src/store/creator.js"),i=n("./client/src/store/constants.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const a=i.A;(0,o.A)(a);const s=a;var l,c;t.A=s,(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(l.register(a,"store","/home/runner/work/byline-manager/byline-manager/client/src/store/index.js"),l.register(s,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/index.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./client/src/store/reducer.js":function(e,t,n){"use strict";var r,o=n("./client/src/store/actions-types/index.js"),i=n("./client/src/store/reducers/hydrate-reducer.js"),a=n("./client/src/store/reducers/modify-reducer.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const s={byline:{profiles:[]},profilesHydrated:!1},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(!0){case Object.values(o.J).includes(t.type):return(0,i.A)(e,t);case Object.values(o.G).includes(t.type):return{byline:{profiles:(0,a.A)(e.byline.profiles,t)},profilesHydrated:e.profilesHydrated};default:return e}},c=l;var d,u;t.A=c,(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(d.register(s,"DEFAULT_STATE","/home/runner/work/byline-manager/byline-manager/client/src/store/reducer.js"),d.register(l,"reducer","/home/runner/work/byline-manager/byline-manager/client/src/store/reducer.js"),d.register(c,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/reducer.js")),(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&u(e)},"./client/src/store/reducers/hydrate-reducer.js":function(e,t,n){"use strict";var r,o=n("./client/src/store/actions-types/index.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{type:n,payload:r}=t;return n===o.J.RECEIVE_HYDRATED_PROFILES?{byline:{profiles:e.byline.profiles.concat(r)},profilesHydrated:!0}:e},a=i;var s,l;t.A=a,(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(i,"reducer","/home/runner/work/byline-manager/byline-manager/client/src/store/reducers/hydrate-reducer.js"),s.register(a,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/reducers/hydrate-reducer.js")),(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&l(e)},"./client/src/store/reducers/modify-reducer.js":function(e,t,n){"use strict";var r,o=n("./client/src/store/actions-types/index.js"),i=n("./client/src/utils/remove-index.js"),a=n("./client/src/utils/reorder-index.js");e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{type:n,payload:r}=t;switch(n){case o.G.ADD_PROFILE:return[...e,t.payload];case o.G.REMOVE_PROFILE:return(0,i.A)(e,r);case o.G.REORDER_PROFILE:{const{oldIndex:t,newIndex:n}=r;return(0,a.A)(e,t,n)}default:return e}},l=s;var c,d;t.A=l,(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(c.register(s,"reducer","/home/runner/work/byline-manager/byline-manager/client/src/store/reducers/modify-reducer.js"),c.register(l,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/reducers/modify-reducer.js")),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},"./client/src/store/resolvers.js":function(e,t,n){"use strict";var r,o=n("@wordpress/data"),i=n("./client/src/store/actions/index.js");function*a(e,t){const{profilesHydrated:n,byline:r}=(0,o.select)(e);if(n)return(0,i.actionReceiveHydratedProfiles)(r.profiles);const a=(0,o.select)("core/editor").getEditedPostAttribute("meta")[t]||{},s=yield(0,i.actionHydrateProfiles)(a.profiles||[]);return(0,i.actionReceiveHydratedProfiles)(s)}e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const s=a;var l,c;t.A=s,(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(l.register(a,"resolveProfiles","/home/runner/work/byline-manager/byline-manager/client/src/store/resolvers.js"),l.register(s,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/resolvers.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./client/src/store/selectors.js":function(e,t,n){"use strict";var r;e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const o=e=>e.profilesHydrated?e.byline.profiles||[]:null,i=o;var a,s;t.A=i,(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(a.register(o,"getProfiles","/home/runner/work/byline-manager/byline-manager/client/src/store/selectors.js"),a.register(i,"default","/home/runner/work/byline-manager/byline-manager/client/src/store/selectors.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},"./client/src/utils/get-hydrate-profiles.js":function(e,t,n){"use strict";var r,o=n("@wordpress/api-fetch"),i=n.n(o);e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const a=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return i()({path:"/byline-manager/v1/hydrateProfiles/",method:"POST",data:{profiles:e}}).catch((()=>[]))},s=a;var l,c;t.A=s,(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(l.register(a,"getHydrateProfiles","/home/runner/work/byline-manager/byline-manager/client/src/utils/get-hydrate-profiles.js"),l.register(s,"default","/home/runner/work/byline-manager/byline-manager/client/src/utils/get-hydrate-profiles.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./client/src/utils/remove-index.js":function(e,t,n){"use strict";var r;e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const o=(e,t)=>e.findIndex((e=>e.id===t))>=0?e.filter((e=>e.id!==t)):e,i=o;var a,s;t.A=i,(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(a.register(o,"removeIndex","/home/runner/work/byline-manager/byline-manager/client/src/utils/remove-index.js"),a.register(i,"default","/home/runner/work/byline-manager/byline-manager/client/src/utils/remove-index.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},"./client/src/utils/reorder-index.js":function(e,t,n){"use strict";var r;n.d(t,{A:function(){return l}}),e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const o=(e,t,n)=>{return r=e,o=t,i=n,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&rn=>{const r=(0,o.A)(n),i=r.filter((e=>e.type&&"byline_id"===e.type)),a=i.length?[...i.map((e=>e.atts.term_id))]:[];return e("core/editor").editPost({byline:a,meta:{[t]:{profiles:r}}})},a=i;var s,l;t.A=a,(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(i,"setBylineMeta","/home/runner/work/byline-manager/byline-manager/client/src/utils/set-byline.js"),s.register(a,"default","/home/runner/work/byline-manager/byline-manager/client/src/utils/set-byline.js")),(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&l(e)},"./client/src/utils/transform-hydrate-profiles.js":function(e,t,n){"use strict";var r;e=n.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const o=e=>e.length<=0?[]:e.map((e=>e.byline_id&&"number"==typeof e.id?{type:"byline_id",atts:{term_id:e.byline_id,post_id:e.id}}:{type:"text",atts:{text:e.name}})),i=o;var a,s;t.A=i,(a="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(a.register(o,"transformHydratedProfiles","/home/runner/work/byline-manager/byline-manager/client/src/utils/transform-hydrate-profiles.js"),a.register(i,"default","/home/runner/work/byline-manager/byline-manager/client/src/utils/transform-hydrate-profiles.js")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},"./node_modules/invariant/browser.js":function(e){"use strict";e.exports=function(e,t,n,r,o,i,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,s],d=0;(l=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},"./node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,n){"use strict";var r=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},"./node_modules/prop-types/index.js":function(e,t,n){e.exports=n("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js":function(e,t,n){"use strict";n.d(t,{Zj:function(){return V},q6:function(){return q}});var r=n("./node_modules/@babel/runtime/helpers/esm/extends.js"),o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=n("./node_modules/@babel/runtime/helpers/esm/objectSpread.js"),a=n("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),s=n("./node_modules/@babel/runtime/helpers/esm/createClass.js"),l=n("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),c=n("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),d=n("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=n("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"),p=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),f=n("react"),h=n("react-dom"),m=n("./node_modules/invariant/browser.js"),y=n.n(m),g=n("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),b=n("./node_modules/prop-types/index.js"),v=n.n(b),A=function(){function e(){(0,a.A)(this,e),(0,p.A)(this,"refs",{})}return(0,s.A)(e,[{key:"add",value:function(e,t){this.refs[e]||(this.refs[e]=[]),this.refs[e].push(t)}},{key:"remove",value:function(e,t){var n=this.getIndex(e,t);-1!==n&&this.refs[e].splice(n,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var e=this;return this.refs[this.active.collection].find((function(t){return t.node.sortableInfo.index==e.active.index}))}},{key:"getIndex",value:function(e,t){return this.refs[e].indexOf(t)}},{key:"getOrderedRefs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(x)}}]),e}();function x(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function _(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var w={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},S=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function C(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function k(e,t){e.style["".concat(S,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function E(e,t){e.style["".concat(S,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function R(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function L(e,t,n){return Math.max(e,Math.min(n,t))}function T(e){return"px"===e.substr(-2)?parseFloat(e):0}function j(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function I(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function O(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:P(e.parentNode,t,r)}}function H(e){var t=e.lockOffset,n=e.width,r=e.height,o=t,i=t,a="px";if("string"==typeof t){var s=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);y()(null!==s,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),o=parseFloat(t),i=parseFloat(t),a=s[1]}return y()(isFinite(o)&&isFinite(i),"lockOffset value should be a finite. Given %s",t),"%"===a&&(o=o*n/100,i=i*r/100),{x:o,y:i}}function N(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:N(e.parentNode):null}var G={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function D(e){return null!=e.sortableHandle}var M=function(){function e(t,n){(0,a.A)(this,e),this.container=t,this.onScrollCallback=n}return(0,s.A)(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,o=e.maxTranslate,i=e.width,a=e.height,s={x:0,y:0},l={x:1,y:1},c=this.container,d=c.scrollTop,u=c.scrollLeft,p=c.scrollHeight,f=c.scrollWidth,h=0===d,m=p-d-c.clientHeight==0,y=0===u,g=f-u-c.clientWidth==0;n.y>=o.y-a/2&&!m?(s.y=1,l.y=10*Math.abs((o.y-a/2-n.y)/a)):n.x>=o.x-i/2&&!g?(s.x=1,l.x=10*Math.abs((o.x-i/2-n.x)/i)):n.y<=r.y+a/2&&!h?(s.y=-1,l.y=10*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+i/2&&!y&&(s.x=-1,l.x=10*Math.abs((n.x-i/2-r.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===s.x&&0===s.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*s.x,top:l.y*s.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}(),U={axis:v().oneOf(["x","y","xy"]),contentWindow:v().any,disableAutoscroll:v().bool,distance:v().number,getContainer:v().func,getHelperDimensions:v().func,helperClass:v().string,helperContainer:v().oneOfType([v().func,"undefined"==typeof HTMLElement?v().any:v().instanceOf(HTMLElement)]),hideSortableGhost:v().bool,keyboardSortingTransitionDuration:v().number,lockAxis:v().string,lockOffset:v().oneOfType([v().number,v().string,v().arrayOf(v().oneOfType([v().number,v().string]))]),lockToContainerEdges:v().bool,onSortEnd:v().func,onSortMove:v().func,onSortOver:v().func,onSortStart:v().func,pressDelay:v().number,pressThreshold:v().number,keyCodes:v().shape({lift:v().arrayOf(v().number),drop:v().arrayOf(v().number),cancel:v().arrayOf(v().number),up:v().arrayOf(v().number),down:v().arrayOf(v().number)}),shouldCancelStart:v().func,transitionDuration:v().number,updateBeforeSortStart:v().func,useDragHandle:v().bool,useWindowAsScrollContainer:v().bool},B={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},F={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:B,shouldCancelStart:function(e){return-1!==[G.Input,G.Textarea,G.Select,G.Option,G.Button].indexOf(e.target.tagName)||!!R(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},z=Object.keys(U),W=(0,f.createContext)({manager:{}});function q(e){var t,n,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;(0,a.A)(this,n),t=(0,l.A)(this,(0,c.A)(n).call(this,e)),(0,p.A)((0,u.A)((0,u.A)(t)),"state",{}),(0,p.A)((0,u.A)((0,u.A)(t)),"handleStart",(function(e){var n=t.props,r=n.distance,o=n.shouldCancelStart;if(2!==e.button&&!o(e)){t.touched=!0,t.position=O(e);var i=R(e.target,(function(e){return null!=e.sortableInfo}));if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var a=t.props.useDragHandle,s=i.sortableInfo,l=s.index,c=s.collection;if(s.disabled)return;if(a&&!R(e.target,D))return;t.manager.active={collection:c,index:l},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==G.Anchor||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),(0,p.A)((0,u.A)((0,u.A)(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),(0,p.A)((0,u.A)((0,u.A)(t)),"handleMove",(function(e){var n=t.props,r=n.distance,o=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=O(e),a={x:t.position.x-i.x,y:t.position.y-i.y},s=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||o&&!(s>=o)?r&&s>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),(0,p.A)((0,u.A)((0,u.A)(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),(0,p.A)((0,u.A)((0,u.A)(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),(0,p.A)((0,u.A)((0,u.A)(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n,r,o,d,y,b,v=f.sortableInfo.index,A=(n=f,{bottom:T((r=window.getComputedStyle(n)).marginBottom),left:T(r.marginLeft),right:T(r.marginRight),top:T(r.marginTop)}),x=function(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:T(t.gridColumnGap),y:T(t.gridRowGap)}:{x:0,y:0}}(t.container),_=t.scrollContainer.getBoundingClientRect(),S=s({index:v,node:f,collection:h});if(t.node=f,t.margin=A,t.gridGap=x,t.width=S.width,t.height=S.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=f.getBoundingClientRect(),t.containerBoundingRect=_,t.index=v,t.newIndex=v,t.axis={x:a.indexOf("x")>=0,y:a.indexOf("y")>=0},t.offsetEdge=P(f,t.container),t.initialOffset=O(m?(0,i.A)({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild((d="input, textarea, select, canvas, [contenteditable]",y=(o=f).querySelectorAll(d),b=o.cloneNode(!0),(0,g.A)(b.querySelectorAll(d)).forEach((function(e,t){"file"!==e.type&&(e.value=y[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===G.Canvas&&y[t].width>0&&y[t].height>0&&e.getContext("2d").drawImage(y[t],0,0)})),b)),C(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-A.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-A.top,"px"),width:"".concat(t.width,"px")}),m&&t.helper.focus(),c&&(t.sortableGhost=f,C(f,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},m){var k=p?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,E=k.top,R=k.left,L=k.width,j=E+k.height,I=R+L;t.axis.x&&(t.minTranslate.x=R-t.boundingClientRect.left,t.maxTranslate.x=I-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=E-t.boundingClientRect.top,t.maxTranslate.y=j-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(p?0:_.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(p?t.contentWindow.innerWidth:_.left+_.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(p?0:_.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(p?t.contentWindow.innerHeight:_.top+_.height)-t.boundingClientRect.top-t.height/2);l&&l.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,m?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(w.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),w.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:v}),u&&u({node:f,index:v,collection:h,isKeySorting:m,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),m&&t.keyMove(0)},o=t.props,a=o.axis,s=o.getHelperDimensions,l=o.helperClass,c=o.hideSortableGhost,d=o.updateBeforeSortStart,u=o.onSortStart,p=o.useWindowAsScrollContainer,f=n.node,h=n.collection,m=t.manager.isKeySorting,y=function(){if("function"==typeof d){t._awaitingUpdateBeforeSortStart=!0;var n=function(t,n){try{var r=(o=f.sortableInfo.index,Promise.resolve(d({collection:h,index:o,node:f,isKeySorting:m},e)).then((function(){})))}catch(e){return n(!0,e)}var o;return r&&r.then?r.then(n.bind(null,!1),n.bind(null,!0)):n(!1,value)}(0,(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return y&&y.then?y.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),(0,p.A)((0,u.A)((0,u.A)(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),(0,p.A)((0,u.A)((0,u.A)(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,o=n.onSortEnd,i=t.manager,a=i.active.collection,s=i.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(s?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(w.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),w.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&C(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,d=l.length;cr)){t.prevIndex=i,t.newIndex=o;var a=function(e,t,n){return et?e-1:e>n&&ey?y/2:this.height/2,width:this.width>m?m/2:this.width/2},b=c&&h>this.index&&h<=d,v=c&&h=d,A={x:0,y:0},x=a[u].edgeOffset;x||(x=P(f,this.container),a[u].edgeOffset=x,c&&(a[u].boundingClientRect=I(f,o)));var _=u0&&a[u-1];_&&!_.edgeOffset&&(_.edgeOffset=P(_.node,this.container),c&&(_.boundingClientRect=I(_.node,o))),h!==this.index?(t&&E(f,t),this.axis.x?this.axis.y?v||hthis.containerBoundingRect.width-g.width&&_&&(A.x=_.edgeOffset.left-x.left,A.y=_.edgeOffset.top-x.top),null===this.newIndex&&(this.newIndex=h)):(b||h>this.index&&(s+i.left+g.width>=x.left&&l+i.top+g.height>=x.top||l+i.top+g.height>=x.top+y))&&(A.x=-(this.width+this.marginOffset.x),x.left+A.xthis.index&&s+i.left+g.width>=x.left?(A.x=-(this.width+this.marginOffset.x),this.newIndex=h):(v||hthis.index&&l+i.top+g.height>=x.top?(A.y=-(this.height+this.marginOffset.y),this.newIndex=h):(v||h1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;(0,a.A)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return y()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,f.createElement)(e,(0,r.A)({ref:t},_(this.props,Y)))}}]),n}(f.Component),(0,p.A)(t,"displayName",j("sortableElement",e)),(0,p.A)(t,"contextType",W),(0,p.A)(t,"propTypes",$),(0,p.A)(t,"defaultProps",{collection:0}),n}},react:function(e){"use strict";e.exports=window.React},"react-dom":function(e){"use strict";e.exports=window.ReactDOM},"@wordpress/api-fetch":function(e){"use strict";e.exports=window.wp.apiFetch},"@wordpress/components":function(e){"use strict";e.exports=window.wp.components},"@wordpress/data":function(e){"use strict";e.exports=window.wp.data},"@wordpress/element":function(e){"use strict";e.exports=window.wp.element},"@wordpress/i18n":function(e){"use strict";e.exports=window.wp.i18n},"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ndiv{flex:1;max-width:34.375rem;min-width:15.625rem}.byline-manager-meta-box .current-user-link{font-weight:700}.byline-manager-meta-box .current-user-link button{font-weight:500;margin-left:.625rem}.byline-manager-meta-box .byline-override-option{float:right;margin:.3125rem 0 .9375rem .9375rem}.byline-manager-meta-box label span{display:block}#advanced-sortables .profile-user-link input,#normal-sortables .profile-user-link input{width:28.125rem}@media(min-width: 851px){#side-sortables .menu{right:.625rem;width:27.5rem}.components-panel #side-sortables .menu{left:1.5rem;max-width:14.5rem;right:auto}}.byline-list{min-height:6.25rem}.byline-list ol,.byline-list ul{list-style:none;margin-left:0}.byline-list-item{align-items:center;display:flex;max-width:15.625rem}.byline-list-item button{margin-left:auto}.components-item-group div[role=listitem]:last-child .byline-list-item{margin-bottom:0}div.byline-list-item{align-items:center;background-color:#fff;cursor:move;display:flex;list-style:none;margin-bottom:.3125rem;padding:.3125rem 0 .3125rem .625rem}div.byline-list-item *{vertical-align:middle}div.byline-list-item img{height:3.125rem;margin-right:.625rem;width:3.125rem}div.byline-list-item button.components-button.is-destructive{background:none;border:1px solid rgba(0,0,0,0);cursor:pointer;margin-left:auto;transition:background-color .2s} diff --git a/client/build/main.b0805fcc.bundle.asset.php b/client/build/main.b0805fcc.bundle.asset.php new file mode 100644 index 00000000..4cfe2b45 --- /dev/null +++ b/client/build/main.b0805fcc.bundle.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-url'), 'version' => 'e25bb3c6da8422f604a6'); diff --git a/client/build/main.b0805fcc.bundle.js b/client/build/main.b0805fcc.bundle.js new file mode 100644 index 00000000..b88895f6 --- /dev/null +++ b/client/build/main.b0805fcc.bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see main.b0805fcc.bundle.js.LICENSE.txt */ +!function(){var e={"./client/src/components/byline-metabox/index.js":function(e,t,n){"use strict";var o,r=n("./node_modules/prop-types/index.js"),i=n.n(r),a=n("./client/src/components/byline-profiles/index.js");function l(e){let{bylineMetaBox:{profiles:t=[]}}=e;const{addAuthorLabel:n,addAuthorPlaceholder:o,addFreeformButtonLabel:r,addFreeformLabel:i,addFreeformPlaceholder:l,profilesApiUrl:s,removeAuthorLabel:u}=bylineData;return t?React.createElement("div",{className:"byline-list byline-manager-meta-box"},React.createElement("input",{type:"hidden",name:"byline_source",value:"profiles"}),React.createElement(a.A,{addAuthorLabel:n,addAuthorPlaceholder:o,addFreeformButtonLabel:r,addFreeformLabel:i,addFreeformPlaceholder:l,profilesApiUrl:s,removeAuthorLabel:u,profiles:t})):null}e=n.hmd(e),(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&o(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature,l.propTypes={bylineMetaBox:i().shape({profiles:i().arrayOf(i().shape({id:i().oneOfType([i().number,i().string]),byline_id:i().number,name:i().string,image:i().oneOfType([i().bool,i().string])}))}).isRequired};const s=l;var u,c;t.A=s,(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(l,"BylineMetaBox","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-metabox/index.js"),u.register(s,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-metabox/index.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./client/src/components/byline-profiles/index.js":function(e,t,n){"use strict";n.d(t,{A:function(){return ge}});var o=n("./node_modules/prop-types/index.js"),r=n.n(o),i=n("@wordpress/element"),a=n("@wordpress/api-fetch"),l=n.n(a),s=n("@wordpress/url"),u=n("./node_modules/classnames/index.js"),c=n.n(u);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(j)}}]),e}();function j(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function A(e,t){return Object.keys(e).reduce((function(n,o){return-1===t.indexOf(o)&&(n[o]=e[o]),n}),{})}var P={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},D=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function H(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function M(e,t){e.style["".concat(D,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function B(e,t){e.style["".concat(D,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function N(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function W(e,t,n){return Math.max(e,Math.min(n,t))}function G(e){return"px"===e.substr(-2)?parseFloat(e):0}function F(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function U(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function K(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var o={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?o:V(e.parentNode,t,o)}}function q(e){var t=e.lockOffset,n=e.width,o=e.height,r=t,i=t,a="px";if("string"==typeof t){var l=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);R()(null!==l,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),r=parseFloat(t),i=parseFloat(t),a=l[1]}return R()(isFinite(r)&&isFinite(i),"lockOffset value should be a finite. Given %s",t),"%"===a&&(r=r*n/100,i=i*o/100),{x:r,y:i}}function X(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:X(e.parentNode):null}var Y={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function z(e){return null!=e.sortableHandle}var $,J=function(){function e(t,n){v(this,e),this.container=t,this.onScrollCallback=n}return w(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,o=e.minTranslate,r=e.maxTranslate,i=e.width,a=e.height,l={x:0,y:0},s={x:1,y:1},u=this.container,c=u.scrollTop,d=u.scrollLeft,f=u.scrollHeight,p=u.scrollWidth,h=0===c,m=f-c-u.clientHeight==0,g=0===d,y=p-d-u.clientWidth==0;n.y>=r.y-a/2&&!m?(l.y=1,s.y=10*Math.abs((r.y-a/2-n.y)/a)):n.x>=r.x-i/2&&!y?(l.x=1,s.x=10*Math.abs((r.x-i/2-n.x)/i)):n.y<=o.y+a/2&&!h?(l.y=-1,s.y=10*Math.abs((n.y-a/2-o.y)/a)):n.x<=o.x+i/2&&!g&&(l.x=-1,s.x=10*Math.abs((n.x-i/2-o.x)/i)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===l.x&&0===l.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:s.x*l.x,top:s.y*l.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}(),Q={axis:r().oneOf(["x","y","xy"]),contentWindow:r().any,disableAutoscroll:r().bool,distance:r().number,getContainer:r().func,getHelperDimensions:r().func,helperClass:r().string,helperContainer:r().oneOfType([r().func,"undefined"==typeof HTMLElement?r().any:r().instanceOf(HTMLElement)]),hideSortableGhost:r().bool,keyboardSortingTransitionDuration:r().number,lockAxis:r().string,lockOffset:r().oneOfType([r().number,r().string,r().arrayOf(r().oneOfType([r().number,r().string]))]),lockToContainerEdges:r().bool,onSortEnd:r().func,onSortMove:r().func,onSortOver:r().func,onSortStart:r().func,pressDelay:r().number,pressThreshold:r().number,keyCodes:r().shape({lift:r().arrayOf(r().number),drop:r().arrayOf(r().number),cancel:r().arrayOf(r().number),up:r().arrayOf(r().number),down:r().arrayOf(r().number)}),shouldCancelStart:r().func,transitionDuration:r().number,updateBeforeSortStart:r().func,useDragHandle:r().bool,useWindowAsScrollContainer:r().bool},Z={lift:[32],drop:[32],cancel:[27],up:[38,37],down:[40,39]},ee={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:Z,shouldCancelStart:function(e){return-1!==[Y.Input,Y.Textarea,Y.Select,Y.Option,Y.Button].indexOf(e.target.tagName)||!!N(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},te=Object.keys(Q),ne=(0,E.createContext)({manager:{}}),oe={index:r().number.isRequired,collection:r().oneOfType([r().number,r().string]),disabled:r().bool},re=Object.keys(oe),ie=n("./node_modules/react-autocomplete/build/lib/Autocomplete.js"),ae=n.n(ie),le=n("@wordpress/components"),se=n("./node_modules/@uidotdev/usehooks/index.js");e=n.hmd(e),($="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&$(e);var ue="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e};const ce=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(){var e,t;v(this,n);for(var o=arguments.length,r=new Array(o),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return R()(o.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var t=o.withRef?this.wrappedInstance:null;return(0,E.createElement)(e,d({ref:t},A(this.props,re)))}}]),n}(E.Component),y(t,"displayName",F("sortableElement",e)),y(t,"contextType",ne),y(t,"propTypes",oe),y(t,"defaultProps",{collection:0}),n}((e=>{let{count:t,bylineId:n,name:o,image:r,removeItem:i,removeAuthorLabel:a}=e;return React.createElement("li",{className:"byline-list-item"},React.createElement("input",{type:"hidden",name:`byline_entry[${t}][type]`,value:n?"byline_id":"text"}),React.createElement("input",{type:"hidden",name:`byline_entry[${t}][value]`,value:n||o}),r?React.createElement("img",{src:r,alt:o}):null,React.createElement("span",null,o),React.createElement(le.Button,{label:a,isDestructive:!0,size:"small",variant:"secondary",onClick:e=>{e.preventDefault(),i()}},"×"))})),de=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return n=t=function(t){function n(e){var t;v(this,n),y(S(S(t=I(this,k(n).call(this,e)))),"state",{}),y(S(S(t)),"handleStart",(function(e){var n=t.props,o=n.distance,r=n.shouldCancelStart;if(2!==e.button&&!r(e)){t.touched=!0,t.position=K(e);var i=N(e.target,(function(e){return null!=e.sortableInfo}));if(i&&i.sortableInfo&&t.nodeIsChild(i)&&!t.state.sorting){var a=t.props.useDragHandle,l=i.sortableInfo,s=l.index,u=l.collection;if(l.disabled)return;if(a&&!N(e.target,z))return;t.manager.active={collection:u,index:s},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==Y.Anchor||e.preventDefault(),o||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),y(S(S(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),y(S(S(t)),"handleMove",(function(e){var n=t.props,o=n.distance,r=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var i=K(e),a={x:t.position.x-i.x,y:t.position.y-i.y},l=Math.abs(a.x)+Math.abs(a.y);t.delta=a,o||r&&!(l>=r)?o&&l>=o&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),y(S(S(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),y(S(S(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),y(S(S(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),o=function(){if(n){var o=function(){var n,o,r,u,y,v,x,w=h.sortableInfo.index,S=(n=h,{bottom:G((o=window.getComputedStyle(n)).marginBottom),left:G(o.marginLeft),right:G(o.marginRight),top:G(o.marginTop)}),I=function(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:G(t.gridColumnGap),y:G(t.gridRowGap)}:{x:0,y:0}}(t.container),k=t.scrollContainer.getBoundingClientRect(),O=a({index:w,node:h,collection:m});if(t.node=h,t.margin=S,t.gridGap=I,t.width=O.width,t.height=O.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=h.getBoundingClientRect(),t.containerBoundingRect=k,t.index=w,t.newIndex=w,t.axis={x:i.indexOf("x")>=0,y:i.indexOf("y")>=0},t.offsetEdge=V(h,t.container),t.initialOffset=K(g?b({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild((u="input, textarea, select, canvas, [contenteditable]",y=(r=h).querySelectorAll(u),(x=(v=r.cloneNode(!0)).querySelectorAll(u),function(e){if(Array.isArray(e))return f(e)}(x)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(x)||p(x)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach((function(e,t){"file"!==e.type&&(e.value=y[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===Y.Canvas&&y[t].width>0&&y[t].height>0&&e.getContext("2d").drawImage(y[t],0,0)})),v)),H(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-S.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-S.top,"px"),width:"".concat(t.width,"px")}),g&&t.helper.focus(),s&&(t.sortableGhost=h,H(h,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},g){var T=d?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,E=T.top,C=T.left,L=T.width,R=E+T.height,_=C+L;t.axis.x&&(t.minTranslate.x=C-t.boundingClientRect.left,t.maxTranslate.x=_-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=E-t.boundingClientRect.top,t.maxTranslate.y=R-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(d?0:k.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(d?t.contentWindow.innerWidth:k.left+k.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(d?0:k.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(d?t.contentWindow.innerHeight:k.top+k.height)-t.boundingClientRect.top-t.height/2);l&&l.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?e.target:t.contentWindow,g?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(P.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),P.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:w}),c&&c({node:h,index:w,collection:m,isKeySorting:g,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),g&&t.keyMove(0)},r=t.props,i=r.axis,a=r.getHelperDimensions,l=r.helperClass,s=r.hideSortableGhost,u=r.updateBeforeSortStart,c=r.onSortStart,d=r.useWindowAsScrollContainer,h=n.node,m=n.collection,g=t.manager.isKeySorting,y=function(){if("function"==typeof u){t._awaitingUpdateBeforeSortStart=!0;var n=function(t,n){try{var o=(r=h.sortableInfo.index,Promise.resolve(u({collection:m,index:r,node:h,isKeySorting:g},e)).then((function(){})))}catch(e){return n(!0,e)}var r;return o&&o.then?o.then(n.bind(null,!1),n.bind(null,!0)):n(!1,value)}(0,(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return y&&y.then?y.then(o):o()}}();return Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),y(S(S(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.cancelable&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),y(S(S(t)),"handleSortEnd",(function(e){var n=t.props,o=n.hideSortableGhost,r=n.onSortEnd,i=t.manager,a=i.active.collection,l=i.isKeySorting,s=t.manager.getOrderedRefs();t.listenerNode&&(l?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(P.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),P.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),o&&t.sortableGhost&&H(t.sortableGhost,{opacity:"",visibility:""});for(var u=0,c=s.length;uo)){t.prevIndex=i,t.newIndex=r;var a=function(e,t,n){return et?e-1:e>n&&eg?g/2:this.height/2,width:this.width>m?m/2:this.width/2},b=u&&h>this.index&&h<=c,v=u&&h=c,x={x:0,y:0},w=a[d].edgeOffset;w||(w=V(p,this.container),a[d].edgeOffset=w,u&&(a[d].boundingClientRect=U(p,r)));var S=d0&&a[d-1];S&&!S.edgeOffset&&(S.edgeOffset=V(S.node,this.container),u&&(S.boundingClientRect=U(S.node,r))),h!==this.index?(t&&B(p,t),this.axis.x?this.axis.y?v||hthis.containerBoundingRect.width-y.width&&S&&(x.x=S.edgeOffset.left-w.left,x.y=S.edgeOffset.top-w.top),null===this.newIndex&&(this.newIndex=h)):(b||h>this.index&&(l+i.left+y.width>=w.left&&s+i.top+y.height>=w.top||s+i.top+y.height>=w.top+g))&&(x.x=-(this.width+this.marginOffset.x),w.left+x.xthis.index&&l+i.left+y.width>=w.left?(x.x=-(this.width+this.marginOffset.x),this.newIndex=h):(v||hthis.index&&s+i.top+y.height>=w.top?(x.y=-(this.height+this.marginOffset.y),this.newIndex=h):(v||h{let{profiles:t,removeItem:n,removeAuthorLabel:o}=e;return React.createElement("ol",null,t.map(((e,t)=>React.createElement(ce,{key:`item-${e.id}`,index:t,count:t,bylineId:e.byline_id,name:e.name,image:e.image,removeItem:()=>n(e.id),removeAuthorLabel:o}))))}));function fe(e){let{autocompleteInputId:t,freeformInputId:n,addAuthorLabel:o,addAuthorPlaceholder:r,addFreeformButtonLabel:a,addFreeformLabel:u,addFreeformPlaceholder:d,profiles:f,profilesApiUrl:p,removeAuthorLabel:h}=e;const[m,g]=(0,i.useState)(f),[y,b]=(0,i.useState)(""),[v,x]=(0,i.useState)([]),[w,S]=(0,i.useState)(""),I=(0,se.d7)(y,750),k=(0,i.useCallback)((e=>{l()({url:(0,s.addQueryArgs)(p,{s:e})}).then((e=>{const t=m.map((e=>e.id)),n=e.filter((e=>t.indexOf(e.id)<0));x(n)}))}),[m,p]),O={className:"components-text-control__input",type:"text",placeholder:r,id:t,onKeyDown:e=>{13===e.keyCode&&e.preventDefault()}};return(0,i.useEffect)((()=>{""!==I&&k(I)}),[I,k]),React.createElement("div",null,React.createElement("div",{className:"byline-list-controls components-base-control"},React.createElement("div",{className:"profile-controls components-base-control__field"},React.createElement("label",{className:"components-base-control__label",htmlFor:t},o),React.createElement(ae(),{inputProps:O,items:v,value:y,getItemValue:e=>e.name,wrapperStyle:{position:"relative",display:"block"},onSelect:(e,t)=>{b(""),x([]),g([...m,t])},onChange:(e,t)=>b(t),renderMenu:e=>React.createElement("div",{className:"menu"},e),renderItem:(e,t)=>React.createElement("div",{className:c()("item",{"item-highlighted":t}),key:e.id},e.name)})),React.createElement("div",{className:"freeform-controls components-base-control__field"},React.createElement("label",{className:"components-base-control__label",htmlFor:n},u),React.createElement("div",{className:"freeformInputGrp"},React.createElement("input",{className:"components-text-control__input",id:n,name:n,onChange:e=>{S(e.target.value)},placeholder:d,type:"text",value:w}),React.createElement(le.Button,{label:a,className:"button",disabled:!w,size:"small",variant:"secondary",onClick:e=>{e.preventDefault();const t={id:("text",`text-${(new Date).getTime()}`),name:w};g([...m,t]),S("")}},a)))),React.createElement(de,{profiles:m,onSortEnd:e=>{let{oldIndex:t,newIndex:n}=e;var o,r,i;g((r=t,i=n,(o=(o=m).slice()).splice(i<0?o.length+i:i,0,o.splice(r,1)[0]),o))},lockAxis:"y",helperClass:"byline-list-item",removeItem:e=>{const t=m.findIndex((t=>t.id===e));t>=0&&g([...m.slice(0,t),...m.slice(t+1)])},removeAuthorLabel:h}))}ue(fe,"useState{[profiles, setProfiles](profilesRaw)}\nuseState{[search, setSearch]('')}\nuseState{[searchResults, setSearchResults]([])}\nuseState{[value, setValue]('')}\nuseDebounce{debouncedSearchString}\nuseCallback{doProfileSearch}\nuseEffect{}",(()=>[se.d7])),fe.defaultProps={autocompleteInputId:"profiles_autocomplete",freeformInputId:"byline_freeform"},fe.propTypes={autocompleteInputId:r().string,freeformInputId:r().string,addAuthorLabel:r().string.isRequired,addAuthorPlaceholder:r().string.isRequired,addFreeformButtonLabel:r().string.isRequired,addFreeformLabel:r().string.isRequired,addFreeformPlaceholder:r().string.isRequired,profilesApiUrl:r().string.isRequired,removeAuthorLabel:r().string.isRequired,profiles:r().arrayOf(r().shape({id:r().oneOfType([r().number,r().string]),byline_id:r().number,name:r().string,image:r().oneOfType([r().bool,r().string])})).isRequired};const pe=fe;var he,me,ge=pe;(he="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(he.register(ce,"SortableItem","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-profiles/index.js"),he.register(de,"BylineList","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-profiles/index.js"),he.register(fe,"BylineProfiles","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-profiles/index.js"),he.register(pe,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/byline-profiles/index.js")),(me="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&me(e)},"./client/src/components/user-link-metabox/index.js":function(e,t,n){"use strict";var o,r=n("./node_modules/prop-types/index.js"),i=n.n(r),a=n("@wordpress/element"),l=n("@wordpress/api-fetch"),s=n.n(l),u=n("@wordpress/url"),c=n("@wordpress/components"),d=n("./node_modules/react-autocomplete/build/lib/Autocomplete.js"),f=n.n(d),p=n("./node_modules/@uidotdev/usehooks/index.js");function h(e){let{linkUserPlaceholder:t,linkedToLabel:n,postId:o,unlinkLabel:r,user:i,userAlreadyLinked:l,usersApiUrl:d}=e;const[h,m]=(0,a.useState)(""),[g,y]=(0,a.useState)([]),[b,v]=(0,a.useState)({}),x=(0,p.d7)(h,750),w=(0,a.useCallback)((e=>{s()({url:(0,u.addQueryArgs)(d,{s:e,post:o})}).then((e=>y(e)))}),[o,d]),S={placeholder:t,onKeyDown:e=>{13===e.keyCode&&e.preventDefault()}};return(0,a.useEffect)((()=>{""!==x&&w(x)}),[x,w]),(0,a.useEffect)((()=>{v(i)}),[i]),React.createElement("div",{className:"profile-user-link byline-manager-meta-box"},React.createElement("input",{type:"hidden",name:"profile_user_link",value:b.id||0}),b&&b.id&&b.name?React.createElement("p",{className:"current-user-link"},`${n} `,React.createElement("a",{href:`/wp-admin/user-edit.php?user_id=${b.id}`},b.name)," ",React.createElement(c.Button,{className:"button button-link-delete button-small",variant:"secondary",isDestructive:!0,size:"small",onClick:e=>{e.preventDefault(),v({})}},r)):null,React.createElement(f(),{inputProps:S,items:g,value:h,getItemValue:e=>e.name,onSelect:(e,t)=>{v(t),m(""),y([])},onChange:(e,t)=>m(t),isItemSelectable:e=>!e.linked,renderMenu:e=>React.createElement("div",{className:"menu"},e),renderItem:(e,t)=>React.createElement("div",{className:["item",t?"item-highlighted":"",e.linked?"item-disabled":""].join(" "),key:e.id},e.name,e.linked?React.createElement("em",null,l):null),wrapperStyle:{display:"block"}}))}e=n.hmd(e),(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&o(e),("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e})(h,"useState{[search, setSearch]('')}\nuseState{[searchResults, setSearchResults]([])}\nuseState{[user, setUser]({})}\nuseDebounce{debouncedSearchString}\nuseCallback{doUserSearch}\nuseEffect{}\nuseEffect{}",(()=>[p.d7])),h.defaultProps={user:{}},h.propTypes={linkUserPlaceholder:i().string.isRequired,linkedToLabel:i().string.isRequired,postId:i().number.isRequired,unlinkLabel:i().string.isRequired,user:i().shape({id:i().number,name:i().string,linked:i().bool}),userAlreadyLinked:i().string.isRequired,usersApiUrl:i().string.isRequired};const m=h;var g,y;t.A=m,(g="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(g.register(h,"UserLinkMetaBox","/home/runner/work/byline-manager/byline-manager/client/src/components/user-link-metabox/index.js"),g.register(m,"default","/home/runner/work/byline-manager/byline-manager/client/src/components/user-link-metabox/index.js")),(y="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&y(e)},"./client/src/init-byline-metabox.js":function(e,t,n){"use strict";var o,r=n("react-dom"),i=n.n(r),a=n("./client/src/components/byline-metabox/index.js");e=n.hmd(e),(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&o(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const l=()=>{const{bylineMetaBox:e}=bylineData;i().createRoot(document.getElementById("byline-manager-metabox-root")).render(React.createElement(a.A,{bylineMetaBox:e}))},s=l;var u,c;t.A=s,(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(l,"initBylineMetaBox","/home/runner/work/byline-manager/byline-manager/client/src/init-byline-metabox.js"),u.register(s,"default","/home/runner/work/byline-manager/byline-manager/client/src/init-byline-metabox.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./client/src/init-user-link-metabox.js":function(e,t,n){"use strict";var o,r=n("react-dom"),i=n.n(r),a=n("./client/src/components/user-link-metabox/index.js");e=n.hmd(e),(o="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&o(e),"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;const l=()=>{const e=document.getElementById("byline-manager-user-link-root"),t=e.dataset.user?JSON.parse(e.dataset.user):{},{linkUserPlaceholder:n,linkedToLabel:o,postId:r,unlinkLabel:l,userAlreadyLinked:s,usersApiUrl:u}=bylineData;i().createRoot(e).render(React.createElement(a.A,{linkUserPlaceholder:n,linkedToLabel:o,postId:+r,unlinkLabel:l,user:t,userAlreadyLinked:s,usersApiUrl:u}))},s=l;var u,c;t.A=s,(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(l,"initUserLinkMetaBox","/home/runner/work/byline-manager/byline-manager/client/src/init-user-link-metabox.js"),u.register(s,"default","/home/runner/work/byline-manager/byline-manager/client/src/init-user-link-metabox.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},"./node_modules/invariant/browser.js":function(e){"use strict";e.exports=function(e,t,n,o,r,i,a,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},"./node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,n){"use strict";var o=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},"./node_modules/prop-types/index.js":function(e,t,n){e.exports=n("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-autocomplete/build/lib/Autocomplete.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t=this.getFilteredItems(t).length)return{highlightedIndex:null}}},{key:"setMenuPositions",value:function(){var e=this.refs.input,t=e.getBoundingClientRect(),o=n.g.window.getComputedStyle(e),r=parseInt(o.marginBottom,10)||0,i=parseInt(o.marginLeft,10)||0,a=parseInt(o.marginRight,10)||0;this.setState({menuTop:t.bottom+r,menuLeft:t.left+i,menuWidth:t.width+i+a})}},{key:"highlightItemFromMouse",value:function(e){this.setState({highlightedIndex:e})}},{key:"selectItemFromMouse",value:function(e){var t=this,n=this.props.getItemValue(e);this.setIgnoreBlur(!1),this.setState({isOpen:!1,highlightedIndex:null},(function(){t.props.onSelect(n,e)}))}},{key:"setIgnoreBlur",value:function(e){this._ignoreBlur=e}},{key:"renderMenu",value:function(){var e=this,t=this.getFilteredItems(this.props).map((function(t,n){var o=e.props.renderItem(t,e.state.highlightedIndex===n,{cursor:"default"});return i.cloneElement(o,{onMouseEnter:e.props.isItemSelectable(t)?function(){return e.highlightItemFromMouse(n)}:null,onClick:e.props.isItemSelectable(t)?function(){return e.selectItemFromMouse(t)}:null,ref:function(t){return e.refs["item-"+n]=t}})})),n={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth},o=this.props.renderMenu(t,this.props.value,n);return i.cloneElement(o,{ref:function(t){return e.refs.menu=t},onTouchStart:function(){return e.setIgnoreBlur(!0)},onMouseEnter:function(){return e.setIgnoreBlur(!0)},onMouseLeave:function(){return e.setIgnoreBlur(!1)}})}},{key:"handleInputBlur",value:function(e){var t=this;if(this._ignoreBlur)return this._ignoreFocus=!0,this._scrollOffset={x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop},void this.refs.input.focus();var n=void 0,o=this.state.highlightedIndex;if(this.props.selectOnBlur&&null!==o){var r=this.getFilteredItems(this.props)[o],i=this.props.getItemValue(r);n=function(){return t.props.onSelect(i,r)}}this.setState({isOpen:!1,highlightedIndex:null},n);var a=this.props.inputProps.onBlur;a&&a(e)}},{key:"handleInputFocus",value:function(e){var t=this;if(this._ignoreFocus){this._ignoreFocus=!1;var n=this._scrollOffset,o=n.x,r=n.y;return this._scrollOffset=null,window.scrollTo(o,r),clearTimeout(this._scrollTimer),void(this._scrollTimer=setTimeout((function(){t._scrollTimer=null,window.scrollTo(o,r)}),0))}this.setState({isOpen:!0});var i=this.props.inputProps.onFocus;i&&i(e)}},{key:"isInputFocused",value:function(){var e=this.refs.input;return e.ownerDocument&&e===e.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!this.isOpen()&&this.setState({isOpen:!0})}},{key:"composeEventHandlers",value:function(e,t){return t?function(n){e(n),t(n)}:e}},{key:"isOpen",value:function(){return"open"in this.props?this.props.open:this.state.isOpen}},{key:"render",value:function(){this.props.debug&&this._debugStates.push({id:this._debugStates.length,state:this.state});var e=this.props.inputProps,t=this.isOpen();return i.createElement("div",o({style:o({},this.props.wrapperStyle)},this.props.wrapperProps),this.props.renderInput(o({},e,{role:"combobox","aria-autocomplete":"list","aria-expanded":t,autoComplete:"off",ref:this.exposeAPI,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onChange:this.handleChange,onKeyDown:this.composeEventHandlers(this.handleKeyDown,e.onKeyDown),onClick:this.composeEventHandlers(this.handleInputClick,e.onClick),value:this.props.value})),t&&this.renderMenu(),this.props.debug&&i.createElement("pre",{style:{marginLeft:300}},JSON.stringify(this._debugStates.slice(Math.max(0,this._debugStates.length-5),this._debugStates.length),null,2)))}}]),t}(i.Component);c.propTypes={items:a.array.isRequired,value:a.any,onChange:a.func,onSelect:a.func,shouldItemRender:a.func,isItemSelectable:a.func,sortItems:a.func,getItemValue:a.func.isRequired,renderItem:a.func.isRequired,renderMenu:a.func,menuStyle:a.object,renderInput:a.func,inputProps:a.object,wrapperProps:a.object,wrapperStyle:a.object,autoHighlight:a.bool,selectOnBlur:a.bool,onMenuVisibilityChange:a.func,open:a.bool,debug:a.bool},c.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},renderInput:function(e){return i.createElement("input",e)},onChange:function(){},onSelect:function(){},isItemSelectable:function(){return!0},renderMenu:function(e,t,n){return i.createElement("div",{style:o({},n,this.menuStyle),children:e})},menuStyle:{borderRadius:"3px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",background:"rgba(255, 255, 255, 0.9)",padding:"2px 0",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"50%"},autoHighlight:!0,selectOnBlur:!1,onMenuVisibilityChange:function(){}},c.keyDownHandlers={ArrowDown:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var n=this.state.highlightedIndex,o=null===n?-1:n,r=0;r-1&&o!==n&&this.setState({highlightedIndex:o,isOpen:!0})}},ArrowUp:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var n=this.state.highlightedIndex,o=null===n?t.length:n,r=0;r0?!0===a?o.scrollTop(t,d.top+f.top):!1===a?o.scrollTop(t,d.top+p.top):f.top<0?o.scrollTop(t,d.top+f.top):o.scrollTop(t,d.top+p.top):i||((a=void 0===a||!!a)?o.scrollTop(t,d.top+f.top):o.scrollTop(t,d.top+p.top)),r&&(f.left<0||p.left>0?!0===l?o.scrollLeft(t,d.left+f.left):!1===l?o.scrollLeft(t,d.left+p.left):f.left<0?o.scrollLeft(t,d.left+f.left):o.scrollLeft(t,d.left+p.left):i||((l=void 0===l||!!l)?o.scrollLeft(t,d.left+f.left):o.scrollLeft(t,d.left+p.left)))}},"./node_modules/react-autocomplete/node_modules/dom-scroll-into-view/lib/util.js":function(e){function t(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function n(e){return t(e)}function o(e){return t(e,!0)}function r(e){var t=function(e){var t,n,o,r=e.ownerDocument,i=r.body,a=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=a.clientLeft||i.clientLeft||0,top:o-=a.clientTop||i.clientTop||0}}(e),r=e.ownerDocument,i=r.defaultView||r.parentWindow;return t.left+=n(i),t.top+=o(i),t}var i,a=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),l=/^(top|right|bottom|left)$/,s="currentStyle",u="runtimeStyle",c="left";function d(e,t){for(var n=0;n{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,loaded:!1,exports:{}};return e[o](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=n("./client/src/init-byline-metabox.js"),t=n("./client/src/init-user-link-metabox.js");"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature,document.getElementById("byline-manager-metabox-root")?(0,e.A)():document.getElementById("byline-manager-user-link-root")&&(0,t.A)()}()}(); \ No newline at end of file diff --git a/client/build/main.b0805fcc.bundle.js.LICENSE.txt b/client/build/main.b0805fcc.bundle.js.LICENSE.txt new file mode 100644 index 00000000..827f2732 --- /dev/null +++ b/client/build/main.b0805fcc.bundle.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/client/build/main.b0805fcc.min.css b/client/build/main.b0805fcc.min.css new file mode 100644 index 00000000..065386c7 --- /dev/null +++ b/client/build/main.b0805fcc.min.css @@ -0,0 +1 @@ +:root{--spacer: rem(20px)}.demo{background-color:var(--grayLight);font-style:italic;margin:rem(20px) 0;padding:rem(20px);text-align:center}.freeform-controls label,.profile-controls label{display:block}.freeform-controls .freeformInputGrp{align-items:flex-start;display:flex;margin:.3125rem 0}.freeform-controls .freeformInputGrp .components-text-control__input{border-bottom-right-radius:0;border-top-right-radius:0;margin:0}.freeform-controls .freeformInputGrp button{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0;box-shadow:none;margin:0}.profile-controls .components-text-control__input,.profile-user-link .components-text-control__input{margin:.3125rem 0 0}.profile-controls .menu,.profile-user-link .menu{background:#fff;box-sizing:border-box;padding:0;position:absolute;width:100%;z-index:100}.components-panel #side-sortables .profile-controls .menu,.components-panel #side-sortables .profile-user-link .menu{max-width:calc(100% - 48px)}.block-editor-page .profile-controls .menu,.block-editor-page .profile-user-link .menu{background:rgba(0,0,0,0);border:0}.profile-controls .item,.profile-user-link .item{background:#fff;border:0 solid #ccc;border-left-width:1px;border-right-width:1px;cursor:default;padding:.5rem}.profile-controls .item:first-of-type,.profile-user-link .item:first-of-type{border-top-width:1px}.profile-controls .item:last-of-type,.profile-user-link .item:last-of-type{border-bottom-width:1px}.profile-controls .item-highlighted,.profile-user-link .item-highlighted{background-color:#4095bf;color:#fff}.profile-controls .item-disabled,.profile-user-link .item-disabled{color:#aaa;cursor:not-allowed;display:flex;flex-wrap:wrap;justify-content:space-between}.profile-controls .item-disabled em,.profile-user-link .item-disabled em{margin-left:.5rem}.profile-controls .item-header,.profile-user-link .item-header{background-color:#eee;color:#454545;font-weight:700}.profile-user-link .menu{max-width:37.5rem}.byline-manager-meta-box label{color:#555d66;display:block}.byline-manager-meta-box input[type=text],.byline-manager-meta-box input[role=combobox]{display:block;min-height:28px;width:100%}.byline-manager-meta-box .byline-list-controls{border-bottom:1px solid var(--grayLight);display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem}.byline-manager-meta-box .byline-list-controls>div{flex:1;max-width:34.375rem;min-width:15.625rem}.byline-manager-meta-box .current-user-link{font-weight:700}.byline-manager-meta-box .current-user-link button{font-weight:500;margin-left:.625rem}.byline-manager-meta-box .byline-override-option{float:right;margin:.3125rem 0 .9375rem .9375rem}.byline-manager-meta-box label span{display:block}#advanced-sortables .profile-user-link input,#normal-sortables .profile-user-link input{width:28.125rem}@media(min-width: 851px){#side-sortables .menu{right:.625rem;width:27.5rem}.components-panel #side-sortables .menu{left:1.5rem;max-width:14.5rem;right:auto}}.byline-list{min-height:6.25rem}.byline-list ol,.byline-list ul{list-style:none;margin-left:0}.byline-list-item{align-items:center;display:flex;max-width:15.625rem}.byline-list-item button{margin-left:auto}.components-item-group div[role=listitem]:last-child .byline-list-item{margin-bottom:0}div.byline-list-item{align-items:center;background-color:#fff;cursor:move;display:flex;list-style:none;margin-bottom:.3125rem;padding:.3125rem 0 .3125rem .625rem}div.byline-list-item *{vertical-align:middle}div.byline-list-item img{height:3.125rem;margin-right:.625rem;width:3.125rem}div.byline-list-item button.components-button.is-destructive{background:none;border:1px solid rgba(0,0,0,0);cursor:pointer;margin-left:auto;transition:background-color .2s} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100755 index 0ca9c560..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,135 +0,0 @@ -maybe_rsync_plugin() - ->before( - function() { - // Load the testcases. - require_once __DIR__ . '/testcases/class-test-controller.php'; - } - ) - ->loaded( fn () => require_once __DIR__ . '/../byline-manager.php' ) - ->install(); - -// XML to Array from Core - -// Convert valid XML to an array tree structure. -// Kinda lame, but it works with a default PHP 4 installation. -class TestXMLParser { - public $xml; - public $data = []; - - /** - * PHP5 constructor. - */ - public function __construct( $in ) { - $this->xml = xml_parser_create(); - xml_set_object( $this->xml, $this ); - xml_parser_set_option( $this->xml, XML_OPTION_CASE_FOLDING, 0 ); - xml_set_element_handler( $this->xml, [ $this, 'start_handler' ], [ $this, 'end_handler' ] ); - xml_set_character_data_handler( $this->xml, [ $this, 'data_handler' ] ); - $this->parse( $in ); - } - - public function parse( $in ) { - $parse = xml_parse( $this->xml, $in, true ); - if ( ! $parse ) { - trigger_error( - sprintf( - 'XML error: %s at line %d', - xml_error_string( xml_get_error_code( $this->xml ) ), - xml_get_current_line_number( $this->xml ) - ), - E_USER_ERROR - ); - xml_parser_free( $this->xml ); - } - return true; - } - - public function start_handler( $parser, $name, $attributes ) { - $data['name'] = $name; - if ( $attributes ) { - $data['attributes'] = $attributes; } - $this->data[] = $data; - } - - public function data_handler( $parser, $data ) { - $index = count( $this->data ) - 1; - - if ( ! isset( $this->data[ $index ]['content'] ) ) { - $this->data[ $index ]['content'] = ''; - } - $this->data[ $index ]['content'] .= $data; - } - - public function end_handler( $parser, $name ) { - if ( count( $this->data ) > 1 ) { - $data = array_pop( $this->data ); - $index = count( $this->data ) - 1; - $this->data[ $index ]['child'][] = $data; - } - } -} - -/** - * Converts an XML string into an array tree structure. - * - * The output of this function can be passed to xml_find() to find nodes by their path. - * - * @param string $in The XML string. - * @return array XML as an array. - */ -function xml_to_array( $in ) { - $p = new TestXMLParser( $in ); - return $p->data; -} - -/** - * Finds XML nodes by a given "path". - * - * Example usage: - * - * $tree = xml_to_array( $rss ); - * $items = xml_find( $tree, 'rss', 'channel', 'item' ); - * - * @param array $tree An array tree structure of XML, typically from xml_to_array(). - * @param string ...$elements Names of XML nodes to create a "path" to find within the XML. - * @return array Array of matching XML node information. - */ -function xml_find( $tree, ...$elements ) { - $n = count( $elements ); - $out = []; - - if ( $n < 1 ) { - return $out; - } - - for ( $i = 0; $i < count( $tree ); $i++ ) { - // echo "checking '{$tree[$i][name]}' == '{$elements[0]}'\n"; - // var_dump( $tree[$i]['name'], $elements[0] ); - if ( $tree[ $i ]['name'] === $elements[0] ) { - // echo "n == {$n}\n"; - if ( 1 === $n ) { - $out[] = $tree[ $i ]; - } else { - $subtree =& $tree[ $i ]['child']; - $out = array_merge( $out, xml_find( $subtree, ...array_slice( $elements, 1 ) ) ); - } - } - } - - return $out; -} - -function get_echo( $callback, $args = [] ) { - ob_start(); - call_user_func_array( $callback, $args ); - return ob_get_clean(); -} diff --git a/tests/feature/controllers/test-authors-controller.php b/tests/feature/controllers/test-authors-controller.php deleted file mode 100644 index b9e1a066..00000000 --- a/tests/feature/controllers/test-authors-controller.php +++ /dev/null @@ -1,44 +0,0 @@ -endpoint = '/' . REST_NAMESPACE . '/authors'; - } - - public function test_get_authors(): void { - $user = self::factory()->user->create(); - - wp_set_current_user( $user ); - - $request = new WP_REST_Request( WP_REST_Server::READABLE, $this->endpoint ); - - $response = rest_get_server()->dispatch( $request ); - - $this->assertEquals( 200, $response->get_status() ); - } - - public function test_get_authors_without_permission(): void { - $request = new WP_REST_Request( WP_REST_Server::READABLE, $this->endpoint ); - - $response = rest_get_server()->dispatch( $request ); - - $this->assertErrorResponse( 'rest_forbidden', $response, rest_authorization_required_code() ); - } -} diff --git a/tests/feature/controllers/test-hydrate-profiles-controller.php b/tests/feature/controllers/test-hydrate-profiles-controller.php deleted file mode 100644 index a6276640..00000000 --- a/tests/feature/controllers/test-hydrate-profiles-controller.php +++ /dev/null @@ -1,50 +0,0 @@ -endpoint = '/' . REST_NAMESPACE . '/hydrateProfiles'; - } - - public function test_get_hydrated_profiles(): void { - $user = self::factory()->user->create(); - - wp_set_current_user( $user ); - - $request = new WP_REST_Request( WP_REST_Server::CREATABLE, $this->endpoint ); - $request->add_header( 'content-type', 'application/json' ); - $request->set_param( 'context', 'edit' ); - $request->set_body( wp_json_encode( [ 'profiles' => [] ] ) ); - - $response = rest_get_server()->dispatch( $request ); - - $this->assertEquals( 200, $response->get_status() ); - } - - public function test_get_hydrated_profiles_without_permission(): void { - $request = new WP_REST_Request( WP_REST_Server::CREATABLE, $this->endpoint ); - $request->add_header( 'content-type', 'application/json' ); - $request->set_param( 'context', 'edit' ); - $request->set_body( wp_json_encode( [ 'profiles' => [] ] ) ); - - $response = rest_get_server()->dispatch( $request ); - - $this->assertErrorResponse( 'rest_forbidden', $response, rest_authorization_required_code() ); - } -} diff --git a/tests/feature/controllers/test-users-controller.php b/tests/feature/controllers/test-users-controller.php deleted file mode 100644 index 62df232a..00000000 --- a/tests/feature/controllers/test-users-controller.php +++ /dev/null @@ -1,44 +0,0 @@ -endpoint = '/' . REST_NAMESPACE . '/users'; - } - - public function test_get_authors(): void { - $user = self::factory()->user->create(); - - wp_set_current_user( $user ); - - $request = new WP_REST_Request( WP_REST_Server::READABLE, $this->endpoint ); - - $response = rest_get_server()->dispatch( $request ); - - $this->assertEquals( 200, $response->get_status() ); - } - - public function test_get_authors_without_permission(): void { - $request = new WP_REST_Request( WP_REST_Server::READABLE, $this->endpoint ); - - $response = rest_get_server()->dispatch( $request ); - - $this->assertErrorResponse( 'rest_forbidden', $response, rest_authorization_required_code() ); - } -} diff --git a/tests/feature/test-bylines-template-tags.php b/tests/feature/test-bylines-template-tags.php deleted file mode 100644 index b17d96a4..00000000 --- a/tests/feature/test-bylines-template-tags.php +++ /dev/null @@ -1,612 +0,0 @@ - 'b1', - 'post_title' => 'Byline 1', - ] - ); - $b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - - $post_id = static::factory()->post->create(); - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b2->term_id, - ], - ], - ], - ]; - - Utils::set_post_byline( $post_id, $byline_meta ); - - $byline = Utils::get_byline_entries_for_post( $post_id ); - - $this->assertCount( 2, $byline ); - $this->assertEquals( [ $b1->post_id, $b2->post_id ], wp_list_pluck( $byline, 'post_id' ) ); - - // Ensure the order persists. - $byline_meta['byline_entries'] = array_reverse( $byline_meta['byline_entries'] ); - Utils::set_post_byline( $post_id, $byline_meta ); - $byline = Utils::get_byline_entries_for_post( $post_id ); - $this->assertCount( 2, $byline ); - $this->assertEquals( [ $b2->post_id, $b1->post_id ], wp_list_pluck( $byline, 'post_id' ) ); - - // Ensure that adding a text profile item alongside profiles works. - $byline_meta['byline_entries'][] = [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Text Item 1', - ], - ]; - } - - /** - * Ensure get_byline_entries_for_post() returns a user object when no bylines are assigned - */ - public function test_get_byline_entries_for_post_returns_wp_user() { - $this->markTestSkipped( 'TODO: how to handle posts without byline' ); - - $user_id = static::factory()->user->create(); - $post_id = static::factory()->post->create( - [ - 'post_author' => $user_id, - ] - ); - $byline = Utils::get_byline_entries_for_post( $post_id ); - $this->assertCount( 1, $byline ); - $this->assertEquals( [ $user_id ], wp_list_pluck( $byline, 'ID' ) ); - // Adding a byline means the user id should no longer be returned. - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - Utils::set_post_byline( $post_id, [ 'byline_ids' => wp_list_pluck( [ $b1 ], 'term_id' ) ] ); - $byline = Utils::get_byline_entries_for_post( $post_id ); - $this->assertCount( 1, $byline ); - $this->assertEquals( [ 'b1' ], wp_list_pluck( $byline, 'post_name' ) ); - } - - /** - * Render one byline, without the link to its post - */ - public function test_template_tag_the_byline_one_byline() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - ], - ]; - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( 'Byline 1' ); - the_byline(); - } - - /** - * Render two bylines, without the link to its post - */ - public function test_template_tag_the_byline_two_byline() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b2->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - ], - ]; - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( 'Byline 2 and Byline 1' ); - the_byline(); - } - - /** - * Render three bylines, without the link to its post - */ - public function test_template_tag_the_byline_three_byline() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - $b3 = Profile::create( - [ - 'post_name' => 'b3', - 'post_title' => 'Byline 3', - ] - ); - - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b2->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b3->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - ], - ]; - - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( 'Byline 2, Byline 3, and Byline 1' ); - the_byline(); - } - - /** - * Render four bylines, without the link to its post - */ - public function test_template_tag_the_byline_four_byline() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - $b3 = Profile::create( - [ - 'post_name' => 'b3', - 'post_title' => 'Byline 3', - ] - ); - $b4 = Profile::create( - [ - 'post_name' => 'b4', - 'post_title' => 'Byline 4', - ] - ); - - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b2->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b4->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b3->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - ], - ]; - - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( 'Byline 2, Byline 4, Byline 3, and Byline 1' ); - the_byline(); - } - - /** - * Render three bylines, without the link to its post, one as a text item - */ - public function test_template_tag_the_byline_mixed_byline() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Text Item 1', - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b2->term_id, - ], - ], - ], - ]; - - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( 'Byline 1, Text Item 1, and Byline 2' ); - the_byline(); - } - - /** - * Render two bylines, with the link to its post - */ - public function test_template_tag_the_byline_posts_links_two_byline() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b2->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - ], - ]; - - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( ' and ' ); - the_byline_posts_links(); - } - - /** - * Render two bylines, with the link to its post - */ - public function test_template_tag_the_byline_posts_links_mixed_byline() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Text Item 1', - ], - ], - ], - ]; - - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( ' and Text Item 1' ); - the_byline_posts_links(); - } - - /** - * Render one user, with the link to its post - */ - public function test_template_tag_the_byline_posts_links_one_user() { - $this->markTestSkipped( 'TODO: how to handle posts without byline' ); - - global $post; - $user_id = static::factory()->user->create(); - $post_id = static::factory()->post->create( - [ - 'post_author' => $user_id, - ] - ); - $post = get_post( $post_id ); - $user = get_user_by( 'id', $user_id ); - $this->expectOutputString( '' ); - the_byline_posts_links(); - } - - /** - * Render two bylines, one with a custom URL and the other without - */ - public function test_template_tag_the_byline_links_two_bylines() { - global $post; - $b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - update_post_meta( $b2->post_id, 'user_url', 'https://apple.com' ); - - $byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b2->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $b1->term_id, - ], - ], - ], - ]; - - $post_id = static::factory()->post->create(); - $post = get_post( $post_id ); - Utils::set_post_byline( $post_id, $byline_meta ); - $this->expectOutputString( 'Byline 2 and Byline 1' ); - the_byline_links(); - } - - /** - * Render byline override. - */ - public function test_get_override_for_post() { - global $post; - $post = static::factory()->post->create_and_get(); - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Override 1', - ], - ], - ], - ] - ); - $this->assertSame( 'Test Override 1', get_echo( '\Byline_Manager\the_byline' ) ); - } - - /** - * Render byline override that has an HTML link without the link. - */ - public function test_get_override_with_link_for_post() { - global $post; - $post = static::factory()->post->create_and_get(); - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Override 1', - ], - ], - ], - ] - ); - $this->assertSame( 'Test Override 1', get_echo( '\Byline_Manager\the_byline' ) ); - } - - /** - * Render byline override via `the_byline_posts_links()`. - */ - public function test_template_tag_the_byline_posts_links_with_override() { - global $post; - $post = static::factory()->post->create_and_get(); - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Override 2', - ], - ], - ], - ] - ); - $this->assertSame( 'Test Override 2', get_echo( '\Byline_Manager\the_byline_posts_links' ) ); - } - - /** - * Render byline override with a link via `the_byline_posts_links()`. - */ - public function test_template_tag_the_byline_posts_links_with_override_with_link() { - global $post; - $post = static::factory()->post->create_and_get(); - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Override 2', - ], - ], - ], - ] - ); - $this->assertSame( 'Test Override 2', get_echo( '\Byline_Manager\the_byline_posts_links' ) ); - } - - /** - * Render byline override via `the_byline_links()`. - */ - public function test_template_tag_the_byline_links_with_override() { - global $post; - $post = static::factory()->post->create_and_get(); - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Override 3', - ], - ], - ], - ] - ); - $this->assertSame( 'Test Override 3', get_echo( '\Byline_Manager\the_byline_links' ) ); - } - - /** - * Render byline override with a link via `the_byline_links()`. - */ - public function test_template_tag_the_byline_links_with_override_with_link() { - global $post; - $post = static::factory()->post->create_and_get(); - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Override 3', - ], - ], - ], - ] - ); - $this->assertSame( 'Test Override 3', get_echo( '\Byline_Manager\the_byline_links' ) ); - } -} diff --git a/tests/feature/test-core-filters.php b/tests/feature/test-core-filters.php deleted file mode 100644 index 4381398b..00000000 --- a/tests/feature/test-core-filters.php +++ /dev/null @@ -1,290 +0,0 @@ -user->create( - [ - 'role' => 'editor', - ] - ); - $this->b1 = Profile::create( - [ - 'post_name' => 'b1', - 'post_title' => 'Byline 1', - ] - ); - $this->b2 = Profile::create( - [ - 'post_name' => 'b2', - 'post_title' => 'Byline 2', - ] - ); - $this->byline_meta = [ - 'byline_entries' => [ - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $this->b1->term_id, - ], - ], - [ - 'type' => 'byline_id', - 'atts' => [ - 'byline_id' => $this->b2->term_id, - ], - ], - ], - ]; - $post = static::factory()->post->create_and_get( [ 'post_author' => $user_id ] ); - setup_postdata( $post ); - } - - /** - * Check that `the_author()` will output the byline automatically. - */ - public function test_the_author_filter() { - global $post; - $byline_meta = $this->byline_meta; - - // Before the byline gets set, `the_author()` should output nothing. - $this->assertEquals( '', get_echo( 'the_author' ) ); - - // Set the byline and confirm that `the_author()` outputs it. - Utils::set_post_byline( $post->ID, $byline_meta ); - $this->assertEquals( 'Byline 1 and Byline 2', get_echo( 'the_author' ) ); - - // Ensure order changes propogate. - $byline_meta['byline_entries'] = array_reverse( $byline_meta['byline_entries'] ); - Utils::set_post_byline( $post->ID, $byline_meta ); - $this->assertEquals( 'Byline 2 and Byline 1', get_echo( 'the_author' ) ); - } - - /** - * Render two profiles in a byline, with the links to their posts. - */ - public function test_template_tag_the_byline_posts_links_two_byline() { - global $post; - $byline_meta = $this->byline_meta; - // Flip the order of the bylines. - $byline_meta['byline_entries'] = array_reverse( $byline_meta['byline_entries'] ); - Utils::set_post_byline( $post->ID, $byline_meta ); - - $this->expectOutputString( ' and ' ); - the_author_posts_link(); - } - - /** - * Check that `the_author()` will output the byline override automatically. - */ - public function test_the_author_filter_byline_override() { - global $post; - - // Before the byline gets set, `the_author()` should output nothing. - $this->assertEquals( '', get_echo( 'the_author' ) ); - - // Set the byline and confirm that `the_author()` outputs it. - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Core Override 1', - ], - ], - ], - ] - ); - $this->assertEquals( 'Test Core Override 1', get_echo( 'the_author' ) ); - } - - /** - * Render the byline override without links. - */ - public function test_template_tag_the_byline_posts_links_override() { - global $post; - - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test Core Override 2', - ], - ], - ], - ] - ); - - $this->assertEquals( 'Test Core Override 2', get_echo( 'the_author_posts_link' ) ); - } - - /** - * This is a bit of a hack used to buffer feed content. - * - * @return string - */ - public function do_rss2(): string { - ob_start(); - try { - @require ABSPATH . 'wp-includes/feed-rss2.php'; - $out = ob_get_clean(); - } catch ( \Exception $e ) { - $out = ob_get_clean(); - throw($e); - } - return $out; - } - - /** - * Test that the rss feed automatically gets the byline profiles added. - */ - public function test_rss_elements() { - global $post; - $byline_meta = $this->byline_meta; - // Flip the order of the bylines. - $byline_meta['byline_entries'] = array_reverse( $byline_meta['byline_entries'] ); - Utils::set_post_byline( $post->ID, $byline_meta ); - - $this->get( '/?feed=rss2' ); - $feed = $this->do_rss2(); - $xml = xml_to_array( $feed ); - - // Get all the child elements of the element - $items = xml_find( $xml, 'rss', 'channel', 'item' ); - - // Verify we only have one post. - $this->assertCount( 1, $items ); - $item = reset( $items ); - - // Check all dc:creator nodes. - $creator = xml_find( $item['child'], 'dc:creator' ); - $this->assertCount( 2, $creator ); - $this->assertEquals( 'Byline 2', $creator[0]['content'] ); - $this->assertEquals( 'Byline 1', $creator[1]['content'] ); - } - - /** - * Test that the rss feed automatically gets the byline override added. - */ - public function test_rss_elements_byline_override() { - global $post; - Utils::set_post_byline( - $post->ID, - [ - 'byline_entries' => [ - [ - 'type' => 'text', - 'atts' => [ - 'text' => 'Test RSS Override 1', - ], - ], - ], - ] - ); - - $this->get( '/?feed=rss2' ); - $feed = $this->do_rss2(); - $xml = xml_to_array( $feed ); - - // Get all the child elements of the element - $items = xml_find( $xml, 'rss', 'channel', 'item' ); - - // Verify we only have one post. - $this->assertCount( 1, $items ); - $item = reset( $items ); - - // Check all dc:creator nodes. - $creator = xml_find( $item['child'], 'dc:creator' ); - $this->assertCount( 1, $creator ); - $this->assertEquals( 'Test RSS Override 1', $creator[0]['content'] ); - } - - public function test_author_link() { - global $post; - - // Before a user is linked to a profile, it should have no posts url. - $this->assertSame( '', get_author_posts_url( $post->post_author ) ); - - // Link the profile and user, then recheck the url. - $this->b1->update_user_link( $post->post_author ); - $this->assertSame( - get_permalink( $this->b1->post_id ), - get_author_posts_url( $post->post_author ) - ); - } - - public function test_get_author_display_name_from_user(): void { - $author_name = 'Dumas Davy de la Pailleterie'; - $user = static::factory()->user->create_and_get( - [ - 'display_name' => $author_name, - 'first_name' => 'Dumas', - 'last_name' => 'Davy de la Pailleterie', - ] - ); - - static::factory()->post->create_and_get( [ 'post_author' => $user->ID ] ); - - $display_name = get_the_author_meta( 'display_name', $user->ID ); - - $this->assertNotSame( '', $display_name ); - $this->assertSame( $author_name, $display_name ); - } - - /** - * Test that the core author block's author name can be filtered using a byline author. - */ - public function test_replace_author_block_author(): void { - global $post; - - // Create a WP user to be the post author. - $user = static::factory()->user->create_and_get([ - 'display_name' => 'Author Name', - 'description' => 'This is a test author bio.', - ]); - - // Create a post with the author block. - $post = static::factory()->post->create_and_get([ - 'post_author' => $user->ID, - 'post_content' => '', - ]); - - // Render the post content. - $rendered_content = apply_filters( 'the_content', $post->post_content ); - - // Call our replace method and pass it the rendered content and a byline post. - $filtered_content = Core_Author_Block::get_instance()->replace_author_block_author( $rendered_content, $this->b1->post ); - - // Assert that the original author in the block content is replaced. - $this->assertStringNotContainsString( 'Author Name', $filtered_content ); - $this->assertStringContainsString('Byline 1', $filtered_content ); - } -} diff --git a/tests/feature/test-profile-byline-sync.php b/tests/feature/test-profile-byline-sync.php deleted file mode 100755 index 88536c6c..00000000 --- a/tests/feature/test-profile-byline-sync.php +++ /dev/null @@ -1,60 +0,0 @@ - byline sync functionality. - */ -class Test_Profile_Byline_Sync extends Test_Case { - use Refresh_Database; - - protected $profile_id; - - protected function setUp(): void { - parent::setUp(); - $this->profile_id = self::factory()->post->create( [ 'post_type' => PROFILE_POST_TYPE ] ); - } - - public function test_profile_creates_byline() { - $byline_id = absint( get_post_meta( $this->profile_id, 'byline_id', true ) ); - $this->assertGreaterThan( 0, $byline_id ); - - $term = get_term( $byline_id, BYLINE_TAXONOMY ); - $this->assertInstanceOf( '\WP_Term', $term ); - $this->assertSame( $term->name, "profile-{$this->profile_id}" ); - $this->assertSame( $term->slug, "profile-{$this->profile_id}" ); - } - - public function test_profile_deletes_byline() { - // Verify the byline term exists. - $byline_id = absint( get_post_meta( $this->profile_id, 'byline_id', true ) ); - $this->assertInstanceOf( '\WP_Term', get_term( $byline_id, BYLINE_TAXONOMY ) ); - - // Deleting the profile should delete the byline term. - wp_delete_post( $this->profile_id, true ); - $this->assertNull( get_term( $byline_id, BYLINE_TAXONOMY ) ); - } - - public function test_byline_relationships() { - $post_type_no_author = 'test-without-author'; - register_post_type( - $post_type_no_author, - [ - 'public' => true, - 'supports' => [ 'title', 'editor' ], - ] - ); - - unregister_taxonomy( BYLINE_TAXONOMY ); - register_byline(); - - $this->assertFalse( is_object_in_taxonomy( $post_type_no_author, BYLINE_TAXONOMY ) ); - } -} diff --git a/tests/feature/test-profile-user-sync.php b/tests/feature/test-profile-user-sync.php deleted file mode 100644 index 2e2697f5..00000000 --- a/tests/feature/test-profile-user-sync.php +++ /dev/null @@ -1,96 +0,0 @@ - user sync functionality. - */ -class Test_Profile_User_Sync extends Test_Case { - use Refresh_Database; - - protected $profile_id; - - protected function setUp(): void { - parent::setUp(); - $this->profile_id = self::factory()->post->create( [ 'post_type' => PROFILE_POST_TYPE ] ); - } - - public function test_update_link(): void { - $profile = Profile::get_by_post( $this->profile_id ); - $user1 = self::factory()->user->create( [ 'role' => 'author' ] ); - $user2 = self::factory()->user->create( [ 'role' => 'editor' ] ); - - $this->assertSame( 0, $profile->get_linked_user_id() ); - - // Link user1 and confirm that all data got set properly. - $profile->update_user_link( $user1 ); - $this->assertSame( $user1, $profile->get_linked_user_id() ); - $this->assertSame( $this->profile_id, absint( get_user_meta( $user1, 'profile_id', true ) ) ); - - // Link user2 and confirm that all data got unset and reset properly. - $profile->update_user_link( $user2 ); - $this->assertSame( $user2, $profile->get_linked_user_id() ); - $this->assertSame( $this->profile_id, absint( get_user_meta( $user2, 'profile_id', true ) ) ); - - // user1 should now have no profile_id meta. - $this->assertEmpty( get_user_meta( $user1, 'profile_id', true ) ); - } - - public function test_unlink(): void { - $profile = Profile::get_by_post( $this->profile_id ); - $user = self::factory()->user->create( [ 'role' => 'author' ] ); - - // Link user and confirm that all data got set properly. - $profile->update_user_link( $user ); - $this->assertSame( $user, $profile->get_linked_user_id() ); - $this->assertSame( $this->profile_id, absint( get_user_meta( $user, 'profile_id', true ) ) ); - - // Unlink user 2 and confirm that all data got unset properly. - $profile->update_user_link( 0 ); - $this->assertEmpty( $profile->get_linked_user_id() ); - $this->assertEmpty( get_user_meta( $user, 'profile_id', true ) ); - } - - public function test_profile_from_associated_user(): void { - $profile = Profile::get_by_post( $this->profile_id ); - $user = self::factory()->user->create( [ 'role' => 'author' ] ); - - // Link user and confirm that all data got set properly. - $profile->update_user_link( $user ); - $this->assertSame( $user, $profile->get_linked_user_id() ); - $this->assertSame( $this->profile_id, absint( get_user_meta( $user, 'profile_id', true ) ) ); - - // Delete profile post. - wp_delete_post( $this->profile_id, true ); - - // Confirm the associated user meta was deleted. - $this->assertEmpty( $profile->get_linked_user_id() ); - $this->assertEmpty( get_user_meta( $user, 'profile_id', true ) ); - } - - public function test_profile_from_deleted_user(): void { - $profile = Profile::get_by_post( $this->profile_id ); - $user = self::factory()->user->create( [ 'role' => 'author' ] ); - - // Link user and confirm that all data got set properly. - $profile->update_user_link( $user ); - $this->assertSame( $user, $profile->get_linked_user_id() ); - $this->assertSame( $this->profile_id, absint( get_user_meta( $user, 'profile_id', true ) ) ); - - // Delete user. - require_once(ABSPATH . 'wp-admin/includes/user.php'); - wp_delete_user( $user ); - - // Confirm the profile associated user meta was deleted. - $this->assertEmpty( $profile->get_linked_user_id() ); - } -} diff --git a/tests/testcases/class-test-controller.php b/tests/testcases/class-test-controller.php deleted file mode 100644 index ed3befe0..00000000 --- a/tests/testcases/class-test-controller.php +++ /dev/null @@ -1,40 +0,0 @@ -as_error(); - } - - $this->assertWPError( $response ); - $this->assertSame( $code, $response->get_error_code() ); - - if ( null !== $status ) { - $data = $response->get_error_data(); - $this->assertArrayHasKey( 'status', $data ); - $this->assertSame( $status, $data['status'] ); - } - } -} diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 00000000..7e0bef86 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,25 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var \Closure(string):void */ + private static $includeFile; + + /** @var string|null */ + private $vendorDir; + + // PSR-4 + /** + * @var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var list + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * List of PSR-0 prefixes + * + * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) + * + * @var array>> + */ + private $prefixesPsr0 = array(); + /** + * @var list + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var array + */ + private $missingClasses = array(); + + /** @var string|null */ + private $apcuPrefix; + + /** + * @var array + */ + private static $registeredLoaders = array(); + + /** + * @param string|null $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); + } + + /** + * @return array> + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return list + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return list + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return array Array of classname => path + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + $paths = (array) $paths; + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param list|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param list|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + $includeFile = self::$includeFile; + $includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders keyed by their corresponding vendor directories. + * + * @return array + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } + + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } +} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 00000000..51e734a7 --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,359 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints((string) $constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; + } else { + self::$installed = array(); + } + } + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } + + return $installed; + } +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..0fb0a2c1 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,10 @@ + $vendorDir . '/composer/InstalledVersions.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..15a2ff3a --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ +register(true); + + return $loader; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 00000000..dcbbb469 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,20 @@ + __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->classMap = ComposerStaticInit8f1a96330292b26f548537f96d154a7f::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 00000000..f20a6c47 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,5 @@ +{ + "packages": [], + "dev": false, + "dev-package-names": [] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 00000000..795e5491 --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,23 @@ + array( + 'name' => 'alleyinteractive/byline-manager', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => null, + 'type' => 'wordpress-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev' => false, + ), + 'versions' => array( + 'alleyinteractive/byline-manager' => array( + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => null, + 'type' => 'wordpress-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'dev_requirement' => false, + ), + ), +);