(()=>{"use strict";var e={339(){const e=window.wp.blocks,t=window.wp.primitives,o=window.ReactJSXRuntime;var r=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(t.Path,{d:"m6.6 15.6-1.2.8c.6.9 1.3 1.6 2.2 2.2l.8-1.2c-.7-.5-1.3-1.1-1.8-1.8zM5.5 12c0-.4 0-.9.1-1.3l-1.5-.3c0 .5-.1 1.1-.1 1.6s.1 1.1.2 1.6l1.5-.3c-.2-.4-.2-.9-.2-1.3zm11.9-3.6 1.2-.8c-.6-.9-1.3-1.6-2.2-2.2l-.8 1.2c.7.5 1.3 1.1 1.8 1.8zM5.3 7.6l1.2.8c.5-.7 1.1-1.3 1.8-1.8l-.7-1.3c-.9.6-1.7 1.4-2.3 2.3zm14.5 2.8-1.5.3c.1.4.1.8.1 1.3s0 .9-.1 1.3l1.5.3c.1-.5.2-1 .2-1.6s-.1-1.1-.2-1.6zM12 18.5c-.4 0-.9 0-1.3-.1l-.3 1.5c.5.1 1 .2 1.6.2s1.1-.1 1.6-.2l-.3-1.5c-.4.1-.9.1-1.3.1zm3.6-1.1.8 1.2c.9-.6 1.6-1.3 2.2-2.2l-1.2-.8c-.5.7-1.1 1.3-1.8 1.8zM10.4 4.2l.3 1.5c.4-.1.8-.1 1.3-.1s.9 0 1.3.1l.3-1.5c-.5-.1-1.1-.2-1.6-.2s-1.1.1-1.6.2z"})}),n=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(t.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});const l=JSON.parse('{"UU":"remote-data-blocks/no-results"}'),c=window.wp.blockEditor,s=window.wp.components;var i,a=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(t.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});null===(i=window.REMOTE_DATA_BLOCKS)||void 0===i||i.rest_url,function(...e){e.filter(Boolean).join(" ")}(undefined,`rdb-${"container".replace(/[^a-zA-Z\d\u00C0-\u00FF]/g,"-").toLowerCase()}`);const d=window.wp.data,u=window.wp.editor;function v(e){var t;const{postMeta:o,postType:r}=(n=e=>{var t,o;return{postMeta:null!==(t=e("meta"))&&void 0!==t?t:{},postType:null!==(o=e("type"))&&void 0!==o?o:""}},(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(u.store);return n(t)}),[]));var n;if("wp_block"===r){const e=String(null!==(t=o._remote_data_blocks_block_type)&&void 0!==t?t:""),r=function(e){var t,o;return null===(o=null===(t=window.REMOTE_DATA_BLOCKS)||void 0===t?void 0:t.config)||void 0===o?void 0:o[e]}(e);if(r)return{remoteData:{blockName:e,metadata:{},queryInputs:[],queryKey:"Example Query Key",resultId:"",results:[{result:Object.fromEntries(Object.entries(r.availableBindings).map((([e,t])=>[e,{name:t.name,type:t.type,value:t.name}]))),uuid:"Example Entity ID"}]}}}return{remoteData:e["remote-data-blocks/remoteData"]}}const p=window.wp.i18n;function __(e){return(0,p.__)(e,"remote-data-blocks")}const w=[["core/paragraph",{content:__("No results found.")}]],m=[["core/paragraph",{content:__("Error loading results.")}]];(0,e.registerBlockType)(l.UU,{edit:function(e){var t;const{context:r}=e,{remoteData:n}=v(r),l=(0,c.useBlockProps)();return(null==n?void 0:n.blockName)?(0,o.jsx)("div",Object.assign({},l,{children:(0,o.jsx)(c.InnerBlocks,{template:"error"===(null===(t=e.attributes)||void 0===t?void 0:t.mode)?m:w})})):(0,o.jsx)(s.Placeholder,{label:__("No Remote Data Results"),icon:a,instructions:__("This block must be placed inside a remote data block. This block will be ignored as currently configured.")})},icon:{src:r},save:function(){return(0,o.jsx)(c.InnerBlocks.Content,{})},variations:[{name:"remote-data-blocks/error",title:"Error",icon:{src:n}}]})}};const t={};function o(r){const n=t[r];if(void 0!==n)return n.exports;const l=t[r]={exports:{}};return e[r](l,l.exports,o),l.exports}o.m=e,(()=>{const e=[];o.O=(t,r,n,l)=>{if(r){l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];return void(e[c]=[r,n,l])}let s=1/0;for(c=0;c<e.length;c++){let[r,n,l]=e[c],a=!0;for(var i=0;i<r.length;i++)(!1&l||s>=l)&&Object.keys(o.O).every((e=>o.O[e](r[i])))?r.splice(i--,1):(a=!1,l<s&&(s=l));if(a){e.splice(c--,1);const o=n();void 0!==o&&(t=o)}}return t}})(),o.o=(e,t)=>Object.hasOwn(e,t),(()=>{const e={589:0,849:0};o.O.j=t=>0===e[t];const t=(t,r)=>{let[n,l,c]=r;var s,i,a=0;if(n.some((t=>0!==e[t]))){for(s in l)o.o(l,s)&&(o.m[s]=l[s]);if(c)var d=c(o)}for(t&&t(r);a<n.length;a++)i=n[a],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(d)},r=globalThis.webpackChunkremote_data_blocks||=[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();let r=o.O(void 0,[849],(()=>o(339)));r=o.O(r)})();