PageSourceSearch

https://www.ville-arcachon.fr/wp-content/plugins/smartfire-blocks-…de---components---choices.5635900e.chunk.js

js ville-arcachon.fr collected 2026-10-02 15:23:59 UTC 4,193 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksmartfire=self.webpackChunksmartfire||[]).push([[6321],{19307(e,r,t){t.r(r),t.d(r,{default:()=>u});var o=t(47075),a=t(41594),n=t(74888);const l={tabletBreakpoint:"992px",mobileBreakpoint:"767px",desktopBreakpoint:"1200px",headerTopMenuHeight:"68px",yellow:"#d8b458",yellowHover:"#caa851",yellowLink:"#8d650c",blue:"#202f46",blue2:"#131c2a",beige:"#fefdfb",beige2:"#f6f5f3",white:"#fff",black:"#212121","content-width":"block_content-width__x5Eik",choices:"block_choices__nWKo3",select:"block_select__0IGD3",radio:"block_radio__DFpqR",radios:"block_radios__+StVD",radioGroup:"block_radioGroup__Il2mW",groups:"block_groups__udpBI",noGroup:"block_noGroup__ckN0A"};var c=t(58387),i=t(70579);const s=(0,a.lazy)(()=>t.e(186).then(t.bind(t,80186))),u=(0,n.defineBlock)({Block:e=>{let r=e.name,t=e.label,u=e.choices,f=e.type,d=e.showLabel,p=e.parentName,h=void 0===p?null:p,m=e.formErrors,b=e.setFormErrors;(0,n.useInspectorControl)(s);const _=(0,a.useState)(u[0].name),y=(0,o.A)(_,2),g=y[0],k=y[1],v=(0,a.useState)("".concat(t.replace(/ /g,"_").toLowerCase(),"_").concat(Math.floor(100*Math.random()))),w=(0,o.A)(v,1)[0],x=(0,a.useRef)(null),A="group"===u[0].type,j="formulaide_choices_".concat(w);let C="root_field";return h?C=r?"".concat(h,":").concat(r):h:r&&(C=r),(0,n.useBlockEffect)(()=>{const e=document.querySelectorAll('div[id^="formulaide_group_'.concat(w,'"]'));e.length>0&&e.forEach(e=>{e.id!=="formulaide_group_".concat(w,"_").concat(g)?e.style.display="none":e.style.display="block"})},[g,w]),(0,i.jsxs)(n.BlockWrapper.Div,{id:j,className:(0,c.A)(l.choices,l[f]),ref:x,children:[d&&t&&(0,i.jsx)("label",{htmlFor:j,children:t}),"select"===f?(0,i.jsx)("select",{id:j,name:C,value:g,onChange:e=>k(e.target.value),children:u.map(e=>(0,i.jsx)("option",{value:e.name,children:e.label},e.name))}):(0,i.jsx)("div",{className:l.radios,children:u.map((e,r)=>(0,i.jsxs)("div",{className:l.radioGroup,children:[(0,i.jsx)("label",{htmlFor:"".concat(j,"_").concat(r),children:e.label}),(0,i.jsx)("input",{id:"".concat(j,"_").concat(r),name:C,value:e.name,checked:g===e.name,type:"radio",onChange:e=>k(e.target.value)})]},e.name))}),(0,i.jsx)(n.ChildrenBlock,{gutenbergEditorConfig:{orientation:"vertical"},className:(0,c.A)(l.groups,!A&&l.noGroup),childrenProps:{parentName:"root_field"!==C?C:null,choiceId:w,formErrors:m,setFormErrors:b}})]})},smartProps:{name:n.smartProps.string.withDefault(""),label:n.smartProps.string.withDefault(""),choices:n.smartProps.array.withDefault([]),type:n.smartProps.string.withDefault("select"),showLabel:n.smartProps.bool.withDefault(!0)},setup:{title:"Choix",parent:["smartfire/formulaide"]}})},47075(e,r,t){function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=Array(r);t<r;t++)o[t]=e[t];return o}function a(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,a,n,l,c=[],i=!0,s=!1;try{if(n=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;i=!1}else for(;!(i=(o=n.call(t)).done)&&(c.push(o.value),c.length!==r);i=!0);}catch(e){s=!0,a=e}finally{try{if(!i&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(s)throw a}}return c}}(e,r)||function(e,r){if(e){if("string"==typeof e)return o(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.d(r,{A:()=>a})},58387(e,r,t){function o(e){var r,t,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=o(e[r]))&&(a&&(a+=" "),a+=t)}else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}t.d(r,{A:()=>a});const a=function(){for(var e,r,t=0,a="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=o(e))&&(a&&(a+=" "),a+=r);return a}}}]);
2//# sourceMappingURL=block-formulaide---components---choices.5635900e.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.