"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[9725],{99725:(e,a,t)=>{t.r(a),t.d(a,{default:()=>s});var n=t(93150),i=t.n(n);const o={get:["name","url"],remove:["name","url"],getAll:["domain","name","path","secure","url"],set:["name","url","expirationDate","domain","path","sameSite","secure","url","value","httpOnly"]};const s=async function({data:e,id:a}){if(!await i().permissions.contains({permissions:["cookies"]})){const e=new Error("no-permission");throw e.data={permission:"cookies"},e}let t=e.type;"get"===t&&e.getAll&&(t="getAll");const n=function(e,a){const t={};return a.forEach((a=>{const n=e[a];n&&(t[a]=n)})),t}(e,o[t]);n.expirationDate&&(n.expirationDate=Date.now()/1e3+ +n.expirationDate);let s=null;if("remove"!==e.type||e.name)s=await i().cookies[t](n);else{const a=await i().cookies.getAll({url:e.url}),t=a.map((({name:a})=>i().cookies.remove({name:a,url:e.url})));await Promise.allSettled(t),s=a}return"get"===e.type&&(e.assignVariable&&this.setVariable(e.variableName,s),e.saveData&&this.addDataToColumn(e.dataColumn,s)),{data:s,nextBlockId:this.getBlockConnections(a)}}}}]);