export const __webpack_esm_id__=38746;export const __webpack_esm_ids__=[25306,38746];export const __webpack_esm_modules__={38746(e,t,a){a.d(t,{F:()=>l});var s=a(25306);const i="ls.tabs-state",n=`yagui__${s.y}`,r="completed",o="rejected",l=function(){const e=(e,t,a=null)=>{e.val.migration={date:(new Date).toISOString(),status:t,error:a}},t=e=>{let t=localStorage.getItem(e);if(t)return t=JSON.parse(t),t},a=(e,t)=>{localStorage.setItem(e,JSON.stringify(t))};return{isMigrationNeeded:()=>{const e=t(n);let a=!1;return e&&(a=e.val.migration&&(e.val.migration.status===r||e.val.migration.status===o)),!(!localStorage.getItem(i)||a)},revertMigration:()=>{const e=t(n);(e=>{e.val.tabs=e.val.tabs.filter(e=>!e.startsWith("_"))})(e),(e=>{for(const t in e.val.tabConfig)t.startsWith("_")&&delete e.val.tabConfig[t]})(e),a(n,e)},migrateYasguiPersistence:s=>{let o=t(i);o=Object.freeze(o);let l=t(n);l||(l={val:{active:null,tabs:[],tabConfig:{}}}),o.map(e=>({id:e.id,name:e.name,yasqe:{value:e.query,sameAs:e.sameAs,infer:e.inference,pageSize:1e3,pageNumber:1},yasr:{response:null,settings:{selectedPlugin:"extended_table",pluginsConfig:{}}},requestConfig:{method:"POST"}})).forEach((e,t)=>{e.id="_"+Math.random().toString(36).substring(7),e.name=e.name||((e,t)=>`${t} ${e}`)(t,s),((e,t)=>{e.val.tabs.push(t)})(l,e.id),((e,t)=>{e.val.tabConfig[t.id]=t})(l,e)}),l.val.active=l.val.tabs[0],e(l,r),a(n,l)},rejectMigration:()=>{const s=t(n);e(s,o),a(n,s)}}}()},25306(e,t,a){a.d(t,{y:()=>s});const s="graphdb-workbench-sparql-editor"}};
//# sourceMappingURL=38746.55eca466e666a9d1e7eb.bundle.js.map