diff --git a/.deployignore b/.deployignore deleted file mode 100644 index 56180bf5..00000000 --- a/.deployignore +++ /dev/null @@ -1,22 +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 -tests -.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/build-branch.yml b/.github/workflows/build-branch.yml deleted file mode 100644 index 52fee124..00000000 --- a/.github/workflows/build-branch.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Create a -built branch - -on: - push: - branches: - - main - - develop - -jobs: - built-branch: - uses: alleyinteractive/.github/.github/workflows/built-branch.yml@main - with: - node: 18 - php: 8.1 diff --git a/.github/workflows/built-release.yml b/.github/workflows/built-release.yml deleted file mode 100644 index cf60ecfc..00000000 --- a/.github/workflows/built-release.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Built Release - -on: - push: - branches: - - develop - -jobs: - built-release: - uses: alleyinteractive/.github/.github/workflows/built-release.yml@main diff --git a/.github/workflows/built-tag.yml b/.github/workflows/built-tag.yml deleted file mode 100644 index 94e59e2d..00000000 --- a/.github/workflows/built-tag.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Create a -built tag - -on: - push: - tags: - - 'v*.*.*' - - '!*-built' - -jobs: - built-tag: - uses: alleyinteractive/.github/.github/workflows/built-tag.yml@main - with: - node: 18 diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml deleted file mode 100644 index 904f1477..00000000 --- a/.github/workflows/code-quality.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Code Quality - -on: - push: - branches: - - develop - pull_request: - -jobs: - code-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 3432d71c..00000000 --- a/.github/workflows/node-tests.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Node Tests - -on: - push: - branches: - - develop - pull_request: - -jobs: - node-tests: - uses: alleyinteractive/.github/.github/workflows/node-tests.yml@main - with: - run-audit: true - ci: true - node: 18 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml deleted file mode 100644 index 1f2763d0..00000000 --- a/.github/workflows/unit-test.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Testing Suite - -on: - push: - branches: - - develop - pull_request: - -jobs: - unit-tests: - strategy: - matrix: - php: [8.1, 8.2] - wordpress: ["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 36f38e0d..00000000 --- a/.github/workflows/upgrade-wordpress-plugin.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Update WordPress Plugin - -on: - schedule: - - cron: '0 6 1 * *' # Run on the first day of every month at 6am UTC. - -permissions: - contents: write - pull-requests: write - -jobs: - update-plugin: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: alleyinteractive/action-update-wordpress-plugin@v1.2.1 - with: - plugin-file: 'wp-curate.php' - upgrade-npm-dependencies: "true" diff --git a/.gitignore b/.gitignore index a8545793..56180bf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,22 @@ -# Build files -build -vendor -composer.lock -node_modules - -# Log files -*.log - -# Cache files -.phpcs/*.json -.phpunit.result.cache - -# Ignore temporary OS files .DS_Store -.DS_Store? -.Spotlight-V100 -.Trashes -ehthumbs.db Thumbs.db -.thumbsdb - -# IDE files -*.code-workspace -.idea -.vscode +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 +tests +.phpcs +Makefile diff --git a/.phpcs.xml b/.phpcs.xml deleted file mode 100644 index d1d18bc4..00000000 --- a/.phpcs.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - PHP_CodeSniffer standard for wp-curate. - - - - - - - - - - - - - - - - - - - - - - - - - - - build/ - vendor/ - - - - - - - - - - - - - - - src/assets.php - blocks - build - entries - - - - src/assets.php - - diff --git a/.phpcs/.gitkeep b/.phpcs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/build/post/block.json b/build/post/block.json new file mode 100644 index 00000000..1cb16357 --- /dev/null +++ b/build/post/block.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-curate/post", + "version": "0.1.0", + "title": "Post", + "category": "theme", + "icon": "admin-post", + "description": "Container block to allow setting a post inline", + "textdomain": "wp-curate", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "usesContext": [ + "postId", + "query" + ], + "render": "file:render.php", + "supports": { + "inserter": false + } +} \ No newline at end of file diff --git a/build/post/index.asset.php b/build/post/index.asset.php new file mode 100644 index 00000000..e49008c0 --- /dev/null +++ b/build/post/index.asset.php @@ -0,0 +1 @@ + array('react', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-i18n'), 'version' => 'd59edb5fd0a5554349c2'); diff --git a/build/post/index.css b/build/post/index.css new file mode 100644 index 00000000..b47ad643 --- /dev/null +++ b/build/post/index.css @@ -0,0 +1 @@ +.wp-curate-post-block{padding:2px}.wp-curate-post-block--selected{outline:1px dashed #ccc;outline-offset:.5rem}.wp-curate-post-block--backfill .block-editor-inner-blocks{opacity:.5}.wp-curate-post-block__post-picker{margin-bottom:.5rem;text-align:right} diff --git a/build/post/index.js b/build/post/index.js new file mode 100644 index 00000000..a931595b --- /dev/null +++ b/build/post/index.js @@ -0,0 +1,42 @@ +!function(){var e={373:function(e){var t;self,t=()=>(()=>{var e={779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.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:#f5f5f5}.alley-scripts-post-picker__post.is-selected{background-color:#f5f5f5}.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: #f5f5f5;\n }\n\n &.is-selected {\n background-color: #f5f5f5;\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 a=i},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".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:"AAAA,2BACE,UAAA,CAGF,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".components-modal__content {\n width: 90vw;\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 a=i},458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.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 a=i},609: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,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},272: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),s="/*# ".concat(o," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},368:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:s,seal:i,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(e){return e}),i||(i=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 u=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),f=w(String.prototype.toLowerCase),h=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),v=w(String.prototype.trim),A=w(RegExp.prototype.test),b=(_=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 s=r.length;for(;s--;){let t=r[s];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[s]=e),t=e)}e[t]=!0}return e}function C(t){const n=a(null);for(const[r,s]of e(t))void 0!==o(t,r)&&(n[r]=s);return n}function S(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const k=s(["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=s(["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=s(["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"]),T=s(["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"]),I=s(["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"]),N=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),P=s(["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"]),L=s(["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"]),j=s(["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"]),D=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=i(/<%[\w\W]*|[\w\W]*%>/gm),B=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),q=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:M,TMPLIT_EXPR:B,DATA_ATTR:F,ARIA_ATTR:z,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:H,DOCTYPE_NAME:W});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 i=o,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:_,Node:w,Element:U,NodeFilter:M,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,H=U.prototype,Y=S(H,"cloneNode"),V=S(H,"nextSibling"),Z=S(H,"childNodes"),K=S(H,"parentNode");if("function"==typeof _){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Q,J="";const{implementation:X,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=o,{importNode:re}=i;let oe={};r.isSupported="function"==typeof e&&"function"==typeof K&&X&&void 0!==X.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:ie,TMPLIT_EXPR:ae,DATA_ATTR:le,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:pe}=G;let{IS_ALLOWED_URI:de}=G,fe=null;const he=x({},[...k,...E,...R,...I,...O]);let me=null;const ge=x({},[...P,...L,...j,...D]);let ye=Object.seal(a(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}})),ve=null,Ae=null,be=!0,_e=!0,we=!1,xe=!0,Ce=!1,Se=!1,ke=!1,Ee=!1,Re=!1,Te=!1,Ie=!1,Ne=!0,Oe=!1,Pe=!0,Le=!1,je={},De=null;const Ue=x({},["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 Me=null;const Be=x({},["audio","video","img","source","image","track"]);let Fe=null;const ze=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let We=He,Ge=!1,Ye=null;const Ve=x({},[qe,$e,He],h);let Ze=null;const Ke=["application/xhtml+xml","text/html"];let Qe=null,Je=null;const Xe=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(!Je||Je!==e){if(e&&"object"==typeof e||(e={}),e=C(e),Ze=Ze=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Qe="application/xhtml+xml"===Ze?h:f,fe="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS,Qe):he,me="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR,Qe):ge,Ye="ALLOWED_NAMESPACES"in e?x({},e.ALLOWED_NAMESPACES,h):Ve,Fe="ADD_URI_SAFE_ATTR"in e?x(C(ze),e.ADD_URI_SAFE_ATTR,Qe):ze,Me="ADD_DATA_URI_TAGS"in e?x(C(Be),e.ADD_DATA_URI_TAGS,Qe):Be,De="FORBID_CONTENTS"in e?x({},e.FORBID_CONTENTS,Qe):Ue,ve="FORBID_TAGS"in e?x({},e.FORBID_TAGS,Qe):{},Ae="FORBID_ATTR"in e?x({},e.FORBID_ATTR,Qe):{},je="USE_PROFILES"in e&&e.USE_PROFILES,be=!1!==e.ALLOW_ARIA_ATTR,_e=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,Se=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Te=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ee=e.FORCE_BODY||!1,Ne=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Le=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||q,We=e.NAMESPACE||He,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(_e=!1),Te&&(Re=!0),je&&(fe=x({},[...O]),me=[],!0===je.html&&(x(fe,k),x(me,P)),!0===je.svg&&(x(fe,E),x(me,L),x(me,D)),!0===je.svgFilters&&(x(fe,R),x(me,L),x(me,D)),!0===je.mathMl&&(x(fe,I),x(me,j),x(me,D))),e.ADD_TAGS&&(fe===he&&(fe=C(fe)),x(fe,e.ADD_TAGS,Qe)),e.ADD_ATTR&&(me===ge&&(me=C(me)),x(me,e.ADD_ATTR,Qe)),e.ADD_URI_SAFE_ATTR&&x(Fe,e.ADD_URI_SAFE_ATTR,Qe),e.FORBID_CONTENTS&&(De===Ue&&(De=C(De)),x(De,e.FORBID_CONTENTS,Qe)),Pe&&(fe["#text"]=!0),Se&&x(fe,["html","head","body"]),fe.table&&(x(fe,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,J=Q.createHTML("")}else void 0===Q&&(Q=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}}($,l)),null!==Q&&"string"==typeof J&&(J=Q.createHTML(""));s&&s(e),Je=e}},nt=x({},["mi","mo","mn","ms","mtext"]),rt=x({},["foreignobject","desc","title","annotation-xml"]),ot=x({},["title","style","font","a","script"]),st=x({},E);x(st,R),x(st,T);const it=x({},I);x(it,N);const at=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},lt=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!me[e])if(Re||Te)try{at(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"===Ze&&We===He&&(e=''+e+"");const r=Q?Q.createHTML(e):e;if(We===He)try{t=(new z).parseFromString(r,Ze)}catch(e){}if(!t||!t.documentElement){t=X.createDocument(We,"template",null);try{t.documentElement.innerHTML=Ge?J:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),We===He?ne.call(t,Se?"html":"body")[0]:Se?t.documentElement:s},ut=function(e){return ee.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},pt=function(e){return"function"==typeof w&&e instanceof w},dt=function(e,t,n){oe[e]&&u(oe[e],(e=>{e.call(r,t,n,Je)}))},ft=function(e){let t=null;if(dt("beforeSanitizeElements",e,null),(n=e)instanceof F&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return at(e),!0;var n;const o=Qe(e.nodeName);if(dt("uponSanitizeElement",e,{tagName:o,allowedTags:fe}),e.hasChildNodes()&&!pt(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return at(e),!0;if(!fe[o]||ve[o]){if(!ve[o]&&mt(o)){if(ye.tagNameCheck instanceof RegExp&&A(ye.tagNameCheck,o))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(o))return!1}if(Pe&&!De[o]){const t=K(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Y(n[r],!0),V(e))}return at(e),!0}return e instanceof U&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:We,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===He?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(st[n]):e.namespaceURI===qe?t.namespaceURI===He?"math"===n:t.namespaceURI===$e?"math"===n&&rt[r]:Boolean(it[n]):e.namespaceURI===He?!(t.namespaceURI===$e&&!rt[r])&&!(t.namespaceURI===qe&&!nt[r])&&!it[n]&&(ot[n]||!st[n]):!("application/xhtml+xml"!==Ze||!Ye[e.namespaceURI]))}(e)?(at(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,u([se,ie,ae],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),dt("afterSanitizeElements",e,null),!1):(at(e),!0)},ht=function(e,t,n){if(Ne&&("id"===t||"name"===t)&&(n in o||n in Xe))return!1;if(_e&&!Ae[t]&&A(le,t));else if(be&&A(ce,t));else if(!me[t]||Ae[t]){if(!(mt(e)&&(ye.tagNameCheck instanceof RegExp&&A(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&A(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&A(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(Fe[t]);else if(A(de,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Me[e])if(we&&!A(ue,g(n,pe,"")));else if(n)return!1;return!0},mt=function(e){return e.indexOf("-")>0},gt=function(e){dt("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 s=t[o],{name:i,namespaceURI:a,value:l}=s,c=Qe(i);let d="value"===i?l:v(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,dt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(lt(i,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,d)){lt(i,e);continue}Ce&&u([se,ie,ae],(e=>{d=g(d,e," ")}));const f=Qe(e.nodeName);if(ht(f,c,d)){if(!Oe||"id"!==c&&"name"!==c||(lt(i,e),d="user-content-"+d),Q&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(a);else switch($.getAttributeType(f,c)){case"TrustedHTML":d=Q.createHTML(d);break;case"TrustedScriptURL":d=Q.createScriptURL(d)}try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),p(r.removed)}catch(e){}}}dt("afterSanitizeAttributes",e,null)},yt=function e(t){let n=null;const r=ut(t);for(dt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)dt("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof c&&e(n.content),gt(n));dt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,a=null;if(Ge=!e,Ge&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!r.isSupported)return e;if(ke||tt(t),r.removed=[],"string"==typeof e&&(Le=!1),Le){if(e.nodeName){const t=Qe(e.nodeName);if(!fe[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)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&&!Ce&&!Se&&-1===e.indexOf("<"))return Q&&Ie?Q.createHTML(e):e;if(n=ct(e),!n)return Re?null:Ie?J:""}n&&Ee&&at(n.firstChild);const l=ut(Le?e:n);for(;s=l.nextNode();)ft(s)||(s.content instanceof c&&yt(s.content),gt(s));if(Le)return e;if(Re){if(Te)for(a=te.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(me.shadowroot||me.shadowrootmode)&&(a=re.call(i,a,!0)),a}let p=Se?n.outerHTML:n.innerHTML;return Se&&fe["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(W,n.ownerDocument.doctype.name)&&(p="\n"+p),Ce&&u([se,ie,ae],(e=>{p=g(p,e," ")})),Q&&Ie?Q.createHTML(p):p},r.setConfig=function(){tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ke=!0},r.clearConfig=function(){Je=null,ke=!1},r.isValidAttribute=function(e,t,n){Je||tt({});const r=Qe(e),o=Qe(t);return ht(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],d(oe[e],t))},r.removeHook=function(e){if(oe[e])return p(oe[e])},r.removeHooks=function(e){oe[e]&&(oe[e]=[])},r.removeAllHooks=function(){oe={}},r}()}()},286: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={},s=0,i={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(_(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!_(r.transform)&&r.transform,r.worker&&i.WORKERS_SUPPORTED){var l=function(){if(!i.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),i.BLOB_URL||(i.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(a);return l.onmessage=g,l.id=s++,o[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=_(r.step),r.chunk=_(r.chunk),r.complete=_(r.complete),r.error=_(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return i.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 p(r)):!0===n.readable&&_(n.read)&&_(n.on)?f=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",s="\r\n",a='"',l=a+a,c=!1,u=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.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&&(s=t.newline),"string"==typeof t.quoteChar&&(a=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");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"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(u||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||u),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 i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:a,workerId:i.WORKER_ID,finished:c});else if(_(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!_(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.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=b(this._chunkLoaded,this),t.onerror=b(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 u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=i.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=b(this._chunkLoaded,this),t.onerror=b(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 p(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 d(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=b((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=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((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),s=-o,a=/^\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,u=0,p=0,d=!1,f=!1,g=[],y={data:[],errors:[],meta:{}};if(_(e.step)){var v=e.step;e.step=function(t){if(y=t,x())w();else{if(w(),0===y.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!b(e)}))),x()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;x()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(i=e.transform(i,s)),i=C(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(r>g.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,p+n):r=r.length/2?"\r\n":"\r"}(o,l)),r=!1,e.delimiter)_(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,o,s){var a,l,c,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var p=0;p=a)return G(!0)}else for(B=u,u++;;){if(-1===(B=i.indexOf(t,B+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:u}),H();if(B===m-1)return H(i.substring(u,B).replace(M,t));if(t!==c||i[B+1]!==c){if(t===c||0===B||i[B-1]!==c){-1!==D&&D=a)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:u}),B++}}else B++}return H();function q(e){b.push(e),C=u}function $(e){var t=0;if(-1!==e){var n=i.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function H(e){return f||(void 0===e&&(e=i.substring(u)),x.push(e),u=m,q(x),A&&Y()),G()}function W(e){u=e,q(x),x=[],U=i.indexOf(r,u)}function G(e){return{data:b,errors:w,meta:{delimiter:n,linebreak:r,aborted:p,truncated:!!e,cursor:C+(d||0)}}}function Y(){s(G()),b=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return u}}function g(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 s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(_(n.userStep)){for(var i=0;i{"use strict";var r=n(586);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,i){if(i!==r){var a=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 a.name="Invariant Violation",a}}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:s,resetWarningCache:o};return n.PropTypes=n,n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},837:(e,t,n)=>{"use strict";var r=n(196),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=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,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},322:(e,t,n)=>{"use strict";e.exports=n(837)},665: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 s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var a=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)}},173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},36: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 s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464: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))}}},196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.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:()=>$t,CSVUploader:()=>Jt,Checkboxes:()=>Gt,ImagePicker:()=>nn,MediaPicker:()=>cn,PostPicker:()=>ar,PostSelector:()=>cr,SafeHtml:()=>fn,Selector:()=>_r,TermSelector:()=>xr,VideoPicker:()=>Er,getMediaUrl:()=>Qt,parseCSVFile:()=>Kt,useCurrentPostId:()=>kn,useDebounce:()=>gn,useHasInnerBlocks:()=>yn,useInnerBlocks:()=>An,useInnerBlocksAttributes:()=>_n,useInnerBlocksCount:()=>bn,useInnerBlocksIndex:()=>vn,useMedia:()=>wn,useParentBlock:()=>xn,useParentBlockAttributes:()=>Cn,usePost:()=>Sn,usePostById:()=>Tn,usePostMeta:()=>On,usePostMetaValue:()=>Pn,usePosts:()=>Ln,useTerms:()=>jn});var e=n(322),t=n(980),o=n.n(t),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||G(U)>3?"":" "}function Z(e,t){for(;--t&&q()&&!(U<48||U>102||U>57&&U<65||U>70&&U<97););return W(e,H()+(t<6&&32==$()&&32==q()))}function K(e){for(;q();)switch(U){case e:return D;case 34:case 39:34!==e&&39!==e&&K(U);break;case 40:41===e&&K(e);break;case 92:q()}return D}function Q(e,t){for(;q()&&e+U!==57&&(e+U!==84||47!==$()););return"/*"+W(t,D-1)+"*"+_(47===e?e:q())}function J(e){for(;!G($());)q();return W(e,D)}function X(e,t){for(var n="",r=0;r6)switch(E(e,t+1)){case 109:if(45!==E(e,t+4))break;case 102:return S(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+d+(108==E(e,t+3)?"$3":"$2-$3"))+e;case 115:return~k(e,"stretch")?te(S(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return S(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,s,i,a){return p+n+":"+r+a+(o?p+n+"-span:"+(s?i:+i-+r)+a:"")+e}));case 4949:if(121===E(e,t+6))return S(e,":",":"+f)+e;break;case 6444:switch(E(e,45===E(e,14)?18:11)){case 120:return S(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===E(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+p+"$2box$3")+e;case 100:return S(e,":",":"+p)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return S(e,"scroll-","scroll-snap-")+e}return e}function ne(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:return void(e.return=te(e.value,e.length,n));case v:return X([F(e,{value:S(e.value,"@","@"+f)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(C(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":z(F(e,{props:[S(t,/:(read-\w+)/,":"+d+"$1")]})),z(F(e,{props:[t]})),w(e,{props:O(n,r)});break;case"::placeholder":z(F(e,{props:[S(t,/:(plac\w+)/,":"+f+"input-$1")]})),z(F(e,{props:[S(t,/:(plac\w+)/,":"+d+"$1")]})),z(F(e,{props:[S(t,/:(plac\w+)/,p+"input-$1")]})),z(F(e,{props:[t]})),w(e,{props:O(n,r)})}return""}))}}function re(e){return function(e){return M="",e}(oe("",null,null,null,[""],e=function(e){return P=L=1,j=T(M=e),D=0,[]}(e),0,[0],e))}function oe(e,t,n,r,o,s,i,a,l){for(var c=0,u=0,p=i,d=0,f=0,h=0,m=1,g=1,y=1,v=0,A="",b=o,w=s,x=r,C=A;g;)switch(h=v,v=q()){case 40:if(108!=h&&58==E(C,p-1)){-1!=k(C+=S(Y(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:C+=Y(v);break;case 9:case 10:case 13:case 32:C+=V(h);break;case 92:C+=Z(H()-1,7);continue;case 47:switch($()){case 42:case 47:N(ie(Q(q(),H()),t,n,l),l);break;default:C+="/"}break;case 123*m:a[c++]=T(C)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(C=S(C,/\f/g,"")),f>0&&T(C)-p&&N(f>32?ae(C+";",r,n,p-1,l):ae(S(C," ","")+";",r,n,p-2,l),l);break;case 59:C+=";";default:if(N(x=se(C,t,n,c,u,o,a,A,b=[],w=[],p,s),s),123===v)if(0===u)oe(C,t,x,x,b,s,p,a,w);else switch(99===d&&110===E(C,3)?100:d){case 100:case 108:case 109:case 115:oe(e,x,x,r&&N(se(e,x,x,0,0,o,a,A,o,b=[],p,w),w),o,w,p,a,r?b:w);break;default:oe(C,x,x,x,[""],w,0,a,w)}}c=u=f=0,m=y=1,A=C="",p=i;break;case 58:p=1+T(C),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(U=D>0?E(M,--D):0,L--,10===U&&(L=1,P--),U))continue;switch(C+=_(v),v*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:a[c++]=(T(C)-1)*y,y=1;break;case 64:45===$()&&(C+=Y(q())),d=$(),u=p=T(A=C+=J(H())),v++;break;case 45:45===h&&2==T(C)&&(m=0)}}return s}function se(e,t,n,r,o,s,i,a,l,c,u,p){for(var d=o-1,f=0===o?s:[""],h=I(f),g=0,y=0,v=0;g0?f[A]+" "+_:S(_,/&\f/g,f[A])))&&(l[v++]=w);return B(e,t,n,0===o?m:a,l,c,u,p)}function ie(e,t,n,r){return B(e,t,n,h,_(U),R(e,2,-2),0,r)}function ae(e,t,n,r,o){return B(e,t,n,g,R(e,0,r),R(e,r+1,-1),r,o)}const le={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 ce="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ue="undefined"!=typeof window&&"HTMLElement"in window,pe=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([])),fe=Object.freeze({}),he=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"]),me=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ge=/(^-|-$)/g;function ye(e){return e.replace(me,"-").replace(ge,"")}var ve=/(a)(d)/gi,Ae=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=Ae(t%52)+n;return(Ae(t%52)+n).replace(ve,"$1-$2")}var _e,we=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},xe=function(e){return we(5381,e)};function Ce(e){return"string"==typeof e&&!0}var Se="function"==typeof Symbol&&Symbol.for,ke=Se?Symbol.for("react.memo"):60115,Ee=Se?Symbol.for("react.forward_ref"):60112,Re={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Te={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ie={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ne=((_e={})[Ee]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_e[ke]=Ie,_e);function Oe(e){return("type"in(t=e)&&t.type.$$typeof)===ke?Ie:"$$typeof"in e?Ne[e.$$typeof]:Re;var t}var Pe=Object.defineProperty,Le=Object.getOwnPropertyNames,je=Object.getOwnPropertySymbols,De=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,Me=Object.prototype;function Be(e,t,n){if("string"!=typeof t){if(Me){var r=Ue(t);r&&r!==Me&&Be(e,r,n)}var o=Le(t);je&&(o=o.concat(je(t)));for(var s=Oe(e),i=Oe(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Ve=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 Ye(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=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(i).concat(a,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},s=0;s0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(dt,n).replace(r,c))})),i.prefix&&u.push(ne),u.push(ee);var p=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(ft,""),c=re(s||o?"".concat(s," ").concat(o," { ").concat(l," }"):l);i.namespace&&(c=ht(c,i.namespace));var p,d,f,h=[];return X(c,(p=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),d=I(p),function(e,t,n,r){for(var o="",s=0;s="A"&&e<="Z"};function Ct(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=qe(r,s),this.staticRulesId=s}else{for(var a=we(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),r=qe(r,d)}}return r},e}(),Nt=l().createContext(void 0);Nt.Consumer;var Ot={};function Pt(e,t,n){var r=ze(e),o=e,i=!Ce(e),c=t.attrs,u=void 0===c?de:c,p=t.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":ye(e);Ot[n]=(Ot[n]||0)+1;var r="".concat(n,"-").concat(function(e){return be(xe(e)>>>0)}("6.1.0"+n+Ot[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):p,f=(void 0===t.displayName&&function(e){Ce(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e),t.displayName&&t.componentId?"".concat(ye(t.displayName),"-").concat(t.componentId):t.componentId||d),h=r&&o.attrs?o.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(r&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return g(e,t)&&y(e,t)}}else m=g}var v=new It(n,f,r?o.componentStyle:void 0),A=l().forwardRef((function(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,i=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,p=e.target,d=l().useContext(Nt),f=bt(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var r,o=s(s({},t),{className:void 0,theme:n}),i=0;i2&&pt.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=ot(),r=$e([n&&'nonce="'.concat(n,'"'),"".concat(ce,'="true"'),"".concat("data-styled-version",'="').concat("6.1.0",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw Ye(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Ye(2);var n=((t={})[ce]="",t["data-styled-version"]="6.1.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=ot();return r&&(n.nonce=r),[l().createElement("style",s({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new pt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Ye(2);return l().createElement(_t,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Ye(3)}}(),"__sc-".concat(ce,"__");const Ft=Bt.div` + height: auto; + width: 100%; +`,zt=({src:t})=>(0,e.jsx)(Ft,{children:(0,e.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:t})});zt.propTypes={src:o().string.isRequired};const qt=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(cn,{allowedTypes:["audio"],className:t,icon:"format-audio",onReset:n,onUpdate:r,onUpdateURL:o,preview:zt,value:s,valueURL:i});qt.defaultProps={className:"",onUpdateURL:null,valueURL:""},qt.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const $t=qt,Ht=window.wp.components,Wt=({label:t,value:n,options:r,onChange:o})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ht.BaseControl,{label:t}),r.map((t=>(0,e.jsx)(Ht.CheckboxControl,{label:t.label,checked:n.includes(t.value),onChange:e=>{o(e?[...n,t.value]:[...n.filter((e=>e!==t.value))])}})))]});Wt.propTypes={label:o().string.isRequired,value:o().arrayOf(o().string).isRequired,options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().string.isRequired})).isRequired,onChange:o().func.isRequired};const Gt=Wt,Yt=window.wp.i18n;var Vt=n(286),Zt=n.n(Vt);const Kt=e=>new Promise(((t,n)=>{Zt().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})})),Qt=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:o=""}={},full:{url:s=""}={}}={},source_url:i="",url:a=""}=e;return o||n||s||r||a||i||""};class Jt extends l().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]&&Kt(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,Yt.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,Yt.__)("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:t="",success:n=""}=this.state;return(0,e.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,e.jsx)("h2",{children:(0,Yt.__)("Upload CSV","alley-scripts")}),(0,e.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==t?(0,e.jsxs)("div",{style:{color:"#c00"},children:[(0,e.jsx)("strong",{children:(0,Yt.__)("Error:","alley-scripts")})," ",t]}):null,""!==n?(0,e.jsxs)("div",{style:{color:"#0c0"},children:[(0,e.jsx)("strong",{children:(0,Yt.__)("Success:","alley-scripts")})," ",n]}):null,(0,e.jsx)("div",{children:(0,e.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,e.jsx)("p",{children:(0,Yt.__)("Select a file to load data.","alley-scripts")}),(0,e.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}Jt.defaultProps={callback:null},Jt.propTypes={attributeName:o().string.isRequired,callback:o().func,setAttributes:o().func.isRequired};const Xt=Bt.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; +`,en=({src:t})=>(0,e.jsx)(Xt,{children:(0,e.jsx)("img",{alt:(0,Yt.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:t,title:(0,Yt.__)("Edit image","alley-scripts")})});en.propTypes={src:o().string.isRequired};const tn=({className:t,imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,value:a,valueURL:l})=>(0,e.jsx)(cn,{allowedTypes:["image"],className:t,icon:"format-image",imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,preview:en,value:a,valueURL:l});tn.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},tn.propTypes={className:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const nn=tn,rn=window.wp.blockEditor,on=window.wp.data,sn=Bt.div` + display: block; + position: relative; +`,an=Bt.div` + background: white; + border: 1px solid black; + padding: 1em; +`,ln=({allowedTypes:t,className:n,icon:r,imageSize:o,displayControlsInToolbar:s,onReset:i,onUpdate:a,onUpdateURL:l,preview:c,value:u,valueURL:p})=>{const{media:d}=(0,on.useSelect)((e=>({media:u?e("core").getMedia(u):void 0})),[u]);if(0!==u&&null===d)return(0,e.jsx)(Ht.Spinner,{});const f=d?Qt(d,o):p;return f?(0,e.jsxs)(sn,{className:n,children:[c?(0,e.jsx)(c,{src:f}):(0,e.jsxs)(an,{className:"alley-scripts-media-picker__preview",children:[(0,e.jsx)("p",{children:(0,Yt.__)("Selected file:","alley-scripts")}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:f,children:f})})]}),s?(0,e.jsx)(rn.BlockControls,{group:"other",children:(0,e.jsx)(rn.MediaReplaceFlow,{name:(0,Yt.__)("Edit Media","alley-scripts"),mediaId:u,mediaURL:f,allowedTypes:t,onSelect:a,onSelectURL:l,children:(0,e.jsx)(Ht.ToolbarButton,{isDestructive:!0,text:(0,Yt.__)("Remove","alley-scripts"),onClick:i})})}):(0,e.jsx)(Ht.Button,{variant:"primary",onClick:i,children:(0,Yt.__)("Reset","alley-scripts")})]}):(0,e.jsx)(sn,{className:n,children:(0,e.jsx)(rn.MediaPlaceholder,{allowedTypes:t,disableMediaButtons:!!p,icon:(0,e.jsx)(rn.BlockIcon,{icon:r}),onSelect:a,onSelectURL:l,value:{id:u,src:f}})})};ln.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},ln.propTypes={allowedTypes:o().arrayOf(o().string),className:o().string,icon:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,preview:o().element,value:o().number.isRequired,valueURL:o().string};const cn=ln;var un=n(368),pn=n.n(un);const dn=({className:t,html:n,tag:r})=>(0,e.jsx)(r,{className:t,dangerouslySetInnerHTML:{__html:pn().sanitize(n)}});dn.defaultProps={className:""},dn.propTypes={className:o().string,html:o().string.isRequired,tag:o().string.isRequired};const fn=dn,hn=window.wp.element,mn=window.wp.url,gn=(e,t)=>{const[n,r]=(0,hn.useState)(e);return(0,hn.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},yn=e=>bn(e)>0,vn=e=>{const t=xn(e),n=An(t);return n?n.findIndex((t=>t.clientId===e)):-1},An=e=>(0,on.useSelect)((t=>t(rn.store).getBlocks(e)),[e]),_n=e=>An(e).map((e=>e.attributes)),bn=e=>An(e).length,wn=e=>(0,on.useSelect)((t=>t("core").getMedia(e)),[e]),xn=e=>(0,on.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:r}=t(rn.store),o=r(e);return o?n(o):null}),[e]),Cn=e=>(0,on.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:r}=t(rn.store),o=r(e);return o?n(o):null}),[e]),Sn=(e,t="post")=>(0,on.useSelect)((n=>n("core").getEntityRecord("postType",t,e)),[e,t]),kn=()=>(0,on.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[]),En=window.wp.apiFetch;var Rn=n.n(En);const Tn=(e,t=null)=>{const[n,r]=(0,hn.useState)({});return(0,hn.useEffect)((()=>{e&&!n[e]&&(async()=>{if(t){const n=await t(e);n?r((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,mn.addQueryArgs)("/wp/v2/search",{include:e}),n=await Rn()({path:t});r((t=>({...t,[e]:n[0].subtype})))}})()}),[e]),Sn(e,n[e]??"")},In=window.wp.coreData,Nn=window.lodash,On=(e=null,t=null)=>{const n=(0,on.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[r,o]=(0,In.useEntityProp)("postType",n,"meta",t),s="function"==typeof o?o:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof r?r:{},e=>s((0,Nn.cloneDeep)(e))]},Pn=(e,t=null,n=null)=>{const[r,o]=On(t,n);return[r[e],t=>o({...r,[e]:t})]},Ln=(e,t="post")=>(0,on.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t]),jn=(e=null,t=null,n="categories")=>{const r=(0,on.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[o,s]=(0,In.useEntityProp)("postType",r,n,t);return[o,e=>s(e)]};var Dn=n(62),Un=n.n(Dn),Mn=n(36),Bn=n.n(Mn),Fn=n(793),zn=n.n(Fn),qn=n(892),$n=n.n(qn),Hn=n(173),Wn=n.n(Hn),Gn=n(464),Yn=n.n(Gn),Vn=n(992),Zn={};Zn.styleTagTransform=Yn(),Zn.setAttributes=$n(),Zn.insert=zn().bind(null,"head"),Zn.domAPI=Bn(),Zn.insertStyleElement=Wn(),Un()(Vn.Z,Zn),Vn.Z&&Vn.Z.locals&&Vn.Z.locals;var Kn=n(779),Qn=n.n(Kn),Jn=n(905),Xn={};Xn.styleTagTransform=Yn(),Xn.setAttributes=$n(),Xn.insert=zn().bind(null,"head"),Xn.domAPI=Bn(),Xn.insertStyleElement=Wn(),Un()(Jn.Z,Xn),Jn.Z&&Jn.Z.locals&&Jn.Z.locals;const er=window.wp.htmlEntities,tr=Bt.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,nr=({title:t,postType:n,attachmentID:r})=>{const o=wn(r),s=o?.media_details?.sizes?.thumbnail?.source_url,i=o?.alt_text??"";return(0,e.jsxs)(tr,{children:[s?(0,e.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:s,alt:i}):null,(0,e.jsx)(fn,{html:(0,er.decodeEntities)(t),className:"post-picker-result-title",tag:"strong"}),(0,Yt.sprintf)(" (%s)",n)]})},rr=({baseUrl:t,searchRender:n,selected:r,setSelected:o,suppressPostIds:s=[]})=>{const[i,a]=(0,hn.useState)(!1),[l,c]=(0,hn.useState)([]),[u,p]=(0,hn.useState)(!1),[d,f]=(0,hn.useState)(0),[h,m]=(0,hn.useState)({searchValue:"",page:1}),g=(0,hn.useCallback)((async(e,n=!1)=>{if(e.searchValue&&e.searchValue.length<=2)return;const r=function(){let n=(0,mn.addQueryArgs)(t,{page:e.page,_embed:1,exclude:s.join(",")});return e.searchValue&&e.searchValue.length>2&&(n=(0,mn.addQueryArgs)(n,{search:e.searchValue})),n}();a(!0);const o=await Rn()({path:r,parse:!1});f(parseInt(o.headers.get("X-WP-TotalPages"),10));const i=await o.json();let u=i;e.page>1&&(u=[...l,...i]),n||(c(u),a(!1))}),[l,t,s]);return(0,hn.useEffect)((()=>{let e=!1;return u||(p(!0),g(h,e)),()=>{e=!0}}),[g,u,h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ht.TextControl,{value:h.searchValue,placeholder:(0,Yt.__)("Search...","alley-scripts"),label:(0,Yt.__)("Search","alley-scripts"),onChange:e=>{const t={...h,searchValue:e,page:1};m(t),g(t)}}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[l?l.map((t=>(0,e.jsx)(Ht.Button,{className:Qn()({"alley-scripts-post-picker__post":!0,"is-selected":t.id===r}),onClick:()=>o(t.id),children:n?n(t):(0,e.jsx)(nr,{title:t.title,postType:t.subtype,attachmentID:t?._embedded?.self[0]?.featured_media})},t.id))):null,i?(0,e.jsx)(Ht.Spinner,{}):null,d>0&&h.page{const e={...h,page:h.page+1};m(e),g(e)},children:(0,Yt.__)("Load More","alley-scripts")})}):null]})]})},or=({baseUrl:t,closeModal:n,modalTitle:r,onUpdate:o,searchRender:s,suppressPostIds:i=[]})=>{const[a,l]=(0,hn.useState)();return(0,e.jsxs)(Ht.Modal,{isDismissible:!0,title:r,onRequestClose:n,closeButtonLabel:"Close",children:[(0,e.jsx)(rr,{baseUrl:t,selected:a??0,setSelected:l,searchRender:s,suppressPostIds:i}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:n,children:(0,Yt.__)("Cancel","alley-scripts")}),(0,e.jsx)(Ht.Button,{variant:"primary",onClick:()=>{a&&(o(a),n())},disabled:!a,children:(0,Yt.__)("Select","alley-scripts")})]})]})},sr=Bt.div` + display: block; + position: relative; +`,ir=Bt.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,ar=({allowedTypes:t,className:n,getPostType:r,modalTitle:o=(0,Yt.__)("Select Post","alley-scripts"),onReset:s,onUpdate:i,params:a={},previewRender:l,replaceText:c=(0,Yt.__)("Replace","alley-scripts"),resetText:u=(0,Yt.__)("Reset","alley-scripts"),searchEndpoint:p="/wp/v2/search",searchRender:d,selectText:f=(0,Yt.__)("Select","alley-scripts"),suppressPostIds:h=[],title:m="",value:g=0})=>{const[y,v]=(0,hn.useState)(!1),A=(0,mn.addQueryArgs)(p,{type:"post",subtype:t??"any",...a}),b=Tn(g,r),{featured_media:_,title:{rendered:w=""}={},type:x=""}=b||{},C=()=>{v(!0)};return 0!==g&&null===b?(0,e.jsx)(Ht.Spinner,{}):(0,e.jsxs)(sr,{className:n,children:[m?(0,e.jsx)("h4",{children:m}):null,0!==g&&null!==b?(0,e.jsxs)(e.Fragment,{children:[void 0!==l?l(b):(0,e.jsx)(ir,{children:(0,e.jsx)(nr,{title:w,postType:x,attachmentID:_})}),(0,e.jsxs)(Ht.ButtonGroup,{children:[(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:s,style:{margin:"0 4px"},children:u}),(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:C,style:{margin:"0 4px"},children:c})]})]}):(0,e.jsx)(Ht.Button,{onClick:C,variant:"secondary",children:f}),y?(0,e.jsx)(or,{closeModal:()=>{v(!1)},baseUrl:A,modalTitle:o,onUpdate:i,searchRender:d,suppressPostIds:h}):null]})},lr=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(_r,{type:"post",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});lr.defaultProps={className:"",emptyLabel:(0,Yt.__)("No posts found","alley-scripts"),label:(0,Yt.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},lr.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const cr=lr,ur={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let pr;const dr=new Uint8Array(16);function fr(){if(!pr&&(pr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pr(dr)}const hr=[];for(let e=0;e<256;++e)hr.push((e+256).toString(16).slice(1));const mr=function(e,t,n){if(ur.randomUUID&&!t&&!e)return ur.randomUUID();const r=(e=e||{}).random||(e.rng||fr)();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 hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]}(r)},gr=({emptyLabel:t,error:n,id:r,isOpen:o,labelledbyId:s,loading:i,onSelect:a,options:l,selectedItems:c,threshold:u,value:p})=>{if(!i&&(""===p||u>p.length))return null;let d="",f="";return i?(d="loading",f=(0,Yt.__)("Loading...","alley-scripts")):n?(d="error",f=n):i||0!==l.length||(d="no-posts",f=t),i||!i&&(p&&0===l.length||n)?(0,e.jsx)("div",{"aria-busy":!0,className:Qn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("div",{className:Qn()("autocomplete__dropdown--notice",`autocomplete__${d}`),children:f})}):(0,e.jsx)("div",{className:Qn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("ul",{role:"listbox","aria-labelledby":s,id:r,className:Qn()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((t=>(0,e.jsx)("li",{className:"autocomplete__list--item",children:(0,e.jsx)(Ht.Button,{onClick:()=>a(t),type:"button",disabled:c.some((e=>e.id===t.id)),isTertiary:!0,children:t.title})},t.id)))})})};gr.propTypes={emptyLabel:o().string.isRequired,error:o().string.isRequired,id:o().string.isRequired,isOpen:o().bool.isRequired,labelledbyId:o().string.isRequired,loading:o().bool.isRequired,options:o().arrayOf(o().shape({label:o().string,value:o().string})).isRequired,onSelect:o().func.isRequired,selectedItems:o().shape([]).isRequired,threshold:o().number.isRequired,value:o().string.isRequired};const yr=gr;var vr=n(458),Ar={};Ar.styleTagTransform=Yn(),Ar.setAttributes=$n(),Ar.insert=zn().bind(null,"head"),Ar.domAPI=Bn(),Ar.insertStyleElement=Wn(),Un()(vr.Z,Ar),vr.Z&&vr.Z.locals&&vr.Z.locals;const br=({type:t,className:n,emptyLabel:r,label:o,maxPages:s,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:u,threshold:p})=>{const d=mr(),[f,h]=(0,hn.useState)(""),[m,g]=(0,hn.useState)([]),[y,v]=(0,hn.useState)(!1),[A,b]=(0,hn.useState)(!1),[_,w]=(0,hn.useState)(""),[x,C]=(0,hn.useState)([]),S=(0,hn.useRef)(),k=gn(_,750),E=(0,hn.useCallback)((async(e=1)=>{if(k.length0?c.join(","):"any",type:t});await Rn()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>s?s:t,e.json()})).then((t=>{g((e=>[...e,...t])),b(!1),(n&&n>e||e>=1&&i&&x.length>0)&&E(e+1)})).catch((e=>h(e.message)))}),[k,t,s,i,c,x.length,p]);(0,hn.useEffect)((()=>{C(u)}),[u]),(0,hn.useEffect)((()=>{k&&p<=k.length?E():g([])}),[k,E,p]);const R=e=>{v(S.current.contains(e.target))},T=e=>{"Escape"===e.key&&v(!1)};(0,hn.useEffect)((()=>(document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)))),(0,hn.useEffect)((()=>(S&&document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R))));const I=e=>{let t=[];if(x.some((t=>t.id===e.id))){const n=x.findIndex((t=>t.id===e.id));t=[...x.slice(0,n),...x.slice(n+1,x.length)]}else i?t=[...x,e]:(t=[e],v(!1));C(t),a(t)};return(0,e.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,e.jsxs)("div",{className:Qn()("components-base-control","autocomplete-base-control",n),ref:S,children:[(0,e.jsxs)("div",{"aria-expanded":y,"aria-haspopup":"listbox","aria-owns":`listbox-${d}`,className:Qn()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,e.jsx)("label",{className:Qn()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${d}`,children:(0,e.jsx)("div",{children:o})}),x.length>0?(0,e.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${d}`,id:`selected-items-${d}`,className:Qn()("autocomplete__selection--results","autocomplete__selection-list"),children:x.map((t=>(0,e.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,e.jsx)(Ht.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>I(t),type:"button",children:t.title})},t.title)))}):null,(0,e.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:Qn()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":y}),id:`autocomplete-${d}`,onChange:e=>w(e.target.value),onFocus:()=>v(!0),placeholder:l,type:"text",value:_})]}),(0,e.jsx)(yr,{emptyLabel:r,error:f,labelledById:`autocomplete-${d}`,id:`listbox-${d}`,isOpen:y,loading:A&&k,onSelect:I,options:m,selectedItems:x,threshold:p,value:k})]})})};br.defaultProps={type:"post",className:"",emptyLabel:(0,Yt.__)("No items found","alley-scripts"),label:(0,Yt.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},br.propTypes={type:o().string,className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const _r=br,wr=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(_r,{type:"term",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});wr.defaultProps={className:"",emptyLabel:(0,Yt.__)("No terms found","alley-scripts"),label:(0,Yt.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},wr.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const xr=wr,Cr=Bt.div` + height: auto; + width: 100%; +`,Sr=({src:t})=>(0,e.jsx)(Cr,{children:(0,e.jsx)("video",{className:"edit-video-preview",controls:!0,src:t})});Sr.propTypes={src:o().string.isRequired};const kr=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(cn,{allowedTypes:["video"],className:t,icon:"format-video",onReset:n,onUpdate:r,onUpdateURL:o,preview:Sr,value:s,valueURL:i});kr.defaultProps={className:"",onUpdateURL:null,valueURL:""},kr.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const Er=kr})(),r})(),e.exports=t()},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;tparseInt(e,10))).findIndex((e=>e===u)),v=m[y],A=e=>{const t=[...m];t[y]=e,(0,a.dispatch)("core/block-editor").updateBlockAttributes(f,{posts:t})},b=(0,a.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(o,!0)),[o]);return(0,e.createElement)("div",{...(0,r.useBlockProps)({className:s()("wp-curate-post-block",{"wp-curate-post-block--selected":b},{"wp-curate-post-block--backfill":!v})})},b||d?(0,e.createElement)(i.PostPicker,{allowedTypes:g,onUpdate:A,onReset:()=>{A(null)},value:null!=v?v:0,previewRender:c,className:"wp-curate-post-block__post-picker",selectText:(0,l.__)("Pin a post","wp-curate"),resetText:(0,l.__)("Backfill post","wp-curate"),replaceText:(0,l.__)("Pin a different post","wp-curate")}):null,(0,e.createElement)(r.InnerBlocks,null))},save:()=>{const t=r.useBlockProps.save();return(0,e.createElement)("div",{...t},(0,e.createElement)(r.InnerBlocks.Content,null))}})}()}(); \ No newline at end of file diff --git a/build/post/index.php b/build/post/index.php new file mode 100644 index 00000000..57999c84 --- /dev/null +++ b/build/post/index.php @@ -0,0 +1,24 @@ +should_register_block() ) { + return; + } + + // Register the block by passing the location of block.json. + register_block_type( + __DIR__ + ); +} +add_action( 'init', 'wp_curate_post_block_init' ); diff --git a/build/post/render.php b/build/post/render.php new file mode 100644 index 00000000..14833e08 --- /dev/null +++ b/build/post/render.php @@ -0,0 +1,15 @@ +. + * @var WP_Block $block The instance of the WP_Block class that represents the block being rendered. + * + * @package wp-curate + */ + +echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Rendered by Gutenberg. diff --git a/build/query/block.json b/build/query/block.json new file mode 100644 index 00000000..0899b158 --- /dev/null +++ b/build/query/block.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-curate/query", + "version": "0.1.0", + "title": "Query", + "category": "theme", + "icon": "filter", + "description": "Custom queries for WP Curate", + "textdomain": "wp-curate", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "providesContext": { + "query": "query", + "displayLayout": "displayLayout", + "heading": "heading", + "curation": "curation" + }, + "attributes": { + "deduplication": { + "default": "inherit", + "enum": [ + "inherit", + "never" + ], + "type": "string" + }, + "maxNumberOfPosts": { + "default": 10, + "type": "number" + }, + "minNumberOfPosts": { + "default": 1, + "type": "number" + }, + "numberOfPosts": { + "default": 5, + "type": "number" + }, + "offset": { + "default": 0, + "type": "number" + }, + "postTypes": { + "default": [ + "post" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "posts": { + "default": [], + "items": { + "type": "number" + }, + "type": "array" + }, + "searchTerm": { + "default": "", + "type": "string" + }, + "terms": { + "default": {}, + "items": { + "default": [], + "items": { + "type": "object" + }, + "type": "array" + }, + "type": "object" + }, + "termRelations": { + "default": {}, + "items": { + "default": "AND", + "enum": [ + "AND", + "OR" + ], + "type": "string" + }, + "type": "object" + }, + "taxRelation": { + "default": "AND", + "enum": [ + "AND", + "OR" + ], + "type": "string" + } + } +} \ No newline at end of file diff --git a/build/query/index.asset.php b/build/query/index.asset.php new file mode 100644 index 00000000..cd6ceea1 --- /dev/null +++ b/build/query/index.asset.php @@ -0,0 +1 @@ + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '961122a9efb240bb0838'); diff --git a/build/query/index.css b/build/query/index.css new file mode 100644 index 00000000..5b314f14 --- /dev/null +++ b/build/query/index.css @@ -0,0 +1 @@ +.autocomplete__component .components-base-control__label{display:inline-block;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:8px;text-transform:uppercase}.manual-posts__container{gap:1rem}.manual-posts__picker{border:1px dashed #e0e0e0;flex:1;padding:8px}.manual-posts__picker>.components-button{justify-content:center;width:100%}.manual-posts__container--selected .manual-posts__picker{border:0;padding:0 0 16px}.manual-posts__container--selected .manual-posts__picker>*{width:100%}.manual-posts__counter{font-weight:500}.manual-posts:has(.manual-posts__container:nth-last-child(10)) .manual-posts__counter{min-width:18px} diff --git a/build/query/index.js b/build/query/index.js new file mode 100644 index 00000000..31ee32e8 --- /dev/null +++ b/build/query/index.js @@ -0,0 +1,42 @@ +!function(){var e,t={373:function(e){var t;self,t=()=>(()=>{var e={779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.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:#f5f5f5}.alley-scripts-post-picker__post.is-selected{background-color:#f5f5f5}.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: #f5f5f5;\n }\n\n &.is-selected {\n background-color: #f5f5f5;\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 a=i},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".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:"AAAA,2BACE,UAAA,CAGF,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".components-modal__content {\n width: 90vw;\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 a=i},458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.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 a=i},609: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,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},272: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),s="/*# ".concat(o," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},368:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:s,seal:i,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(e){return e}),i||(i=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 u=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),f=w(String.prototype.toLowerCase),h=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),v=w(String.prototype.trim),b=w(RegExp.prototype.test),_=(A=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 s=r.length;for(;s--;){let t=r[s];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[s]=e),t=e)}e[t]=!0}return e}function x(t){const n=a(null);for(const[r,s]of e(t))void 0!==o(t,r)&&(n[r]=s);return n}function S(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const E=s(["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"]),k=s(["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=s(["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"]),T=s(["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"]),I=s(["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"]),N=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),P=s(["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"]),L=s(["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"]),j=s(["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"]),D=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=i(/<%[\w\W]*|[\w\W]*%>/gm),B=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),q=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:M,TMPLIT_EXPR:B,DATA_ATTR:F,ARIA_ATTR:z,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:H,DOCTYPE_NAME:W});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 i=o,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:A,Node:w,Element:U,NodeFilter:M,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,H=U.prototype,Y=S(H,"cloneNode"),V=S(H,"nextSibling"),Z=S(H,"childNodes"),Q=S(H,"parentNode");if("function"==typeof A){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let K,J="";const{implementation:X,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=o,{importNode:re}=i;let oe={};r.isSupported="function"==typeof e&&"function"==typeof Q&&X&&void 0!==X.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:ie,TMPLIT_EXPR:ae,DATA_ATTR:le,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:pe}=G;let{IS_ALLOWED_URI:de}=G,fe=null;const he=C({},[...E,...k,...R,...I,...O]);let me=null;const ge=C({},[...P,...L,...j,...D]);let ye=Object.seal(a(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}})),ve=null,be=null,_e=!0,Ae=!0,we=!1,Ce=!0,xe=!1,Se=!1,Ee=!1,ke=!1,Re=!1,Te=!1,Ie=!1,Ne=!0,Oe=!1,Pe=!0,Le=!1,je={},De=null;const Ue=C({},["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 Me=null;const Be=C({},["audio","video","img","source","image","track"]);let Fe=null;const ze=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let We=He,Ge=!1,Ye=null;const Ve=C({},[qe,$e,He],h);let Ze=null;const Qe=["application/xhtml+xml","text/html"];let Ke=null,Je=null;const Xe=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(!Je||Je!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ze=Ze=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ke="application/xhtml+xml"===Ze?h:f,fe="ALLOWED_TAGS"in e?C({},e.ALLOWED_TAGS,Ke):he,me="ALLOWED_ATTR"in e?C({},e.ALLOWED_ATTR,Ke):ge,Ye="ALLOWED_NAMESPACES"in e?C({},e.ALLOWED_NAMESPACES,h):Ve,Fe="ADD_URI_SAFE_ATTR"in e?C(x(ze),e.ADD_URI_SAFE_ATTR,Ke):ze,Me="ADD_DATA_URI_TAGS"in e?C(x(Be),e.ADD_DATA_URI_TAGS,Ke):Be,De="FORBID_CONTENTS"in e?C({},e.FORBID_CONTENTS,Ke):Ue,ve="FORBID_TAGS"in e?C({},e.FORBID_TAGS,Ke):{},be="FORBID_ATTR"in e?C({},e.FORBID_ATTR,Ke):{},je="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Se=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Te=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Ne=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Le=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||q,We=e.NAMESPACE||He,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ae=!1),Te&&(Re=!0),je&&(fe=C({},[...O]),me=[],!0===je.html&&(C(fe,E),C(me,P)),!0===je.svg&&(C(fe,k),C(me,L),C(me,D)),!0===je.svgFilters&&(C(fe,R),C(me,L),C(me,D)),!0===je.mathMl&&(C(fe,I),C(me,j),C(me,D))),e.ADD_TAGS&&(fe===he&&(fe=x(fe)),C(fe,e.ADD_TAGS,Ke)),e.ADD_ATTR&&(me===ge&&(me=x(me)),C(me,e.ADD_ATTR,Ke)),e.ADD_URI_SAFE_ATTR&&C(Fe,e.ADD_URI_SAFE_ATTR,Ke),e.FORBID_CONTENTS&&(De===Ue&&(De=x(De)),C(De,e.FORBID_CONTENTS,Ke)),Pe&&(fe["#text"]=!0),Se&&C(fe,["html","head","body"]),fe.table&&(C(fe,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');K=e.TRUSTED_TYPES_POLICY,J=K.createHTML("")}else void 0===K&&(K=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}}($,l)),null!==K&&"string"==typeof J&&(J=K.createHTML(""));s&&s(e),Je=e}},nt=C({},["mi","mo","mn","ms","mtext"]),rt=C({},["foreignobject","desc","title","annotation-xml"]),ot=C({},["title","style","font","a","script"]),st=C({},k);C(st,R),C(st,T);const it=C({},I);C(it,N);const at=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},lt=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!me[e])if(Re||Te)try{at(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ct=function(e){let t=null,n=null;if(ke)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&We===He&&(e=''+e+"");const r=K?K.createHTML(e):e;if(We===He)try{t=(new z).parseFromString(r,Ze)}catch(e){}if(!t||!t.documentElement){t=X.createDocument(We,"template",null);try{t.documentElement.innerHTML=Ge?J:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),We===He?ne.call(t,Se?"html":"body")[0]:Se?t.documentElement:s},ut=function(e){return ee.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},pt=function(e){return"function"==typeof w&&e instanceof w},dt=function(e,t,n){oe[e]&&u(oe[e],(e=>{e.call(r,t,n,Je)}))},ft=function(e){let t=null;if(dt("beforeSanitizeElements",e,null),(n=e)instanceof F&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return at(e),!0;var n;const o=Ke(e.nodeName);if(dt("uponSanitizeElement",e,{tagName:o,allowedTags:fe}),e.hasChildNodes()&&!pt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return at(e),!0;if(!fe[o]||ve[o]){if(!ve[o]&&mt(o)){if(ye.tagNameCheck instanceof RegExp&&b(ye.tagNameCheck,o))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(o))return!1}if(Pe&&!De[o]){const t=Q(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Y(n[r],!0),V(e))}return at(e),!0}return e instanceof U&&!function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:We,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===He?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(st[n]):e.namespaceURI===qe?t.namespaceURI===He?"math"===n:t.namespaceURI===$e?"math"===n&&rt[r]:Boolean(it[n]):e.namespaceURI===He?!(t.namespaceURI===$e&&!rt[r])&&!(t.namespaceURI===qe&&!nt[r])&&!it[n]&&(ot[n]||!st[n]):!("application/xhtml+xml"!==Ze||!Ye[e.namespaceURI]))}(e)?(at(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,u([se,ie,ae],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),dt("afterSanitizeElements",e,null),!1):(at(e),!0)},ht=function(e,t,n){if(Ne&&("id"===t||"name"===t)&&(n in o||n in Xe))return!1;if(Ae&&!be[t]&&b(le,t));else if(_e&&b(ce,t));else if(!me[t]||be[t]){if(!(mt(e)&&(ye.tagNameCheck instanceof RegExp&&b(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&b(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&b(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(Fe[t]);else if(b(de,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Me[e])if(we&&!b(ue,g(n,pe,"")));else if(n)return!1;return!0},mt=function(e){return e.indexOf("-")>0},gt=function(e){dt("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 s=t[o],{name:i,namespaceURI:a,value:l}=s,c=Ke(i);let d="value"===i?l:v(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,dt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(lt(i,e),!n.keepAttr)continue;if(!Ce&&b(/\/>/i,d)){lt(i,e);continue}xe&&u([se,ie,ae],(e=>{d=g(d,e," ")}));const f=Ke(e.nodeName);if(ht(f,c,d)){if(!Oe||"id"!==c&&"name"!==c||(lt(i,e),d="user-content-"+d),K&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(a);else switch($.getAttributeType(f,c)){case"TrustedHTML":d=K.createHTML(d);break;case"TrustedScriptURL":d=K.createScriptURL(d)}try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),p(r.removed)}catch(e){}}}dt("afterSanitizeAttributes",e,null)},yt=function e(t){let n=null;const r=ut(t);for(dt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)dt("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof c&&e(n.content),gt(n));dt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,a=null;if(Ge=!e,Ge&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ee||tt(t),r.removed=[],"string"==typeof e&&(Le=!1),Le){if(e.nodeName){const t=Ke(e.nodeName);if(!fe[t]||ve[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)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&&!xe&&!Se&&-1===e.indexOf("<"))return K&&Ie?K.createHTML(e):e;if(n=ct(e),!n)return Re?null:Ie?J:""}n&&ke&&at(n.firstChild);const l=ut(Le?e:n);for(;s=l.nextNode();)ft(s)||(s.content instanceof c&&yt(s.content),gt(s));if(Le)return e;if(Re){if(Te)for(a=te.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(me.shadowroot||me.shadowrootmode)&&(a=re.call(i,a,!0)),a}let p=Se?n.outerHTML:n.innerHTML;return Se&&fe["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(W,n.ownerDocument.doctype.name)&&(p="\n"+p),xe&&u([se,ie,ae],(e=>{p=g(p,e," ")})),K&&Ie?K.createHTML(p):p},r.setConfig=function(){tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ee=!0},r.clearConfig=function(){Je=null,Ee=!1},r.isValidAttribute=function(e,t,n){Je||tt({});const r=Ke(e),o=Ke(t);return ht(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],d(oe[e],t))},r.removeHook=function(e){if(oe[e])return p(oe[e])},r.removeHooks=function(e){oe[e]&&(oe[e]=[])},r.removeAllHooks=function(){oe={}},r}()}()},286: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={},s=0,i={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(A(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!A(r.transform)&&r.transform,r.worker&&i.WORKERS_SUPPORTED){var l=function(){if(!i.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),i.BLOB_URL||(i.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(a);return l.onmessage=g,l.id=s++,o[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=A(r.step),r.chunk=A(r.chunk),r.complete=A(r.complete),r.error=A(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return i.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 p(r)):!0===n.readable&&A(n.read)&&A(n.on)?f=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",s="\r\n",a='"',l=a+a,c=!1,u=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.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&&(s=t.newline),"string"==typeof t.quoteChar&&(a=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");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"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(u||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||u),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 i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:a,workerId:i.WORKER_ID,finished:c});else if(A(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!A(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){A(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.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=_(this._chunkLoaded,this),t.onerror=_(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 u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=i.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=_(this._chunkLoaded,this),t.onerror=_(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 p(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 d(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=_((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=_((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=_((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=_((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),s=-o,a=/^\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,u=0,p=0,d=!1,f=!1,g=[],y={data:[],errors:[],meta:{}};if(A(e.step)){var v=e.step;e.step=function(t){if(y=t,C())w();else{if(w(),0===y.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function _(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!_(e)}))),C()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;C()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(i=e.transform(i,s)),i=x(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(r>g.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,p+n):r=r.length/2?"\r\n":"\r"}(o,l)),r=!1,e.delimiter)A(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,o,s){var a,l,c,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var p=0;p=a)return G(!0)}else for(B=u,u++;;){if(-1===(B=i.indexOf(t,B+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:u}),H();if(B===m-1)return H(i.substring(u,B).replace(M,t));if(t!==c||i[B+1]!==c){if(t===c||0===B||i[B-1]!==c){-1!==D&&D=a)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:u}),B++}}else B++}return H();function q(e){_.push(e),x=u}function $(e){var t=0;if(-1!==e){var n=i.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function H(e){return f||(void 0===e&&(e=i.substring(u)),C.push(e),u=m,q(C),b&&Y()),G()}function W(e){u=e,q(C),C=[],U=i.indexOf(r,u)}function G(e){return{data:_,errors:w,meta:{delimiter:n,linebreak:r,aborted:p,truncated:!!e,cursor:x+(d||0)}}}function Y(){s(G()),_=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return u}}function g(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 s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(A(n.userStep)){for(var i=0;i{"use strict";var r=n(586);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,i){if(i!==r){var a=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 a.name="Invariant Violation",a}}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:s,resetWarningCache:o};return n.PropTypes=n,n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},837:(e,t,n)=>{"use strict";var r=n(196),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=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,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},322:(e,t,n)=>{"use strict";e.exports=n(837)},665: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 s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var a=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)}},173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},36: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 s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464: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))}}},196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.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:()=>$t,CSVUploader:()=>Jt,Checkboxes:()=>Gt,ImagePicker:()=>nn,MediaPicker:()=>cn,PostPicker:()=>ar,PostSelector:()=>cr,SafeHtml:()=>fn,Selector:()=>Ar,TermSelector:()=>Cr,VideoPicker:()=>kr,getMediaUrl:()=>Kt,parseCSVFile:()=>Qt,useCurrentPostId:()=>En,useDebounce:()=>gn,useHasInnerBlocks:()=>yn,useInnerBlocks:()=>bn,useInnerBlocksAttributes:()=>_n,useInnerBlocksCount:()=>An,useInnerBlocksIndex:()=>vn,useMedia:()=>wn,useParentBlock:()=>Cn,useParentBlockAttributes:()=>xn,usePost:()=>Sn,usePostById:()=>Tn,usePostMeta:()=>On,usePostMetaValue:()=>Pn,usePosts:()=>Ln,useTerms:()=>jn});var e=n(322),t=n(980),o=n.n(t),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||G(U)>3?"":" "}function Z(e,t){for(;--t&&q()&&!(U<48||U>102||U>57&&U<65||U>70&&U<97););return W(e,H()+(t<6&&32==$()&&32==q()))}function Q(e){for(;q();)switch(U){case e:return D;case 34:case 39:34!==e&&39!==e&&Q(U);break;case 40:41===e&&Q(e);break;case 92:q()}return D}function K(e,t){for(;q()&&e+U!==57&&(e+U!==84||47!==$()););return"/*"+W(t,D-1)+"*"+A(47===e?e:q())}function J(e){for(;!G($());)q();return W(e,D)}function X(e,t){for(var n="",r=0;r6)switch(k(e,t+1)){case 109:if(45!==k(e,t+4))break;case 102:return S(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+d+(108==k(e,t+3)?"$3":"$2-$3"))+e;case 115:return~E(e,"stretch")?te(S(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return S(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,s,i,a){return p+n+":"+r+a+(o?p+n+"-span:"+(s?i:+i-+r)+a:"")+e}));case 4949:if(121===k(e,t+6))return S(e,":",":"+f)+e;break;case 6444:switch(k(e,45===k(e,14)?18:11)){case 120:return S(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===k(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+p+"$2box$3")+e;case 100:return S(e,":",":"+p)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return S(e,"scroll-","scroll-snap-")+e}return e}function ne(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:return void(e.return=te(e.value,e.length,n));case v:return X([F(e,{value:S(e.value,"@","@"+f)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(x(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":z(F(e,{props:[S(t,/:(read-\w+)/,":"+d+"$1")]})),z(F(e,{props:[t]})),w(e,{props:O(n,r)});break;case"::placeholder":z(F(e,{props:[S(t,/:(plac\w+)/,":"+f+"input-$1")]})),z(F(e,{props:[S(t,/:(plac\w+)/,":"+d+"$1")]})),z(F(e,{props:[S(t,/:(plac\w+)/,p+"input-$1")]})),z(F(e,{props:[t]})),w(e,{props:O(n,r)})}return""}))}}function re(e){return function(e){return M="",e}(oe("",null,null,null,[""],e=function(e){return P=L=1,j=T(M=e),D=0,[]}(e),0,[0],e))}function oe(e,t,n,r,o,s,i,a,l){for(var c=0,u=0,p=i,d=0,f=0,h=0,m=1,g=1,y=1,v=0,b="",_=o,w=s,C=r,x=b;g;)switch(h=v,v=q()){case 40:if(108!=h&&58==k(x,p-1)){-1!=E(x+=S(Y(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:x+=Y(v);break;case 9:case 10:case 13:case 32:x+=V(h);break;case 92:x+=Z(H()-1,7);continue;case 47:switch($()){case 42:case 47:N(ie(K(q(),H()),t,n,l),l);break;default:x+="/"}break;case 123*m:a[c++]=T(x)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(x=S(x,/\f/g,"")),f>0&&T(x)-p&&N(f>32?ae(x+";",r,n,p-1,l):ae(S(x," ","")+";",r,n,p-2,l),l);break;case 59:x+=";";default:if(N(C=se(x,t,n,c,u,o,a,b,_=[],w=[],p,s),s),123===v)if(0===u)oe(x,t,C,C,_,s,p,a,w);else switch(99===d&&110===k(x,3)?100:d){case 100:case 108:case 109:case 115:oe(e,C,C,r&&N(se(e,C,C,0,0,o,a,b,o,_=[],p,w),w),o,w,p,a,r?_:w);break;default:oe(x,C,C,C,[""],w,0,a,w)}}c=u=f=0,m=y=1,b=x="",p=i;break;case 58:p=1+T(x),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(U=D>0?k(M,--D):0,L--,10===U&&(L=1,P--),U))continue;switch(x+=A(v),v*m){case 38:y=u>0?1:(x+="\f",-1);break;case 44:a[c++]=(T(x)-1)*y,y=1;break;case 64:45===$()&&(x+=Y(q())),d=$(),u=p=T(b=x+=J(H())),v++;break;case 45:45===h&&2==T(x)&&(m=0)}}return s}function se(e,t,n,r,o,s,i,a,l,c,u,p){for(var d=o-1,f=0===o?s:[""],h=I(f),g=0,y=0,v=0;g0?f[b]+" "+A:S(A,/&\f/g,f[b])))&&(l[v++]=w);return B(e,t,n,0===o?m:a,l,c,u,p)}function ie(e,t,n,r){return B(e,t,n,h,A(U),R(e,2,-2),0,r)}function ae(e,t,n,r,o){return B(e,t,n,g,R(e,0,r),R(e,r+1,-1),r,o)}const le={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 ce="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ue="undefined"!=typeof window&&"HTMLElement"in window,pe=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([])),fe=Object.freeze({}),he=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"]),me=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ge=/(^-|-$)/g;function ye(e){return e.replace(me,"-").replace(ge,"")}var ve=/(a)(d)/gi,be=function(e){return String.fromCharCode(e+(e>25?39:97))};function _e(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=be(t%52)+n;return(be(t%52)+n).replace(ve,"$1-$2")}var Ae,we=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ce=function(e){return we(5381,e)};function xe(e){return"string"==typeof e&&!0}var Se="function"==typeof Symbol&&Symbol.for,Ee=Se?Symbol.for("react.memo"):60115,ke=Se?Symbol.for("react.forward_ref"):60112,Re={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Te={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ie={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ne=((Ae={})[ke]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ae[Ee]=Ie,Ae);function Oe(e){return("type"in(t=e)&&t.type.$$typeof)===Ee?Ie:"$$typeof"in e?Ne[e.$$typeof]:Re;var t}var Pe=Object.defineProperty,Le=Object.getOwnPropertyNames,je=Object.getOwnPropertySymbols,De=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,Me=Object.prototype;function Be(e,t,n){if("string"!=typeof t){if(Me){var r=Ue(t);r&&r!==Me&&Be(e,r,n)}var o=Le(t);je&&(o=o.concat(je(t)));for(var s=Oe(e),i=Oe(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Ve=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 Ye(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=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(i).concat(a,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},s=0;s0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(dt,n).replace(r,c))})),i.prefix&&u.push(ne),u.push(ee);var p=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(ft,""),c=re(s||o?"".concat(s," ").concat(o," { ").concat(l," }"):l);i.namespace&&(c=ht(c,i.namespace));var p,d,f,h=[];return X(c,(p=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),d=I(p),function(e,t,n,r){for(var o="",s=0;s="A"&&e<="Z"};function xt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=qe(r,s),this.staticRulesId=s}else{for(var a=we(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),r=qe(r,d)}}return r},e}(),Nt=l().createContext(void 0);Nt.Consumer;var Ot={};function Pt(e,t,n){var r=ze(e),o=e,i=!xe(e),c=t.attrs,u=void 0===c?de:c,p=t.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":ye(e);Ot[n]=(Ot[n]||0)+1;var r="".concat(n,"-").concat(function(e){return _e(Ce(e)>>>0)}("6.1.0"+n+Ot[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):p,f=(void 0===t.displayName&&function(e){xe(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e),t.displayName&&t.componentId?"".concat(ye(t.displayName),"-").concat(t.componentId):t.componentId||d),h=r&&o.attrs?o.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(r&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return g(e,t)&&y(e,t)}}else m=g}var v=new It(n,f,r?o.componentStyle:void 0),b=l().forwardRef((function(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,i=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,p=e.target,d=l().useContext(Nt),f=_t(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var r,o=s(s({},t),{className:void 0,theme:n}),i=0;i2&&pt.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=ot(),r=$e([n&&'nonce="'.concat(n,'"'),"".concat(ce,'="true"'),"".concat("data-styled-version",'="').concat("6.1.0",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw Ye(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Ye(2);var n=((t={})[ce]="",t["data-styled-version"]="6.1.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=ot();return r&&(n.nonce=r),[l().createElement("style",s({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new pt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Ye(2);return l().createElement(At,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Ye(3)}}(),"__sc-".concat(ce,"__");const Ft=Bt.div` + height: auto; + width: 100%; +`,zt=({src:t})=>(0,e.jsx)(Ft,{children:(0,e.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:t})});zt.propTypes={src:o().string.isRequired};const qt=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(cn,{allowedTypes:["audio"],className:t,icon:"format-audio",onReset:n,onUpdate:r,onUpdateURL:o,preview:zt,value:s,valueURL:i});qt.defaultProps={className:"",onUpdateURL:null,valueURL:""},qt.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const $t=qt,Ht=window.wp.components,Wt=({label:t,value:n,options:r,onChange:o})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ht.BaseControl,{label:t}),r.map((t=>(0,e.jsx)(Ht.CheckboxControl,{label:t.label,checked:n.includes(t.value),onChange:e=>{o(e?[...n,t.value]:[...n.filter((e=>e!==t.value))])}})))]});Wt.propTypes={label:o().string.isRequired,value:o().arrayOf(o().string).isRequired,options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().string.isRequired})).isRequired,onChange:o().func.isRequired};const Gt=Wt,Yt=window.wp.i18n;var Vt=n(286),Zt=n.n(Vt);const Qt=e=>new Promise(((t,n)=>{Zt().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})})),Kt=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:o=""}={},full:{url:s=""}={}}={},source_url:i="",url:a=""}=e;return o||n||s||r||a||i||""};class Jt extends l().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]&&Qt(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,Yt.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,Yt.__)("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:t="",success:n=""}=this.state;return(0,e.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,e.jsx)("h2",{children:(0,Yt.__)("Upload CSV","alley-scripts")}),(0,e.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==t?(0,e.jsxs)("div",{style:{color:"#c00"},children:[(0,e.jsx)("strong",{children:(0,Yt.__)("Error:","alley-scripts")})," ",t]}):null,""!==n?(0,e.jsxs)("div",{style:{color:"#0c0"},children:[(0,e.jsx)("strong",{children:(0,Yt.__)("Success:","alley-scripts")})," ",n]}):null,(0,e.jsx)("div",{children:(0,e.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,e.jsx)("p",{children:(0,Yt.__)("Select a file to load data.","alley-scripts")}),(0,e.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}Jt.defaultProps={callback:null},Jt.propTypes={attributeName:o().string.isRequired,callback:o().func,setAttributes:o().func.isRequired};const Xt=Bt.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; +`,en=({src:t})=>(0,e.jsx)(Xt,{children:(0,e.jsx)("img",{alt:(0,Yt.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:t,title:(0,Yt.__)("Edit image","alley-scripts")})});en.propTypes={src:o().string.isRequired};const tn=({className:t,imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,value:a,valueURL:l})=>(0,e.jsx)(cn,{allowedTypes:["image"],className:t,icon:"format-image",imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,preview:en,value:a,valueURL:l});tn.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},tn.propTypes={className:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const nn=tn,rn=window.wp.blockEditor,on=window.wp.data,sn=Bt.div` + display: block; + position: relative; +`,an=Bt.div` + background: white; + border: 1px solid black; + padding: 1em; +`,ln=({allowedTypes:t,className:n,icon:r,imageSize:o,displayControlsInToolbar:s,onReset:i,onUpdate:a,onUpdateURL:l,preview:c,value:u,valueURL:p})=>{const{media:d}=(0,on.useSelect)((e=>({media:u?e("core").getMedia(u):void 0})),[u]);if(0!==u&&null===d)return(0,e.jsx)(Ht.Spinner,{});const f=d?Kt(d,o):p;return f?(0,e.jsxs)(sn,{className:n,children:[c?(0,e.jsx)(c,{src:f}):(0,e.jsxs)(an,{className:"alley-scripts-media-picker__preview",children:[(0,e.jsx)("p",{children:(0,Yt.__)("Selected file:","alley-scripts")}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:f,children:f})})]}),s?(0,e.jsx)(rn.BlockControls,{group:"other",children:(0,e.jsx)(rn.MediaReplaceFlow,{name:(0,Yt.__)("Edit Media","alley-scripts"),mediaId:u,mediaURL:f,allowedTypes:t,onSelect:a,onSelectURL:l,children:(0,e.jsx)(Ht.ToolbarButton,{isDestructive:!0,text:(0,Yt.__)("Remove","alley-scripts"),onClick:i})})}):(0,e.jsx)(Ht.Button,{variant:"primary",onClick:i,children:(0,Yt.__)("Reset","alley-scripts")})]}):(0,e.jsx)(sn,{className:n,children:(0,e.jsx)(rn.MediaPlaceholder,{allowedTypes:t,disableMediaButtons:!!p,icon:(0,e.jsx)(rn.BlockIcon,{icon:r}),onSelect:a,onSelectURL:l,value:{id:u,src:f}})})};ln.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},ln.propTypes={allowedTypes:o().arrayOf(o().string),className:o().string,icon:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,preview:o().element,value:o().number.isRequired,valueURL:o().string};const cn=ln;var un=n(368),pn=n.n(un);const dn=({className:t,html:n,tag:r})=>(0,e.jsx)(r,{className:t,dangerouslySetInnerHTML:{__html:pn().sanitize(n)}});dn.defaultProps={className:""},dn.propTypes={className:o().string,html:o().string.isRequired,tag:o().string.isRequired};const fn=dn,hn=window.wp.element,mn=window.wp.url,gn=(e,t)=>{const[n,r]=(0,hn.useState)(e);return(0,hn.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},yn=e=>An(e)>0,vn=e=>{const t=Cn(e),n=bn(t);return n?n.findIndex((t=>t.clientId===e)):-1},bn=e=>(0,on.useSelect)((t=>t(rn.store).getBlocks(e)),[e]),_n=e=>bn(e).map((e=>e.attributes)),An=e=>bn(e).length,wn=e=>(0,on.useSelect)((t=>t("core").getMedia(e)),[e]),Cn=e=>(0,on.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:r}=t(rn.store),o=r(e);return o?n(o):null}),[e]),xn=e=>(0,on.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:r}=t(rn.store),o=r(e);return o?n(o):null}),[e]),Sn=(e,t="post")=>(0,on.useSelect)((n=>n("core").getEntityRecord("postType",t,e)),[e,t]),En=()=>(0,on.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[]),kn=window.wp.apiFetch;var Rn=n.n(kn);const Tn=(e,t=null)=>{const[n,r]=(0,hn.useState)({});return(0,hn.useEffect)((()=>{e&&!n[e]&&(async()=>{if(t){const n=await t(e);n?r((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,mn.addQueryArgs)("/wp/v2/search",{include:e}),n=await Rn()({path:t});r((t=>({...t,[e]:n[0].subtype})))}})()}),[e]),Sn(e,n[e]??"")},In=window.wp.coreData,Nn=window.lodash,On=(e=null,t=null)=>{const n=(0,on.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[r,o]=(0,In.useEntityProp)("postType",n,"meta",t),s="function"==typeof o?o:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof r?r:{},e=>s((0,Nn.cloneDeep)(e))]},Pn=(e,t=null,n=null)=>{const[r,o]=On(t,n);return[r[e],t=>o({...r,[e]:t})]},Ln=(e,t="post")=>(0,on.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t]),jn=(e=null,t=null,n="categories")=>{const r=(0,on.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[o,s]=(0,In.useEntityProp)("postType",r,n,t);return[o,e=>s(e)]};var Dn=n(62),Un=n.n(Dn),Mn=n(36),Bn=n.n(Mn),Fn=n(793),zn=n.n(Fn),qn=n(892),$n=n.n(qn),Hn=n(173),Wn=n.n(Hn),Gn=n(464),Yn=n.n(Gn),Vn=n(992),Zn={};Zn.styleTagTransform=Yn(),Zn.setAttributes=$n(),Zn.insert=zn().bind(null,"head"),Zn.domAPI=Bn(),Zn.insertStyleElement=Wn(),Un()(Vn.Z,Zn),Vn.Z&&Vn.Z.locals&&Vn.Z.locals;var Qn=n(779),Kn=n.n(Qn),Jn=n(905),Xn={};Xn.styleTagTransform=Yn(),Xn.setAttributes=$n(),Xn.insert=zn().bind(null,"head"),Xn.domAPI=Bn(),Xn.insertStyleElement=Wn(),Un()(Jn.Z,Xn),Jn.Z&&Jn.Z.locals&&Jn.Z.locals;const er=window.wp.htmlEntities,tr=Bt.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,nr=({title:t,postType:n,attachmentID:r})=>{const o=wn(r),s=o?.media_details?.sizes?.thumbnail?.source_url,i=o?.alt_text??"";return(0,e.jsxs)(tr,{children:[s?(0,e.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:s,alt:i}):null,(0,e.jsx)(fn,{html:(0,er.decodeEntities)(t),className:"post-picker-result-title",tag:"strong"}),(0,Yt.sprintf)(" (%s)",n)]})},rr=({baseUrl:t,searchRender:n,selected:r,setSelected:o,suppressPostIds:s=[]})=>{const[i,a]=(0,hn.useState)(!1),[l,c]=(0,hn.useState)([]),[u,p]=(0,hn.useState)(!1),[d,f]=(0,hn.useState)(0),[h,m]=(0,hn.useState)({searchValue:"",page:1}),g=(0,hn.useCallback)((async(e,n=!1)=>{if(e.searchValue&&e.searchValue.length<=2)return;const r=function(){let n=(0,mn.addQueryArgs)(t,{page:e.page,_embed:1,exclude:s.join(",")});return e.searchValue&&e.searchValue.length>2&&(n=(0,mn.addQueryArgs)(n,{search:e.searchValue})),n}();a(!0);const o=await Rn()({path:r,parse:!1});f(parseInt(o.headers.get("X-WP-TotalPages"),10));const i=await o.json();let u=i;e.page>1&&(u=[...l,...i]),n||(c(u),a(!1))}),[l,t,s]);return(0,hn.useEffect)((()=>{let e=!1;return u||(p(!0),g(h,e)),()=>{e=!0}}),[g,u,h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ht.TextControl,{value:h.searchValue,placeholder:(0,Yt.__)("Search...","alley-scripts"),label:(0,Yt.__)("Search","alley-scripts"),onChange:e=>{const t={...h,searchValue:e,page:1};m(t),g(t)}}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[l?l.map((t=>(0,e.jsx)(Ht.Button,{className:Kn()({"alley-scripts-post-picker__post":!0,"is-selected":t.id===r}),onClick:()=>o(t.id),children:n?n(t):(0,e.jsx)(nr,{title:t.title,postType:t.subtype,attachmentID:t?._embedded?.self[0]?.featured_media})},t.id))):null,i?(0,e.jsx)(Ht.Spinner,{}):null,d>0&&h.page{const e={...h,page:h.page+1};m(e),g(e)},children:(0,Yt.__)("Load More","alley-scripts")})}):null]})]})},or=({baseUrl:t,closeModal:n,modalTitle:r,onUpdate:o,searchRender:s,suppressPostIds:i=[]})=>{const[a,l]=(0,hn.useState)();return(0,e.jsxs)(Ht.Modal,{isDismissible:!0,title:r,onRequestClose:n,closeButtonLabel:"Close",children:[(0,e.jsx)(rr,{baseUrl:t,selected:a??0,setSelected:l,searchRender:s,suppressPostIds:i}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:n,children:(0,Yt.__)("Cancel","alley-scripts")}),(0,e.jsx)(Ht.Button,{variant:"primary",onClick:()=>{a&&(o(a),n())},disabled:!a,children:(0,Yt.__)("Select","alley-scripts")})]})]})},sr=Bt.div` + display: block; + position: relative; +`,ir=Bt.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,ar=({allowedTypes:t,className:n,getPostType:r,modalTitle:o=(0,Yt.__)("Select Post","alley-scripts"),onReset:s,onUpdate:i,params:a={},previewRender:l,replaceText:c=(0,Yt.__)("Replace","alley-scripts"),resetText:u=(0,Yt.__)("Reset","alley-scripts"),searchEndpoint:p="/wp/v2/search",searchRender:d,selectText:f=(0,Yt.__)("Select","alley-scripts"),suppressPostIds:h=[],title:m="",value:g=0})=>{const[y,v]=(0,hn.useState)(!1),b=(0,mn.addQueryArgs)(p,{type:"post",subtype:t??"any",...a}),_=Tn(g,r),{featured_media:A,title:{rendered:w=""}={},type:C=""}=_||{},x=()=>{v(!0)};return 0!==g&&null===_?(0,e.jsx)(Ht.Spinner,{}):(0,e.jsxs)(sr,{className:n,children:[m?(0,e.jsx)("h4",{children:m}):null,0!==g&&null!==_?(0,e.jsxs)(e.Fragment,{children:[void 0!==l?l(_):(0,e.jsx)(ir,{children:(0,e.jsx)(nr,{title:w,postType:C,attachmentID:A})}),(0,e.jsxs)(Ht.ButtonGroup,{children:[(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:s,style:{margin:"0 4px"},children:u}),(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:x,style:{margin:"0 4px"},children:c})]})]}):(0,e.jsx)(Ht.Button,{onClick:x,variant:"secondary",children:f}),y?(0,e.jsx)(or,{closeModal:()=>{v(!1)},baseUrl:b,modalTitle:o,onUpdate:i,searchRender:d,suppressPostIds:h}):null]})},lr=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(Ar,{type:"post",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});lr.defaultProps={className:"",emptyLabel:(0,Yt.__)("No posts found","alley-scripts"),label:(0,Yt.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},lr.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const cr=lr,ur={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let pr;const dr=new Uint8Array(16);function fr(){if(!pr&&(pr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pr(dr)}const hr=[];for(let e=0;e<256;++e)hr.push((e+256).toString(16).slice(1));const mr=function(e,t,n){if(ur.randomUUID&&!t&&!e)return ur.randomUUID();const r=(e=e||{}).random||(e.rng||fr)();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 hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]}(r)},gr=({emptyLabel:t,error:n,id:r,isOpen:o,labelledbyId:s,loading:i,onSelect:a,options:l,selectedItems:c,threshold:u,value:p})=>{if(!i&&(""===p||u>p.length))return null;let d="",f="";return i?(d="loading",f=(0,Yt.__)("Loading...","alley-scripts")):n?(d="error",f=n):i||0!==l.length||(d="no-posts",f=t),i||!i&&(p&&0===l.length||n)?(0,e.jsx)("div",{"aria-busy":!0,className:Kn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("div",{className:Kn()("autocomplete__dropdown--notice",`autocomplete__${d}`),children:f})}):(0,e.jsx)("div",{className:Kn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("ul",{role:"listbox","aria-labelledby":s,id:r,className:Kn()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((t=>(0,e.jsx)("li",{className:"autocomplete__list--item",children:(0,e.jsx)(Ht.Button,{onClick:()=>a(t),type:"button",disabled:c.some((e=>e.id===t.id)),isTertiary:!0,children:t.title})},t.id)))})})};gr.propTypes={emptyLabel:o().string.isRequired,error:o().string.isRequired,id:o().string.isRequired,isOpen:o().bool.isRequired,labelledbyId:o().string.isRequired,loading:o().bool.isRequired,options:o().arrayOf(o().shape({label:o().string,value:o().string})).isRequired,onSelect:o().func.isRequired,selectedItems:o().shape([]).isRequired,threshold:o().number.isRequired,value:o().string.isRequired};const yr=gr;var vr=n(458),br={};br.styleTagTransform=Yn(),br.setAttributes=$n(),br.insert=zn().bind(null,"head"),br.domAPI=Bn(),br.insertStyleElement=Wn(),Un()(vr.Z,br),vr.Z&&vr.Z.locals&&vr.Z.locals;const _r=({type:t,className:n,emptyLabel:r,label:o,maxPages:s,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:u,threshold:p})=>{const d=mr(),[f,h]=(0,hn.useState)(""),[m,g]=(0,hn.useState)([]),[y,v]=(0,hn.useState)(!1),[b,_]=(0,hn.useState)(!1),[A,w]=(0,hn.useState)(""),[C,x]=(0,hn.useState)([]),S=(0,hn.useRef)(),E=gn(A,750),k=(0,hn.useCallback)((async(e=1)=>{if(E.length0?c.join(","):"any",type:t});await Rn()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>s?s:t,e.json()})).then((t=>{g((e=>[...e,...t])),_(!1),(n&&n>e||e>=1&&i&&C.length>0)&&k(e+1)})).catch((e=>h(e.message)))}),[E,t,s,i,c,C.length,p]);(0,hn.useEffect)((()=>{x(u)}),[u]),(0,hn.useEffect)((()=>{E&&p<=E.length?k():g([])}),[E,k,p]);const R=e=>{v(S.current.contains(e.target))},T=e=>{"Escape"===e.key&&v(!1)};(0,hn.useEffect)((()=>(document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)))),(0,hn.useEffect)((()=>(S&&document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R))));const I=e=>{let t=[];if(C.some((t=>t.id===e.id))){const n=C.findIndex((t=>t.id===e.id));t=[...C.slice(0,n),...C.slice(n+1,C.length)]}else i?t=[...C,e]:(t=[e],v(!1));x(t),a(t)};return(0,e.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,e.jsxs)("div",{className:Kn()("components-base-control","autocomplete-base-control",n),ref:S,children:[(0,e.jsxs)("div",{"aria-expanded":y,"aria-haspopup":"listbox","aria-owns":`listbox-${d}`,className:Kn()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,e.jsx)("label",{className:Kn()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${d}`,children:(0,e.jsx)("div",{children:o})}),C.length>0?(0,e.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${d}`,id:`selected-items-${d}`,className:Kn()("autocomplete__selection--results","autocomplete__selection-list"),children:C.map((t=>(0,e.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,e.jsx)(Ht.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>I(t),type:"button",children:t.title})},t.title)))}):null,(0,e.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:Kn()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":y}),id:`autocomplete-${d}`,onChange:e=>w(e.target.value),onFocus:()=>v(!0),placeholder:l,type:"text",value:A})]}),(0,e.jsx)(yr,{emptyLabel:r,error:f,labelledById:`autocomplete-${d}`,id:`listbox-${d}`,isOpen:y,loading:b&&E,onSelect:I,options:m,selectedItems:C,threshold:p,value:E})]})})};_r.defaultProps={type:"post",className:"",emptyLabel:(0,Yt.__)("No items found","alley-scripts"),label:(0,Yt.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},_r.propTypes={type:o().string,className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const Ar=_r,wr=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(Ar,{type:"term",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});wr.defaultProps={className:"",emptyLabel:(0,Yt.__)("No terms found","alley-scripts"),label:(0,Yt.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},wr.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const Cr=wr,xr=Bt.div` + height: auto; + width: 100%; +`,Sr=({src:t})=>(0,e.jsx)(xr,{children:(0,e.jsx)("video",{className:"edit-video-preview",controls:!0,src:t})});Sr.propTypes={src:o().string.isRequired};const Er=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(cn,{allowedTypes:["video"],className:t,icon:"format-video",onReset:n,onUpdate:r,onUpdateURL:o,preview:Sr,value:s,valueURL:i});Er.defaultProps={className:"",onUpdateURL:null,valueURL:""},Er.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const kr=Er})(),r})(),e.exports=t()},254:function(e,t,n){"use strict";var r=window.React,o=window.wp.blocks,s=window.wp.blockEditor,i=n(373),a=n(184),l=n.n(a),c=window.wp.apiFetch,u=n.n(c),p=window.wp.components,d=window.wp.data,f=window.wp.element,h=window.wp.i18n,m=window.wp.url;const g=new Map,y=new Map;let v=!1,b=!1;function _(e){if(!e)return!0;const t="string"==typeof e?parseInt(e,10):e;return!g.has(t)&&(g.set(t,!0),!0)}function A(e){if(!e)return;const t="string"==typeof e?parseInt(e,10):e;g.set(t,!0)}const w=(e,t)=>{e.forEach((e=>{if("wp-curate/query"===e.name)t.push(e);else{const{innerBlocks:n}=e;if(!n)return;w(n,t)}}))};function C(){if(v)return void(b=!0);v=!0,b=!1,g.clear(),y.clear();const e=(0,d.select)("core/block-editor").getBlocks(),{wp_curate_deduplication:t=!0}=(0,d.select)("core/editor").getEditedPostAttribute("meta")||{},n=[];w(e,n),n.forEach((e=>{const{attributes:n}=e,{backfillPosts:r=null,deduplication:o="inherit",posts:s=[],numberOfPosts:i=5,postTypes:a=["post"]}=n;if(!r)return;const l=a.join(",");let c=0;const u=[],p=s,f=r.filter((e=>!p.includes(e)));for(let e=0;e{let r,s,i=!1;if(null!==p[n])r=p[n],A(r);else do{f[c]&&(s=f[c],t&&"inherit"===o?i=_(s):(i=!0,A(s))),c+=1}while(!1===i&&c<=f.length);u.push(r||s)})),(0,d.dispatch)("core/block-editor").updateBlockAttributes(e.clientId,{query:{perPage:i,postType:"post",type:l,include:u.join(","),orderby:"include"},queryId:0})})),v=!1,b&&C()}var x=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-curate/query","version":"0.1.0","title":"Query","category":"theme","icon":"filter","description":"Custom queries for WP Curate","textdomain":"wp-curate","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"providesContext":{"query":"query","displayLayout":"displayLayout","heading":"heading","curation":"curation"},"attributes":{"deduplication":{"default":"inherit","enum":["inherit","never"],"type":"string"},"maxNumberOfPosts":{"default":10,"type":"number"},"minNumberOfPosts":{"default":1,"type":"number"},"numberOfPosts":{"default":5,"type":"number"},"offset":{"default":0,"type":"number"},"postTypes":{"default":["post"],"items":{"type":"string"},"type":"array"},"posts":{"default":[],"items":{"type":"number"},"type":"array"},"searchTerm":{"default":"","type":"string"},"terms":{"default":{},"items":{"default":[],"items":{"type":"object"},"type":"array"},"type":"object"},"termRelations":{"default":{},"items":{"default":"AND","enum":["AND","OR"],"type":"string"},"type":"object"},"taxRelation":{"default":"AND","enum":["AND","OR"],"type":"string"}}}');(0,o.registerBlockType)(x,{edit:function(e){let{attributes:{backfillPosts:t=[],deduplication:n="inherit",maxNumberOfPosts:o=10,minNumberOfPosts:a=1,numberOfPosts:c=5,offset:g=0,posts:y=[],postTypes:v=["post"],searchTerm:b="",terms:_={},termRelations:A={},taxRelation:w="AND"},setAttributes:x}=e;const{wpCurateQueryBlock:{allowedPostTypes:S=[],allowedTaxonomies:E=[]}={}}=window,k=[{label:(0,h.__)("AND","wp-curate"),value:"AND"},{label:(0,h.__)("OR","wp-curate"),value:"OR"}],[R,T]=(0,d.useSelect)((e=>{const t=e("core/editor"),n=t.getEditedPostAttribute("type"),r=t.getEditedPostAttribute("meta");return[Boolean(r?.wp_curate_deduplication),n?e("core").getPostType(n):null]})),I=function(e,t){const[n,o]=r.useState(e);return r.useEffect((()=>{const t=setTimeout((()=>{o(e)}),500);return()=>{clearTimeout(t)}}),[e,500]),n}(null!=b?b:""),[N,O]=(0,f.useState)({}),[P,L]=(0,f.useState)({}),j=E.filter((e=>_[e]?.length>0)).length,D=function(e,t,n,r,o){const s=e.filter((e=>t[e]?.length>0)).length,i=[];return Object.keys(n).length>0&&(e.forEach((e=>{if(t[e]?.length>0){const o=n[e].rest_base;o&&(i.push(`${o}[terms]=${t[e].map((e=>e.id)).join(",")}`),""!==r[e]&&void 0!==r[e]&&i.push(`${o}[operator]=${r[e]}`))}})),s>1&&i.push(`tax_relation=${o}`)),i.join("&")}(E,_,N,A,w),U=y.map((e=>null!=e?e:null)).join(","),M=v.join(",");(0,f.useEffect)((()=>{(async()=>{u()({path:"/wp/v2/taxonomies"}).then((e=>{O(e)}))})()}),[]),(0,f.useEffect)((()=>{(async()=>{u()({path:"/wp/v2/types"}).then((e=>{L(e)}))})()}),[]),(0,f.useEffect)((()=>{Object.keys(N).length<=0||(async()=>{let e=(0,m.addQueryArgs)("/wp/v2/posts",{search:I,offset:g,type:M,status:"publish",per_page:20});e+=`&${D}`,u()({path:e}).then((e=>{const t=e.map((e=>e.id));x({backfillPosts:t})}))})()}),[I,D,g,M,N,x]),(0,f.useEffect)((()=>{C()}),[U,t,c,x,M,R,n]);const B=(e,t)=>{const n=[...y];n.splice(t,1,e),x({posts:n})};for(let e=0;e{S.includes(e)&&F.push({label:P[e].name,value:e})})),(0,r.createElement)(f.Fragment,null,(0,r.createElement)("div",{...(0,s.useBlockProps)()},(0,r.createElement)(s.InnerBlocks,{template:[["core/post-template",{},[["wp-curate/post",{},[["core/post-title",{isLink:!0}],["core/post-excerpt",{}]]]]]]})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(p.PanelBody,{title:(0,h.__)("Setup","wp-curate"),initialOpen:!0},void 0!==a&&a!==o?(0,r.createElement)(p.RangeControl,{label:(0,h.__)("Number of Posts","wp-curate"),help:(0,h.__)("The maximum number of posts to show.","wp-curate"),value:c,onChange:e=>{x({numberOfPosts:e,posts:y.slice(0,e)})},min:a,max:o}):null,(0,r.createElement)(p.RangeControl,{label:(0,h.__)("Offset","wp-curate"),help:(0,h.__)("The number of posts to pass over.","wp-curate"),onChange:e=>x({offset:e}),value:g,min:0,max:20})),(0,r.createElement)(p.PanelBody,{title:(0,h.__)("Select Posts","wp-curate"),initialOpen:!1,className:"manual-posts"},y.map(((e,t)=>(0,r.createElement)(p.PanelRow,{key:t,className:l()("manual-posts__container",{"manual-posts__container--selected":y[t]})},(0,r.createElement)("span",{className:"manual-posts__counter"},t+1),(0,r.createElement)(i.PostPicker,{allowedTypes:S,onReset:()=>B(0,t),onUpdate:e=>{B(e,t)},value:y[t]||0,className:"manual-posts__picker"}))))),(0,r.createElement)(p.PanelBody,{title:(0,h.__)("Query Parameters","wp-curate"),initialOpen:!1},(0,r.createElement)(i.Checkboxes,{label:(0,h.__)("Post Types","wp-curate"),value:v,onChange:e=>x({postTypes:e}),options:F}),Object.keys(N).length>0?E.map((e=>{var t,n;return(0,r.createElement)(f.Fragment,{key:e},(0,r.createElement)(i.TermSelector,{label:N[e].name||e,subTypes:[e],selected:null!==(t=_[e])&&void 0!==t?t:[],onSelect:t=>((e,t)=>{const n=t.map((e=>({id:e.id,title:e.title,url:e.url,type:e.type}))),r={..._,[e]:n};x({terms:r})})(e,t),multiple:!0}),_[e]?.length>1?(0,r.createElement)(p.SelectControl,{label:(0,h.sprintf)((0,h.__)("%s Relation","wp-curate"),N[e].name||e),help:(0,h.__)("AND: Posts must have all selected terms. OR: Posts may have one or more selected terms.","wp-curate"),options:k,onChange:t=>((e,t)=>{const n={...A,[e]:t};x({termRelations:n})})(e,t),value:null!==(n=A[e])&&void 0!==n?n:"OR"}):null,(0,r.createElement)("hr",null))})):null,j>1?(0,r.createElement)(p.SelectControl,{label:(0,h.__)("Taxonomy Relation","wp-curate"),help:(0,h.__)("AND: Posts must meet all selected taxonomy requirements. OR: Posts may have meet one or more selected taxonomy requirements.","wp-curate"),options:k,onChange:e=>x({taxRelation:e}),value:w}):null,(0,r.createElement)(p.TextControl,{label:(0,h.__)("Search Term","wp-curate"),onChange:e=>x({searchTerm:e}),value:b}))),(0,r.createElement)(s.InspectorControls,{group:"advanced"},(0,r.createElement)(p.RadioControl,{label:(0,h.__)("Deduplication","wp-curate"),help:(0,h.__)("Customize whether posts that have already appeared in previous query blocks can appear again in this block.","wp-curate"),options:[{label:(0,f.createInterpolateElement)((0,h.sprintf)((0,h.__)("Inherit deduplication setting from this %1$s (currently %2$s)","wp-curate"),T?T.labels.singular_name:"post",`${R?(0,h.__)("enabled","wp-curate"):(0,h.__)("disabled","wp-curate")}`),{strong:(0,r.createElement)("strong",null)}),value:"inherit"},{label:(0,h.__)("Never exclude posts appearing in previous query blocks","wp-curate"),value:"never"}],onChange:e=>x({deduplication:e}),selected:n})))},save:()=>{const e=s.useBlockProps.save();return(0,r.createElement)("div",{...e},(0,r.createElement)(s.InnerBlocks.Content,null))}})},184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t=s)&&Object.keys(r.O).every((function(e){return r.O[e](n[l])}))?n.splice(l--,1):(a=!1,s0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[n,o,s]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={477:0,566:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,s,i=n[0],a=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var u=l(r)}for(t&&t(n);cshould_register_block() ) { + return; + } + + // Register the block by passing the location of block.json. + register_block_type( + __DIR__, + [ + 'render_callback' => 'wp_curate_render_query_block', + ], + ); + + /** + * Filter the post types that can be used in the Query block. + */ + $allowed_post_types = apply_filters( 'wp_curate_allowed_post_types', [ 'post' ] ); + + /** + * Filter the taxonomies that can be used in the Query block. + */ + $allowed_taxonomies = apply_filters( 'wp_curate_allowed_taxonomies', [ 'category', 'post_tag' ] ); + + wp_localize_script( + 'wp-curate-query-editor-script', + 'wpCurateQueryBlock', + [ + 'allowedPostTypes' => $allowed_post_types, + 'allowedTaxonomies' => $allowed_taxonomies, + ] + ); +} +add_action( 'init', 'wp_curate_query_block_init' ); + +/** + * Renders the `wp-curate/query` block on the server. + * + * @param array $attributes Block attributes. + * @param string $content Block default content. + * @return string Block output. + */ +function wp_curate_render_query_block( $attributes, $content ): string { + $proc = new WP_HTML_Tag_Processor( $content ); + + /* + * If a query returns no posts -- denoted by the absence of a list in the content -- don't + * show any of the inner content. + * + * This approach is not great because the inner blocks will have been rendered already and their + * scripts and styles will have been enqueued, but it's not clear what other options are + * available because the post template inner block needs to render for us to know whether there + * are any posts to begin with. + */ + return $proc->next_tag( [ 'tag_name' => 'ul' ] ) === true || $proc->next_tag( [ 'tag_name' => 'ol' ] ) === true ? $content : ''; +} diff --git a/build/query/style-index.css b/build/query/style-index.css new file mode 100644 index 00000000..de232b2b --- /dev/null +++ b/build/query/style-index.css @@ -0,0 +1 @@ +.wp-block-wp-curate-query{min-height:50px;padding:2px} diff --git a/build/slotfills/index.asset.php b/build/slotfills/index.asset.php new file mode 100644 index 00000000..9f2f3574 --- /dev/null +++ b/build/slotfills/index.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-i18n', 'wp-plugins'), 'version' => '6b81853c3c40aada0247'); diff --git a/build/slotfills/index.js b/build/slotfills/index.js new file mode 100644 index 00000000..81c3b2e2 --- /dev/null +++ b/build/slotfills/index.js @@ -0,0 +1,42 @@ +!function(){var e={373:function(e){var t;self,t=()=>(()=>{var e={779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.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:#f5f5f5}.alley-scripts-post-picker__post.is-selected{background-color:#f5f5f5}.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: #f5f5f5;\n }\n\n &.is-selected {\n background-color: #f5f5f5;\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 a=i},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".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:"AAAA,2BACE,UAAA,CAGF,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".components-modal__content {\n width: 90vw;\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 a=i},458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.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 a=i},609: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,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},272: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),s="/*# ".concat(o," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},368:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:s,seal:i,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(e){return e}),i||(i=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 u=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),f=w(String.prototype.toLowerCase),h=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),v=w(String.prototype.trim),A=w(RegExp.prototype.test),b=(_=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 s=r.length;for(;s--;){let t=r[s];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[s]=e),t=e)}e[t]=!0}return e}function x(t){const n=a(null);for(const[r,s]of e(t))void 0!==o(t,r)&&(n[r]=s);return n}function S(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const E=s(["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"]),k=s(["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=s(["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"]),T=s(["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"]),I=s(["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"]),N=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),P=s(["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"]),L=s(["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"]),j=s(["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"]),D=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=i(/<%[\w\W]*|[\w\W]*%>/gm),B=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),q=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:M,TMPLIT_EXPR:B,DATA_ATTR:F,ARIA_ATTR:z,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:H,DOCTYPE_NAME:W});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 i=o,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:_,Node:w,Element:U,NodeFilter:M,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,H=U.prototype,Y=S(H,"cloneNode"),V=S(H,"nextSibling"),Z=S(H,"childNodes"),K=S(H,"parentNode");if("function"==typeof _){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Q,J="";const{implementation:X,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=o,{importNode:re}=i;let oe={};r.isSupported="function"==typeof e&&"function"==typeof K&&X&&void 0!==X.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:ie,TMPLIT_EXPR:ae,DATA_ATTR:le,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:pe}=G;let{IS_ALLOWED_URI:de}=G,fe=null;const he=C({},[...E,...k,...R,...I,...O]);let me=null;const ge=C({},[...P,...L,...j,...D]);let ye=Object.seal(a(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}})),ve=null,Ae=null,be=!0,_e=!0,we=!1,Ce=!0,xe=!1,Se=!1,Ee=!1,ke=!1,Re=!1,Te=!1,Ie=!1,Ne=!0,Oe=!1,Pe=!0,Le=!1,je={},De=null;const Ue=C({},["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 Me=null;const Be=C({},["audio","video","img","source","image","track"]);let Fe=null;const ze=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let We=He,Ge=!1,Ye=null;const Ve=C({},[qe,$e,He],h);let Ze=null;const Ke=["application/xhtml+xml","text/html"];let Qe=null,Je=null;const Xe=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(!Je||Je!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ze=Ze=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Qe="application/xhtml+xml"===Ze?h:f,fe="ALLOWED_TAGS"in e?C({},e.ALLOWED_TAGS,Qe):he,me="ALLOWED_ATTR"in e?C({},e.ALLOWED_ATTR,Qe):ge,Ye="ALLOWED_NAMESPACES"in e?C({},e.ALLOWED_NAMESPACES,h):Ve,Fe="ADD_URI_SAFE_ATTR"in e?C(x(ze),e.ADD_URI_SAFE_ATTR,Qe):ze,Me="ADD_DATA_URI_TAGS"in e?C(x(Be),e.ADD_DATA_URI_TAGS,Qe):Be,De="FORBID_CONTENTS"in e?C({},e.FORBID_CONTENTS,Qe):Ue,ve="FORBID_TAGS"in e?C({},e.FORBID_TAGS,Qe):{},Ae="FORBID_ATTR"in e?C({},e.FORBID_ATTR,Qe):{},je="USE_PROFILES"in e&&e.USE_PROFILES,be=!1!==e.ALLOW_ARIA_ATTR,_e=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Se=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Te=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Ne=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Le=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||q,We=e.NAMESPACE||He,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(_e=!1),Te&&(Re=!0),je&&(fe=C({},[...O]),me=[],!0===je.html&&(C(fe,E),C(me,P)),!0===je.svg&&(C(fe,k),C(me,L),C(me,D)),!0===je.svgFilters&&(C(fe,R),C(me,L),C(me,D)),!0===je.mathMl&&(C(fe,I),C(me,j),C(me,D))),e.ADD_TAGS&&(fe===he&&(fe=x(fe)),C(fe,e.ADD_TAGS,Qe)),e.ADD_ATTR&&(me===ge&&(me=x(me)),C(me,e.ADD_ATTR,Qe)),e.ADD_URI_SAFE_ATTR&&C(Fe,e.ADD_URI_SAFE_ATTR,Qe),e.FORBID_CONTENTS&&(De===Ue&&(De=x(De)),C(De,e.FORBID_CONTENTS,Qe)),Pe&&(fe["#text"]=!0),Se&&C(fe,["html","head","body"]),fe.table&&(C(fe,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,J=Q.createHTML("")}else void 0===Q&&(Q=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}}($,l)),null!==Q&&"string"==typeof J&&(J=Q.createHTML(""));s&&s(e),Je=e}},nt=C({},["mi","mo","mn","ms","mtext"]),rt=C({},["foreignobject","desc","title","annotation-xml"]),ot=C({},["title","style","font","a","script"]),st=C({},k);C(st,R),C(st,T);const it=C({},I);C(it,N);const at=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},lt=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!me[e])if(Re||Te)try{at(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ct=function(e){let t=null,n=null;if(ke)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&We===He&&(e=''+e+"");const r=Q?Q.createHTML(e):e;if(We===He)try{t=(new z).parseFromString(r,Ze)}catch(e){}if(!t||!t.documentElement){t=X.createDocument(We,"template",null);try{t.documentElement.innerHTML=Ge?J:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),We===He?ne.call(t,Se?"html":"body")[0]:Se?t.documentElement:s},ut=function(e){return ee.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},pt=function(e){return"function"==typeof w&&e instanceof w},dt=function(e,t,n){oe[e]&&u(oe[e],(e=>{e.call(r,t,n,Je)}))},ft=function(e){let t=null;if(dt("beforeSanitizeElements",e,null),(n=e)instanceof F&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return at(e),!0;var n;const o=Qe(e.nodeName);if(dt("uponSanitizeElement",e,{tagName:o,allowedTags:fe}),e.hasChildNodes()&&!pt(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return at(e),!0;if(!fe[o]||ve[o]){if(!ve[o]&&mt(o)){if(ye.tagNameCheck instanceof RegExp&&A(ye.tagNameCheck,o))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(o))return!1}if(Pe&&!De[o]){const t=K(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(Y(n[r],!0),V(e))}return at(e),!0}return e instanceof U&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:We,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===He?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(st[n]):e.namespaceURI===qe?t.namespaceURI===He?"math"===n:t.namespaceURI===$e?"math"===n&&rt[r]:Boolean(it[n]):e.namespaceURI===He?!(t.namespaceURI===$e&&!rt[r])&&!(t.namespaceURI===qe&&!nt[r])&&!it[n]&&(ot[n]||!st[n]):!("application/xhtml+xml"!==Ze||!Ye[e.namespaceURI]))}(e)?(at(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,u([se,ie,ae],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),dt("afterSanitizeElements",e,null),!1):(at(e),!0)},ht=function(e,t,n){if(Ne&&("id"===t||"name"===t)&&(n in o||n in Xe))return!1;if(_e&&!Ae[t]&&A(le,t));else if(be&&A(ce,t));else if(!me[t]||Ae[t]){if(!(mt(e)&&(ye.tagNameCheck instanceof RegExp&&A(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&A(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&A(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(Fe[t]);else if(A(de,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Me[e])if(we&&!A(ue,g(n,pe,"")));else if(n)return!1;return!0},mt=function(e){return e.indexOf("-")>0},gt=function(e){dt("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 s=t[o],{name:i,namespaceURI:a,value:l}=s,c=Qe(i);let d="value"===i?l:v(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,dt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(lt(i,e),!n.keepAttr)continue;if(!Ce&&A(/\/>/i,d)){lt(i,e);continue}xe&&u([se,ie,ae],(e=>{d=g(d,e," ")}));const f=Qe(e.nodeName);if(ht(f,c,d)){if(!Oe||"id"!==c&&"name"!==c||(lt(i,e),d="user-content-"+d),Q&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(a);else switch($.getAttributeType(f,c)){case"TrustedHTML":d=Q.createHTML(d);break;case"TrustedScriptURL":d=Q.createScriptURL(d)}try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),p(r.removed)}catch(e){}}}dt("afterSanitizeAttributes",e,null)},yt=function e(t){let n=null;const r=ut(t);for(dt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)dt("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof c&&e(n.content),gt(n));dt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,a=null;if(Ge=!e,Ge&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ee||tt(t),r.removed=[],"string"==typeof e&&(Le=!1),Le){if(e.nodeName){const t=Qe(e.nodeName);if(!fe[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)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&&!xe&&!Se&&-1===e.indexOf("<"))return Q&&Ie?Q.createHTML(e):e;if(n=ct(e),!n)return Re?null:Ie?J:""}n&&ke&&at(n.firstChild);const l=ut(Le?e:n);for(;s=l.nextNode();)ft(s)||(s.content instanceof c&&yt(s.content),gt(s));if(Le)return e;if(Re){if(Te)for(a=te.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(me.shadowroot||me.shadowrootmode)&&(a=re.call(i,a,!0)),a}let p=Se?n.outerHTML:n.innerHTML;return Se&&fe["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(W,n.ownerDocument.doctype.name)&&(p="\n"+p),xe&&u([se,ie,ae],(e=>{p=g(p,e," ")})),Q&&Ie?Q.createHTML(p):p},r.setConfig=function(){tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ee=!0},r.clearConfig=function(){Je=null,Ee=!1},r.isValidAttribute=function(e,t,n){Je||tt({});const r=Qe(e),o=Qe(t);return ht(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],d(oe[e],t))},r.removeHook=function(e){if(oe[e])return p(oe[e])},r.removeHooks=function(e){oe[e]&&(oe[e]=[])},r.removeAllHooks=function(){oe={}},r}()}()},286: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={},s=0,i={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(_(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!_(r.transform)&&r.transform,r.worker&&i.WORKERS_SUPPORTED){var l=function(){if(!i.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),i.BLOB_URL||(i.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(a);return l.onmessage=g,l.id=s++,o[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=_(r.step),r.chunk=_(r.chunk),r.complete=_(r.complete),r.error=_(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return i.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 p(r)):!0===n.readable&&_(n.read)&&_(n.on)?f=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",s="\r\n",a='"',l=a+a,c=!1,u=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.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&&(s=t.newline),"string"==typeof t.quoteChar&&(a=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");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"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(u||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||u),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 i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:a,workerId:i.WORKER_ID,finished:c});else if(_(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!_(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.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=b(this._chunkLoaded,this),t.onerror=b(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 u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=i.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=b(this._chunkLoaded,this),t.onerror=b(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 p(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 d(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=b((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=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((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),s=-o,a=/^\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,u=0,p=0,d=!1,f=!1,g=[],y={data:[],errors:[],meta:{}};if(_(e.step)){var v=e.step;e.step=function(t){if(y=t,C())w();else{if(w(),0===y.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!b(e)}))),C()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;C()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(i=e.transform(i,s)),i=x(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(r>g.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,p+n):r=r.length/2?"\r\n":"\r"}(o,l)),r=!1,e.delimiter)_(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,o,s){var a,l,c,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var p=0;p=a)return G(!0)}else for(B=u,u++;;){if(-1===(B=i.indexOf(t,B+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:u}),H();if(B===m-1)return H(i.substring(u,B).replace(M,t));if(t!==c||i[B+1]!==c){if(t===c||0===B||i[B-1]!==c){-1!==D&&D=a)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:u}),B++}}else B++}return H();function q(e){b.push(e),x=u}function $(e){var t=0;if(-1!==e){var n=i.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function H(e){return f||(void 0===e&&(e=i.substring(u)),C.push(e),u=m,q(C),A&&Y()),G()}function W(e){u=e,q(C),C=[],U=i.indexOf(r,u)}function G(e){return{data:b,errors:w,meta:{delimiter:n,linebreak:r,aborted:p,truncated:!!e,cursor:x+(d||0)}}}function Y(){s(G()),b=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return u}}function g(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 s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(_(n.userStep)){for(var i=0;i{"use strict";var r=n(586);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,i){if(i!==r){var a=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 a.name="Invariant Violation",a}}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:s,resetWarningCache:o};return n.PropTypes=n,n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},837:(e,t,n)=>{"use strict";var r=n(196),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=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,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},322:(e,t,n)=>{"use strict";e.exports=n(837)},665: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 s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var a=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)}},173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},36: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 s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464: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))}}},196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.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:()=>$t,CSVUploader:()=>Jt,Checkboxes:()=>Gt,ImagePicker:()=>nn,MediaPicker:()=>cn,PostPicker:()=>ar,PostSelector:()=>cr,SafeHtml:()=>fn,Selector:()=>_r,TermSelector:()=>Cr,VideoPicker:()=>kr,getMediaUrl:()=>Qt,parseCSVFile:()=>Kt,useCurrentPostId:()=>En,useDebounce:()=>gn,useHasInnerBlocks:()=>yn,useInnerBlocks:()=>An,useInnerBlocksAttributes:()=>_n,useInnerBlocksCount:()=>bn,useInnerBlocksIndex:()=>vn,useMedia:()=>wn,useParentBlock:()=>Cn,useParentBlockAttributes:()=>xn,usePost:()=>Sn,usePostById:()=>Tn,usePostMeta:()=>On,usePostMetaValue:()=>Pn,usePosts:()=>Ln,useTerms:()=>jn});var e=n(322),t=n(980),o=n.n(t),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||G(U)>3?"":" "}function Z(e,t){for(;--t&&q()&&!(U<48||U>102||U>57&&U<65||U>70&&U<97););return W(e,H()+(t<6&&32==$()&&32==q()))}function K(e){for(;q();)switch(U){case e:return D;case 34:case 39:34!==e&&39!==e&&K(U);break;case 40:41===e&&K(e);break;case 92:q()}return D}function Q(e,t){for(;q()&&e+U!==57&&(e+U!==84||47!==$()););return"/*"+W(t,D-1)+"*"+_(47===e?e:q())}function J(e){for(;!G($());)q();return W(e,D)}function X(e,t){for(var n="",r=0;r6)switch(k(e,t+1)){case 109:if(45!==k(e,t+4))break;case 102:return S(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+d+(108==k(e,t+3)?"$3":"$2-$3"))+e;case 115:return~E(e,"stretch")?te(S(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return S(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,s,i,a){return p+n+":"+r+a+(o?p+n+"-span:"+(s?i:+i-+r)+a:"")+e}));case 4949:if(121===k(e,t+6))return S(e,":",":"+f)+e;break;case 6444:switch(k(e,45===k(e,14)?18:11)){case 120:return S(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===k(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+p+"$2box$3")+e;case 100:return S(e,":",":"+p)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return S(e,"scroll-","scroll-snap-")+e}return e}function ne(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:return void(e.return=te(e.value,e.length,n));case v:return X([F(e,{value:S(e.value,"@","@"+f)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(x(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":z(F(e,{props:[S(t,/:(read-\w+)/,":"+d+"$1")]})),z(F(e,{props:[t]})),w(e,{props:O(n,r)});break;case"::placeholder":z(F(e,{props:[S(t,/:(plac\w+)/,":"+f+"input-$1")]})),z(F(e,{props:[S(t,/:(plac\w+)/,":"+d+"$1")]})),z(F(e,{props:[S(t,/:(plac\w+)/,p+"input-$1")]})),z(F(e,{props:[t]})),w(e,{props:O(n,r)})}return""}))}}function re(e){return function(e){return M="",e}(oe("",null,null,null,[""],e=function(e){return P=L=1,j=T(M=e),D=0,[]}(e),0,[0],e))}function oe(e,t,n,r,o,s,i,a,l){for(var c=0,u=0,p=i,d=0,f=0,h=0,m=1,g=1,y=1,v=0,A="",b=o,w=s,C=r,x=A;g;)switch(h=v,v=q()){case 40:if(108!=h&&58==k(x,p-1)){-1!=E(x+=S(Y(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:x+=Y(v);break;case 9:case 10:case 13:case 32:x+=V(h);break;case 92:x+=Z(H()-1,7);continue;case 47:switch($()){case 42:case 47:N(ie(Q(q(),H()),t,n,l),l);break;default:x+="/"}break;case 123*m:a[c++]=T(x)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(x=S(x,/\f/g,"")),f>0&&T(x)-p&&N(f>32?ae(x+";",r,n,p-1,l):ae(S(x," ","")+";",r,n,p-2,l),l);break;case 59:x+=";";default:if(N(C=se(x,t,n,c,u,o,a,A,b=[],w=[],p,s),s),123===v)if(0===u)oe(x,t,C,C,b,s,p,a,w);else switch(99===d&&110===k(x,3)?100:d){case 100:case 108:case 109:case 115:oe(e,C,C,r&&N(se(e,C,C,0,0,o,a,A,o,b=[],p,w),w),o,w,p,a,r?b:w);break;default:oe(x,C,C,C,[""],w,0,a,w)}}c=u=f=0,m=y=1,A=x="",p=i;break;case 58:p=1+T(x),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(U=D>0?k(M,--D):0,L--,10===U&&(L=1,P--),U))continue;switch(x+=_(v),v*m){case 38:y=u>0?1:(x+="\f",-1);break;case 44:a[c++]=(T(x)-1)*y,y=1;break;case 64:45===$()&&(x+=Y(q())),d=$(),u=p=T(A=x+=J(H())),v++;break;case 45:45===h&&2==T(x)&&(m=0)}}return s}function se(e,t,n,r,o,s,i,a,l,c,u,p){for(var d=o-1,f=0===o?s:[""],h=I(f),g=0,y=0,v=0;g0?f[A]+" "+_:S(_,/&\f/g,f[A])))&&(l[v++]=w);return B(e,t,n,0===o?m:a,l,c,u,p)}function ie(e,t,n,r){return B(e,t,n,h,_(U),R(e,2,-2),0,r)}function ae(e,t,n,r,o){return B(e,t,n,g,R(e,0,r),R(e,r+1,-1),r,o)}const le={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 ce="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ue="undefined"!=typeof window&&"HTMLElement"in window,pe=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([])),fe=Object.freeze({}),he=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"]),me=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ge=/(^-|-$)/g;function ye(e){return e.replace(me,"-").replace(ge,"")}var ve=/(a)(d)/gi,Ae=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=Ae(t%52)+n;return(Ae(t%52)+n).replace(ve,"$1-$2")}var _e,we=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ce=function(e){return we(5381,e)};function xe(e){return"string"==typeof e&&!0}var Se="function"==typeof Symbol&&Symbol.for,Ee=Se?Symbol.for("react.memo"):60115,ke=Se?Symbol.for("react.forward_ref"):60112,Re={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Te={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ie={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ne=((_e={})[ke]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_e[Ee]=Ie,_e);function Oe(e){return("type"in(t=e)&&t.type.$$typeof)===Ee?Ie:"$$typeof"in e?Ne[e.$$typeof]:Re;var t}var Pe=Object.defineProperty,Le=Object.getOwnPropertyNames,je=Object.getOwnPropertySymbols,De=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,Me=Object.prototype;function Be(e,t,n){if("string"!=typeof t){if(Me){var r=Ue(t);r&&r!==Me&&Be(e,r,n)}var o=Le(t);je&&(o=o.concat(je(t)));for(var s=Oe(e),i=Oe(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Ve=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 Ye(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=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(i).concat(a,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},s=0;s0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(dt,n).replace(r,c))})),i.prefix&&u.push(ne),u.push(ee);var p=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(ft,""),c=re(s||o?"".concat(s," ").concat(o," { ").concat(l," }"):l);i.namespace&&(c=ht(c,i.namespace));var p,d,f,h=[];return X(c,(p=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),d=I(p),function(e,t,n,r){for(var o="",s=0;s="A"&&e<="Z"};function xt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=qe(r,s),this.staticRulesId=s}else{for(var a=we(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),r=qe(r,d)}}return r},e}(),Nt=l().createContext(void 0);Nt.Consumer;var Ot={};function Pt(e,t,n){var r=ze(e),o=e,i=!xe(e),c=t.attrs,u=void 0===c?de:c,p=t.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":ye(e);Ot[n]=(Ot[n]||0)+1;var r="".concat(n,"-").concat(function(e){return be(Ce(e)>>>0)}("6.1.0"+n+Ot[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):p,f=(void 0===t.displayName&&function(e){xe(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e),t.displayName&&t.componentId?"".concat(ye(t.displayName),"-").concat(t.componentId):t.componentId||d),h=r&&o.attrs?o.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(r&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return g(e,t)&&y(e,t)}}else m=g}var v=new It(n,f,r?o.componentStyle:void 0),A=l().forwardRef((function(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,i=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,p=e.target,d=l().useContext(Nt),f=bt(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var r,o=s(s({},t),{className:void 0,theme:n}),i=0;i2&&pt.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=ot(),r=$e([n&&'nonce="'.concat(n,'"'),"".concat(ce,'="true"'),"".concat("data-styled-version",'="').concat("6.1.0",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw Ye(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Ye(2);var n=((t={})[ce]="",t["data-styled-version"]="6.1.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=ot();return r&&(n.nonce=r),[l().createElement("style",s({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new pt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Ye(2);return l().createElement(_t,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Ye(3)}}(),"__sc-".concat(ce,"__");const Ft=Bt.div` + height: auto; + width: 100%; +`,zt=({src:t})=>(0,e.jsx)(Ft,{children:(0,e.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:t})});zt.propTypes={src:o().string.isRequired};const qt=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(cn,{allowedTypes:["audio"],className:t,icon:"format-audio",onReset:n,onUpdate:r,onUpdateURL:o,preview:zt,value:s,valueURL:i});qt.defaultProps={className:"",onUpdateURL:null,valueURL:""},qt.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const $t=qt,Ht=window.wp.components,Wt=({label:t,value:n,options:r,onChange:o})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ht.BaseControl,{label:t}),r.map((t=>(0,e.jsx)(Ht.CheckboxControl,{label:t.label,checked:n.includes(t.value),onChange:e=>{o(e?[...n,t.value]:[...n.filter((e=>e!==t.value))])}})))]});Wt.propTypes={label:o().string.isRequired,value:o().arrayOf(o().string).isRequired,options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().string.isRequired})).isRequired,onChange:o().func.isRequired};const Gt=Wt,Yt=window.wp.i18n;var Vt=n(286),Zt=n.n(Vt);const Kt=e=>new Promise(((t,n)=>{Zt().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})})),Qt=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:o=""}={},full:{url:s=""}={}}={},source_url:i="",url:a=""}=e;return o||n||s||r||a||i||""};class Jt extends l().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]&&Kt(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,Yt.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,Yt.__)("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:t="",success:n=""}=this.state;return(0,e.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,e.jsx)("h2",{children:(0,Yt.__)("Upload CSV","alley-scripts")}),(0,e.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==t?(0,e.jsxs)("div",{style:{color:"#c00"},children:[(0,e.jsx)("strong",{children:(0,Yt.__)("Error:","alley-scripts")})," ",t]}):null,""!==n?(0,e.jsxs)("div",{style:{color:"#0c0"},children:[(0,e.jsx)("strong",{children:(0,Yt.__)("Success:","alley-scripts")})," ",n]}):null,(0,e.jsx)("div",{children:(0,e.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,e.jsx)("p",{children:(0,Yt.__)("Select a file to load data.","alley-scripts")}),(0,e.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}Jt.defaultProps={callback:null},Jt.propTypes={attributeName:o().string.isRequired,callback:o().func,setAttributes:o().func.isRequired};const Xt=Bt.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; +`,en=({src:t})=>(0,e.jsx)(Xt,{children:(0,e.jsx)("img",{alt:(0,Yt.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:t,title:(0,Yt.__)("Edit image","alley-scripts")})});en.propTypes={src:o().string.isRequired};const tn=({className:t,imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,value:a,valueURL:l})=>(0,e.jsx)(cn,{allowedTypes:["image"],className:t,icon:"format-image",imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,preview:en,value:a,valueURL:l});tn.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},tn.propTypes={className:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const nn=tn,rn=window.wp.blockEditor,on=window.wp.data,sn=Bt.div` + display: block; + position: relative; +`,an=Bt.div` + background: white; + border: 1px solid black; + padding: 1em; +`,ln=({allowedTypes:t,className:n,icon:r,imageSize:o,displayControlsInToolbar:s,onReset:i,onUpdate:a,onUpdateURL:l,preview:c,value:u,valueURL:p})=>{const{media:d}=(0,on.useSelect)((e=>({media:u?e("core").getMedia(u):void 0})),[u]);if(0!==u&&null===d)return(0,e.jsx)(Ht.Spinner,{});const f=d?Qt(d,o):p;return f?(0,e.jsxs)(sn,{className:n,children:[c?(0,e.jsx)(c,{src:f}):(0,e.jsxs)(an,{className:"alley-scripts-media-picker__preview",children:[(0,e.jsx)("p",{children:(0,Yt.__)("Selected file:","alley-scripts")}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:f,children:f})})]}),s?(0,e.jsx)(rn.BlockControls,{group:"other",children:(0,e.jsx)(rn.MediaReplaceFlow,{name:(0,Yt.__)("Edit Media","alley-scripts"),mediaId:u,mediaURL:f,allowedTypes:t,onSelect:a,onSelectURL:l,children:(0,e.jsx)(Ht.ToolbarButton,{isDestructive:!0,text:(0,Yt.__)("Remove","alley-scripts"),onClick:i})})}):(0,e.jsx)(Ht.Button,{variant:"primary",onClick:i,children:(0,Yt.__)("Reset","alley-scripts")})]}):(0,e.jsx)(sn,{className:n,children:(0,e.jsx)(rn.MediaPlaceholder,{allowedTypes:t,disableMediaButtons:!!p,icon:(0,e.jsx)(rn.BlockIcon,{icon:r}),onSelect:a,onSelectURL:l,value:{id:u,src:f}})})};ln.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},ln.propTypes={allowedTypes:o().arrayOf(o().string),className:o().string,icon:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,preview:o().element,value:o().number.isRequired,valueURL:o().string};const cn=ln;var un=n(368),pn=n.n(un);const dn=({className:t,html:n,tag:r})=>(0,e.jsx)(r,{className:t,dangerouslySetInnerHTML:{__html:pn().sanitize(n)}});dn.defaultProps={className:""},dn.propTypes={className:o().string,html:o().string.isRequired,tag:o().string.isRequired};const fn=dn,hn=window.wp.element,mn=window.wp.url,gn=(e,t)=>{const[n,r]=(0,hn.useState)(e);return(0,hn.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},yn=e=>bn(e)>0,vn=e=>{const t=Cn(e),n=An(t);return n?n.findIndex((t=>t.clientId===e)):-1},An=e=>(0,on.useSelect)((t=>t(rn.store).getBlocks(e)),[e]),_n=e=>An(e).map((e=>e.attributes)),bn=e=>An(e).length,wn=e=>(0,on.useSelect)((t=>t("core").getMedia(e)),[e]),Cn=e=>(0,on.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:r}=t(rn.store),o=r(e);return o?n(o):null}),[e]),xn=e=>(0,on.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:r}=t(rn.store),o=r(e);return o?n(o):null}),[e]),Sn=(e,t="post")=>(0,on.useSelect)((n=>n("core").getEntityRecord("postType",t,e)),[e,t]),En=()=>(0,on.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[]),kn=window.wp.apiFetch;var Rn=n.n(kn);const Tn=(e,t=null)=>{const[n,r]=(0,hn.useState)({});return(0,hn.useEffect)((()=>{e&&!n[e]&&(async()=>{if(t){const n=await t(e);n?r((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,mn.addQueryArgs)("/wp/v2/search",{include:e}),n=await Rn()({path:t});r((t=>({...t,[e]:n[0].subtype})))}})()}),[e]),Sn(e,n[e]??"")},In=window.wp.coreData,Nn=window.lodash,On=(e=null,t=null)=>{const n=(0,on.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[r,o]=(0,In.useEntityProp)("postType",n,"meta",t),s="function"==typeof o?o:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof r?r:{},e=>s((0,Nn.cloneDeep)(e))]},Pn=(e,t=null,n=null)=>{const[r,o]=On(t,n);return[r[e],t=>o({...r,[e]:t})]},Ln=(e,t="post")=>(0,on.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t]),jn=(e=null,t=null,n="categories")=>{const r=(0,on.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[o,s]=(0,In.useEntityProp)("postType",r,n,t);return[o,e=>s(e)]};var Dn=n(62),Un=n.n(Dn),Mn=n(36),Bn=n.n(Mn),Fn=n(793),zn=n.n(Fn),qn=n(892),$n=n.n(qn),Hn=n(173),Wn=n.n(Hn),Gn=n(464),Yn=n.n(Gn),Vn=n(992),Zn={};Zn.styleTagTransform=Yn(),Zn.setAttributes=$n(),Zn.insert=zn().bind(null,"head"),Zn.domAPI=Bn(),Zn.insertStyleElement=Wn(),Un()(Vn.Z,Zn),Vn.Z&&Vn.Z.locals&&Vn.Z.locals;var Kn=n(779),Qn=n.n(Kn),Jn=n(905),Xn={};Xn.styleTagTransform=Yn(),Xn.setAttributes=$n(),Xn.insert=zn().bind(null,"head"),Xn.domAPI=Bn(),Xn.insertStyleElement=Wn(),Un()(Jn.Z,Xn),Jn.Z&&Jn.Z.locals&&Jn.Z.locals;const er=window.wp.htmlEntities,tr=Bt.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,nr=({title:t,postType:n,attachmentID:r})=>{const o=wn(r),s=o?.media_details?.sizes?.thumbnail?.source_url,i=o?.alt_text??"";return(0,e.jsxs)(tr,{children:[s?(0,e.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:s,alt:i}):null,(0,e.jsx)(fn,{html:(0,er.decodeEntities)(t),className:"post-picker-result-title",tag:"strong"}),(0,Yt.sprintf)(" (%s)",n)]})},rr=({baseUrl:t,searchRender:n,selected:r,setSelected:o,suppressPostIds:s=[]})=>{const[i,a]=(0,hn.useState)(!1),[l,c]=(0,hn.useState)([]),[u,p]=(0,hn.useState)(!1),[d,f]=(0,hn.useState)(0),[h,m]=(0,hn.useState)({searchValue:"",page:1}),g=(0,hn.useCallback)((async(e,n=!1)=>{if(e.searchValue&&e.searchValue.length<=2)return;const r=function(){let n=(0,mn.addQueryArgs)(t,{page:e.page,_embed:1,exclude:s.join(",")});return e.searchValue&&e.searchValue.length>2&&(n=(0,mn.addQueryArgs)(n,{search:e.searchValue})),n}();a(!0);const o=await Rn()({path:r,parse:!1});f(parseInt(o.headers.get("X-WP-TotalPages"),10));const i=await o.json();let u=i;e.page>1&&(u=[...l,...i]),n||(c(u),a(!1))}),[l,t,s]);return(0,hn.useEffect)((()=>{let e=!1;return u||(p(!0),g(h,e)),()=>{e=!0}}),[g,u,h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ht.TextControl,{value:h.searchValue,placeholder:(0,Yt.__)("Search...","alley-scripts"),label:(0,Yt.__)("Search","alley-scripts"),onChange:e=>{const t={...h,searchValue:e,page:1};m(t),g(t)}}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[l?l.map((t=>(0,e.jsx)(Ht.Button,{className:Qn()({"alley-scripts-post-picker__post":!0,"is-selected":t.id===r}),onClick:()=>o(t.id),children:n?n(t):(0,e.jsx)(nr,{title:t.title,postType:t.subtype,attachmentID:t?._embedded?.self[0]?.featured_media})},t.id))):null,i?(0,e.jsx)(Ht.Spinner,{}):null,d>0&&h.page{const e={...h,page:h.page+1};m(e),g(e)},children:(0,Yt.__)("Load More","alley-scripts")})}):null]})]})},or=({baseUrl:t,closeModal:n,modalTitle:r,onUpdate:o,searchRender:s,suppressPostIds:i=[]})=>{const[a,l]=(0,hn.useState)();return(0,e.jsxs)(Ht.Modal,{isDismissible:!0,title:r,onRequestClose:n,closeButtonLabel:"Close",children:[(0,e.jsx)(rr,{baseUrl:t,selected:a??0,setSelected:l,searchRender:s,suppressPostIds:i}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:n,children:(0,Yt.__)("Cancel","alley-scripts")}),(0,e.jsx)(Ht.Button,{variant:"primary",onClick:()=>{a&&(o(a),n())},disabled:!a,children:(0,Yt.__)("Select","alley-scripts")})]})]})},sr=Bt.div` + display: block; + position: relative; +`,ir=Bt.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,ar=({allowedTypes:t,className:n,getPostType:r,modalTitle:o=(0,Yt.__)("Select Post","alley-scripts"),onReset:s,onUpdate:i,params:a={},previewRender:l,replaceText:c=(0,Yt.__)("Replace","alley-scripts"),resetText:u=(0,Yt.__)("Reset","alley-scripts"),searchEndpoint:p="/wp/v2/search",searchRender:d,selectText:f=(0,Yt.__)("Select","alley-scripts"),suppressPostIds:h=[],title:m="",value:g=0})=>{const[y,v]=(0,hn.useState)(!1),A=(0,mn.addQueryArgs)(p,{type:"post",subtype:t??"any",...a}),b=Tn(g,r),{featured_media:_,title:{rendered:w=""}={},type:C=""}=b||{},x=()=>{v(!0)};return 0!==g&&null===b?(0,e.jsx)(Ht.Spinner,{}):(0,e.jsxs)(sr,{className:n,children:[m?(0,e.jsx)("h4",{children:m}):null,0!==g&&null!==b?(0,e.jsxs)(e.Fragment,{children:[void 0!==l?l(b):(0,e.jsx)(ir,{children:(0,e.jsx)(nr,{title:w,postType:C,attachmentID:_})}),(0,e.jsxs)(Ht.ButtonGroup,{children:[(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:s,style:{margin:"0 4px"},children:u}),(0,e.jsx)(Ht.Button,{variant:"secondary",onClick:x,style:{margin:"0 4px"},children:c})]})]}):(0,e.jsx)(Ht.Button,{onClick:x,variant:"secondary",children:f}),y?(0,e.jsx)(or,{closeModal:()=>{v(!1)},baseUrl:A,modalTitle:o,onUpdate:i,searchRender:d,suppressPostIds:h}):null]})},lr=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(_r,{type:"post",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});lr.defaultProps={className:"",emptyLabel:(0,Yt.__)("No posts found","alley-scripts"),label:(0,Yt.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},lr.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const cr=lr,ur={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let pr;const dr=new Uint8Array(16);function fr(){if(!pr&&(pr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pr(dr)}const hr=[];for(let e=0;e<256;++e)hr.push((e+256).toString(16).slice(1));const mr=function(e,t,n){if(ur.randomUUID&&!t&&!e)return ur.randomUUID();const r=(e=e||{}).random||(e.rng||fr)();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 hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]}(r)},gr=({emptyLabel:t,error:n,id:r,isOpen:o,labelledbyId:s,loading:i,onSelect:a,options:l,selectedItems:c,threshold:u,value:p})=>{if(!i&&(""===p||u>p.length))return null;let d="",f="";return i?(d="loading",f=(0,Yt.__)("Loading...","alley-scripts")):n?(d="error",f=n):i||0!==l.length||(d="no-posts",f=t),i||!i&&(p&&0===l.length||n)?(0,e.jsx)("div",{"aria-busy":!0,className:Qn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("div",{className:Qn()("autocomplete__dropdown--notice",`autocomplete__${d}`),children:f})}):(0,e.jsx)("div",{className:Qn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("ul",{role:"listbox","aria-labelledby":s,id:r,className:Qn()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((t=>(0,e.jsx)("li",{className:"autocomplete__list--item",children:(0,e.jsx)(Ht.Button,{onClick:()=>a(t),type:"button",disabled:c.some((e=>e.id===t.id)),isTertiary:!0,children:t.title})},t.id)))})})};gr.propTypes={emptyLabel:o().string.isRequired,error:o().string.isRequired,id:o().string.isRequired,isOpen:o().bool.isRequired,labelledbyId:o().string.isRequired,loading:o().bool.isRequired,options:o().arrayOf(o().shape({label:o().string,value:o().string})).isRequired,onSelect:o().func.isRequired,selectedItems:o().shape([]).isRequired,threshold:o().number.isRequired,value:o().string.isRequired};const yr=gr;var vr=n(458),Ar={};Ar.styleTagTransform=Yn(),Ar.setAttributes=$n(),Ar.insert=zn().bind(null,"head"),Ar.domAPI=Bn(),Ar.insertStyleElement=Wn(),Un()(vr.Z,Ar),vr.Z&&vr.Z.locals&&vr.Z.locals;const br=({type:t,className:n,emptyLabel:r,label:o,maxPages:s,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:u,threshold:p})=>{const d=mr(),[f,h]=(0,hn.useState)(""),[m,g]=(0,hn.useState)([]),[y,v]=(0,hn.useState)(!1),[A,b]=(0,hn.useState)(!1),[_,w]=(0,hn.useState)(""),[C,x]=(0,hn.useState)([]),S=(0,hn.useRef)(),E=gn(_,750),k=(0,hn.useCallback)((async(e=1)=>{if(E.length0?c.join(","):"any",type:t});await Rn()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>s?s:t,e.json()})).then((t=>{g((e=>[...e,...t])),b(!1),(n&&n>e||e>=1&&i&&C.length>0)&&k(e+1)})).catch((e=>h(e.message)))}),[E,t,s,i,c,C.length,p]);(0,hn.useEffect)((()=>{x(u)}),[u]),(0,hn.useEffect)((()=>{E&&p<=E.length?k():g([])}),[E,k,p]);const R=e=>{v(S.current.contains(e.target))},T=e=>{"Escape"===e.key&&v(!1)};(0,hn.useEffect)((()=>(document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)))),(0,hn.useEffect)((()=>(S&&document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R))));const I=e=>{let t=[];if(C.some((t=>t.id===e.id))){const n=C.findIndex((t=>t.id===e.id));t=[...C.slice(0,n),...C.slice(n+1,C.length)]}else i?t=[...C,e]:(t=[e],v(!1));x(t),a(t)};return(0,e.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,e.jsxs)("div",{className:Qn()("components-base-control","autocomplete-base-control",n),ref:S,children:[(0,e.jsxs)("div",{"aria-expanded":y,"aria-haspopup":"listbox","aria-owns":`listbox-${d}`,className:Qn()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,e.jsx)("label",{className:Qn()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${d}`,children:(0,e.jsx)("div",{children:o})}),C.length>0?(0,e.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${d}`,id:`selected-items-${d}`,className:Qn()("autocomplete__selection--results","autocomplete__selection-list"),children:C.map((t=>(0,e.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,e.jsx)(Ht.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>I(t),type:"button",children:t.title})},t.title)))}):null,(0,e.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:Qn()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":y}),id:`autocomplete-${d}`,onChange:e=>w(e.target.value),onFocus:()=>v(!0),placeholder:l,type:"text",value:_})]}),(0,e.jsx)(yr,{emptyLabel:r,error:f,labelledById:`autocomplete-${d}`,id:`listbox-${d}`,isOpen:y,loading:A&&E,onSelect:I,options:m,selectedItems:C,threshold:p,value:E})]})})};br.defaultProps={type:"post",className:"",emptyLabel:(0,Yt.__)("No items found","alley-scripts"),label:(0,Yt.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},br.propTypes={type:o().string,className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const _r=br,wr=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(_r,{type:"term",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});wr.defaultProps={className:"",emptyLabel:(0,Yt.__)("No terms found","alley-scripts"),label:(0,Yt.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Yt.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},wr.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const Cr=wr,xr=Bt.div` + height: auto; + width: 100%; +`,Sr=({src:t})=>(0,e.jsx)(xr,{children:(0,e.jsx)("video",{className:"edit-video-preview",controls:!0,src:t})});Sr.propTypes={src:o().string.isRequired};const Er=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(cn,{allowedTypes:["video"],className:t,icon:"format-video",onReset:n,onUpdate:r,onUpdateURL:o,preview:Sr,value:s,valueURL:i});Er.defaultProps={className:"",onUpdateURL:null,valueURL:""},Er.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const kr=Er})(),r})(),e.exports=t()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}!function(){"use strict";var e=window.wp.plugins,t=window.React,r=window.wp.components,o=window.wp.editPost,s=window.wp.i18n,i=n(373),a=window.lodash,l=window.wp.data;function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(const r of e)r.name===t&&(n+=1),r.innerBlocks&&r.innerBlocks.length>0&&(n=c(r.innerBlocks,t,n));return n}window.cloneDeepTemp=a.cloneDeep;(0,e.registerPlugin)("wp-curate-deduplication",{icon:"",render:function(){const[e,n]=(0,i.usePostMetaValue)("wp_curate_deduplication");return c((0,l.useSelect)((e=>e("core/block-editor").getBlocks()),[]),"wp-curate/query")<2?null:(0,t.createElement)(o.PluginDocumentSettingPanel,{icon:"",name:"deduplication",title:(0,s.__)("Deduplication","wp-curate")},(0,t.createElement)(r.ToggleControl,{label:(0,s.__)("Enable deduplication","wp-curate"),checked:e,onChange:e=>n(e)}))}})}()}(); \ No newline at end of file diff --git a/build/slotfills/index.php b/build/slotfills/index.php new file mode 100644 index 00000000..e7917f36 --- /dev/null +++ b/build/slotfills/index.php @@ -0,0 +1,53 @@ +should_register_block() ) { + return; + } + + // Automatically load dependencies and version. + $asset_file = include __DIR__ . '/index.asset.php'; + + wp_register_script( + 'wp-curate_slotfills', + plugins_url( 'index.js', __FILE__ ), + $asset_file['dependencies'], + $asset_file['version'], + true + ); + + wp_set_script_translations( 'wp-curate_slotfills', 'wp-curate' ); +} +add_action( 'init', __NAMESPACE__ . '\register_slotfills_scripts' ); + +/** + * Enqueue block editor assets for this slotfill. + */ +function action_enqueue_slotfills_assets(): void { + wp_enqueue_script( 'wp-curate_slotfills' ); +} +add_action( + 'enqueue_block_editor_assets', + __NAMESPACE__ . '\action_enqueue_slotfills_assets' +); diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index ab2a15ee..00000000 --- a/phpunit.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - tests/feature - - - tests/unit - - - diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index e22936b9..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,16 +0,0 @@ -maybe_rsync_plugin() - ->with_sqlite() - // Load the main file of the plugin. - ->loaded( fn () => require_once __DIR__ . '/../wp-curate.php' ) - ->install(); diff --git a/tests/class-test-case.php b/tests/class-test-case.php deleted file mode 100644 index c10d64d2..00000000 --- a/tests/class-test-case.php +++ /dev/null @@ -1,17 +0,0 @@ -assertTrue( true ); - $this->assertNotEmpty( home_url() ); - } -} diff --git a/tests/unit/class-example-unit-test.php b/tests/unit/class-example-unit-test.php deleted file mode 100644 index 9ffefc99..00000000 --- a/tests/unit/class-example-unit-test.php +++ /dev/null @@ -1,24 +0,0 @@ -assertTrue( true ); - } -}