@slogvo/vue-notion 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as N, computed as o, createBlock as z, openBlock as l, resolveDynamicComponent as V, unref as m, normalizeClass as x, withCtx as w, createElementBlock as n, createCommentVNode as u, createElementVNode as d, createVNode as s, normalizeStyle as B, Fragment as v, renderList as F } from "vue";
2
- import { u as U, c as $, a as E } from "./index-C6Ntkz0I.js";
3
- import { a as p } from "./collection-utils-Dca5iBmp.js";
2
+ import { u as U, c as $, a as E } from "./index-PIdEQxoT.js";
3
+ import { a as p } from "./collection-utils-DHckNam-.js";
4
4
  const L = {
5
5
  key: 0,
6
6
  class: "notion-collection-card-cover"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as L, computed as s, createElementBlock as e, openBlock as o, Fragment as r, renderList as c, createBlock as f, mergeProps as E, withCtx as F, createElementVNode as t, normalizeStyle as z, normalizeClass as x, unref as b, createCommentVNode as _, toDisplayString as h } from "vue";
2
- import { u as I, c as G } from "./index-C6Ntkz0I.js";
3
- import { _ as N } from "./CollectionCard.vue_vue_type_script_setup_true_lang-CN5XdO9s.js";
4
- import { g as K, _ as M } from "./collection-utils-Dca5iBmp.js";
2
+ import { u as I, c as G } from "./index-PIdEQxoT.js";
3
+ import { _ as N } from "./CollectionCard.vue_vue_type_script_setup_true_lang-CfsyyYpu.js";
4
+ import { g as K, _ as M } from "./collection-utils-DHckNam-.js";
5
5
  const P = { class: "notion-board" }, R = { class: "notion-board-header" }, j = { class: "notion-board-header-inner" }, q = {
6
6
  key: 0,
7
7
  class: "notion-board-th-body"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as C, computed as c, createElementBlock as i, openBlock as e, Fragment as a, renderList as s, createBlock as u, mergeProps as V, withCtx as h, createElementVNode as n, normalizeClass as g, unref as r } from "vue";
2
- import { u as z, c as y } from "./index-C6Ntkz0I.js";
3
- import { _ as f } from "./CollectionCard.vue_vue_type_script_setup_true_lang-CN5XdO9s.js";
4
- import { g as x, _ as D } from "./collection-utils-Dca5iBmp.js";
2
+ import { u as z, c as y } from "./index-PIdEQxoT.js";
3
+ import { _ as f } from "./CollectionCard.vue_vue_type_script_setup_true_lang-CfsyyYpu.js";
4
+ import { g as x, _ as D } from "./collection-utils-DHckNam-.js";
5
5
  const G = { class: "notion-gallery" }, $ = { class: "notion-gallery-view" }, B = {
6
6
  key: 1,
7
7
  class: "notion-gallery"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as x, computed as _, createElementBlock as i, openBlock as t, Fragment as r, renderList as m, createBlock as v, mergeProps as L, withCtx as k, createElementVNode as n, resolveDynamicComponent as C, unref as e, createVNode as d, createCommentVNode as V } from "vue";
