1import{L as o,t as n,$ as d,u as P}from"./DzN7NCPu.js";const u=()=>new Promise(t=>{window.TPP_SNAP.onInit(e=>{o.info(n,"onInit",`connection ${e?"established":"failed"}`),t(e)})}),w=async t=>{const[e,i]=t.split(".");if(!e){o.error(n,"navigateFromContentCreator",`no pageId found in previewId ${t}`);return}window.TPP_SNAP.setPreviewElement(t);const r=await d("/api/caas/navigation/seoRouteById",{identifier:e,locale:i});let a=r;if(!r){const s=await d("/api/routes/byId",{id:e});a=s?.find(c=>c.caasLocale.toLowerCase()===i?.toLowerCase())?.seoRoute??s?.[0]?.seoRoute??null}if(!a){o.error(n,"navigateFromContentCreator",`Could not find route for pageId '${e}'`);return}await P().push(a),o.info(n,"navigateFromContentCreator",`navigating to '${a}' (previewId: '${t}')`)},p=async()=>await window.TPP_SNAP.isConnected?await u()?(window.TPP_SNAP.onRequestPreviewElement(w),{provide:{setPreviewId:i=>{window.TPP_SNAP.setPreviewElement(i)}}}):null:(o.error(n,"createTpp","TPP_SNAP not connected"),null);export{p as createTpp};
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.