2
- import { u as B, _ as D } from "./index-C6Ntkz0I.js";
3
- import { g as G, _ as $, a as h } from "./collection-utils-Dca5iBmp.js";
2
+ import { u as B, _ as D } from "./index-PIdEQxoT.js";
3
+ import { g as G, _ as $, a as h } from "./collection-utils-DHckNam-.js";
4
4
  const E = { class: "notion-list-collection" }, F = { class: "notion-list-view" }, M = { class: "notion-list-body" }, U = { class: "notion-list-item-title" }, j = { class: "notion-list-item-body" }, q = {
5
5
  key: 0,
6
6
  class: "notion-list-item-property"
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as N, createElementBlock as l, openBlock as t, createElementVNode as o, toDisplayString as L, computed as u, Fragment as p, renderList as m, createBlock as z, mergeProps as E, withCtx as R, normalizeStyle as a, createCommentVNode as x, createVNode as f, normalizeClass as $, unref as y } from "vue";
2
- import { u as T, c as C } from "./index-C6Ntkz0I.js";
3
- import { g as j, _ as F, a as V } from "./collection-utils-Dca5iBmp.js";
2
+ import { u as T, c as C } from "./index-PIdEQxoT.js";
3
+ import { g as j, _ as F, a as V } from "./collection-utils-DHckNam-.js";
4
4
  const M = { class: "notion-collection-column-title" }, O = { class: "notion-collection-column-title-body" }, P = {
5
5
  name: "NotionCollectionColumnTitle"
6
6
  }, S = /* @__PURE__ */ N({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as P, computed as B, createElementBlock as a, openBlock as n, normalizeClass as v, unref as x, createBlock as d, Fragment as y, renderList as G, toDisplayString as h, createTextVNode as z, createCommentVNode as D, mergeProps as $, createElementVNode as k, renderSlot as I, createVNode as L } from "vue";
2
- import { c as N, b as C, d as S, u as q } from "./index-C6Ntkz0I.js";
2
+ import { c as N, b as C, d as S, u as q } from "./index-PIdEQxoT.js";
3
3
  const w = {
4
4
  name: "NotionProperty"
5
5
  }, E = /* @__PURE__ */ P({
@@ -1804,13 +1804,13 @@ const $t = { class: "notion-code" }, xt = {
1804
1804
  },
1805
1805
  setup(e) {
1806
1806
  const t = Z(
1807
- () => import("./CollectionViewGallery--5N_bZaT.js")
1807
+ () => import("./CollectionViewGallery-CEjQtjBx.js")
1808
1808
  ), o = Z(
1809
- () => import("./CollectionViewList-L-ds3LSI.js")
1809
+ () => import("./CollectionViewList-BP5A6Q7Y.js")
1810
1810
  ), i = Z(
1811
- () => import("./CollectionViewTable-CyZ5Mvuc.js")
1811
+ () => import("./CollectionViewTable-Dwqq2AU2.js")
1812
1812
  ), n = Z(
1813
- () => import("./CollectionViewBoard--SqZyzsM.js")
1813
+ () => import("./CollectionViewBoard-ua_MdC0w.js")
1814
1814
  );
1815
1815
  return (l, r) => (a(), c("div", Tt, [
1816
1816
  e.collectionView.type === "gallery" ? (a(), x(v(t), {
@@ -2178,8 +2178,8 @@ const $t = { class: "notion-code" }, xt = {
2178
2178
  key: 0,
2179
2179
  class: $(
2180
2180
  v(S)(
2181
- "notion",
2182
- "notion-app",
2181
+ // 'notion',
2182
+ // 'notion-app',
2183
2183
  v(r) ? "dark-mode" : "light-mode",
2184
2184
  d.value,
2185
2185
  e.className,
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e as r } from "./index-C6Ntkz0I.js";
1
+ import { e as r } from "./index-PIdEQxoT.js";
2
2
  export {
3
3
  r as NotionRenderer
4
4
  };
@@ -1,2 +1,2 @@
1
1
  (function(S,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("prismjs"),require("katex"),require("medium-zoom")):typeof define=="function"&&define.amd?define(["exports","vue","prismjs","katex","medium-zoom"],e):(S=typeof globalThis<"u"?globalThis:S||self,e(S.VueNotionX={},S.Vue,S.Prism$1,S.katex,S.mediumZoom))})(this,(function(S,e,le,ae,ce){"use strict";function M(t,{lenient:o=!1}={}){if(typeof t!="string")throw new TypeError("Expected a string");if(t=t.trim(),t.includes(" "))return!1;try{return new URL(t),!0}catch{return o?M(`https://${t}`):!1}}const re=(t,o,n,a)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;const l=Object.getOwnPropertyDescriptor(t,n),c=Object.getOwnPropertyDescriptor(o,n);!ie(l,c)&&a||Object.defineProperty(t,n,c)},ie=function(t,o){return t===void 0||t.configurable||t.writable===o.writable&&t.enumerable===o.enumerable&&t.configurable===o.configurable&&(t.writable||t.value===o.value)},se=(t,o)=>{const n=Object.getPrototypeOf(o);n!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,n)},de=(t,o)=>`/* Wrapped ${t}*/
2
- ${o}`,me=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),pe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),ke=(t,o,n)=>{const a=n===""?"":`with ${n.trim()}() `,l=de.bind(null,a,o.toString());Object.defineProperty(l,"name",pe);const{writable:c,enumerable:r,configurable:i}=me;Object.defineProperty(t,"toString",{value:l,writable:c,enumerable:r,configurable:i})};function ue(t,o,{ignoreNonConfigurable:n=!1}={}){const{name:a}=t;for(const l of Reflect.ownKeys(o))re(t,o,l,n);return se(t,o),ke(t,o,a),t}const I=2147483647,fe=new WeakMap,U=new WeakMap,he=new WeakMap;function be(t,o){const n=t.get(o);if(n){if(n.maxAge<=Date.now()){t.delete(o);return}return n}}function ge(t,{cacheKey:o,cache:n=new Map,maxAge:a}={}){if(a===0)return t;if(typeof a=="number"&&Number.isFinite(a)){if(a>I)throw new TypeError(`The \`maxAge\` option cannot exceed ${I}.`);if(a<0)throw new TypeError("The `maxAge` option should not be a negative number.")}const l=function(...c){const r=o?o(c):c[0],i=be(n,r);if(i)return i.data;const u=t.apply(this,c),k=typeof a=="function"?a(...c):a;if(k!==void 0&&k!==Number.POSITIVE_INFINITY){if(!Number.isFinite(k))throw new TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(k<=0)return u;if(k>I)throw new TypeError(`The \`maxAge\` function result cannot exceed ${I}.`)}if(n.set(r,{data:u,maxAge:k===void 0||k===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Date.now()+k}),k!==void 0&&k!==Number.POSITIVE_INFINITY){const p=setTimeout(()=>{n.delete(r),U.get(l)?.delete(p)},k);p.unref?.();const s=U.get(l)??new Set;s.add(p),U.set(l,s)}return u};return ue(l,t,{ignoreNonConfigurable:!0}),fe.set(l,n),he.set(l,o??(c=>c[0])),l}const ye="text/plain",Be="us-ascii",j=(t,o)=>o.some(n=>n instanceof RegExp?n.test(t):n===t),we=new Set(["https:","http:","file:"]),_e=t=>{try{const{protocol:o}=new URL(t);return o.endsWith(":")&&!o.includes(".")&&!we.has(o)}catch{return!1}},Ee=(t,{stripHash:o})=>{const n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!n)throw new Error(`Invalid URL: ${t}`);const{type:a,data:l,hash:c}=n.groups,r=a.split(";"),i=r.at(-1)==="base64";i&&r.pop();const u=r.shift()?.toLowerCase()??"",p=[...r.map(m=>{let[d,h=""]=m.split("=").map(f=>f.trim());return d==="charset"&&(h=h.toLowerCase(),h===Be)?"":`${d}${h?`=${h}`:""}`}).filter(Boolean)];i&&p.push("base64"),(p.length>0||u&&u!==ye)&&p.unshift(u);const s=o||!c?"":`#${c}`;return`data:${p.join(";")},${i?l.trim():l}${s}`};function $e(t,o){if(o={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,...o},typeof o.defaultProtocol=="string"&&!o.defaultProtocol.endsWith(":")&&(o.defaultProtocol=`${o.defaultProtocol}:`),t=t.trim(),/^data:/i.test(t))return Ee(t,o);if(_e(t))return t;const n=t.startsWith("//");!n&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,o.defaultProtocol));const l=new URL(t);if(o.forceHttp&&o.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(o.forceHttp&&l.protocol==="https:"&&(l.protocol="http:"),o.forceHttps&&l.protocol==="http:"&&(l.protocol="https:"),o.stripAuthentication&&(l.username="",l.password=""),o.stripHash?l.hash="":o.stripTextFragment&&(l.hash=l.hash.replace(/#?:~:text.*?$/i,"")),l.pathname){const r=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let i=0,u="";for(;;){const p=r.exec(l.pathname);if(!p)break;const s=p[0],m=p.index,d=l.pathname.slice(i,m);u+=d.replace(/\/{2,}/g,"/"),u+=s,i=m+s.length}const k=l.pathname.slice(i,l.pathname.length);u+=k.replace(/\/{2,}/g,"/"),l.pathname=u}if(l.pathname)try{l.pathname=decodeURI(l.pathname).replace(/\\/g,"%5C")}catch{}if(o.removeDirectoryIndex===!0&&(o.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(o.removeDirectoryIndex)&&o.removeDirectoryIndex.length>0){const r=l.pathname.split("/").filter(Boolean),i=r.at(-1);i&&j(i,o.removeDirectoryIndex)&&(r.pop(),l.pathname=r.length>0?`/${r.join("/")}/`:"/")}if(o.removePath&&(l.pathname="/"),o.transformPath&&typeof o.transformPath=="function"){const r=l.pathname.split("/").filter(Boolean),i=o.transformPath(r);l.pathname=i?.length>0?`/${i.join("/")}`:"/"}if(l.hostname&&(l.hostname=l.hostname.replace(/\.$/,""),o.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(l.hostname)&&(l.hostname=l.hostname.replace(/^www\./,""))),Array.isArray(o.removeQueryParameters))for(const r of[...l.searchParams.keys()])j(r,o.removeQueryParameters)&&l.searchParams.delete(r);if(!Array.isArray(o.keepQueryParameters)&&o.removeQueryParameters===!0&&(l.search=""),Array.isArray(o.keepQueryParameters)&&o.keepQueryParameters.length>0)for(const r of[...l.searchParams.keys()])j(r,o.keepQueryParameters)||l.searchParams.delete(r);if(o.sortQueryParameters){const r=l.search;l.searchParams.sort();try{l.search=decodeURIComponent(l.search)}catch{}const i=r.slice(1).split("&").filter(u=>u&&!u.includes("="));for(const u of i){const k=decodeURIComponent(u);l.search=l.search.replace(`?${k}=`,`?${k}`).replace(`&${k}=`,`&${k}`)}}o.removeTrailingSlash&&(l.pathname=l.pathname.replace(/\/$/,"")),o.removeExplicitPort&&l.port&&(l.port="");const c=t;return t=l.toString(),!o.removeSingleSlash&&l.pathname==="/"&&!c.endsWith("/")&&l.hash===""&&(t=t.replace(/\/$/,"")),(o.removeTrailingSlash||l.pathname==="/")&&l.hash===""&&o.removeSingleSlash&&(t=t.replace(/\/$/,"")),n&&!o.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),o.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}function H(t,o){var n,a,l,c,r,i,u;const k=t.collection_id||((a=(n=t.format)==null?void 0:n.collection_pointer)==null?void 0:a.id);if(k)return k;const p=(l=t?.view_ids)==null?void 0:l[0];if(p){const s=(r=(c=o.collection_view)==null?void 0:c[p])==null?void 0:r.value;if(s)return(u=(i=s.format)==null?void 0:i.collection_pointer)==null?void 0:u.id}return null}var C=t=>{var o;return t?Array.isArray(t)?(o=t?.reduce((n,a)=>n+(a[0]!=="⁍"&&a[0]!=="‣"?a[0]:""),""))!=null?o:"":t:""};function P(t,o){var n,a;if((n=t.properties)!=null&&n.title)return C(t.properties.title);if(t.type==="collection_view_page"||t.type==="collection_view"){const l=H(t,o);if(l){const c=(a=o.collection[l])==null?void 0:a.value;if(c)return C(c.name)}}return""}var Ne={header:0,sub_header:1,sub_sub_header:2},Ce=(t,o)=>{function n(r){return(r??[]).map(i=>{var u,k;const p=(u=o.block[i])==null?void 0:u.value;if(p){const{type:s}=p;if(s==="header"||s==="sub_header"||s==="sub_sub_header")return{id:i,type:s,text:C((k=p.properties)==null?void 0:k.title),indentLevel:Ne[s]};if(s==="transclusion_container"||s==="column_list"||s==="column")return n(p.content)}return null})}function a(r){return r.flatMap(i=>i==null?[]:Array.isArray(i)?a(i):[i])}const l=a(n(t.content)),c=[{actual:-1,effective:-1}];for(const r of l){const{indentLevel:i}=r,u=i;do{const k=c.at(-1),{actual:p,effective:s}=k;if(u>p)r.indentLevel=s+1,c.push({actual:u,effective:r.indentLevel});else if(u===p){r.indentLevel=s;break}else c.pop()}while(!0)}return l},Se=(t,{month:o="short"}={})=>{const n=new Date(t);return`${n.toLocaleString("en-US",{month:o})} ${n.getUTCDate()}, ${n.getUTCFullYear()}`},Ve=t=>{const o=`${t.start_date}T${t.start_time||"00:00"}+00:00`;return Se(o)},G=(t="")=>`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`;function W(t,o){var n,a,l;if((n=t.format)!=null&&n.page_icon)return(a=t.format)==null?void 0:a.page_icon;if(t.type==="collection_view_page"||t.type==="collection_view"){const c=H(t,o);if(c){const r=(l=o.collection[c])==null?void 0:l.value;if(r)return r.icon}}return null}var z=(t,o,{inclusive:n=!1}={})=>{var a,l;let c=t;for(;c;){if(n&&c?.type==="page")return c;const r=c.parent_id,i=c.parent_table;if(!r)break;if(i==="collection")c=(a=o.collection[r])==null?void 0:a.value;else if(c=(l=o.block[r])==null?void 0:l.value,c?.type==="page")return c}return null},A=t=>t.replaceAll("-",""),q=(t,o)=>{var n;const a=t.block,l=[];let c=o;do{const r=(n=a[c])==null?void 0:n.value;if(!r)break;const i=P(r,t),u=W(r,t);if(!(i||u))break;l.push({block:r,active:c===o,pageId:c,title:i,icon:u});const k=z(r,t),p=k?.id;if(!p)break;c=p}while(!0);return l.reverse(),l},xe=/(?:https?:\/\/)?[^\s]+\.gif(?=$|\?|#)/,Fe=(t,o)=>{if(!t)return;if(t.startsWith("data:")||xe.test(t)||t.startsWith("https://images.unsplash.com"))return t;try{const l=new URL(t);if(l.pathname.startsWith("/secure.notion-static.com")&&l.hostname.endsWith(".amazonaws.com")&&l.searchParams.has("X-Amz-Credential")&&l.searchParams.has("X-Amz-Signature")&&l.searchParams.has("X-Amz-Algorithm")||l.hostname==="img.notionusercontent.com")return t}catch{}t.startsWith("/images")&&(t=`https://www.notion.so${t}`),t=`https://www.notion.so${t.startsWith("/image")?t:`/image/${encodeURIComponent(t)}`}`;const n=new URL(t);let a=o.parent_table==="space"?"block":o.parent_table;return(a==="collection"||a==="team")&&(a="block"),n.searchParams.set("table",a),n.searchParams.set("id",o.id),n.searchParams.set("cache","v2"),t=n.toString(),t},X=ge(t=>{if(!t)return"";try{if(t.startsWith("https://www.notion.so/image/")){const o=new URL(t),n=decodeURIComponent(o.pathname.slice(7)),a=X(n);o.pathname=`/image/${encodeURIComponent(a)}`,t=o.toString()}return $e(t,{stripProtocol:!0,stripWWW:!0,stripHash:!0,stripTextFragment:!0,removeQueryParameters:!0})}catch{return""}});const Z=Symbol("NotionContext");function Ie(t){e.provide(Z,t)}function _(){const t=e.inject(Z);if(!t)throw new Error("useNotionContext must be used within a NotionRenderer");return t}const y=(...t)=>t.filter(o=>!!o).map(o=>typeof o=="object"?Object.keys(o).filter(n=>o[n]).join(" "):o).join(" "),Pe=new Set(["youtu.be","youtube.com","www.youtube.com","youtube-nocookie.com","www.youtube-nocookie.com"]),ze=t=>{try{const{hostname:o}=new URL(t);if(!Pe.has(o))return null;const n=/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/i,a=t.match(n);if(a&&a[2]?.length===11)return a[2]}catch{}return null},Ae=["src","alt"],Te=["src","alt","width","height"],Le=["src","alt"],De={name:"LazyImage"},T=e.defineComponent({...De,props:{src:{},alt:{},className:{},style:{},height:{},zoomable:{type:Boolean},priority:{type:Boolean}},setup(t){const o=t,{recordMap:n,previewImages:a,forceCustomImages:l,components:c,zoom:r}=_(),i=e.computed(()=>!a||!o.src?null:n?.preview_images?.[o.src]??n?.preview_images?.[X(o.src)]),u=e.ref(null),k=p=>{o.zoomable&&u.value&&r&&r.attach(u.value)};return(p,s)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("lazy-image-wrapper",t.className)),style:e.normalizeStyle({width:"100%",paddingBottom:t.height?void 0:`${i.value.originalHeight/i.value.originalWidth*100}%`,height:t.height?`${t.height}px`:void 0})},[e.createElementVNode("img",{class:"lazy-image-preview",src:i.value.dataURIBase64,alt:t.alt,decoding:"async"},null,8,Ae),e.createElementVNode("img",{ref_key:"imageRef",ref:u,class:"lazy-image-real",src:t.src,alt:t.alt,width:i.value.originalWidth,height:i.value.originalHeight,decoding:"async",loading:"lazy",onLoad:k},null,40,Te)],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.src?(e.openBlock(),e.createElementBlock("img",{key:0,ref_key:"imageRef",ref:u,class:e.normalizeClass(t.className),style:e.normalizeStyle(t.style),src:t.src,alt:t.alt,loading:"lazy",decoding:"async",onLoad:k},null,46,Le)):e.createCommentVNode("",!0)],64))}}),Re=["aria-label"],Oe={name:"PageIcon"},V=e.defineComponent({...Oe,props:{block:{},className:{},inline:{type:Boolean,default:!0},hideDefaultIcon:{type:Boolean,default:!1},defaultIcon:{}},setup(t){const o=t,{recordMap:n,mapImageUrl:a,darkMode:l}=_(),c=e.computed(()=>W(o.block,n)?.trim()||o.defaultIcon),r=e.computed(()=>P(o.block,n)),i=e.computed(()=>c.value&&(M(c.value)||c.value.startsWith("/icons/"))),u=e.computed(()=>{if(c.value){if(M(c.value))return a(c.value,o.block);if(c.value.startsWith("/icons/"))return`https://www.notion.so${c.value}?mode=${l?"dark":"light"}`}});return(k,p)=>c.value||!t.hideDefaultIcon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)(t.inline?"notion-page-icon-inline":"notion-page-icon-hero",i.value?"notion-page-icon-image":"notion-page-icon-span"))},[i.value?(e.openBlock(),e.createBlock(T,{key:0,src:u.value,alt:r.value||"page icon",className:e.unref(y)(t.className,"notion-page-icon")},null,8,["src","alt","className"])):c.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(y)(t.className,"notion-page-icon")),role:"img","aria-label":c.value},e.toDisplayString(c.value),11,Re)):t.hideDefaultIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(y)(t.className,"notion-page-icon"))}," 📄 ",2))],2)):e.createCommentVNode("",!0)}}),Me=e.defineComponent({__name:"TextDecorator",props:{content:{}},setup(t){const o=t,n=e.computed(()=>o.content[0]),a=e.computed(()=>o.content[1]||[]),{recordMap:l,mapPageUrl:c,components:r}=_(),i=e.computed(()=>{const u=n.value,k=a.value,p=k?.find(d=>d[0]==="eoi");if(p){const d=p[1],h=l.block[d]?.value||l.block[A(d)]?.value||l.block[G(d)]?.value;if(h&&h.type==="external_object_instance"){const f=h.format,g=f?.original_url||f?.uri,w=(f?.attributes||[]).find($=>$.id==="title")?.values?.[0]||g;return e.h("a",{class:"notion-link notion-external-object",href:g,target:"_blank",rel:"noopener noreferrer"},w||"Original Link")}}const s=k?.find(d=>d[0]==="p");if(s){const d=s[1],h=l.block[d]?.value||l.block[A(d)]?.value||l.block[G(d)]?.value;if(h){const f=C(h.properties?.title)||"Untitled",g=c(d);return e.h(r.PageLink,{class:"notion-link notion-page-mention",href:g},()=>[e.h(V,{block:h,class:"notion-page-mention-icon"}),e.h("span",{class:"notion-page-mention-text"},f)])}else{const f=c(d);return e.h(r.PageLink,{class:"notion-link notion-page-mention",href:f},()=>[e.h("span",{class:"notion-page-mention-text"},"Page")])}}if(!k?.length)return u;let m=u;for(const d of k)switch(d[0]){case"b":m=e.h("b",null,m);break;case"i":m=e.h("i",null,m);break;case"s":m=e.h("s",null,m);break;case"a":const f=d[1];f.startsWith("/")?m=e.h(r.PageLink,{class:"notion-link",href:f},m):m=e.h("a",{class:"notion-link",href:f,target:"_blank",rel:"noopener noreferrer"},m);break;case"c":m=e.h("code",{class:"notion-inline-code"},m);break;case"_":m=e.h("span",{class:"notion-inline-underscore"},m);break;case"h":const g=d[1];m=e.h("span",{class:`notion-${g}`},m);break}return m});return(u,k)=>typeof i.value=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.value),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:1}))}}),Ue={key:0,class:"notion-text"},E=e.defineComponent({__name:"Text",props:{value:{},block:{}},setup(t){return(o,n)=>t.value?(e.openBlock(),e.createElementBlock("span",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(a,l)=>(e.openBlock(),e.createBlock(Me,{key:l,content:a},null,8,["content"]))),128))])):e.createCommentVNode("",!0)}}),je=["src"],He=["src"],Ge=["src"],We={key:3,class:"notion-pdf"},qe=["href"],Xe={name:"NotionAsset"},Ze=e.defineComponent({...Xe,props:{block:{},zoomable:{type:Boolean}},setup(t){const o=t,{recordMap:n,mapImageUrl:a,components:l}=_(),c=e.computed(()=>{const m={position:"relative",display:"flex",justifyContent:"center",alignSelf:"center",width:"100%",maxWidth:"100%",flexDirection:"column"};if(o.block.format){const{block_aspect_ratio:d,block_height:h,block_width:f,block_full_width:g,block_page_width:B,block_preserve_scale:b}=o.block.format;if(g||B)g?m.width="100vw":m.width="100%",o.block.type==="video"?h?m.height=`${h}px`:d&&(m.paddingBottom=`${d*100}%`):d&&o.block.type!=="image"?m.paddingBottom=`${d*100}%`:h&&(m.height=`${h}px`);else{switch(o.block.format?.block_alignment){case"center":m.alignSelf="center";break;case"left":m.alignSelf="start";break;case"right":m.alignSelf="end";break}f&&(m.width=typeof f=="number"?`${f}px`:f)}}return m}),r=e.computed(()=>{const m={};return o.block.type==="image"||u.value?m.objectFit="cover":o.block.format?.block_preserve_scale&&(m.objectFit="contain"),m}),i=e.computed(()=>{let m=n.signed_urls?.[o.block.id]||o.block.properties?.source?.[0]?.[0];if(m&&o.block.space_id){const d=new URL(m);d.searchParams.set("spaceId",o.block.space_id),m=d.toString()}return m}),u=e.computed(()=>{if(o.block.type==="embed"&&i.value){const m=i.value.toLowerCase();return/\.(jpeg|jpg|gif|png|webp|svg)($|\?)/.test(m)}return!1}),k=e.computed(()=>{if((o.block.type==="image"||u.value)&&i.value){let m=i.value;return!m.includes(".gif")&&m.includes("file.notion.so")&&(m=o.block.properties?.source?.[0]?.[0]),a(m,o.block)}return i.value}),p=e.computed(()=>{const m=C(o.block.properties?.alt_text),d=C(o.block.properties?.caption);return m||d||"notion image"}),s=e.computed(()=>o.block.type==="video"&&i.value?ze(i.value):null);return(m,d)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(c.value)},[t.block.type==="image"||u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).Image),{key:0,src:k.value,alt:p.value,zoomable:t.zoomable,style:e.normalizeStyle(r.value)},null,8,["src","alt","zoomable","style"])):t.block.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,class:"notion-asset-object-fit",style:e.normalizeStyle(r.value),src:`https://www.youtube.com/embed/${s.value}`,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,je)):(e.openBlock(),e.createElementBlock("video",{key:1,playsInline:"",controls:"",preload:"metadata",style:e.normalizeStyle(r.value),src:i.value},null,12,He))],64)):["embed","figma","typeform","gist","maps","excalidraw","codepen","replit"].includes(t.block.type)?(e.openBlock(),e.createElementBlock("iframe",{key:2,class:"notion-asset-object-fit",style:e.normalizeStyle(r.value),src:i.value,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,Ge)):t.block.type==="pdf"?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("a",{href:i.value,target:"_blank"},"View PDF",8,qe)])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default")],4)):e.createCommentVNode("",!0)}});var Y={},K;function Ye(){return K||(K=1,(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var o=t.languages.extend("typescript",{});delete o["class-name"],t.languages.typescript["class-name"].inside=o,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:o}}}}),t.languages.ts=t.languages.typescript})(Prism)),Y}Ye(),Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,(function(t){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,(function(t){var o="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+o),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+o),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+o),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+o),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var l=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],c=a.variable[1].inside,r=0;r<l.length;r++)c[l[r]]=t.languages.bash[l[r]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(Prism),(function(t){var o=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(p){return p=p.replace(/<inner>/g,function(){return o}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,l=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return a}),c=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+l+c+"(?:"+l+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+l+c+")(?:"+l+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+l+")"+c+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+l+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(p){["url","bold","italic","strike","code-snippet"].forEach(function(s){p!==s&&(t.languages.markdown[p].inside.content.inside[s]=t.languages.markdown[s])})}),t.hooks.add("after-tokenize",function(p){if(p.language!=="markdown"&&p.language!=="md")return;function s(m){if(!(!m||typeof m=="string"))for(var d=0,h=m.length;d<h;d++){var f=m[d];if(f.type!=="code"){s(f.content);continue}var g=f.content[1],B=f.content[3];if(g&&B&&g.type==="code-language"&&B.type==="code-block"&&typeof g.content=="string"){var b=g.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");b=(/[a-z][\w-]*/i.exec(b)||[""])[0].toLowerCase();var w="language-"+b;B.alias?typeof B.alias=="string"?B.alias=[B.alias,w]:B.alias.push(w):B.alias=[w]}}}s(p.tokens)}),t.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var s="",m=0,d=p.classes.length;m<d;m++){var h=p.classes[m],f=/language-(.+)/.exec(h);if(f){s=f[1];break}}var g=t.languages[s];if(g)p.content=t.highlight(k(p.content),g,s);else if(s&&s!=="none"&&t.plugins.autoloader){var B="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);p.attributes.id=B,t.plugins.autoloader.loadLanguages(s,function(){var b=document.getElementById(B);b&&(b.innerHTML=t.highlight(b.textContent,t.languages[s],s))})}}});var r=RegExp(t.languages.markup.tag.pattern.source,"gi"),i={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function k(p){var s=p.replace(r,"");return s=s.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(m,d){if(d=d.toLowerCase(),d[0]==="#"){var h;return d[1]==="x"?h=parseInt(d.slice(2),16):h=Number(d.slice(1)),u(h)}else{var f=i[d];return f||m}}),s}t.languages.md=t.languages.markdown})(Prism);var Q={},J;function Ke(){return J||(J=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Q}Ke();var v={},ee;function Qe(){return ee||(ee=1,(function(t){for(var o=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)o=o.replace(/<self>/g,function(){return o});o=o.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+o),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism)),v}Qe();const Je={class:"notion-code"},ve={key:0,class:"notion-asset-caption"},et={name:"NotionCode"},tt=e.defineComponent({...et,props:{block:{},defaultLanguage:{}},setup(t){const o=t,n=e.computed(()=>C(o.block.properties?.title)),a=e.computed(()=>o.block.properties?.language?.[0]?.[0]?.toLowerCase()||o.defaultLanguage||"typescript"),l=e.computed(()=>o.block.properties?.caption),c=e.ref(null),r=()=>{c.value&&le.highlightElement(c.value)};return e.onMounted(r),e.watch(n,r),e.watch(a,r),(i,u)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("pre",{class:e.normalizeClass(`language-${a.value}`)},[e.createElementVNode("code",{ref_key:"codeRef",ref:c,class:e.normalizeClass(`language-${a.value}`)},e.toDisplayString(n.value),3)],2),l.value?(e.openBlock(),e.createElementBlock("figcaption",ve,[e.createVNode(E,{value:l.value,block:t.block},null,8,["value","block"])])):e.createCommentVNode("",!0)]))}}),ot=["innerHTML"],nt=["innerHTML"],lt={name:"NotionEquation"},at=e.defineComponent({...lt,props:{block:{},inline:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>C(o.block.properties?.title)),a=e.computed(()=>{const l=n.value;if(!l)return"";try{return ae.renderToString(l,{throwOnError:!1,displayMode:!o.inline})}catch(c){return console.error("KaTeX error",c),l}});return(l,c)=>t.inline?(e.openBlock(),e.createElementBlock("span",{key:0,class:"notion-equation notion-equation-inline",innerHTML:a.value},null,8,ot)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"notion-equation notion-equation-block",innerHTML:a.value},null,8,nt))}}),ct={class:"notion-collection-view"},rt={key:4,class:"notion-collection-view-fallback"},it={name:"NotionCollectionView"},st=e.defineComponent({...it,props:{collection:{},collectionView:{},collectionData:{},width:{},padding:{}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>an)),n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>wn)),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Tn)),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Jn));return(c,r)=>(e.openBlock(),e.createElementBlock("div",ct,[t.collectionView.type==="gallery"?(e.openBlock(),e.createBlock(e.unref(o),{key:0,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):t.collectionView.type==="list"?(e.openBlock(),e.createBlock(e.unref(n),{key:1,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):t.collectionView.type==="table"?(e.openBlock(),e.createBlock(e.unref(a),{key:2,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):t.collectionView.type==="board"?(e.openBlock(),e.createBlock(e.unref(l),{key:3,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):(e.openBlock(),e.createElementBlock("div",rt," Unsupported collection view: "+e.toDisplayString(t.collectionView.type),1))]))}}),dt={key:0,class:"notion-collection-view-tabs-row"},mt=["onClick"],pt={class:"notion-collection-view-type-title"},kt={key:1,class:"notion-collection-header"},ut={class:"notion-collection-header-title"},ft={name:"NotionCollection"},L=e.defineComponent({...ft,props:{block:{},className:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>H(o.block,n)),l=e.computed(()=>a.value?n.collection[a.value]?.value:null),c=e.computed(()=>o.block.view_ids||[]),r=e.ref(c.value[0]),i=e.computed(()=>r.value?n.collection_view[r.value]?.value:null),u=e.computed(()=>!a.value||!r.value?null:n.collection_query[a.value]?.[r.value]),k=e.computed(()=>l.value?C(l.value.name).trim():""),p=e.computed(()=>i.value?.format?.hide_linked_collection_name!==!0&&k.value),s=e.ref(typeof window<"u"?window.innerWidth:1024),m=()=>{s.value=window.innerWidth};e.onMounted(()=>{window.addEventListener("resize",m)}),e.onUnmounted(()=>{window.removeEventListener("resize",m)});const d=e.computed(()=>{const g=z(o.block,n)?.format?.page_full_width===!0;if(i.value?.type!=="table"&&i.value?.type!=="board")return{width:0,padding:0};const B=s.value,b=708;let w=b;g?w=Math.trunc(B-2*Math.min(96,B*.08)):w=B<b?Math.trunc(B-B*.02):b;const $=Math.max(0,Math.trunc((B-w)/2));return{width:B,padding:$}}),h=f=>{r.value=f};return(f,g)=>l.value&&i.value&&u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("notion-collection-wrapper",t.className))},[c.value.length>1?(e.openBlock(),e.createElementBlock("div",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,B=>(e.openBlock(),e.createElementBlock("button",{key:B,onClick:b=>h(B),class:e.normalizeClass(e.unref(y)("notion-collection-view-tabs-content-item",r.value===B&&"notion-collection-view-tabs-content-item-active"))},[e.createElementVNode("span",pt,e.toDisplayString(e.unref(n).collection_view[B]?.value?.name||e.unref(n).collection_view[B]?.value?.type),1)],10,mt))),128))])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",kt,[e.createElementVNode("div",ut,[l.value.icon?(e.openBlock(),e.createBlock(V,{key:0,block:t.block,class:"notion-page-title-icon","hide-default-icon":""},null,8,["block"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(k.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-collection",t.className))},[e.createVNode(st,{collection:l.value,collectionView:i.value,collectionData:u.value,width:d.value.width,padding:d.value.padding},null,8,["collection","collectionView","collectionData","width","padding"])],2)],2)):e.createCommentVNode("",!0)}}),ht=["href"],bt={name:"NotionTableOfContents"},gt=e.defineComponent({...bt,props:{block:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>{const c=z(o.block,n);return c?Ce(c,n):[]}),l=e.computed(()=>o.block.format?.block_color);return(c,r)=>a.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("notion-table-of-contents",l.value&&`notion-${l.value}`,t.block.id))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,i=>(e.openBlock(),e.createElementBlock("a",{key:i.id,href:`#${e.unref(A)(i.id)}`,class:e.normalizeClass(e.unref(y)("notion-table-of-contents-item",`notion-table-of-contents-item-indent-level-${i.indentLevel}`))},[e.createElementVNode("span",{class:"notion-table-of-contents-item-body",style:e.normalizeStyle({marginLeft:`${i.indentLevel*24}px`})},e.toDisplayString(i.text),5)],10,ht))),128))],2)):e.createCommentVNode("",!0)}}),yt={class:"notion-bookmark-info"},Bt={key:0,class:"notion-bookmark-title"},wt={key:1,class:"notion-bookmark-description"},_t={class:"notion-bookmark-link-row"},Et=["src","alt"],$t={key:1,class:"notion-bookmark-link-text"},Nt={key:0,class:"notion-bookmark-image"},Ct={name:"NotionBookmark"},St=e.defineComponent({...Ct,props:{block:{}},setup(t){const o=t,{mapImageUrl:n,components:a}=_(),l=e.computed(()=>C(o.block.properties?.title)),c=e.computed(()=>C(o.block.properties?.description)),r=e.computed(()=>o.block.properties?.link?.[0]?.[0]);e.computed(()=>o.block.properties?.caption);const i=e.computed(()=>o.block.format?.bookmark_cover),u=e.computed(()=>o.block.format?.bookmark_icon);return(k,p)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("notion-bookmark",t.block.id))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).Link),{href:r.value,target:"_blank",rel:"noopener noreferrer",class:"notion-bookmark-link"},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[l.value?(e.openBlock(),e.createElementBlock("div",Bt,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_t,[u.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:e.unref(n)(u.value,t.block),class:"notion-bookmark-link-icon",alt:l.value},null,8,Et)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",$t,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)])]),i.value?(e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(T,{src:e.unref(n)(i.value,t.block),alt:l.value,style:{"object-fit":"cover"}},null,8,["src","alt"])])):e.createCommentVNode("",!0)]),_:1},8,["href"]))],2)):e.createCommentVNode("",!0)}}),Vt={key:0,class:"notion-breadcrumbs"},xt={key:1,class:"notion-breadcrumb-title"},Ft={key:0,class:"notion-spacer"},It={name:"NotionBreadcrumbs"},Pt=e.defineComponent({...It,props:{block:{}},setup(t){const o=t,{recordMap:n,components:a,mapPageUrl:l}=_(),c=e.computed(()=>q(n,o.block.id));return(r,i)=>c.value?(e.openBlock(),e.createElementBlock("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(u,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).PageLink),{href:e.unref(l)(u.pageId),class:"notion-breadcrumb"},{default:e.withCtx(()=>[u.icon?(e.openBlock(),e.createBlock(V,{key:0,block:u.block,class:"notion-breadcrumb-icon"},null,8,["block"])):e.createCommentVNode("",!0),u.title?(e.openBlock(),e.createElementBlock("span",xt,e.toDisplayString(u.title),1)):e.createCommentVNode("",!0)]),_:2},1032,["href"])),k<c.value.length-1?(e.openBlock(),e.createElementBlock("div",Ft,"/")):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)}}),zt={key:0,class:"notion-external-image"},At={key:0,viewBox:"0 0 24 24",fill:"#24292e"},Tt={class:"notion-external-description"},Lt={class:"notion-external-title"},Dt={key:0,class:"notion-external-block-desc"},Rt={key:0},Ot={key:1},Mt={key:2},Ut={key:1,style:{color:"#999","font-style":"italic",padding:"8px"}},jt=e.defineComponent({__name:"ExternalObjectInstance",props:{block:{},inline:{type:Boolean},className:{}},setup(t){const o=t,{components:n}=_(),a=e.computed(()=>o.block?.format||{}),l=e.computed(()=>a.value.original_url),c=e.computed(()=>a.value.attributes||[]),r=e.computed(()=>a.value.domain),i=e.computed(()=>c.value.find(f=>f.id==="title")?.values[0]||""),u=e.computed(()=>{let f=c.value.find(g=>g.id==="owner")?.values[0]||"";return r.value==="github.com"&&f&&(f=f.split("/").at(-1)||f),f}),k=e.computed(()=>c.value.find(f=>f.id==="updated_at")?.values[0]),p=e.computed(()=>k.value?Ve(k.value):null),s=e.computed(()=>r.value==="github.com"),m=e.computed(()=>r.value==="github.com"?"github":null),d=e.computed(()=>l.value&&c.value.length>0);return(h,f)=>d.value&&s.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).PageLink),{key:0,target:"_blank",rel:"noopener noreferrer",href:l.value,class:e.normalizeClass(e.unref(y)("notion-external",t.inline?"notion-external-mention":"notion-external-block notion-row",t.className))},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",zt,[m.value==="github"?(e.openBlock(),e.createElementBlock("svg",At,[...f[0]||(f[0]=[e.createElementVNode("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"},null,-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Tt,[e.createElementVNode("div",Lt,e.toDisplayString(i.value),1),!t.inline&&(u.value||p.value)?(e.openBlock(),e.createElementBlock("div",Dt,[u.value?(e.openBlock(),e.createElementBlock("span",Rt,e.toDisplayString(u.value),1)):e.createCommentVNode("",!0),u.value&&p.value?(e.openBlock(),e.createElementBlock("span",Ot," • ")):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("span",Mt,"Updated "+e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["href","class"])):(e.openBlock(),e.createElementBlock("div",Ut," [Unsupported external integration: "+e.toDisplayString(r.value||"unknown")+"] ",1))}}),Ht={key:0,class:"notion-frame"},Gt={key:1,class:"notion-page-cover-wrapper"},Wt=["src"],qt={class:"notion-page-scroller"},Xt={class:"notion-title"},Zt={key:2,class:"notion-page-content"},Yt={key:1,class:"notion-page-content"},Kt={class:"notion-page-link-text"},Qt={class:"notion-h-title"},Jt={class:"notion-h-title"},vt={class:"notion-h-title"},eo={key:1,class:"notion-blank"},to={class:"notion-to-do-item"},oo={class:"notion-to-do-checkbox"},no=["checked"],lo={class:"notion-to-do-children"},ao={class:"notion-callout-text"},co={key:0,class:"notion-asset-caption"},ro=e.defineComponent({__name:"Block",props:{block:{},level:{},className:{},hideBlockId:{type:Boolean}},setup(t){const o=t,{components:n,mapPageUrl:a,mapImageUrl:l,fullPage:c,darkMode:r,recordMap:i,hideHeader:u}=_(),k=e.computed(()=>o.hideBlockId?"notion-block":`notion-block-${A(o.block.id)}`),p=e.computed(()=>o.block.format?.block_color?`notion-${o.block.format.block_color}`:void 0),s=e.computed(()=>o.block.properties?.title),m=e.computed(()=>o.block.properties?.checked?.[0]?.[0]==="Yes"),d=e.computed(()=>o.block.format||{}),h=e.computed(()=>d.value?.page_cover?l(d.value.page_cover,o.block):null),f=e.computed(()=>`center ${(1-(d.value?.page_cover_position||.5))*100}%`),g=e.computed(()=>o.block.type==="column"&&d.value?.column_ratio?{width:`calc(${d.value.column_ratio*100}% - 16px)`}:{});e.computed(()=>{const b=o.block.collection_id;return b&&i.collection[b]?C(i.collection[b].value?.name):"Untitled"});const B=e.computed(()=>o.block);return(b,w)=>t.level===0&&(t.block.type==="page"||t.block.type==="collection_view_page")?(e.openBlock(),e.createElementBlock("main",{key:0,class:e.normalizeClass(e.unref(y)("notion","notion-app",e.unref(r)?"dark-mode":"light-mode",k.value,t.className,d.value.page_full_width&&"notion-full-width",d.value.page_small_text&&"notion-small-text"))},[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Ht,[e.unref(u)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).Header),{key:0,block:t.block},null,8,["block"])),h.value?(e.openBlock(),e.createElementBlock("div",Gt,[e.createElementVNode("img",{class:"notion-page-cover",src:h.value,alt:"page cover",style:e.normalizeStyle({objectPosition:f.value})},null,12,Wt)])):e.createCommentVNode("",!0),e.createElementVNode("div",qt,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-page",h.value?"notion-page-has-cover":"notion-page-no-cover",d.value.page_icon?"notion-page-has-icon":"notion-page-no-icon"))},[d.value.page_icon?(e.openBlock(),e.createBlock(V,{key:0,block:t.block,inline:!1},null,8,["block"])):e.createCommentVNode("",!0),e.createElementVNode("h1",Xt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),t.block.type==="collection_view_page"||t.block.type==="page"&&t.block.parent_table==="collection"?(e.openBlock(),e.createBlock(L,{key:1,block:t.block},null,8,["block"])):e.createCommentVNode("",!0),t.block.type!=="collection_view_page"?(e.openBlock(),e.createElementBlock("div",Zt,[e.renderSlot(b.$slots,"default")])):e.createCommentVNode("",!0)],2)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.block.type==="collection_view_page"||t.block.type==="page"&&t.block.parent_table==="collection"?(e.openBlock(),e.createBlock(L,{key:0,block:t.block},null,8,["block"])):e.createCommentVNode("",!0),t.block.type!=="collection_view_page"?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(b.$slots,"default")])):e.createCommentVNode("",!0)],64))],2)):t.block.type==="page"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).PageLink),{key:1,class:e.normalizeClass(e.unref(y)("notion-page-link",p.value,k.value)),href:e.unref(a)(t.block.id)},{default:e.withCtx(()=>[e.createVNode(V,{block:t.block},null,8,["block"]),e.createElementVNode("div",Kt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])]),_:1},8,["class","href"])):t.block.type==="header"?(e.openBlock(),e.createElementBlock("h1",{key:2,class:e.normalizeClass(e.unref(y)("notion-h","notion-h1",p.value,k.value))},[e.createElementVNode("span",Qt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])],2)):t.block.type==="sub_header"?(e.openBlock(),e.createElementBlock("h2",{key:3,class:e.normalizeClass(e.unref(y)("notion-h","notion-h2",p.value,k.value))},[e.createElementVNode("span",Jt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])],2)):t.block.type==="sub_sub_header"?(e.openBlock(),e.createElementBlock("h3",{key:4,class:e.normalizeClass(e.unref(y)("notion-h","notion-h3",p.value,k.value))},[e.createElementVNode("span",vt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])],2)):t.block.type==="text"?(e.openBlock(),e.createElementBlock("div",{key:5,class:e.normalizeClass(e.unref(y)("notion-text",p.value,k.value))},[s.value?(e.openBlock(),e.createBlock(E,{key:0,value:s.value,block:t.block},null,8,["value","block"])):(e.openBlock(),e.createElementBlock("div",eo," ")),e.renderSlot(b.$slots,"default")],2)):t.block.type==="bulleted_list"?(e.openBlock(),e.createElementBlock("ul",{key:6,class:e.normalizeClass(e.unref(y)("notion-list","notion-list-disc",k.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.renderSlot(b.$slots,"default")],2)):t.block.type==="numbered_list"?(e.openBlock(),e.createElementBlock("ol",{key:7,class:e.normalizeClass(e.unref(y)("notion-list","notion-list-numbered",k.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.renderSlot(b.$slots,"default")],2)):t.block.type==="to_do"?(e.openBlock(),e.createElementBlock("div",{key:8,class:e.normalizeClass(e.unref(y)("notion-to-do",k.value))},[e.createElementVNode("div",to,[e.createElementVNode("div",oo,[e.createElementVNode("input",{type:"checkbox",checked:m.value,readonly:""},null,8,no)]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-to-do-body",m.value&&"notion-to-do-checked"))},[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])],2)]),e.createElementVNode("div",lo,[e.renderSlot(b.$slots,"default")])],2)):t.block.type==="toggle"?(e.openBlock(),e.createElementBlock("details",{key:9,class:e.normalizeClass(e.unref(y)("notion-toggle",k.value))},[e.createElementVNode("summary",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.createElementVNode("div",null,[e.renderSlot(b.$slots,"default")])],2)):t.block.type==="quote"?(e.openBlock(),e.createElementBlock("blockquote",{key:10,class:e.normalizeClass(e.unref(y)("notion-quote",p.value,k.value))},[e.createElementVNode("div",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.renderSlot(b.$slots,"default")],2)):t.block.type==="callout"?(e.openBlock(),e.createElementBlock("div",{key:11,class:e.normalizeClass(e.unref(y)("notion-callout",p.value?`${p.value}_co`:void 0,k.value))},[e.createVNode(V,{block:t.block},null,8,["block"]),e.createElementVNode("div",ao,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"]),e.renderSlot(b.$slots,"default")])],2)):t.block.type==="divider"?(e.openBlock(),e.createElementBlock("hr",{key:12,class:e.normalizeClass(e.unref(y)("notion-hr",k.value))},null,2)):t.block.type==="code"?(e.openBlock(),e.createBlock(tt,{key:13,block:t.block},null,8,["block"])):t.block.type==="breadcrumb"?(e.openBlock(),e.createBlock(Pt,{key:14,block:t.block},null,8,["block"])):t.block.type==="bookmark"?(e.openBlock(),e.createBlock(St,{key:15,block:t.block},null,8,["block"])):t.block.type==="table_of_contents"?(e.openBlock(),e.createBlock(gt,{key:16,block:t.block},null,8,["block"])):t.block.type==="transclusion_container"||t.block.type==="transclusion_reference"?(e.openBlock(),e.createElementBlock("div",{key:17,class:e.normalizeClass(e.unref(y)("notion-sync-block",k.value))},[e.renderSlot(b.$slots,"default")],2)):t.block.type==="equation"?(e.openBlock(),e.createBlock(at,{key:18,block:t.block},null,8,["block"])):["image","video","embed","figma","typeform","gist","maps","excalidraw","codepen","replit","pdf"].includes(t.block.type)?(e.openBlock(),e.createBlock(Ze,{key:19,block:B.value},{default:e.withCtx(()=>[t.block.properties?.caption?(e.openBlock(),e.createElementBlock("figcaption",co,[e.createVNode(E,{value:t.block.properties.caption,block:t.block},null,8,["value","block"])])):e.createCommentVNode("",!0)]),_:1},8,["block"])):t.block.type==="column_list"?(e.openBlock(),e.createElementBlock("div",{key:20,class:e.normalizeClass(e.unref(y)("notion-row",k.value))},[e.renderSlot(b.$slots,"default")],2)):t.block.type==="column"?(e.openBlock(),e.createElementBlock("div",{key:21,class:e.normalizeClass(e.unref(y)("notion-column",k.value)),style:e.normalizeStyle(g.value)},[e.renderSlot(b.$slots,"default")],6)):t.block.type==="collection_view"||t.block.type==="collection_view_page"?(e.openBlock(),e.createBlock(L,{key:22,block:t.block},null,8,["block"])):t.block.type==="external_object_instance"?(e.openBlock(),e.createBlock(jt,{key:23,block:t.block,class:e.normalizeClass(k.value)},null,8,["block","class"])):(e.openBlock(),e.createElementBlock("div",{key:24,class:e.normalizeClass(e.unref(y)("notion-block-fallback",k.value))},null,2))}}),io=e.defineComponent({__name:"NotionBlockRenderer",props:{blockId:{},level:{},zoom:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>o.blockId||Object.keys(n.block)[0]),l=e.computed(()=>n.block[a.value]?.value);return(c,r)=>{const i=e.resolveComponent("NotionBlockRenderer",!0);return l.value?(e.openBlock(),e.createBlock(ro,{key:a.value,level:t.level||0,block:l.value},{default:e.withCtx(()=>[l.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value.content,u=>(e.openBlock(),e.createBlock(i,{key:u,blockId:u,level:(t.level||0)+1},null,8,["blockId","level"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["level","block"])):e.createCommentVNode("",!0)}}}),so=["href"],mo=e.defineComponent({__name:"PageLink",props:{href:{},className:{}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("a",{href:t.href,class:e.normalizeClass(t.className)},[e.renderSlot(o.$slots,"default")],10,so))}}),po={key:0,viewBox:"0 0 14 14",class:"notion-checkbox-check"},ko={name:"NotionCheckbox"},te=e.defineComponent({...ko,props:{isChecked:{type:Boolean}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["notion-checkbox",t.isChecked&&"notion-checkbox-checked"])},[t.isChecked?(e.openBlock(),e.createElementBlock("svg",po,[...n[0]||(n[0]=[e.createElementVNode("polyline",{points:"3.3 7 5.7 9 10.7 4"},null,-1)])])):e.createCommentVNode("",!0)],2))}}),uo=["aria-label"],fo={class:"notion-modal-content"},ho={name:"NotionModal"},bo=e.defineComponent({...ho,props:{isOpen:{type:Boolean},contentLabel:{}},emits:["close"],setup(t,{emit:o}){const n=o;function a(l){l.key==="Escape"&&n("close")}return e.onMounted(()=>{window.addEventListener("keydown",a)}),e.onUnmounted(()=>{window.removeEventListener("keydown",a)}),(l,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"notion-modal-fade"},{default:e.withCtx(()=>[t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"notion-modal-overlay",onClick:c[1]||(c[1]=e.withModifiers(r=>n("close"),["self"]))},[e.createElementVNode("div",{class:"notion-modal",role:"dialog","aria-label":t.contentLabel,"aria-modal":"true"},[e.createElementVNode("button",{class:"notion-modal-close",onClick:c[0]||(c[0]=r=>n("close")),"aria-label":"Close modal"},[...c[2]||(c[2]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"notion-modal-close-icon"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])]),e.createElementVNode("div",fo,[e.renderSlot(l.$slots,"default",{},void 0,!0)])],8,uo)])):e.createCommentVNode("",!0)]),_:3})]))}}),go=((t,o)=>{const n=t.__vccOpts||t;for(const[a,l]of o)n[a]=l;return n})(bo,[["__scopeId","data-v-5ee2c70a"]]),yo={key:0,class:"notion-page-title-text"},Bo={name:"NotionPageTitle"},wo=e.defineComponent({...Bo,props:{block:{},defaultIcon:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>P(o.block,n));return(l,c)=>t.block?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(y)("notion-page-title"))},[e.createVNode(V,{block:t.block,"default-icon":t.defaultIcon,class:"notion-page-title-icon"},null,8,["block","default-icon"]),a.value?(e.openBlock(),e.createElementBlock("span",yo,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}}),_o={class:"quickFindMenu"},Eo={class:"searchBar"},$o={class:"inlineIcon"},No={key:0,class:"loadingIcon",viewBox:"0 0 100 100"},Co={key:1,class:"searchIcon",viewBox:"0 0 24 24"},So={key:0,class:"resultsPane"},Vo=["innerHTML"],xo={class:"resultsFooter"},Fo={class:"resultsCount"},Io={key:1,class:"noResultsPane"},Po={key:1,class:"noResultsPane"},zo={name:"NotionSearchDialog"},Ao=e.defineComponent({...zo,props:{isOpen:{type:Boolean},rootBlockId:{}},emits:["close"],setup(t,{emit:o}){const n=t,a=o,{components:l,searchNotion:c,mapPageUrl:r,defaultPageIcon:i}=_(),u=e.ref(!1),k=e.ref(""),p=e.ref(null),s=e.ref(null),m=e.ref(null);let d=null;function h(b,w){return(...$)=>{d||(d=setTimeout(()=>{b(...$),d=null},w))}}async function f(){if(!k.value.trim()||!c){u.value=!1,p.value=null,s.value=null;return}u.value=!0;try{const b=await c({query:k.value,ancestorId:n.rootBlockId});if(b.error||b.errorId)s.value=b,p.value=null;else{const w=b.results.map(N=>{const F=b.recordMap.block[N.id]?.value;if(!F)return;const ne=P(F,b.recordMap);if(ne&&(N.title=ne,N.block=F,N.recordMap=b.recordMap,N.page=z(F,b.recordMap,{inclusive:!0})||F,!!N.page.id))return N.highlight?.text&&(N.highlight.html=N.highlight.text.replaceAll(/<gzknfouu>/gi,"<b>").replaceAll(/<\/gzknfouu>/gi,"</b>")),N}).filter(Boolean),$=Object.fromEntries(w.map(N=>[N.page.id,N]));p.value={...b,results:Object.values($)},s.value=null}}catch(b){s.value=b,p.value=null}finally{u.value=!1}}const g=h(f,1e3);e.watch(k,b=>{if(!b.trim()){p.value=null,s.value=null,u.value=!1;return}g()}),e.onMounted(async()=>{c&&await c({query:"",ancestorId:n.rootBlockId})});function B(){k.value=""}return(b,w)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).Modal),{"is-open":t.isOpen,"content-label":"Search",onClose:w[3]||(w[3]=$=>a("close"))},{default:e.withCtx(()=>[e.createElementVNode("div",_o,[e.createElementVNode("div",Eo,[e.createElementVNode("div",$o,[u.value?(e.openBlock(),e.createElementBlock("svg",No,[...w[4]||(w[4]=[e.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"currentColor","stroke-width":"10",fill:"none","stroke-dasharray":"282.7","stroke-dashoffset":"210"},[e.createElementVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"1s",repeatCount:"indefinite"})],-1)])])):(e.openBlock(),e.createElementBlock("svg",Co,[...w[5]||(w[5]=[e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},null,-1)])]))]),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:m,"onUpdate:modelValue":w[0]||(w[0]=$=>k.value=$),class:"searchInput",placeholder:"Search",onKeydown:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},null,544),[[e.vModelText,k.value]]),k.value?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"clearButton",onClick:B},[...w[6]||(w[6]=[e.createElementVNode("svg",{class:"clearIcon",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])])):e.createCommentVNode("",!0)]),k.value.trim()&&p.value?(e.openBlock(),e.createElementBlock("div",So,[p.value.results.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.results,$=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:$.id,href:e.unref(r)($.page.id),class:"result notion-page-link",onClick:w[2]||(w[2]=N=>a("close"))},{default:e.withCtx(()=>[e.createVNode(wo,{block:$.page,"default-icon":e.unref(i)},null,8,["block","default-icon"]),$.highlight?.html?(e.openBlock(),e.createElementBlock("div",{key:0,class:"notion-search-result-highlight",innerHTML:$.highlight.html},null,8,Vo)):e.createCommentVNode("",!0)]),_:2},1032,["href"]))),128)),e.createElementVNode("footer",xo,[e.createElementVNode("div",null,[e.createElementVNode("span",Fo,e.toDisplayString(p.value.results.length),1),e.createTextVNode(" "+e.toDisplayString(p.value.results.length===1?" result":" results"),1)])])],64)):(e.openBlock(),e.createElementBlock("div",Io,[...w[7]||(w[7]=[e.createElementVNode("div",{class:"noResults"},"No results",-1),e.createElementVNode("div",{class:"noResultsDetail"},"Try different search terms",-1)])]))])):k.value.trim()&&s.value?(e.openBlock(),e.createElementBlock("div",Po,[...w[8]||(w[8]=[e.createElementVNode("div",{class:"noResults"},"Search error",-1)])])):e.createCommentVNode("",!0)])]),_:1},40,["is-open"]))}}),To={class:"notion-header"},Lo={class:"notion-nav-header"},Do={key:0,class:"breadcrumbs"},Ro={key:1,class:"title"},Oo={key:0,class:"spacer"},Mo={class:"notion-nav-header-right"},Uo={"aria-hidden":"true",role:"graphics-symbol",viewBox:"0 0 20 20",class:"searchIcon",style:{width:"22px",height:"22px",display:"block",fill:"inherit","flex-shrink":"0",color:"inherit"}},jo={name:"NotionHeader"},Ho=e.defineComponent({...jo,props:{block:{}},setup(t){const o=t,{recordMap:n,components:a,mapPageUrl:l,searchNotion:c}=_(),r=e.computed(()=>q(n,o.block.id)),i=e.ref(!1);function u(){i.value=!0}function k(){i.value=!1}function p(s){(s.metaKey||s.ctrlKey)&&(s.key==="p"||s.key==="k")&&(s.preventDefault(),u())}return e.onMounted(()=>{window.addEventListener("keydown",p)}),e.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(s,m)=>(e.openBlock(),e.createElementBlock("header",To,[e.createElementVNode("div",Lo,[r.value?(e.openBlock(),e.createElementBlock("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(d,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.active?"div":e.unref(a).PageLink),e.mergeProps({ref_for:!0},d.active?{}:{href:e.unref(l)(d.pageId)},{class:e.unref(y)("breadcrumb",d.active&&"active")}),{default:e.withCtx(()=>[d.icon?(e.openBlock(),e.createBlock(V,{key:0,block:d.block,class:"icon"},null,8,["block"])):e.createCommentVNode("",!0),d.title?(e.openBlock(),e.createElementBlock("span",Ro,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0)]),_:2},1040,["class"])),h<r.value.length-1?(e.openBlock(),e.createElementBlock("span",Oo," / ")):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Mo,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"notion-nav-button notion-search-button",onClick:u},[(e.openBlock(),e.createElementBlock("svg",Uo,[...m[0]||(m[0]=[e.createElementVNode("path",{d:"M8.875 2.625a6.25 6.25 0 1 0 3.955 11.09l3.983 3.982a.625.625 0 1 0 .884-.884l-3.983-3.982a6.25 6.25 0 0 0-4.84-10.205m-5 6.25a5 5 0 1 1 10 0 5 5 0 0 1-10 0"},null,-1)])]))])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"header-right")]),i.value?(e.openBlock(),e.createBlock(Ao,{key:1,"is-open":i.value,"root-block-id":t.block.id,onClose:k},null,8,["is-open","root-block-id"])):e.createCommentVNode("",!0)])]))}}),Go=e.defineComponent({__name:"NotionRenderer",props:{recordMap:{},components:{},mapPageUrl:{type:Function,default:t=>`/${t}`},mapImageUrl:{type:Function,default:(t,o)=>Fe(t,o)||t},searchNotion:{},fullPage:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},previewImages:{type:Boolean,default:!1},showTableOfContents:{type:Boolean},minTableOfContentsItems:{},defaultPageIcon:{},defaultPageCover:{},defaultPageCoverPosition:{default:.5},isImageZoomable:{type:Boolean},hideHeader:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>({Image:T,Link:"a",PageLink:mo,Checkbox:te,Code:null,Equation:null,Collection:L,Modal:go,Pdf:null,Header:Ho,Text:E,...o.components}));let a=null;return o.isImageZoomable&&typeof window<"u"&&(a=ce({background:"rgba(0, 0, 0, 0.8)",margin:24})),Ie({recordMap:o.recordMap,components:n.value,mapPageUrl:o.mapPageUrl,mapImageUrl:o.mapImageUrl,searchNotion:o.searchNotion,fullPage:o.fullPage,darkMode:o.darkMode,previewImages:o.previewImages,showTableOfContents:o.showTableOfContents,minTableOfContentsItems:o.minTableOfContentsItems||3,defaultPageIcon:o.defaultPageIcon,defaultPageCover:o.defaultPageCover,defaultPageCoverPosition:o.defaultPageCoverPosition||.5,forceCustomImages:!!o.components?.Image,zoom:a,hideHeader:o.hideHeader}),(l,c)=>(e.openBlock(),e.createBlock(io,{level:0,zoom:t.isImageZoomable?e.unref(a):null},null,8,["zoom"]))}}),Wo={name:"NotionProperty"},x=e.defineComponent({...Wo,props:{schema:{},data:{},block:{},collection:{},inline:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>o.schema?.type);return(a,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(y)("notion-property",`notion-property-${n.value}`))},[t.data?n.value==="title"||n.value==="text"?(e.openBlock(),e.createBlock(E,{key:1,value:t.data,block:t.block},null,8,["value","block"])):n.value==="checkbox"?(e.openBlock(),e.createBlock(te,{key:2,"is-checked":t.data?.[0]?.[0]==="Yes"},null,8,["is-checked"])):n.value==="select"||n.value==="multi_select"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(t.data?.[0]?.[0]?.split(","),(c,r)=>(e.openBlock(),e.createElementBlock("span",{key:r,class:e.normalizeClass(e.unref(y)("notion-property-select-item",`notion-item-${c.trim().toLowerCase()}`))},e.toDisplayString(c.trim()),3))),128)):n.value==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(t.data?.[0]?.[0]),1)],64)):(e.openBlock(),e.createBlock(E,{key:5,value:t.data,block:t.block},null,8,["value","block"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[],64))],2))}}),qo={key:0,class:"notion-collection-card-cover"},Xo={class:"notion-collection-card-body"},Zo={class:"notion-collection-card-property"},Yo={key:0,class:"notion-collection-card-property"},Ko={name:"NotionCollectionCard"},D=e.defineComponent({...Ko,props:{block:{},collection:{},collectionView:{},className:{}},setup(t){const o=t,{recordMap:n,mapPageUrl:a,mapImageUrl:l,components:c}=_(),r=e.computed(()=>o.collectionView.format||{}),i=e.computed(()=>r.value.gallery_cover||{type:"none"}),u=e.computed(()=>r.value.gallery_cover_size||"medium"),k=e.computed(()=>r.value.gallery_cover_aspect||"cover"),p=e.computed(()=>r.value.gallery_properties||[]),s=e.computed(()=>{if(i.value.type==="page_cover"){const d=o.block.format?.page_cover;if(d)return{src:l(d,o.block),alt:o.block.properties?.title?.[0]?.[0]||"notion image"}}return null}),m=e.computed(()=>a(o.block.id));return(d,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c).PageLink),{href:m.value,class:e.normalizeClass(e.unref(y)("notion-collection-card",`notion-collection-card-size-${u.value}`,t.className))},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(T,{src:s.value.src,alt:s.value.alt,style:e.normalizeStyle({objectFit:k.value})},null,8,["src","alt","style"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Xo,[e.createElementVNode("div",Zo,[e.createVNode(x,{schema:t.collection.schema.title,data:t.block.properties?.title,block:t.block,collection:t.collection},null,8,["schema","data","block","collection"])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.property},[f.visible&&f.property!=="title"&&t.block.properties?.[f.property]?(e.openBlock(),e.createElementBlock("div",Yo,[e.createVNode(x,{schema:t.collection.schema[f.property],data:t.block.properties[f.property],block:t.block,collection:t.collection,inline:""},null,8,["schema","data","block","collection"])])):e.createCommentVNode("",!0)],64))),128))])]),_:1},8,["href","class"]))}}),Qo={class:"notion-board-th-count"},Jo={name:"NotionCollectionGroup"},R=e.defineComponent({...Jo,props:{collection:{},collectionGroup:{},schema:{},value:{},hidden:{type:Boolean},summaryProps:{},detailsProps:{}},setup(t){const{components:o}=_();return(n,a)=>t.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("details",e.mergeProps({key:0,open:"",class:"notion-collection-group"},t.detailsProps),[e.createElementVNode("summary",e.mergeProps({class:"notion-collection-group-title"},t.summaryProps),[e.createElementVNode("div",null,[e.createVNode(x,{schema:t.schema,data:[[t.value]],collection:t.collection},null,8,["schema","data","collection"]),e.createElementVNode("span",Qo,e.toDisplayString(t.collectionGroup?.total),1)])],16),e.renderSlot(n.$slots,"default")],16))}});function O(t,o,n,...a){return(o?.format?.collection_groups||[]).map(({property:c,hidden:r,value:{value:i,type:u}})=>{const k=i===void 0,p=i?.range,s=k?"uncategorized":p?i.range?.start_date||i.range?.end_date:i?.value||i,m=n[`results:${u}:${s}`];let d=!k&&(p||i?.value||i),h=t.schema[c];if(u==="checkbox"&&i&&(d="Yes"),p){h={type:"text",name:"text"};try{s&&(d=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(new Date(s)))}catch{d=s}}return{collectionGroup:m,schema:h,value:d||"No description",hidden:r,collection:t,collectionView:o,collectionData:n,blockIds:m?.blockIds,...a}})}const vo={class:"notion-gallery"},en={class:"notion-gallery-view"},tn={key:1,class:"notion-gallery"},on={class:"notion-gallery-view"},nn={name:"NotionCollectionViewGallery"},ln=e.defineComponent({...nn,props:{collection:{},collectionView:{},collectionData:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>!!o.collectionView?.format?.collection_group_by),l=e.computed(()=>a.value?O(o.collection,o.collectionView,o.collectionData):[]),c=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),r=e.computed(()=>o.collectionView.format||{}),i=e.computed(()=>r.value.gallery_cover_size||"medium");return(u,k)=>a.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value,(p,s)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:s},{ref_for:!0},p),{default:e.withCtx(()=>[e.createElementVNode("div",vo,[e.createElementVNode("div",en,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-gallery-grid",`notion-gallery-grid-size-${i.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.blockIds,m=>(e.openBlock(),e.createBlock(D,{key:m,block:e.unref(n).block[m]?.value,collection:t.collection,"collection-view":t.collectionView},null,8,["block","collection","collection-view"]))),128))],2)])])]),_:2},1040))),128)):(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",on,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-gallery-grid",`notion-gallery-grid-size-${i.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,p=>(e.openBlock(),e.createBlock(D,{key:p,block:e.unref(n).block[p]?.value,collection:t.collection,"collection-view":t.collectionView},null,8,["block","collection","collection-view"]))),128))],2)])]))}}),an=Object.freeze(Object.defineProperty({__proto__:null,default:ln},Symbol.toStringTag,{value:"Module"})),cn={class:"notion-list-collection"},rn={class:"notion-list-view"},sn={class:"notion-list-body"},dn={class:"notion-list-item-title"},mn={class:"notion-list-item-body"},pn={key:0,class:"notion-list-item-property"},kn={key:1,class:"notion-list-collection"},un={class:"notion-list-view"},fn={class:"notion-list-body"},hn={class:"notion-list-item-title"},bn={class:"notion-list-item-body"},gn={key:0,class:"notion-list-item-property"},yn={name:"NotionCollectionViewList"},Bn=e.defineComponent({...yn,props:{collection:{},collectionView:{},collectionData:{}},setup(t){const o=t,{recordMap:n,mapPageUrl:a,components:l}=_(),c=e.computed(()=>!!o.collectionView?.format?.collection_group_by),r=e.computed(()=>c.value?O(o.collection,o.collectionView,o.collectionData):[]),i=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),u=e.computed(()=>o.collectionView.format?.list_properties?.filter(k=>k.visible)||[]);return(k,p)=>c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(s,m)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:m},{ref_for:!0},s),{default:e.withCtx(()=>[e.createElementVNode("div",cn,[e.createElementVNode("div",rn,[e.createElementVNode("div",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.blockIds,d=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:d,href:e.unref(a)(d),class:"notion-list-item notion-page-link"},{default:e.withCtx(()=>[e.createElementVNode("div",dn,[e.createVNode(V,{block:e.unref(n).block[d]?.value,class:"notion-page-title-icon","hide-default-icon":""},null,8,["block"]),e.createVNode(x,{schema:t.collection.schema.title,data:e.unref(n).block[d]?.value?.properties?.title,block:e.unref(n).block[d]?.value,collection:t.collection},null,8,["schema","data","block","collection"])]),e.createElementVNode("div",mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,h=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h.property},[h.property!=="title"?(e.openBlock(),e.createElementBlock("div",pn,[e.createVNode(x,{schema:t.collection.schema[h.property],data:e.unref(n).block[d]?.value?.properties?.[h.property],block:e.unref(n).block[d]?.value,collection:t.collection},null,8,["schema","data","block","collection"])])):e.createCommentVNode("",!0)],64))),128))])]),_:2},1032,["href"]))),128))])])])]),_:2},1040))),128)):(e.openBlock(),e.createElementBlock("div",kn,[e.createElementVNode("div",un,[e.createElementVNode("div",fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,s=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:s,href:e.unref(a)(s),class:"notion-list-item notion-page-link"},{default:e.withCtx(()=>[e.createElementVNode("div",hn,[e.createVNode(V,{block:e.unref(n).block[s]?.value,class:"notion-page-title-icon","hide-default-icon":""},null,8,["block"]),e.createVNode(x,{schema:t.collection.schema.title,data:e.unref(n).block[s]?.value?.properties?.title,block:e.unref(n).block[s]?.value,collection:t.collection},null,8,["schema","data","block","collection"])]),e.createElementVNode("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,m=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.property},[m.property!=="title"?(e.openBlock(),e.createElementBlock("div",gn,[e.createVNode(x,{schema:t.collection.schema[m.property],data:e.unref(n).block[s]?.value?.properties?.[m.property],block:e.unref(n).block[s]?.value,collection:t.collection},null,8,["schema","data","block","collection"])])):e.createCommentVNode("",!0)],64))),128))])]),_:2},1032,["href"]))),128))])])]))}}),wn=Object.freeze(Object.defineProperty({__proto__:null,default:Bn},Symbol.toStringTag,{value:"Module"})),_n={class:"notion-collection-column-title"},En={class:"notion-collection-column-title-body"},$n={name:"NotionCollectionColumnTitle"},oe=e.defineComponent({...$n,props:{schema:{}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("div",_n,[n[0]||(n[0]=e.createElementVNode("span",{class:"notion-collection-column-title-icon"},null,-1)),e.createElementVNode("span",En,e.toDisplayString(t.schema.name),1)]))}}),Nn={key:0,class:"notion-table-header"},Cn={class:"notion-table-header-inner"},Sn={class:"notion-table-view-header-cell-inner"},Vn={class:"notion-table-body"},xn={key:0,class:"notion-table-header"},Fn={class:"notion-table-header-inner"},In={class:"notion-table-view-header-cell-inner"},Pn={class:"notion-table-body"},zn={name:"NotionCollectionViewTable"},An=e.defineComponent({...zn,props:{collection:{},collectionView:{},collectionData:{},width:{},padding:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>({width:o.width?`${o.width}px`:"100%",maxWidth:o.width?`${o.width}px`:"100%"})),l=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0",paddingRight:o.padding?`${o.padding}px`:"0"})),c=e.computed(()=>!!o.collectionView?.format?.collection_group_by),r=e.computed(()=>c.value?O(o.collection,o.collectionView,o.collectionData):[]),i=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),u=e.computed(()=>o.collectionView.format?.table_properties?o.collectionView.format.table_properties.filter(s=>s.visible&&o.collection.schema[s.property]):[{property:"title"}].concat(Object.keys(o.collection.schema).filter(s=>s!=="title").map(s=>({property:s}))));function k(s){const m={};return s.width?m.width=`${s.width}px`:s.property==="title"?m.width="280px":m.width="200px",m}const p=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0",paddingRight:o.padding?`${o.padding}px`:"0"}));return(s,m)=>c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(d,h)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:h},{ref_for:!0},d,{"summary-props":{style:p.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:"notion-table",style:e.normalizeStyle(a.value)},[e.createElementVNode("div",{class:"notion-table-view",style:e.normalizeStyle(l.value)},[u.value.length?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.property,class:"notion-table-th"},[e.createElementVNode("div",{class:"notion-table-view-header-cell",style:e.normalizeStyle(k(f))},[e.createElementVNode("div",Sn,[e.createVNode(oe,{schema:t.collection.schema[f.property]},null,8,["schema"])])],4)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.blockIds,f=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"notion-table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,g=>(e.openBlock(),e.createElementBlock("div",{key:g.property,class:e.normalizeClass(e.unref(y)("notion-table-cell",`notion-table-cell-${t.collection.schema[g.property]?.type}`)),style:e.normalizeStyle(k(g))},[e.createVNode(x,{schema:t.collection.schema[g.property],data:e.unref(n).block[f]?.value?.properties?.[g.property],block:e.unref(n).block[f]?.value,collection:t.collection},null,8,["schema","data","block","collection"])],6))),128))]))),128))])],4)],4)]),_:2},1040,["summary-props"]))),128)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"notion-table",style:e.normalizeStyle(a.value)},[e.createElementVNode("div",{class:"notion-table-view",style:e.normalizeStyle(l.value)},[u.value.length?(e.openBlock(),e.createElementBlock("div",xn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.property,class:"notion-table-th"},[e.createElementVNode("div",{class:"notion-table-view-header-cell",style:e.normalizeStyle(k(d))},[e.createElementVNode("div",In,[e.createVNode(oe,{schema:t.collection.schema[d.property]},null,8,["schema"])])],4)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"notion-table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.property,class:e.normalizeClass(e.unref(y)("notion-table-cell",`notion-table-cell-${t.collection.schema[h.property]?.type}`)),style:e.normalizeStyle(k(h))},[e.createVNode(x,{schema:t.collection.schema[h.property],data:e.unref(n).block[d]?.value?.properties?.[h.property],block:e.unref(n).block[d]?.value,collection:t.collection},null,8,["schema","data","block","collection"])],6))),128))]))),128))])],4)],4))}}),Tn=Object.freeze(Object.defineProperty({__proto__:null,default:An},Symbol.toStringTag,{value:"Module"})),Ln={class:"notion-board"},Dn={class:"notion-board-header"},Rn={class:"notion-board-header-inner"},On={key:0,class:"notion-board-th-body"},Mn={class:"notion-board-th-title"},Un={class:"notion-board-th-count"},jn={class:"notion-board-body"},Hn={key:1,class:"notion-board"},Gn={class:"notion-board-header"},Wn={class:"notion-board-header-inner"},qn={key:0,class:"notion-board-th-body"},Xn={class:"notion-board-th-title"},Zn={class:"notion-board-th-count"},Yn={class:"notion-board-body"},Kn={name:"NotionCollectionViewBoard"},Qn=e.defineComponent({...Kn,props:{collection:{},collectionView:{},collectionData:{},width:{},padding:{}},setup(t){const o=t,n=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0"})),{recordMap:a}=_(),l=e.computed(()=>!!o.collectionView?.format?.collection_group_by),c=e.computed(()=>l.value?O(o.collection,o.collectionView,o.collectionData):[]),r=e.computed(()=>o.collectionView.format||{}),i=e.computed(()=>r.value.board_cover_size||"medium"),u=e.computed(()=>r.value.board_columns||r.value.board_groups2||[]),k=m=>{const d=`results:${m?.value?.type}:${m?.value?.value||"uncategorized"}`;return o.collectionData[d]||{blockIds:[]}},p=m=>{const d=k(m);return d.total||d.blockIds?.length||0},s=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0"}));return(m,d)=>l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(h,f)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:f},{ref_for:!0},h,{"summary-props":{style:s.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-board-view",`notion-board-view-size-${i.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Dn,[e.createElementVNode("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(g,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"notion-board-th"},[g.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",On,[e.createElementVNode("span",Mn,e.toDisplayString(g.value?.value||"No Select"),1),e.createElementVNode("span",Un,e.toDisplayString(p(g)),1)]))]))),128))])]),d[0]||(d[0]=e.createElementVNode("div",{class:"notion-board-header-placeholder"},null,-1)),e.createElementVNode("div",jn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(g,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"notion-board-group"},[g.hidden?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(k(g).blockIds,b=>(e.openBlock(),e.createBlock(D,{key:b,block:e.unref(a).block[b]?.value,collection:t.collection,"collection-view":t.collectionView,class:"notion-board-group-card"},null,8,["block","collection","collection-view"]))),128))]))),128))])],6)])]),_:1},16,["summary-props"]))),128)):(e.openBlock(),e.createElementBlock("div",Hn,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-board-view",`notion-board-view-size-${i.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Gn,[e.createElementVNode("div",Wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(h,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"notion-board-th"},[h.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",qn,[e.createElementVNode("span",Xn,e.toDisplayString(h.value?.value||"No Select"),1),e.createElementVNode("span",Zn,e.toDisplayString(p(h)),1)]))]))),128))])]),d[1]||(d[1]=e.createElementVNode("div",{class:"notion-board-header-placeholder"},null,-1)),e.createElementVNode("div",Yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(h,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"notion-board-group"},[h.hidden?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(k(h).blockIds,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.unref(a).block[g]?.value?(e.openBlock(),e.createBlock(D,{key:0,block:e.unref(a).block[g].value,collection:t.collection,"collection-view":t.collectionView,class:"notion-board-group-card"},null,8,["block","collection","collection-view"])):e.createCommentVNode("",!0)],64))),128))]))),128))])],6)]))}}),Jn=Object.freeze(Object.defineProperty({__proto__:null,default:Qn},Symbol.toStringTag,{value:"Module"}));S.NotionRenderer=Go,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
2
+ ${o}`,me=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),pe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),ke=(t,o,n)=>{const a=n===""?"":`with ${n.trim()}() `,l=de.bind(null,a,o.toString());Object.defineProperty(l,"name",pe);const{writable:c,enumerable:r,configurable:i}=me;Object.defineProperty(t,"toString",{value:l,writable:c,enumerable:r,configurable:i})};function ue(t,o,{ignoreNonConfigurable:n=!1}={}){const{name:a}=t;for(const l of Reflect.ownKeys(o))re(t,o,l,n);return se(t,o),ke(t,o,a),t}const I=2147483647,fe=new WeakMap,U=new WeakMap,he=new WeakMap;function be(t,o){const n=t.get(o);if(n){if(n.maxAge<=Date.now()){t.delete(o);return}return n}}function ge(t,{cacheKey:o,cache:n=new Map,maxAge:a}={}){if(a===0)return t;if(typeof a=="number"&&Number.isFinite(a)){if(a>I)throw new TypeError(`The \`maxAge\` option cannot exceed ${I}.`);if(a<0)throw new TypeError("The `maxAge` option should not be a negative number.")}const l=function(...c){const r=o?o(c):c[0],i=be(n,r);if(i)return i.data;const u=t.apply(this,c),k=typeof a=="function"?a(...c):a;if(k!==void 0&&k!==Number.POSITIVE_INFINITY){if(!Number.isFinite(k))throw new TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(k<=0)return u;if(k>I)throw new TypeError(`The \`maxAge\` function result cannot exceed ${I}.`)}if(n.set(r,{data:u,maxAge:k===void 0||k===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Date.now()+k}),k!==void 0&&k!==Number.POSITIVE_INFINITY){const p=setTimeout(()=>{n.delete(r),U.get(l)?.delete(p)},k);p.unref?.();const s=U.get(l)??new Set;s.add(p),U.set(l,s)}return u};return ue(l,t,{ignoreNonConfigurable:!0}),fe.set(l,n),he.set(l,o??(c=>c[0])),l}const ye="text/plain",Be="us-ascii",j=(t,o)=>o.some(n=>n instanceof RegExp?n.test(t):n===t),we=new Set(["https:","http:","file:"]),_e=t=>{try{const{protocol:o}=new URL(t);return o.endsWith(":")&&!o.includes(".")&&!we.has(o)}catch{return!1}},Ee=(t,{stripHash:o})=>{const n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!n)throw new Error(`Invalid URL: ${t}`);const{type:a,data:l,hash:c}=n.groups,r=a.split(";"),i=r.at(-1)==="base64";i&&r.pop();const u=r.shift()?.toLowerCase()??"",p=[...r.map(m=>{let[d,h=""]=m.split("=").map(f=>f.trim());return d==="charset"&&(h=h.toLowerCase(),h===Be)?"":`${d}${h?`=${h}`:""}`}).filter(Boolean)];i&&p.push("base64"),(p.length>0||u&&u!==ye)&&p.unshift(u);const s=o||!c?"":`#${c}`;return`data:${p.join(";")},${i?l.trim():l}${s}`};function $e(t,o){if(o={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,...o},typeof o.defaultProtocol=="string"&&!o.defaultProtocol.endsWith(":")&&(o.defaultProtocol=`${o.defaultProtocol}:`),t=t.trim(),/^data:/i.test(t))return Ee(t,o);if(_e(t))return t;const n=t.startsWith("//");!n&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,o.defaultProtocol));const l=new URL(t);if(o.forceHttp&&o.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(o.forceHttp&&l.protocol==="https:"&&(l.protocol="http:"),o.forceHttps&&l.protocol==="http:"&&(l.protocol="https:"),o.stripAuthentication&&(l.username="",l.password=""),o.stripHash?l.hash="":o.stripTextFragment&&(l.hash=l.hash.replace(/#?:~:text.*?$/i,"")),l.pathname){const r=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let i=0,u="";for(;;){const p=r.exec(l.pathname);if(!p)break;const s=p[0],m=p.index,d=l.pathname.slice(i,m);u+=d.replace(/\/{2,}/g,"/"),u+=s,i=m+s.length}const k=l.pathname.slice(i,l.pathname.length);u+=k.replace(/\/{2,}/g,"/"),l.pathname=u}if(l.pathname)try{l.pathname=decodeURI(l.pathname).replace(/\\/g,"%5C")}catch{}if(o.removeDirectoryIndex===!0&&(o.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(o.removeDirectoryIndex)&&o.removeDirectoryIndex.length>0){const r=l.pathname.split("/").filter(Boolean),i=r.at(-1);i&&j(i,o.removeDirectoryIndex)&&(r.pop(),l.pathname=r.length>0?`/${r.join("/")}/`:"/")}if(o.removePath&&(l.pathname="/"),o.transformPath&&typeof o.transformPath=="function"){const r=l.pathname.split("/").filter(Boolean),i=o.transformPath(r);l.pathname=i?.length>0?`/${i.join("/")}`:"/"}if(l.hostname&&(l.hostname=l.hostname.replace(/\.$/,""),o.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(l.hostname)&&(l.hostname=l.hostname.replace(/^www\./,""))),Array.isArray(o.removeQueryParameters))for(const r of[...l.searchParams.keys()])j(r,o.removeQueryParameters)&&l.searchParams.delete(r);if(!Array.isArray(o.keepQueryParameters)&&o.removeQueryParameters===!0&&(l.search=""),Array.isArray(o.keepQueryParameters)&&o.keepQueryParameters.length>0)for(const r of[...l.searchParams.keys()])j(r,o.keepQueryParameters)||l.searchParams.delete(r);if(o.sortQueryParameters){const r=l.search;l.searchParams.sort();try{l.search=decodeURIComponent(l.search)}catch{}const i=r.slice(1).split("&").filter(u=>u&&!u.includes("="));for(const u of i){const k=decodeURIComponent(u);l.search=l.search.replace(`?${k}=`,`?${k}`).replace(`&${k}=`,`&${k}`)}}o.removeTrailingSlash&&(l.pathname=l.pathname.replace(/\/$/,"")),o.removeExplicitPort&&l.port&&(l.port="");const c=t;return t=l.toString(),!o.removeSingleSlash&&l.pathname==="/"&&!c.endsWith("/")&&l.hash===""&&(t=t.replace(/\/$/,"")),(o.removeTrailingSlash||l.pathname==="/")&&l.hash===""&&o.removeSingleSlash&&(t=t.replace(/\/$/,"")),n&&!o.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),o.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}function H(t,o){var n,a,l,c,r,i,u;const k=t.collection_id||((a=(n=t.format)==null?void 0:n.collection_pointer)==null?void 0:a.id);if(k)return k;const p=(l=t?.view_ids)==null?void 0:l[0];if(p){const s=(r=(c=o.collection_view)==null?void 0:c[p])==null?void 0:r.value;if(s)return(u=(i=s.format)==null?void 0:i.collection_pointer)==null?void 0:u.id}return null}var C=t=>{var o;return t?Array.isArray(t)?(o=t?.reduce((n,a)=>n+(a[0]!=="⁍"&&a[0]!=="‣"?a[0]:""),""))!=null?o:"":t:""};function P(t,o){var n,a;if((n=t.properties)!=null&&n.title)return C(t.properties.title);if(t.type==="collection_view_page"||t.type==="collection_view"){const l=H(t,o);if(l){const c=(a=o.collection[l])==null?void 0:a.value;if(c)return C(c.name)}}return""}var Ne={header:0,sub_header:1,sub_sub_header:2},Ce=(t,o)=>{function n(r){return(r??[]).map(i=>{var u,k;const p=(u=o.block[i])==null?void 0:u.value;if(p){const{type:s}=p;if(s==="header"||s==="sub_header"||s==="sub_sub_header")return{id:i,type:s,text:C((k=p.properties)==null?void 0:k.title),indentLevel:Ne[s]};if(s==="transclusion_container"||s==="column_list"||s==="column")return n(p.content)}return null})}function a(r){return r.flatMap(i=>i==null?[]:Array.isArray(i)?a(i):[i])}const l=a(n(t.content)),c=[{actual:-1,effective:-1}];for(const r of l){const{indentLevel:i}=r,u=i;do{const k=c.at(-1),{actual:p,effective:s}=k;if(u>p)r.indentLevel=s+1,c.push({actual:u,effective:r.indentLevel});else if(u===p){r.indentLevel=s;break}else c.pop()}while(!0)}return l},Se=(t,{month:o="short"}={})=>{const n=new Date(t);return`${n.toLocaleString("en-US",{month:o})} ${n.getUTCDate()}, ${n.getUTCFullYear()}`},Ve=t=>{const o=`${t.start_date}T${t.start_time||"00:00"}+00:00`;return Se(o)},G=(t="")=>`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`;function W(t,o){var n,a,l;if((n=t.format)!=null&&n.page_icon)return(a=t.format)==null?void 0:a.page_icon;if(t.type==="collection_view_page"||t.type==="collection_view"){const c=H(t,o);if(c){const r=(l=o.collection[c])==null?void 0:l.value;if(r)return r.icon}}return null}var z=(t,o,{inclusive:n=!1}={})=>{var a,l;let c=t;for(;c;){if(n&&c?.type==="page")return c;const r=c.parent_id,i=c.parent_table;if(!r)break;if(i==="collection")c=(a=o.collection[r])==null?void 0:a.value;else if(c=(l=o.block[r])==null?void 0:l.value,c?.type==="page")return c}return null},A=t=>t.replaceAll("-",""),q=(t,o)=>{var n;const a=t.block,l=[];let c=o;do{const r=(n=a[c])==null?void 0:n.value;if(!r)break;const i=P(r,t),u=W(r,t);if(!(i||u))break;l.push({block:r,active:c===o,pageId:c,title:i,icon:u});const k=z(r,t),p=k?.id;if(!p)break;c=p}while(!0);return l.reverse(),l},xe=/(?:https?:\/\/)?[^\s]+\.gif(?=$|\?|#)/,Fe=(t,o)=>{if(!t)return;if(t.startsWith("data:")||xe.test(t)||t.startsWith("https://images.unsplash.com"))return t;try{const l=new URL(t);if(l.pathname.startsWith("/secure.notion-static.com")&&l.hostname.endsWith(".amazonaws.com")&&l.searchParams.has("X-Amz-Credential")&&l.searchParams.has("X-Amz-Signature")&&l.searchParams.has("X-Amz-Algorithm")||l.hostname==="img.notionusercontent.com")return t}catch{}t.startsWith("/images")&&(t=`https://www.notion.so${t}`),t=`https://www.notion.so${t.startsWith("/image")?t:`/image/${encodeURIComponent(t)}`}`;const n=new URL(t);let a=o.parent_table==="space"?"block":o.parent_table;return(a==="collection"||a==="team")&&(a="block"),n.searchParams.set("table",a),n.searchParams.set("id",o.id),n.searchParams.set("cache","v2"),t=n.toString(),t},X=ge(t=>{if(!t)return"";try{if(t.startsWith("https://www.notion.so/image/")){const o=new URL(t),n=decodeURIComponent(o.pathname.slice(7)),a=X(n);o.pathname=`/image/${encodeURIComponent(a)}`,t=o.toString()}return $e(t,{stripProtocol:!0,stripWWW:!0,stripHash:!0,stripTextFragment:!0,removeQueryParameters:!0})}catch{return""}});const Z=Symbol("NotionContext");function Ie(t){e.provide(Z,t)}function _(){const t=e.inject(Z);if(!t)throw new Error("useNotionContext must be used within a NotionRenderer");return t}const y=(...t)=>t.filter(o=>!!o).map(o=>typeof o=="object"?Object.keys(o).filter(n=>o[n]).join(" "):o).join(" "),Pe=new Set(["youtu.be","youtube.com","www.youtube.com","youtube-nocookie.com","www.youtube-nocookie.com"]),ze=t=>{try{const{hostname:o}=new URL(t);if(!Pe.has(o))return null;const n=/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/i,a=t.match(n);if(a&&a[2]?.length===11)return a[2]}catch{}return null},Ae=["src","alt"],Te=["src","alt","width","height"],Le=["src","alt"],De={name:"LazyImage"},T=e.defineComponent({...De,props:{src:{},alt:{},className:{},style:{},height:{},zoomable:{type:Boolean},priority:{type:Boolean}},setup(t){const o=t,{recordMap:n,previewImages:a,forceCustomImages:l,components:c,zoom:r}=_(),i=e.computed(()=>!a||!o.src?null:n?.preview_images?.[o.src]??n?.preview_images?.[X(o.src)]),u=e.ref(null),k=p=>{o.zoomable&&u.value&&r&&r.attach(u.value)};return(p,s)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("lazy-image-wrapper",t.className)),style:e.normalizeStyle({width:"100%",paddingBottom:t.height?void 0:`${i.value.originalHeight/i.value.originalWidth*100}%`,height:t.height?`${t.height}px`:void 0})},[e.createElementVNode("img",{class:"lazy-image-preview",src:i.value.dataURIBase64,alt:t.alt,decoding:"async"},null,8,Ae),e.createElementVNode("img",{ref_key:"imageRef",ref:u,class:"lazy-image-real",src:t.src,alt:t.alt,width:i.value.originalWidth,height:i.value.originalHeight,decoding:"async",loading:"lazy",onLoad:k},null,40,Te)],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.src?(e.openBlock(),e.createElementBlock("img",{key:0,ref_key:"imageRef",ref:u,class:e.normalizeClass(t.className),style:e.normalizeStyle(t.style),src:t.src,alt:t.alt,loading:"lazy",decoding:"async",onLoad:k},null,46,Le)):e.createCommentVNode("",!0)],64))}}),Re=["aria-label"],Oe={name:"PageIcon"},V=e.defineComponent({...Oe,props:{block:{},className:{},inline:{type:Boolean,default:!0},hideDefaultIcon:{type:Boolean,default:!1},defaultIcon:{}},setup(t){const o=t,{recordMap:n,mapImageUrl:a,darkMode:l}=_(),c=e.computed(()=>W(o.block,n)?.trim()||o.defaultIcon),r=e.computed(()=>P(o.block,n)),i=e.computed(()=>c.value&&(M(c.value)||c.value.startsWith("/icons/"))),u=e.computed(()=>{if(c.value){if(M(c.value))return a(c.value,o.block);if(c.value.startsWith("/icons/"))return`https://www.notion.so${c.value}?mode=${l?"dark":"light"}`}});return(k,p)=>c.value||!t.hideDefaultIcon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)(t.inline?"notion-page-icon-inline":"notion-page-icon-hero",i.value?"notion-page-icon-image":"notion-page-icon-span"))},[i.value?(e.openBlock(),e.createBlock(T,{key:0,src:u.value,alt:r.value||"page icon",className:e.unref(y)(t.className,"notion-page-icon")},null,8,["src","alt","className"])):c.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(y)(t.className,"notion-page-icon")),role:"img","aria-label":c.value},e.toDisplayString(c.value),11,Re)):t.hideDefaultIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(y)(t.className,"notion-page-icon"))}," 📄 ",2))],2)):e.createCommentVNode("",!0)}}),Me=e.defineComponent({__name:"TextDecorator",props:{content:{}},setup(t){const o=t,n=e.computed(()=>o.content[0]),a=e.computed(()=>o.content[1]||[]),{recordMap:l,mapPageUrl:c,components:r}=_(),i=e.computed(()=>{const u=n.value,k=a.value,p=k?.find(d=>d[0]==="eoi");if(p){const d=p[1],h=l.block[d]?.value||l.block[A(d)]?.value||l.block[G(d)]?.value;if(h&&h.type==="external_object_instance"){const f=h.format,g=f?.original_url||f?.uri,w=(f?.attributes||[]).find($=>$.id==="title")?.values?.[0]||g;return e.h("a",{class:"notion-link notion-external-object",href:g,target:"_blank",rel:"noopener noreferrer"},w||"Original Link")}}const s=k?.find(d=>d[0]==="p");if(s){const d=s[1],h=l.block[d]?.value||l.block[A(d)]?.value||l.block[G(d)]?.value;if(h){const f=C(h.properties?.title)||"Untitled",g=c(d);return e.h(r.PageLink,{class:"notion-link notion-page-mention",href:g},()=>[e.h(V,{block:h,class:"notion-page-mention-icon"}),e.h("span",{class:"notion-page-mention-text"},f)])}else{const f=c(d);return e.h(r.PageLink,{class:"notion-link notion-page-mention",href:f},()=>[e.h("span",{class:"notion-page-mention-text"},"Page")])}}if(!k?.length)return u;let m=u;for(const d of k)switch(d[0]){case"b":m=e.h("b",null,m);break;case"i":m=e.h("i",null,m);break;case"s":m=e.h("s",null,m);break;case"a":const f=d[1];f.startsWith("/")?m=e.h(r.PageLink,{class:"notion-link",href:f},m):m=e.h("a",{class:"notion-link",href:f,target:"_blank",rel:"noopener noreferrer"},m);break;case"c":m=e.h("code",{class:"notion-inline-code"},m);break;case"_":m=e.h("span",{class:"notion-inline-underscore"},m);break;case"h":const g=d[1];m=e.h("span",{class:`notion-${g}`},m);break}return m});return(u,k)=>typeof i.value=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(i.value),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:1}))}}),Ue={key:0,class:"notion-text"},E=e.defineComponent({__name:"Text",props:{value:{},block:{}},setup(t){return(o,n)=>t.value?(e.openBlock(),e.createElementBlock("span",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(a,l)=>(e.openBlock(),e.createBlock(Me,{key:l,content:a},null,8,["content"]))),128))])):e.createCommentVNode("",!0)}}),je=["src"],He=["src"],Ge=["src"],We={key:3,class:"notion-pdf"},qe=["href"],Xe={name:"NotionAsset"},Ze=e.defineComponent({...Xe,props:{block:{},zoomable:{type:Boolean}},setup(t){const o=t,{recordMap:n,mapImageUrl:a,components:l}=_(),c=e.computed(()=>{const m={position:"relative",display:"flex",justifyContent:"center",alignSelf:"center",width:"100%",maxWidth:"100%",flexDirection:"column"};if(o.block.format){const{block_aspect_ratio:d,block_height:h,block_width:f,block_full_width:g,block_page_width:B,block_preserve_scale:b}=o.block.format;if(g||B)g?m.width="100vw":m.width="100%",o.block.type==="video"?h?m.height=`${h}px`:d&&(m.paddingBottom=`${d*100}%`):d&&o.block.type!=="image"?m.paddingBottom=`${d*100}%`:h&&(m.height=`${h}px`);else{switch(o.block.format?.block_alignment){case"center":m.alignSelf="center";break;case"left":m.alignSelf="start";break;case"right":m.alignSelf="end";break}f&&(m.width=typeof f=="number"?`${f}px`:f)}}return m}),r=e.computed(()=>{const m={};return o.block.type==="image"||u.value?m.objectFit="cover":o.block.format?.block_preserve_scale&&(m.objectFit="contain"),m}),i=e.computed(()=>{let m=n.signed_urls?.[o.block.id]||o.block.properties?.source?.[0]?.[0];if(m&&o.block.space_id){const d=new URL(m);d.searchParams.set("spaceId",o.block.space_id),m=d.toString()}return m}),u=e.computed(()=>{if(o.block.type==="embed"&&i.value){const m=i.value.toLowerCase();return/\.(jpeg|jpg|gif|png|webp|svg)($|\?)/.test(m)}return!1}),k=e.computed(()=>{if((o.block.type==="image"||u.value)&&i.value){let m=i.value;return!m.includes(".gif")&&m.includes("file.notion.so")&&(m=o.block.properties?.source?.[0]?.[0]),a(m,o.block)}return i.value}),p=e.computed(()=>{const m=C(o.block.properties?.alt_text),d=C(o.block.properties?.caption);return m||d||"notion image"}),s=e.computed(()=>o.block.type==="video"&&i.value?ze(i.value):null);return(m,d)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(c.value)},[t.block.type==="image"||u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).Image),{key:0,src:k.value,alt:p.value,zoomable:t.zoomable,style:e.normalizeStyle(r.value)},null,8,["src","alt","zoomable","style"])):t.block.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,class:"notion-asset-object-fit",style:e.normalizeStyle(r.value),src:`https://www.youtube.com/embed/${s.value}`,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,je)):(e.openBlock(),e.createElementBlock("video",{key:1,playsInline:"",controls:"",preload:"metadata",style:e.normalizeStyle(r.value),src:i.value},null,12,He))],64)):["embed","figma","typeform","gist","maps","excalidraw","codepen","replit"].includes(t.block.type)?(e.openBlock(),e.createElementBlock("iframe",{key:2,class:"notion-asset-object-fit",style:e.normalizeStyle(r.value),src:i.value,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,Ge)):t.block.type==="pdf"?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("a",{href:i.value,target:"_blank"},"View PDF",8,qe)])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default")],4)):e.createCommentVNode("",!0)}});var Y={},K;function Ye(){return K||(K=1,(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var o=t.languages.extend("typescript",{});delete o["class-name"],t.languages.typescript["class-name"].inside=o,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:o}}}}),t.languages.ts=t.languages.typescript})(Prism)),Y}Ye(),Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,(function(t){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,(function(t){var o="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+o),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+o),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+o),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+o),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var l=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],c=a.variable[1].inside,r=0;r<l.length;r++)c[l[r]]=t.languages.bash[l[r]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(Prism),(function(t){var o=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(p){return p=p.replace(/<inner>/g,function(){return o}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,l=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return a}),c=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+l+c+"(?:"+l+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+l+c+")(?:"+l+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+l+")"+c+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+l+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(p){["url","bold","italic","strike","code-snippet"].forEach(function(s){p!==s&&(t.languages.markdown[p].inside.content.inside[s]=t.languages.markdown[s])})}),t.hooks.add("after-tokenize",function(p){if(p.language!=="markdown"&&p.language!=="md")return;function s(m){if(!(!m||typeof m=="string"))for(var d=0,h=m.length;d<h;d++){var f=m[d];if(f.type!=="code"){s(f.content);continue}var g=f.content[1],B=f.content[3];if(g&&B&&g.type==="code-language"&&B.type==="code-block"&&typeof g.content=="string"){var b=g.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");b=(/[a-z][\w-]*/i.exec(b)||[""])[0].toLowerCase();var w="language-"+b;B.alias?typeof B.alias=="string"?B.alias=[B.alias,w]:B.alias.push(w):B.alias=[w]}}}s(p.tokens)}),t.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var s="",m=0,d=p.classes.length;m<d;m++){var h=p.classes[m],f=/language-(.+)/.exec(h);if(f){s=f[1];break}}var g=t.languages[s];if(g)p.content=t.highlight(k(p.content),g,s);else if(s&&s!=="none"&&t.plugins.autoloader){var B="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);p.attributes.id=B,t.plugins.autoloader.loadLanguages(s,function(){var b=document.getElementById(B);b&&(b.innerHTML=t.highlight(b.textContent,t.languages[s],s))})}}});var r=RegExp(t.languages.markup.tag.pattern.source,"gi"),i={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function k(p){var s=p.replace(r,"");return s=s.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(m,d){if(d=d.toLowerCase(),d[0]==="#"){var h;return d[1]==="x"?h=parseInt(d.slice(2),16):h=Number(d.slice(1)),u(h)}else{var f=i[d];return f||m}}),s}t.languages.md=t.languages.markdown})(Prism);var Q={},J;function Ke(){return J||(J=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Q}Ke();var v={},ee;function Qe(){return ee||(ee=1,(function(t){for(var o=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)o=o.replace(/<self>/g,function(){return o});o=o.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+o),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(Prism)),v}Qe();const Je={class:"notion-code"},ve={key:0,class:"notion-asset-caption"},et={name:"NotionCode"},tt=e.defineComponent({...et,props:{block:{},defaultLanguage:{}},setup(t){const o=t,n=e.computed(()=>C(o.block.properties?.title)),a=e.computed(()=>o.block.properties?.language?.[0]?.[0]?.toLowerCase()||o.defaultLanguage||"typescript"),l=e.computed(()=>o.block.properties?.caption),c=e.ref(null),r=()=>{c.value&&le.highlightElement(c.value)};return e.onMounted(r),e.watch(n,r),e.watch(a,r),(i,u)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("pre",{class:e.normalizeClass(`language-${a.value}`)},[e.createElementVNode("code",{ref_key:"codeRef",ref:c,class:e.normalizeClass(`language-${a.value}`)},e.toDisplayString(n.value),3)],2),l.value?(e.openBlock(),e.createElementBlock("figcaption",ve,[e.createVNode(E,{value:l.value,block:t.block},null,8,["value","block"])])):e.createCommentVNode("",!0)]))}}),ot=["innerHTML"],nt=["innerHTML"],lt={name:"NotionEquation"},at=e.defineComponent({...lt,props:{block:{},inline:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>C(o.block.properties?.title)),a=e.computed(()=>{const l=n.value;if(!l)return"";try{return ae.renderToString(l,{throwOnError:!1,displayMode:!o.inline})}catch(c){return console.error("KaTeX error",c),l}});return(l,c)=>t.inline?(e.openBlock(),e.createElementBlock("span",{key:0,class:"notion-equation notion-equation-inline",innerHTML:a.value},null,8,ot)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"notion-equation notion-equation-block",innerHTML:a.value},null,8,nt))}}),ct={class:"notion-collection-view"},rt={key:4,class:"notion-collection-view-fallback"},it={name:"NotionCollectionView"},st=e.defineComponent({...it,props:{collection:{},collectionView:{},collectionData:{},width:{},padding:{}},setup(t){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>an)),n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>wn)),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Tn)),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Jn));return(c,r)=>(e.openBlock(),e.createElementBlock("div",ct,[t.collectionView.type==="gallery"?(e.openBlock(),e.createBlock(e.unref(o),{key:0,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):t.collectionView.type==="list"?(e.openBlock(),e.createBlock(e.unref(n),{key:1,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):t.collectionView.type==="table"?(e.openBlock(),e.createBlock(e.unref(a),{key:2,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):t.collectionView.type==="board"?(e.openBlock(),e.createBlock(e.unref(l),{key:3,collection:t.collection,"collection-view":t.collectionView,"collection-data":t.collectionData,width:t.width,padding:t.padding},null,8,["collection","collection-view","collection-data","width","padding"])):(e.openBlock(),e.createElementBlock("div",rt," Unsupported collection view: "+e.toDisplayString(t.collectionView.type),1))]))}}),dt={key:0,class:"notion-collection-view-tabs-row"},mt=["onClick"],pt={class:"notion-collection-view-type-title"},kt={key:1,class:"notion-collection-header"},ut={class:"notion-collection-header-title"},ft={name:"NotionCollection"},L=e.defineComponent({...ft,props:{block:{},className:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>H(o.block,n)),l=e.computed(()=>a.value?n.collection[a.value]?.value:null),c=e.computed(()=>o.block.view_ids||[]),r=e.ref(c.value[0]),i=e.computed(()=>r.value?n.collection_view[r.value]?.value:null),u=e.computed(()=>!a.value||!r.value?null:n.collection_query[a.value]?.[r.value]),k=e.computed(()=>l.value?C(l.value.name).trim():""),p=e.computed(()=>i.value?.format?.hide_linked_collection_name!==!0&&k.value),s=e.ref(typeof window<"u"?window.innerWidth:1024),m=()=>{s.value=window.innerWidth};e.onMounted(()=>{window.addEventListener("resize",m)}),e.onUnmounted(()=>{window.removeEventListener("resize",m)});const d=e.computed(()=>{const g=z(o.block,n)?.format?.page_full_width===!0;if(i.value?.type!=="table"&&i.value?.type!=="board")return{width:0,padding:0};const B=s.value,b=708;let w=b;g?w=Math.trunc(B-2*Math.min(96,B*.08)):w=B<b?Math.trunc(B-B*.02):b;const $=Math.max(0,Math.trunc((B-w)/2));return{width:B,padding:$}}),h=f=>{r.value=f};return(f,g)=>l.value&&i.value&&u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("notion-collection-wrapper",t.className))},[c.value.length>1?(e.openBlock(),e.createElementBlock("div",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,B=>(e.openBlock(),e.createElementBlock("button",{key:B,onClick:b=>h(B),class:e.normalizeClass(e.unref(y)("notion-collection-view-tabs-content-item",r.value===B&&"notion-collection-view-tabs-content-item-active"))},[e.createElementVNode("span",pt,e.toDisplayString(e.unref(n).collection_view[B]?.value?.name||e.unref(n).collection_view[B]?.value?.type),1)],10,mt))),128))])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",kt,[e.createElementVNode("div",ut,[l.value.icon?(e.openBlock(),e.createBlock(V,{key:0,block:t.block,class:"notion-page-title-icon","hide-default-icon":""},null,8,["block"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(k.value),1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-collection",t.className))},[e.createVNode(st,{collection:l.value,collectionView:i.value,collectionData:u.value,width:d.value.width,padding:d.value.padding},null,8,["collection","collectionView","collectionData","width","padding"])],2)],2)):e.createCommentVNode("",!0)}}),ht=["href"],bt={name:"NotionTableOfContents"},gt=e.defineComponent({...bt,props:{block:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>{const c=z(o.block,n);return c?Ce(c,n):[]}),l=e.computed(()=>o.block.format?.block_color);return(c,r)=>a.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("notion-table-of-contents",l.value&&`notion-${l.value}`,t.block.id))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,i=>(e.openBlock(),e.createElementBlock("a",{key:i.id,href:`#${e.unref(A)(i.id)}`,class:e.normalizeClass(e.unref(y)("notion-table-of-contents-item",`notion-table-of-contents-item-indent-level-${i.indentLevel}`))},[e.createElementVNode("span",{class:"notion-table-of-contents-item-body",style:e.normalizeStyle({marginLeft:`${i.indentLevel*24}px`})},e.toDisplayString(i.text),5)],10,ht))),128))],2)):e.createCommentVNode("",!0)}}),yt={class:"notion-bookmark-info"},Bt={key:0,class:"notion-bookmark-title"},wt={key:1,class:"notion-bookmark-description"},_t={class:"notion-bookmark-link-row"},Et=["src","alt"],$t={key:1,class:"notion-bookmark-link-text"},Nt={key:0,class:"notion-bookmark-image"},Ct={name:"NotionBookmark"},St=e.defineComponent({...Ct,props:{block:{}},setup(t){const o=t,{mapImageUrl:n,components:a}=_(),l=e.computed(()=>C(o.block.properties?.title)),c=e.computed(()=>C(o.block.properties?.description)),r=e.computed(()=>o.block.properties?.link?.[0]?.[0]);e.computed(()=>o.block.properties?.caption);const i=e.computed(()=>o.block.format?.bookmark_cover),u=e.computed(()=>o.block.format?.bookmark_icon);return(k,p)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("notion-bookmark",t.block.id))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).Link),{href:r.value,target:"_blank",rel:"noopener noreferrer",class:"notion-bookmark-link"},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[l.value?(e.openBlock(),e.createElementBlock("div",Bt,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_t,[u.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:e.unref(n)(u.value,t.block),class:"notion-bookmark-link-icon",alt:l.value},null,8,Et)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",$t,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)])]),i.value?(e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(T,{src:e.unref(n)(i.value,t.block),alt:l.value,style:{"object-fit":"cover"}},null,8,["src","alt"])])):e.createCommentVNode("",!0)]),_:1},8,["href"]))],2)):e.createCommentVNode("",!0)}}),Vt={key:0,class:"notion-breadcrumbs"},xt={key:1,class:"notion-breadcrumb-title"},Ft={key:0,class:"notion-spacer"},It={name:"NotionBreadcrumbs"},Pt=e.defineComponent({...It,props:{block:{}},setup(t){const o=t,{recordMap:n,components:a,mapPageUrl:l}=_(),c=e.computed(()=>q(n,o.block.id));return(r,i)=>c.value?(e.openBlock(),e.createElementBlock("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(u,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).PageLink),{href:e.unref(l)(u.pageId),class:"notion-breadcrumb"},{default:e.withCtx(()=>[u.icon?(e.openBlock(),e.createBlock(V,{key:0,block:u.block,class:"notion-breadcrumb-icon"},null,8,["block"])):e.createCommentVNode("",!0),u.title?(e.openBlock(),e.createElementBlock("span",xt,e.toDisplayString(u.title),1)):e.createCommentVNode("",!0)]),_:2},1032,["href"])),k<c.value.length-1?(e.openBlock(),e.createElementBlock("div",Ft,"/")):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)}}),zt={key:0,class:"notion-external-image"},At={key:0,viewBox:"0 0 24 24",fill:"#24292e"},Tt={class:"notion-external-description"},Lt={class:"notion-external-title"},Dt={key:0,class:"notion-external-block-desc"},Rt={key:0},Ot={key:1},Mt={key:2},Ut={key:1,style:{color:"#999","font-style":"italic",padding:"8px"}},jt=e.defineComponent({__name:"ExternalObjectInstance",props:{block:{},inline:{type:Boolean},className:{}},setup(t){const o=t,{components:n}=_(),a=e.computed(()=>o.block?.format||{}),l=e.computed(()=>a.value.original_url),c=e.computed(()=>a.value.attributes||[]),r=e.computed(()=>a.value.domain),i=e.computed(()=>c.value.find(f=>f.id==="title")?.values[0]||""),u=e.computed(()=>{let f=c.value.find(g=>g.id==="owner")?.values[0]||"";return r.value==="github.com"&&f&&(f=f.split("/").at(-1)||f),f}),k=e.computed(()=>c.value.find(f=>f.id==="updated_at")?.values[0]),p=e.computed(()=>k.value?Ve(k.value):null),s=e.computed(()=>r.value==="github.com"),m=e.computed(()=>r.value==="github.com"?"github":null),d=e.computed(()=>l.value&&c.value.length>0);return(h,f)=>d.value&&s.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).PageLink),{key:0,target:"_blank",rel:"noopener noreferrer",href:l.value,class:e.normalizeClass(e.unref(y)("notion-external",t.inline?"notion-external-mention":"notion-external-block notion-row",t.className))},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",zt,[m.value==="github"?(e.openBlock(),e.createElementBlock("svg",At,[...f[0]||(f[0]=[e.createElementVNode("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"},null,-1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Tt,[e.createElementVNode("div",Lt,e.toDisplayString(i.value),1),!t.inline&&(u.value||p.value)?(e.openBlock(),e.createElementBlock("div",Dt,[u.value?(e.openBlock(),e.createElementBlock("span",Rt,e.toDisplayString(u.value),1)):e.createCommentVNode("",!0),u.value&&p.value?(e.openBlock(),e.createElementBlock("span",Ot," • ")):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("span",Mt,"Updated "+e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["href","class"])):(e.openBlock(),e.createElementBlock("div",Ut," [Unsupported external integration: "+e.toDisplayString(r.value||"unknown")+"] ",1))}}),Ht={key:0,class:"notion-frame"},Gt={key:1,class:"notion-page-cover-wrapper"},Wt=["src"],qt={class:"notion-page-scroller"},Xt={class:"notion-title"},Zt={key:2,class:"notion-page-content"},Yt={key:1,class:"notion-page-content"},Kt={class:"notion-page-link-text"},Qt={class:"notion-h-title"},Jt={class:"notion-h-title"},vt={class:"notion-h-title"},eo={key:1,class:"notion-blank"},to={class:"notion-to-do-item"},oo={class:"notion-to-do-checkbox"},no=["checked"],lo={class:"notion-to-do-children"},ao={class:"notion-callout-text"},co={key:0,class:"notion-asset-caption"},ro=e.defineComponent({__name:"Block",props:{block:{},level:{},className:{},hideBlockId:{type:Boolean}},setup(t){const o=t,{components:n,mapPageUrl:a,mapImageUrl:l,fullPage:c,darkMode:r,recordMap:i,hideHeader:u}=_(),k=e.computed(()=>o.hideBlockId?"notion-block":`notion-block-${A(o.block.id)}`),p=e.computed(()=>o.block.format?.block_color?`notion-${o.block.format.block_color}`:void 0),s=e.computed(()=>o.block.properties?.title),m=e.computed(()=>o.block.properties?.checked?.[0]?.[0]==="Yes"),d=e.computed(()=>o.block.format||{}),h=e.computed(()=>d.value?.page_cover?l(d.value.page_cover,o.block):null),f=e.computed(()=>`center ${(1-(d.value?.page_cover_position||.5))*100}%`),g=e.computed(()=>o.block.type==="column"&&d.value?.column_ratio?{width:`calc(${d.value.column_ratio*100}% - 16px)`}:{});e.computed(()=>{const b=o.block.collection_id;return b&&i.collection[b]?C(i.collection[b].value?.name):"Untitled"});const B=e.computed(()=>o.block);return(b,w)=>t.level===0&&(t.block.type==="page"||t.block.type==="collection_view_page")?(e.openBlock(),e.createElementBlock("main",{key:0,class:e.normalizeClass(e.unref(y)(e.unref(r)?"dark-mode":"light-mode",k.value,t.className,d.value.page_full_width&&"notion-full-width",d.value.page_small_text&&"notion-small-text"))},[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Ht,[e.unref(u)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).Header),{key:0,block:t.block},null,8,["block"])),h.value?(e.openBlock(),e.createElementBlock("div",Gt,[e.createElementVNode("img",{class:"notion-page-cover",src:h.value,alt:"page cover",style:e.normalizeStyle({objectPosition:f.value})},null,12,Wt)])):e.createCommentVNode("",!0),e.createElementVNode("div",qt,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-page",h.value?"notion-page-has-cover":"notion-page-no-cover",d.value.page_icon?"notion-page-has-icon":"notion-page-no-icon"))},[d.value.page_icon?(e.openBlock(),e.createBlock(V,{key:0,block:t.block,inline:!1},null,8,["block"])):e.createCommentVNode("",!0),e.createElementVNode("h1",Xt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),t.block.type==="collection_view_page"||t.block.type==="page"&&t.block.parent_table==="collection"?(e.openBlock(),e.createBlock(L,{key:1,block:t.block},null,8,["block"])):e.createCommentVNode("",!0),t.block.type!=="collection_view_page"?(e.openBlock(),e.createElementBlock("div",Zt,[e.renderSlot(b.$slots,"default")])):e.createCommentVNode("",!0)],2)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.block.type==="collection_view_page"||t.block.type==="page"&&t.block.parent_table==="collection"?(e.openBlock(),e.createBlock(L,{key:0,block:t.block},null,8,["block"])):e.createCommentVNode("",!0),t.block.type!=="collection_view_page"?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(b.$slots,"default")])):e.createCommentVNode("",!0)],64))],2)):t.block.type==="page"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).PageLink),{key:1,class:e.normalizeClass(e.unref(y)("notion-page-link",p.value,k.value)),href:e.unref(a)(t.block.id)},{default:e.withCtx(()=>[e.createVNode(V,{block:t.block},null,8,["block"]),e.createElementVNode("div",Kt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])]),_:1},8,["class","href"])):t.block.type==="header"?(e.openBlock(),e.createElementBlock("h1",{key:2,class:e.normalizeClass(e.unref(y)("notion-h","notion-h1",p.value,k.value))},[e.createElementVNode("span",Qt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])],2)):t.block.type==="sub_header"?(e.openBlock(),e.createElementBlock("h2",{key:3,class:e.normalizeClass(e.unref(y)("notion-h","notion-h2",p.value,k.value))},[e.createElementVNode("span",Jt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])],2)):t.block.type==="sub_sub_header"?(e.openBlock(),e.createElementBlock("h3",{key:4,class:e.normalizeClass(e.unref(y)("notion-h","notion-h3",p.value,k.value))},[e.createElementVNode("span",vt,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])])],2)):t.block.type==="text"?(e.openBlock(),e.createElementBlock("div",{key:5,class:e.normalizeClass(e.unref(y)("notion-text",p.value,k.value))},[s.value?(e.openBlock(),e.createBlock(E,{key:0,value:s.value,block:t.block},null,8,["value","block"])):(e.openBlock(),e.createElementBlock("div",eo," ")),e.renderSlot(b.$slots,"default")],2)):t.block.type==="bulleted_list"?(e.openBlock(),e.createElementBlock("ul",{key:6,class:e.normalizeClass(e.unref(y)("notion-list","notion-list-disc",k.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.renderSlot(b.$slots,"default")],2)):t.block.type==="numbered_list"?(e.openBlock(),e.createElementBlock("ol",{key:7,class:e.normalizeClass(e.unref(y)("notion-list","notion-list-numbered",k.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.renderSlot(b.$slots,"default")],2)):t.block.type==="to_do"?(e.openBlock(),e.createElementBlock("div",{key:8,class:e.normalizeClass(e.unref(y)("notion-to-do",k.value))},[e.createElementVNode("div",to,[e.createElementVNode("div",oo,[e.createElementVNode("input",{type:"checkbox",checked:m.value,readonly:""},null,8,no)]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-to-do-body",m.value&&"notion-to-do-checked"))},[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])],2)]),e.createElementVNode("div",lo,[e.renderSlot(b.$slots,"default")])],2)):t.block.type==="toggle"?(e.openBlock(),e.createElementBlock("details",{key:9,class:e.normalizeClass(e.unref(y)("notion-toggle",k.value))},[e.createElementVNode("summary",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.createElementVNode("div",null,[e.renderSlot(b.$slots,"default")])],2)):t.block.type==="quote"?(e.openBlock(),e.createElementBlock("blockquote",{key:10,class:e.normalizeClass(e.unref(y)("notion-quote",p.value,k.value))},[e.createElementVNode("div",null,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"])]),e.renderSlot(b.$slots,"default")],2)):t.block.type==="callout"?(e.openBlock(),e.createElementBlock("div",{key:11,class:e.normalizeClass(e.unref(y)("notion-callout",p.value?`${p.value}_co`:void 0,k.value))},[e.createVNode(V,{block:t.block},null,8,["block"]),e.createElementVNode("div",ao,[e.createVNode(E,{value:s.value,block:t.block},null,8,["value","block"]),e.renderSlot(b.$slots,"default")])],2)):t.block.type==="divider"?(e.openBlock(),e.createElementBlock("hr",{key:12,class:e.normalizeClass(e.unref(y)("notion-hr",k.value))},null,2)):t.block.type==="code"?(e.openBlock(),e.createBlock(tt,{key:13,block:t.block},null,8,["block"])):t.block.type==="breadcrumb"?(e.openBlock(),e.createBlock(Pt,{key:14,block:t.block},null,8,["block"])):t.block.type==="bookmark"?(e.openBlock(),e.createBlock(St,{key:15,block:t.block},null,8,["block"])):t.block.type==="table_of_contents"?(e.openBlock(),e.createBlock(gt,{key:16,block:t.block},null,8,["block"])):t.block.type==="transclusion_container"||t.block.type==="transclusion_reference"?(e.openBlock(),e.createElementBlock("div",{key:17,class:e.normalizeClass(e.unref(y)("notion-sync-block",k.value))},[e.renderSlot(b.$slots,"default")],2)):t.block.type==="equation"?(e.openBlock(),e.createBlock(at,{key:18,block:t.block},null,8,["block"])):["image","video","embed","figma","typeform","gist","maps","excalidraw","codepen","replit","pdf"].includes(t.block.type)?(e.openBlock(),e.createBlock(Ze,{key:19,block:B.value},{default:e.withCtx(()=>[t.block.properties?.caption?(e.openBlock(),e.createElementBlock("figcaption",co,[e.createVNode(E,{value:t.block.properties.caption,block:t.block},null,8,["value","block"])])):e.createCommentVNode("",!0)]),_:1},8,["block"])):t.block.type==="column_list"?(e.openBlock(),e.createElementBlock("div",{key:20,class:e.normalizeClass(e.unref(y)("notion-row",k.value))},[e.renderSlot(b.$slots,"default")],2)):t.block.type==="column"?(e.openBlock(),e.createElementBlock("div",{key:21,class:e.normalizeClass(e.unref(y)("notion-column",k.value)),style:e.normalizeStyle(g.value)},[e.renderSlot(b.$slots,"default")],6)):t.block.type==="collection_view"||t.block.type==="collection_view_page"?(e.openBlock(),e.createBlock(L,{key:22,block:t.block},null,8,["block"])):t.block.type==="external_object_instance"?(e.openBlock(),e.createBlock(jt,{key:23,block:t.block,class:e.normalizeClass(k.value)},null,8,["block","class"])):(e.openBlock(),e.createElementBlock("div",{key:24,class:e.normalizeClass(e.unref(y)("notion-block-fallback",k.value))},null,2))}}),io=e.defineComponent({__name:"NotionBlockRenderer",props:{blockId:{},level:{},zoom:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>o.blockId||Object.keys(n.block)[0]),l=e.computed(()=>n.block[a.value]?.value);return(c,r)=>{const i=e.resolveComponent("NotionBlockRenderer",!0);return l.value?(e.openBlock(),e.createBlock(ro,{key:a.value,level:t.level||0,block:l.value},{default:e.withCtx(()=>[l.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value.content,u=>(e.openBlock(),e.createBlock(i,{key:u,blockId:u,level:(t.level||0)+1},null,8,["blockId","level"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["level","block"])):e.createCommentVNode("",!0)}}}),so=["href"],mo=e.defineComponent({__name:"PageLink",props:{href:{},className:{}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("a",{href:t.href,class:e.normalizeClass(t.className)},[e.renderSlot(o.$slots,"default")],10,so))}}),po={key:0,viewBox:"0 0 14 14",class:"notion-checkbox-check"},ko={name:"NotionCheckbox"},te=e.defineComponent({...ko,props:{isChecked:{type:Boolean}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["notion-checkbox",t.isChecked&&"notion-checkbox-checked"])},[t.isChecked?(e.openBlock(),e.createElementBlock("svg",po,[...n[0]||(n[0]=[e.createElementVNode("polyline",{points:"3.3 7 5.7 9 10.7 4"},null,-1)])])):e.createCommentVNode("",!0)],2))}}),uo=["aria-label"],fo={class:"notion-modal-content"},ho={name:"NotionModal"},bo=e.defineComponent({...ho,props:{isOpen:{type:Boolean},contentLabel:{}},emits:["close"],setup(t,{emit:o}){const n=o;function a(l){l.key==="Escape"&&n("close")}return e.onMounted(()=>{window.addEventListener("keydown",a)}),e.onUnmounted(()=>{window.removeEventListener("keydown",a)}),(l,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"notion-modal-fade"},{default:e.withCtx(()=>[t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"notion-modal-overlay",onClick:c[1]||(c[1]=e.withModifiers(r=>n("close"),["self"]))},[e.createElementVNode("div",{class:"notion-modal",role:"dialog","aria-label":t.contentLabel,"aria-modal":"true"},[e.createElementVNode("button",{class:"notion-modal-close",onClick:c[0]||(c[0]=r=>n("close")),"aria-label":"Close modal"},[...c[2]||(c[2]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"notion-modal-close-icon"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])]),e.createElementVNode("div",fo,[e.renderSlot(l.$slots,"default",{},void 0,!0)])],8,uo)])):e.createCommentVNode("",!0)]),_:3})]))}}),go=((t,o)=>{const n=t.__vccOpts||t;for(const[a,l]of o)n[a]=l;return n})(bo,[["__scopeId","data-v-5ee2c70a"]]),yo={key:0,class:"notion-page-title-text"},Bo={name:"NotionPageTitle"},wo=e.defineComponent({...Bo,props:{block:{},defaultIcon:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>P(o.block,n));return(l,c)=>t.block?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(y)("notion-page-title"))},[e.createVNode(V,{block:t.block,"default-icon":t.defaultIcon,class:"notion-page-title-icon"},null,8,["block","default-icon"]),a.value?(e.openBlock(),e.createElementBlock("span",yo,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}}),_o={class:"quickFindMenu"},Eo={class:"searchBar"},$o={class:"inlineIcon"},No={key:0,class:"loadingIcon",viewBox:"0 0 100 100"},Co={key:1,class:"searchIcon",viewBox:"0 0 24 24"},So={key:0,class:"resultsPane"},Vo=["innerHTML"],xo={class:"resultsFooter"},Fo={class:"resultsCount"},Io={key:1,class:"noResultsPane"},Po={key:1,class:"noResultsPane"},zo={name:"NotionSearchDialog"},Ao=e.defineComponent({...zo,props:{isOpen:{type:Boolean},rootBlockId:{}},emits:["close"],setup(t,{emit:o}){const n=t,a=o,{components:l,searchNotion:c,mapPageUrl:r,defaultPageIcon:i}=_(),u=e.ref(!1),k=e.ref(""),p=e.ref(null),s=e.ref(null),m=e.ref(null);let d=null;function h(b,w){return(...$)=>{d||(d=setTimeout(()=>{b(...$),d=null},w))}}async function f(){if(!k.value.trim()||!c){u.value=!1,p.value=null,s.value=null;return}u.value=!0;try{const b=await c({query:k.value,ancestorId:n.rootBlockId});if(b.error||b.errorId)s.value=b,p.value=null;else{const w=b.results.map(N=>{const F=b.recordMap.block[N.id]?.value;if(!F)return;const ne=P(F,b.recordMap);if(ne&&(N.title=ne,N.block=F,N.recordMap=b.recordMap,N.page=z(F,b.recordMap,{inclusive:!0})||F,!!N.page.id))return N.highlight?.text&&(N.highlight.html=N.highlight.text.replaceAll(/<gzknfouu>/gi,"<b>").replaceAll(/<\/gzknfouu>/gi,"</b>")),N}).filter(Boolean),$=Object.fromEntries(w.map(N=>[N.page.id,N]));p.value={...b,results:Object.values($)},s.value=null}}catch(b){s.value=b,p.value=null}finally{u.value=!1}}const g=h(f,1e3);e.watch(k,b=>{if(!b.trim()){p.value=null,s.value=null,u.value=!1;return}g()}),e.onMounted(async()=>{c&&await c({query:"",ancestorId:n.rootBlockId})});function B(){k.value=""}return(b,w)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).Modal),{"is-open":t.isOpen,"content-label":"Search",onClose:w[3]||(w[3]=$=>a("close"))},{default:e.withCtx(()=>[e.createElementVNode("div",_o,[e.createElementVNode("div",Eo,[e.createElementVNode("div",$o,[u.value?(e.openBlock(),e.createElementBlock("svg",No,[...w[4]||(w[4]=[e.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"currentColor","stroke-width":"10",fill:"none","stroke-dasharray":"282.7","stroke-dashoffset":"210"},[e.createElementVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"1s",repeatCount:"indefinite"})],-1)])])):(e.openBlock(),e.createElementBlock("svg",Co,[...w[5]||(w[5]=[e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},null,-1)])]))]),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:m,"onUpdate:modelValue":w[0]||(w[0]=$=>k.value=$),class:"searchInput",placeholder:"Search",onKeydown:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},null,544),[[e.vModelText,k.value]]),k.value?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"clearButton",onClick:B},[...w[6]||(w[6]=[e.createElementVNode("svg",{class:"clearIcon",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])])):e.createCommentVNode("",!0)]),k.value.trim()&&p.value?(e.openBlock(),e.createElementBlock("div",So,[p.value.results.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.results,$=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:$.id,href:e.unref(r)($.page.id),class:"result notion-page-link",onClick:w[2]||(w[2]=N=>a("close"))},{default:e.withCtx(()=>[e.createVNode(wo,{block:$.page,"default-icon":e.unref(i)},null,8,["block","default-icon"]),$.highlight?.html?(e.openBlock(),e.createElementBlock("div",{key:0,class:"notion-search-result-highlight",innerHTML:$.highlight.html},null,8,Vo)):e.createCommentVNode("",!0)]),_:2},1032,["href"]))),128)),e.createElementVNode("footer",xo,[e.createElementVNode("div",null,[e.createElementVNode("span",Fo,e.toDisplayString(p.value.results.length),1),e.createTextVNode(" "+e.toDisplayString(p.value.results.length===1?" result":" results"),1)])])],64)):(e.openBlock(),e.createElementBlock("div",Io,[...w[7]||(w[7]=[e.createElementVNode("div",{class:"noResults"},"No results",-1),e.createElementVNode("div",{class:"noResultsDetail"},"Try different search terms",-1)])]))])):k.value.trim()&&s.value?(e.openBlock(),e.createElementBlock("div",Po,[...w[8]||(w[8]=[e.createElementVNode("div",{class:"noResults"},"Search error",-1)])])):e.createCommentVNode("",!0)])]),_:1},40,["is-open"]))}}),To={class:"notion-header"},Lo={class:"notion-nav-header"},Do={key:0,class:"breadcrumbs"},Ro={key:1,class:"title"},Oo={key:0,class:"spacer"},Mo={class:"notion-nav-header-right"},Uo={"aria-hidden":"true",role:"graphics-symbol",viewBox:"0 0 20 20",class:"searchIcon",style:{width:"22px",height:"22px",display:"block",fill:"inherit","flex-shrink":"0",color:"inherit"}},jo={name:"NotionHeader"},Ho=e.defineComponent({...jo,props:{block:{}},setup(t){const o=t,{recordMap:n,components:a,mapPageUrl:l,searchNotion:c}=_(),r=e.computed(()=>q(n,o.block.id)),i=e.ref(!1);function u(){i.value=!0}function k(){i.value=!1}function p(s){(s.metaKey||s.ctrlKey)&&(s.key==="p"||s.key==="k")&&(s.preventDefault(),u())}return e.onMounted(()=>{window.addEventListener("keydown",p)}),e.onUnmounted(()=>{window.removeEventListener("keydown",p)}),(s,m)=>(e.openBlock(),e.createElementBlock("header",To,[e.createElementVNode("div",Lo,[r.value?(e.openBlock(),e.createElementBlock("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(d,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.active?"div":e.unref(a).PageLink),e.mergeProps({ref_for:!0},d.active?{}:{href:e.unref(l)(d.pageId)},{class:e.unref(y)("breadcrumb",d.active&&"active")}),{default:e.withCtx(()=>[d.icon?(e.openBlock(),e.createBlock(V,{key:0,block:d.block,class:"icon"},null,8,["block"])):e.createCommentVNode("",!0),d.title?(e.openBlock(),e.createElementBlock("span",Ro,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0)]),_:2},1040,["class"])),h<r.value.length-1?(e.openBlock(),e.createElementBlock("span",Oo," / ")):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Mo,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"notion-nav-button notion-search-button",onClick:u},[(e.openBlock(),e.createElementBlock("svg",Uo,[...m[0]||(m[0]=[e.createElementVNode("path",{d:"M8.875 2.625a6.25 6.25 0 1 0 3.955 11.09l3.983 3.982a.625.625 0 1 0 .884-.884l-3.983-3.982a6.25 6.25 0 0 0-4.84-10.205m-5 6.25a5 5 0 1 1 10 0 5 5 0 0 1-10 0"},null,-1)])]))])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"header-right")]),i.value?(e.openBlock(),e.createBlock(Ao,{key:1,"is-open":i.value,"root-block-id":t.block.id,onClose:k},null,8,["is-open","root-block-id"])):e.createCommentVNode("",!0)])]))}}),Go=e.defineComponent({__name:"NotionRenderer",props:{recordMap:{},components:{},mapPageUrl:{type:Function,default:t=>`/${t}`},mapImageUrl:{type:Function,default:(t,o)=>Fe(t,o)||t},searchNotion:{},fullPage:{type:Boolean,default:!1},darkMode:{type:Boolean,default:!1},previewImages:{type:Boolean,default:!1},showTableOfContents:{type:Boolean},minTableOfContentsItems:{},defaultPageIcon:{},defaultPageCover:{},defaultPageCoverPosition:{default:.5},isImageZoomable:{type:Boolean},hideHeader:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>({Image:T,Link:"a",PageLink:mo,Checkbox:te,Code:null,Equation:null,Collection:L,Modal:go,Pdf:null,Header:Ho,Text:E,...o.components}));let a=null;return o.isImageZoomable&&typeof window<"u"&&(a=ce({background:"rgba(0, 0, 0, 0.8)",margin:24})),Ie({recordMap:o.recordMap,components:n.value,mapPageUrl:o.mapPageUrl,mapImageUrl:o.mapImageUrl,searchNotion:o.searchNotion,fullPage:o.fullPage,darkMode:o.darkMode,previewImages:o.previewImages,showTableOfContents:o.showTableOfContents,minTableOfContentsItems:o.minTableOfContentsItems||3,defaultPageIcon:o.defaultPageIcon,defaultPageCover:o.defaultPageCover,defaultPageCoverPosition:o.defaultPageCoverPosition||.5,forceCustomImages:!!o.components?.Image,zoom:a,hideHeader:o.hideHeader}),(l,c)=>(e.openBlock(),e.createBlock(io,{level:0,zoom:t.isImageZoomable?e.unref(a):null},null,8,["zoom"]))}}),Wo={name:"NotionProperty"},x=e.defineComponent({...Wo,props:{schema:{},data:{},block:{},collection:{},inline:{type:Boolean}},setup(t){const o=t,n=e.computed(()=>o.schema?.type);return(a,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(y)("notion-property",`notion-property-${n.value}`))},[t.data?n.value==="title"||n.value==="text"?(e.openBlock(),e.createBlock(E,{key:1,value:t.data,block:t.block},null,8,["value","block"])):n.value==="checkbox"?(e.openBlock(),e.createBlock(te,{key:2,"is-checked":t.data?.[0]?.[0]==="Yes"},null,8,["is-checked"])):n.value==="select"||n.value==="multi_select"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(t.data?.[0]?.[0]?.split(","),(c,r)=>(e.openBlock(),e.createElementBlock("span",{key:r,class:e.normalizeClass(e.unref(y)("notion-property-select-item",`notion-item-${c.trim().toLowerCase()}`))},e.toDisplayString(c.trim()),3))),128)):n.value==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(t.data?.[0]?.[0]),1)],64)):(e.openBlock(),e.createBlock(E,{key:5,value:t.data,block:t.block},null,8,["value","block"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[],64))],2))}}),qo={key:0,class:"notion-collection-card-cover"},Xo={class:"notion-collection-card-body"},Zo={class:"notion-collection-card-property"},Yo={key:0,class:"notion-collection-card-property"},Ko={name:"NotionCollectionCard"},D=e.defineComponent({...Ko,props:{block:{},collection:{},collectionView:{},className:{}},setup(t){const o=t,{recordMap:n,mapPageUrl:a,mapImageUrl:l,components:c}=_(),r=e.computed(()=>o.collectionView.format||{}),i=e.computed(()=>r.value.gallery_cover||{type:"none"}),u=e.computed(()=>r.value.gallery_cover_size||"medium"),k=e.computed(()=>r.value.gallery_cover_aspect||"cover"),p=e.computed(()=>r.value.gallery_properties||[]),s=e.computed(()=>{if(i.value.type==="page_cover"){const d=o.block.format?.page_cover;if(d)return{src:l(d,o.block),alt:o.block.properties?.title?.[0]?.[0]||"notion image"}}return null}),m=e.computed(()=>a(o.block.id));return(d,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c).PageLink),{href:m.value,class:e.normalizeClass(e.unref(y)("notion-collection-card",`notion-collection-card-size-${u.value}`,t.className))},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(T,{src:s.value.src,alt:s.value.alt,style:e.normalizeStyle({objectFit:k.value})},null,8,["src","alt","style"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Xo,[e.createElementVNode("div",Zo,[e.createVNode(x,{schema:t.collection.schema.title,data:t.block.properties?.title,block:t.block,collection:t.collection},null,8,["schema","data","block","collection"])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.property},[f.visible&&f.property!=="title"&&t.block.properties?.[f.property]?(e.openBlock(),e.createElementBlock("div",Yo,[e.createVNode(x,{schema:t.collection.schema[f.property],data:t.block.properties[f.property],block:t.block,collection:t.collection,inline:""},null,8,["schema","data","block","collection"])])):e.createCommentVNode("",!0)],64))),128))])]),_:1},8,["href","class"]))}}),Qo={class:"notion-board-th-count"},Jo={name:"NotionCollectionGroup"},R=e.defineComponent({...Jo,props:{collection:{},collectionGroup:{},schema:{},value:{},hidden:{type:Boolean},summaryProps:{},detailsProps:{}},setup(t){const{components:o}=_();return(n,a)=>t.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("details",e.mergeProps({key:0,open:"",class:"notion-collection-group"},t.detailsProps),[e.createElementVNode("summary",e.mergeProps({class:"notion-collection-group-title"},t.summaryProps),[e.createElementVNode("div",null,[e.createVNode(x,{schema:t.schema,data:[[t.value]],collection:t.collection},null,8,["schema","data","collection"]),e.createElementVNode("span",Qo,e.toDisplayString(t.collectionGroup?.total),1)])],16),e.renderSlot(n.$slots,"default")],16))}});function O(t,o,n,...a){return(o?.format?.collection_groups||[]).map(({property:c,hidden:r,value:{value:i,type:u}})=>{const k=i===void 0,p=i?.range,s=k?"uncategorized":p?i.range?.start_date||i.range?.end_date:i?.value||i,m=n[`results:${u}:${s}`];let d=!k&&(p||i?.value||i),h=t.schema[c];if(u==="checkbox"&&i&&(d="Yes"),p){h={type:"text",name:"text"};try{s&&(d=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(new Date(s)))}catch{d=s}}return{collectionGroup:m,schema:h,value:d||"No description",hidden:r,collection:t,collectionView:o,collectionData:n,blockIds:m?.blockIds,...a}})}const vo={class:"notion-gallery"},en={class:"notion-gallery-view"},tn={key:1,class:"notion-gallery"},on={class:"notion-gallery-view"},nn={name:"NotionCollectionViewGallery"},ln=e.defineComponent({...nn,props:{collection:{},collectionView:{},collectionData:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>!!o.collectionView?.format?.collection_group_by),l=e.computed(()=>a.value?O(o.collection,o.collectionView,o.collectionData):[]),c=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),r=e.computed(()=>o.collectionView.format||{}),i=e.computed(()=>r.value.gallery_cover_size||"medium");return(u,k)=>a.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value,(p,s)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:s},{ref_for:!0},p),{default:e.withCtx(()=>[e.createElementVNode("div",vo,[e.createElementVNode("div",en,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-gallery-grid",`notion-gallery-grid-size-${i.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.blockIds,m=>(e.openBlock(),e.createBlock(D,{key:m,block:e.unref(n).block[m]?.value,collection:t.collection,"collection-view":t.collectionView},null,8,["block","collection","collection-view"]))),128))],2)])])]),_:2},1040))),128)):(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",on,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-gallery-grid",`notion-gallery-grid-size-${i.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,p=>(e.openBlock(),e.createBlock(D,{key:p,block:e.unref(n).block[p]?.value,collection:t.collection,"collection-view":t.collectionView},null,8,["block","collection","collection-view"]))),128))],2)])]))}}),an=Object.freeze(Object.defineProperty({__proto__:null,default:ln},Symbol.toStringTag,{value:"Module"})),cn={class:"notion-list-collection"},rn={class:"notion-list-view"},sn={class:"notion-list-body"},dn={class:"notion-list-item-title"},mn={class:"notion-list-item-body"},pn={key:0,class:"notion-list-item-property"},kn={key:1,class:"notion-list-collection"},un={class:"notion-list-view"},fn={class:"notion-list-body"},hn={class:"notion-list-item-title"},bn={class:"notion-list-item-body"},gn={key:0,class:"notion-list-item-property"},yn={name:"NotionCollectionViewList"},Bn=e.defineComponent({...yn,props:{collection:{},collectionView:{},collectionData:{}},setup(t){const o=t,{recordMap:n,mapPageUrl:a,components:l}=_(),c=e.computed(()=>!!o.collectionView?.format?.collection_group_by),r=e.computed(()=>c.value?O(o.collection,o.collectionView,o.collectionData):[]),i=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),u=e.computed(()=>o.collectionView.format?.list_properties?.filter(k=>k.visible)||[]);return(k,p)=>c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(s,m)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:m},{ref_for:!0},s),{default:e.withCtx(()=>[e.createElementVNode("div",cn,[e.createElementVNode("div",rn,[e.createElementVNode("div",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.blockIds,d=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:d,href:e.unref(a)(d),class:"notion-list-item notion-page-link"},{default:e.withCtx(()=>[e.createElementVNode("div",dn,[e.createVNode(V,{block:e.unref(n).block[d]?.value,class:"notion-page-title-icon","hide-default-icon":""},null,8,["block"]),e.createVNode(x,{schema:t.collection.schema.title,data:e.unref(n).block[d]?.value?.properties?.title,block:e.unref(n).block[d]?.value,collection:t.collection},null,8,["schema","data","block","collection"])]),e.createElementVNode("div",mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,h=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h.property},[h.property!=="title"?(e.openBlock(),e.createElementBlock("div",pn,[e.createVNode(x,{schema:t.collection.schema[h.property],data:e.unref(n).block[d]?.value?.properties?.[h.property],block:e.unref(n).block[d]?.value,collection:t.collection},null,8,["schema","data","block","collection"])])):e.createCommentVNode("",!0)],64))),128))])]),_:2},1032,["href"]))),128))])])])]),_:2},1040))),128)):(e.openBlock(),e.createElementBlock("div",kn,[e.createElementVNode("div",un,[e.createElementVNode("div",fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,s=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:s,href:e.unref(a)(s),class:"notion-list-item notion-page-link"},{default:e.withCtx(()=>[e.createElementVNode("div",hn,[e.createVNode(V,{block:e.unref(n).block[s]?.value,class:"notion-page-title-icon","hide-default-icon":""},null,8,["block"]),e.createVNode(x,{schema:t.collection.schema.title,data:e.unref(n).block[s]?.value?.properties?.title,block:e.unref(n).block[s]?.value,collection:t.collection},null,8,["schema","data","block","collection"])]),e.createElementVNode("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,m=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.property},[m.property!=="title"?(e.openBlock(),e.createElementBlock("div",gn,[e.createVNode(x,{schema:t.collection.schema[m.property],data:e.unref(n).block[s]?.value?.properties?.[m.property],block:e.unref(n).block[s]?.value,collection:t.collection},null,8,["schema","data","block","collection"])])):e.createCommentVNode("",!0)],64))),128))])]),_:2},1032,["href"]))),128))])])]))}}),wn=Object.freeze(Object.defineProperty({__proto__:null,default:Bn},Symbol.toStringTag,{value:"Module"})),_n={class:"notion-collection-column-title"},En={class:"notion-collection-column-title-body"},$n={name:"NotionCollectionColumnTitle"},oe=e.defineComponent({...$n,props:{schema:{}},setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("div",_n,[n[0]||(n[0]=e.createElementVNode("span",{class:"notion-collection-column-title-icon"},null,-1)),e.createElementVNode("span",En,e.toDisplayString(t.schema.name),1)]))}}),Nn={key:0,class:"notion-table-header"},Cn={class:"notion-table-header-inner"},Sn={class:"notion-table-view-header-cell-inner"},Vn={class:"notion-table-body"},xn={key:0,class:"notion-table-header"},Fn={class:"notion-table-header-inner"},In={class:"notion-table-view-header-cell-inner"},Pn={class:"notion-table-body"},zn={name:"NotionCollectionViewTable"},An=e.defineComponent({...zn,props:{collection:{},collectionView:{},collectionData:{},width:{},padding:{}},setup(t){const o=t,{recordMap:n}=_(),a=e.computed(()=>({width:o.width?`${o.width}px`:"100%",maxWidth:o.width?`${o.width}px`:"100%"})),l=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0",paddingRight:o.padding?`${o.padding}px`:"0"})),c=e.computed(()=>!!o.collectionView?.format?.collection_group_by),r=e.computed(()=>c.value?O(o.collection,o.collectionView,o.collectionData):[]),i=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),u=e.computed(()=>o.collectionView.format?.table_properties?o.collectionView.format.table_properties.filter(s=>s.visible&&o.collection.schema[s.property]):[{property:"title"}].concat(Object.keys(o.collection.schema).filter(s=>s!=="title").map(s=>({property:s}))));function k(s){const m={};return s.width?m.width=`${s.width}px`:s.property==="title"?m.width="280px":m.width="200px",m}const p=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0",paddingRight:o.padding?`${o.padding}px`:"0"}));return(s,m)=>c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(d,h)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:h},{ref_for:!0},d,{"summary-props":{style:p.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:"notion-table",style:e.normalizeStyle(a.value)},[e.createElementVNode("div",{class:"notion-table-view",style:e.normalizeStyle(l.value)},[u.value.length?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.property,class:"notion-table-th"},[e.createElementVNode("div",{class:"notion-table-view-header-cell",style:e.normalizeStyle(k(f))},[e.createElementVNode("div",Sn,[e.createVNode(oe,{schema:t.collection.schema[f.property]},null,8,["schema"])])],4)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.blockIds,f=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"notion-table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,g=>(e.openBlock(),e.createElementBlock("div",{key:g.property,class:e.normalizeClass(e.unref(y)("notion-table-cell",`notion-table-cell-${t.collection.schema[g.property]?.type}`)),style:e.normalizeStyle(k(g))},[e.createVNode(x,{schema:t.collection.schema[g.property],data:e.unref(n).block[f]?.value?.properties?.[g.property],block:e.unref(n).block[f]?.value,collection:t.collection},null,8,["schema","data","block","collection"])],6))),128))]))),128))])],4)],4)]),_:2},1040,["summary-props"]))),128)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"notion-table",style:e.normalizeStyle(a.value)},[e.createElementVNode("div",{class:"notion-table-view",style:e.normalizeStyle(l.value)},[u.value.length?(e.openBlock(),e.createElementBlock("div",xn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.property,class:"notion-table-th"},[e.createElementVNode("div",{class:"notion-table-view-header-cell",style:e.normalizeStyle(k(d))},[e.createElementVNode("div",In,[e.createVNode(oe,{schema:t.collection.schema[d.property]},null,8,["schema"])])],4)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"notion-table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,h=>(e.openBlock(),e.createElementBlock("div",{key:h.property,class:e.normalizeClass(e.unref(y)("notion-table-cell",`notion-table-cell-${t.collection.schema[h.property]?.type}`)),style:e.normalizeStyle(k(h))},[e.createVNode(x,{schema:t.collection.schema[h.property],data:e.unref(n).block[d]?.value?.properties?.[h.property],block:e.unref(n).block[d]?.value,collection:t.collection},null,8,["schema","data","block","collection"])],6))),128))]))),128))])],4)],4))}}),Tn=Object.freeze(Object.defineProperty({__proto__:null,default:An},Symbol.toStringTag,{value:"Module"})),Ln={class:"notion-board"},Dn={class:"notion-board-header"},Rn={class:"notion-board-header-inner"},On={key:0,class:"notion-board-th-body"},Mn={class:"notion-board-th-title"},Un={class:"notion-board-th-count"},jn={class:"notion-board-body"},Hn={key:1,class:"notion-board"},Gn={class:"notion-board-header"},Wn={class:"notion-board-header-inner"},qn={key:0,class:"notion-board-th-body"},Xn={class:"notion-board-th-title"},Zn={class:"notion-board-th-count"},Yn={class:"notion-board-body"},Kn={name:"NotionCollectionViewBoard"},Qn=e.defineComponent({...Kn,props:{collection:{},collectionView:{},collectionData:{},width:{},padding:{}},setup(t){const o=t,n=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0"})),{recordMap:a}=_(),l=e.computed(()=>!!o.collectionView?.format?.collection_group_by),c=e.computed(()=>l.value?O(o.collection,o.collectionView,o.collectionData):[]),r=e.computed(()=>o.collectionView.format||{}),i=e.computed(()=>r.value.board_cover_size||"medium"),u=e.computed(()=>r.value.board_columns||r.value.board_groups2||[]),k=m=>{const d=`results:${m?.value?.type}:${m?.value?.value||"uncategorized"}`;return o.collectionData[d]||{blockIds:[]}},p=m=>{const d=k(m);return d.total||d.blockIds?.length||0},s=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0"}));return(m,d)=>l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(h,f)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:f},{ref_for:!0},h,{"summary-props":{style:s.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-board-view",`notion-board-view-size-${i.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Dn,[e.createElementVNode("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(g,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"notion-board-th"},[g.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",On,[e.createElementVNode("span",Mn,e.toDisplayString(g.value?.value||"No Select"),1),e.createElementVNode("span",Un,e.toDisplayString(p(g)),1)]))]))),128))])]),d[0]||(d[0]=e.createElementVNode("div",{class:"notion-board-header-placeholder"},null,-1)),e.createElementVNode("div",jn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(g,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"notion-board-group"},[g.hidden?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(k(g).blockIds,b=>(e.openBlock(),e.createBlock(D,{key:b,block:e.unref(a).block[b]?.value,collection:t.collection,"collection-view":t.collectionView,class:"notion-board-group-card"},null,8,["block","collection","collection-view"]))),128))]))),128))])],6)])]),_:1},16,["summary-props"]))),128)):(e.openBlock(),e.createElementBlock("div",Hn,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-board-view",`notion-board-view-size-${i.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Gn,[e.createElementVNode("div",Wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(h,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"notion-board-th"},[h.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",qn,[e.createElementVNode("span",Xn,e.toDisplayString(h.value?.value||"No Select"),1),e.createElementVNode("span",Zn,e.toDisplayString(p(h)),1)]))]))),128))])]),d[1]||(d[1]=e.createElementVNode("div",{class:"notion-board-header-placeholder"},null,-1)),e.createElementVNode("div",Yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(h,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"notion-board-group"},[h.hidden?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(k(h).blockIds,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.unref(a).block[g]?.value?(e.openBlock(),e.createBlock(D,{key:0,block:e.unref(a).block[g].value,collection:t.collection,"collection-view":t.collectionView,class:"notion-board-group-card"},null,8,["block","collection","collection-view"])):e.createCommentVNode("",!0)],64))),128))]))),128))])],6)]))}}),Jn=Object.freeze(Object.defineProperty({__proto__:null,default:Qn},Symbol.toStringTag,{value:"Module"}));S.NotionRenderer=Go,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slogvo/vue-notion",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "description": "Fast and accurate Vue renderer for Notion.",
6
6
  "repository": "slogvo/vue-notion",
@@ -43,12 +43,22 @@
43
43
  "engines": {
44
44
  "node": ">=20"
45
45
  },
46
+ "scripts": {
47
+ "build": "vite build && node -e \"const fs = require('fs'); fs.copyFileSync('src/styles.css', 'build/styles.css')\"",
48
+ "dev": "vite build --watch",
49
+ "watch": "vite build --watch",
50
+ "clean": "del build",
51
+ "test": "run-s test:*",
52
+ "test:lint": "eslint .",
53
+ "test:typecheck": "vue-tsc --noEmit",
54
+ "test:unit": "vitest run --passWithNoTests"
55
+ },
46
56
  "dependencies": {
47
57
  "katex": "^0.16.11",
48
58
  "lodash.throttle": "^4.1.1",
49
59
  "medium-zoom": "^1.1.0",
50
- "@slogvo/notion-types": "^0.1.0",
51
- "@slogvo/notion-utils": "^0.1.0",
60
+ "@slogvo/notion-types": "^0.1.1",
61
+ "@slogvo/notion-utils": "^0.1.2",
52
62
  "prismjs": "^1.29.0"
53
63
  },
54
64
  "devDependencies": {
@@ -65,15 +75,5 @@
65
75
  },
66
76
  "optionalDependencies": {
67
77
  "vue-pdf-embed": "^2.1.1"
68
- },
69
- "scripts": {
70
- "build": "vite build && node -e \"const fs = require('fs'); fs.copyFileSync('src/styles.css', 'build/styles.css')\"",
71
- "dev": "vite build --watch",
72
- "watch": "vite build --watch",
73
- "clean": "del build",
74
- "test": "run-s test:*",
75
- "test:lint": "eslint .",
76
- "test:typecheck": "vue-tsc --noEmit",
77
- "test:unit": "vitest run --passWithNoTests"
78
78
  }
79
- }
79
+ }