@slogvo/vue-notion 0.1.0 → 0.2.0
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.
- package/build/{CollectionCard.vue_vue_type_script_setup_true_lang-14wiD7gP.js → CollectionCard.vue_vue_type_script_setup_true_lang-CKc3aa-Q.js} +2 -2
- package/build/{CollectionViewBoard-CgsTRxVb.js → CollectionViewBoard-iUYxAnRz.js} +3 -3
- package/build/{CollectionViewGallery-B_vTmafL.js → CollectionViewGallery-Cbq2Spsg.js} +3 -3
- package/build/{CollectionViewList-D3G1ACy1.js → CollectionViewList-BX2TvKSQ.js} +2 -2
- package/build/{CollectionViewTable-UDQc6cpa.js → CollectionViewTable-CTH-HIZh.js} +2 -2
- package/build/{collection-utils-Cqo2kyVg.js → collection-utils-7wJN6y6q.js} +1 -1
- package/build/components/NotionRenderer.vue.d.ts +2 -0
- package/build/{index-BNMgDI2p.js → index-BVgFvBYW.js} +506 -501
- package/build/index.js +1 -1
- package/build/index.umd.cjs +2 -2
- package/build/types.d.ts +1 -0
- package/package.json +16 -15
package/build/index.js
CHANGED
package/build/index.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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,
|
|
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:i,configurable:s}=me;Object.defineProperty(t,"toString",{value:l,writable:c,enumerable:i,configurable:s})};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 i=o?o(c):c[0],s=be(n,i);if(s)return s.data;const d=t.apply(this,c),u=typeof a=="function"?a(...c):a;if(u!==void 0&&u!==Number.POSITIVE_INFINITY){if(!Number.isFinite(u))throw new TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(u<=0)return d;if(u>I)throw new TypeError(`The \`maxAge\` function result cannot exceed ${I}.`)}if(n.set(i,{data:d,maxAge:u===void 0||u===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Date.now()+u}),u!==void 0&&u!==Number.POSITIVE_INFINITY){const m=setTimeout(()=>{n.delete(i),U.get(l)?.delete(m)},u);m.unref?.();const r=U.get(l)??new Set;r.add(m),U.set(l,r)}return d};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,i=a.split(";"),s=i.at(-1)==="base64";s&&i.pop();const d=i.shift()?.toLowerCase()??"",m=[...i.map(k=>{let[p,h=""]=k.split("=").map(f=>f.trim());return p==="charset"&&(h=h.toLowerCase(),h===Be)?"":`${p}${h?`=${h}`:""}`}).filter(Boolean)];s&&m.push("base64"),(m.length>0||d&&d!==ye)&&m.unshift(d);const r=o||!c?"":`#${c}`;return`data:${m.join(";")},${s?l.trim():l}${r}`};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 i=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let s=0,d="";for(;;){const m=i.exec(l.pathname);if(!m)break;const r=m[0],k=m.index,p=l.pathname.slice(s,k);d+=p.replace(/\/{2,}/g,"/"),d+=r,s=k+r.length}const u=l.pathname.slice(s,l.pathname.length);d+=u.replace(/\/{2,}/g,"/"),l.pathname=d}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 i=l.pathname.split("/").filter(Boolean),s=i.at(-1);s&&j(s,o.removeDirectoryIndex)&&(i.pop(),l.pathname=i.length>0?`/${i.join("/")}/`:"/")}if(o.removePath&&(l.pathname="/"),o.transformPath&&typeof o.transformPath=="function"){const i=l.pathname.split("/").filter(Boolean),s=o.transformPath(i);l.pathname=s?.length>0?`/${s.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 i of[...l.searchParams.keys()])j(i,o.removeQueryParameters)&&l.searchParams.delete(i);if(!Array.isArray(o.keepQueryParameters)&&o.removeQueryParameters===!0&&(l.search=""),Array.isArray(o.keepQueryParameters)&&o.keepQueryParameters.length>0)for(const i of[...l.searchParams.keys()])j(i,o.keepQueryParameters)||l.searchParams.delete(i);if(o.sortQueryParameters){const i=l.search;l.searchParams.sort();try{l.search=decodeURIComponent(l.search)}catch{}const s=i.slice(1).split("&").filter(d=>d&&!d.includes("="));for(const d of s){const u=decodeURIComponent(d);l.search=l.search.replace(`?${u}=`,`?${u}`).replace(`&${u}=`,`&${u}`)}}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,i,s,d;const u=t.collection_id||((a=(n=t.format)==null?void 0:n.collection_pointer)==null?void 0:a.id);if(u)return u;const m=(l=t?.view_ids)==null?void 0:l[0];if(m){const r=(i=(c=o.collection_view)==null?void 0:c[m])==null?void 0:i.value;if(r)return(d=(s=r.format)==null?void 0:s.collection_pointer)==null?void 0:d.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(i){return(i??[]).map(s=>{var d,u;const m=(d=o.block[s])==null?void 0:d.value;if(m){const{type:r}=m;if(r==="header"||r==="sub_header"||r==="sub_sub_header")return{id:s,type:r,text:C((u=m.properties)==null?void 0:u.title),indentLevel:Ne[r]};if(r==="transclusion_container"||r==="column_list"||r==="column")return n(m.content)}return null})}function a(i){return i.flatMap(s=>s==null?[]:Array.isArray(s)?a(s):[s])}const l=a(n(t.content)),c=[{actual:-1,effective:-1}];for(const i of l){const{indentLevel:s}=i,d=s;do{const u=c.at(-1),{actual:m,effective:r}=u;if(d>m)i.indentLevel=r+1,c.push({actual:d,effective:i.indentLevel});else if(d===m){i.indentLevel=r;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 i=(l=o.collection[c])==null?void 0:l.value;if(i)return i.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 i=c.parent_id,s=c.parent_table;if(!i)break;if(s==="collection")c=(a=o.collection[i])==null?void 0:a.value;else if(c=(l=o.block[i])==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 i=(n=a[c])==null?void 0:n.value;if(!i)break;const s=P(i,t),d=W(i,t);if(!(s||d))break;l.push({block:i,active:c===o,pageId:c,title:s,icon:d});const u=z(i,t),m=u?.id;if(!m)break;c=m}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:i}=_(),s=e.computed(()=>!a||!o.src?null:n?.preview_images?.[o.src]??n?.preview_images?.[X(o.src)]),d=e.ref(null),u=m=>{o.zoomable&&d.value&&i&&i.attach(d.value)};return(m,r)=>s.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:`${s.value.originalHeight/s.value.originalWidth*100}%`,height:t.height?`${t.height}px`:void 0})},[e.createElementVNode("img",{class:"lazy-image-preview",src:s.value.dataURIBase64,alt:t.alt,decoding:"async"},null,8,Ae),e.createElementVNode("img",{ref_key:"imageRef",ref:d,class:"lazy-image-real",src:t.src,alt:t.alt,width:s.value.originalWidth,height:s.value.originalHeight,decoding:"async",loading:"lazy",onLoad:u},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:d,class:e.normalizeClass(t.className),style:e.normalizeStyle(t.style),src:t.src,alt:t.alt,loading:"lazy",decoding:"async",onLoad:u},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),i=e.computed(()=>P(o.block,n)),s=e.computed(()=>c.value&&(M(c.value)||c.value.startsWith("/icons/"))),d=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(u,m)=>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",s.value?"notion-page-icon-image":"notion-page-icon-span"))},[s.value?(e.openBlock(),e.createBlock(T,{key:0,src:d.value,alt:i.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:i}=_(),s=e.computed(()=>{const d=n.value,u=a.value,m=u?.find(p=>p[0]==="eoi");if(m){const p=m[1],h=l.block[p]?.value||l.block[A(p)]?.value||l.block[G(p)]?.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 r=u?.find(p=>p[0]==="p");if(r){const p=r[1],h=l.block[p]?.value||l.block[A(p)]?.value||l.block[G(p)]?.value;if(h){const f=C(h.properties?.title)||"Untitled",g=c(p);return e.h(i.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(p);return e.h(i.PageLink,{class:"notion-link notion-page-mention",href:f},()=>[e.h("span",{class:"notion-page-mention-text"},"Page")])}}if(!u?.length)return d;let k=d;for(const p of u)switch(p[0]){case"b":k=e.h("b",null,k);break;case"i":k=e.h("i",null,k);break;case"s":k=e.h("s",null,k);break;case"a":const f=p[1];f.startsWith("/")?k=e.h(i.PageLink,{class:"notion-link",href:f},k):k=e.h("a",{class:"notion-link",href:f,target:"_blank",rel:"noopener noreferrer"},k);break;case"c":k=e.h("code",{class:"notion-inline-code"},k);break;case"_":k=e.h("span",{class:"notion-inline-underscore"},k);break;case"h":const g=p[1];k=e.h("span",{class:`notion-${g}`},k);break}return k});return(d,u)=>typeof s.value=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.value),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.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 r={position:"relative",display:"flex",justifyContent:"center",alignSelf:"center",width:"100%",maxWidth:"100%",flexDirection:"column"};if(o.block.format){const{block_aspect_ratio:k,block_height:p,block_width:h,block_full_width:f,block_page_width:g,block_preserve_scale:b}=o.block.format;if(f||g)f?r.width="100vw":r.width="100%",o.block.type==="video"?p?r.height=`${p}px`:k&&(r.paddingBottom=`${k*100}%`):k&&o.block.type!=="image"?r.paddingBottom=`${k*100}%`:p&&(r.height=`${p}px`);else{switch(o.block.format?.block_alignment){case"center":r.alignSelf="center";break;case"left":r.alignSelf="start";break;case"right":r.alignSelf="end";break}h&&(r.width=typeof h=="number"?`${h}px`:h)}}return r}),i=e.computed(()=>{const r={};return o.block.type==="image"?r.objectFit="cover":o.block.format?.block_preserve_scale&&(r.objectFit="contain"),r}),s=e.computed(()=>{let r=n.signed_urls?.[o.block.id]||o.block.properties?.source?.[0]?.[0];if(r&&o.block.space_id){const k=new URL(r);k.searchParams.set("spaceId",o.block.space_id),r=k.toString()}return r}),d=e.computed(()=>{if(o.block.type==="image"&&s.value){let r=s.value;return!r.includes(".gif")&&r.includes("file.notion.so")&&(r=o.block.properties?.source?.[0]?.[0]),a(r,o.block)}return s.value}),u=e.computed(()=>{const r=C(o.block.properties?.alt_text),k=C(o.block.properties?.caption);return r||k||"notion image"}),m=e.computed(()=>o.block.type==="video"&&s.value?ze(s.value):null);return(r,k)=>s.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(c.value)},[t.block.type==="image"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).Image),{key:0,src:d.value,alt:u.value,zoomable:t.zoomable,style:e.normalizeStyle(i.value)},null,8,["src","alt","zoomable","style"])):t.block.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[m.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,class:"notion-asset-object-fit",style:e.normalizeStyle(i.value),src:`https://www.youtube.com/embed/${m.value}`,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,je)):(e.openBlock(),e.createElementBlock("video",{key:1,playsInline:"",controls:"",preload:"metadata",style:e.normalizeStyle(i.value),src:s.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(i.value),src:s.value,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,Ge)):t.block.type==="pdf"?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("a",{href:s.value,target:"_blank"},"View PDF",8,qe)])):e.createCommentVNode("",!0),e.renderSlot(r.$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,i=0;i<l.length;i++)c[l[i]]=t.languages.bash[l[i]];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(m){return m=m.replace(/<inner>/g,function(){return o}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}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(m){["url","bold","italic","strike","code-snippet"].forEach(function(r){m!==r&&(t.languages.markdown[m].inside.content.inside[r]=t.languages.markdown[r])})}),t.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function r(k){if(!(!k||typeof k=="string"))for(var p=0,h=k.length;p<h;p++){var f=k[p];if(f.type!=="code"){r(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]}}}r(m.tokens)}),t.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var r="",k=0,p=m.classes.length;k<p;k++){var h=m.classes[k],f=/language-(.+)/.exec(h);if(f){r=f[1];break}}var g=t.languages[r];if(g)m.content=t.highlight(u(m.content),g,r);else if(r&&r!=="none"&&t.plugins.autoloader){var b="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=b,t.plugins.autoloader.loadLanguages(r,function(){var B=document.getElementById(b);B&&(B.innerHTML=t.highlight(B.textContent,t.languages[r],r))})}}});var i=RegExp(t.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},d=String.fromCodePoint||String.fromCharCode;function u(m){var r=m.replace(i,"");return r=r.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(k,p){if(p=p.toLowerCase(),p[0]==="#"){var h;return p[1]==="x"?h=parseInt(p.slice(2),16):h=Number(p.slice(1)),d(h)}else{var f=s[p];return f||k}}),r}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://,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),i=()=>{c.value&&le.highlightElement(c.value)};return e.onMounted(i),e.watch(n,i),e.watch(a,i),(s,d)=>(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,i)=>(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||[]),i=e.ref(c.value[0]),s=e.computed(()=>i.value?n.collection_view[i.value]?.value:null),d=e.computed(()=>!a.value||!i.value?null:n.collection_query[a.value]?.[i.value]),u=e.computed(()=>l.value?C(l.value.name).trim():""),m=e.computed(()=>s.value?.format?.hide_linked_collection_name!==!0&&u.value),r=e.ref(typeof window<"u"?window.innerWidth:1024),k=()=>{r.value=window.innerWidth};e.onMounted(()=>{window.addEventListener("resize",k)}),e.onUnmounted(()=>{window.removeEventListener("resize",k)});const p=e.computed(()=>{const g=z(o.block,n)?.format?.page_full_width===!0;if(s.value?.type!=="table"&&s.value?.type!=="board")return{width:0,padding:0};const b=r.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=>{i.value=f};return(f,g)=>l.value&&s.value&&d.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",i.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),m.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(u.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:s.value,collectionData:d.value,width:p.value.width,padding:p.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,i)=>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,s=>(e.openBlock(),e.createElementBlock("a",{key:s.id,href:`#${e.unref(A)(s.id)}`,class:e.normalizeClass(e.unref(y)("notion-table-of-contents-item",`notion-table-of-contents-item-indent-level-${s.indentLevel}`))},[e.createElementVNode("span",{class:"notion-table-of-contents-item-body",style:e.normalizeStyle({marginLeft:`${s.indentLevel*24}px`})},e.toDisplayString(s.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)),i=e.computed(()=>o.block.properties?.link?.[0]?.[0]);e.computed(()=>o.block.properties?.caption);const s=e.computed(()=>o.block.format?.bookmark_cover),d=e.computed(()=>o.block.format?.bookmark_icon);return(u,m)=>i.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:i.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,[d.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:e.unref(n)(d.value,t.block),class:"notion-bookmark-link-icon",alt:l.value},null,8,Et)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",$t,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0)])]),s.value?(e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(T,{src:e.unref(n)(s.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(i,s)=>c.value?(e.openBlock(),e.createElementBlock("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).PageLink),{href:e.unref(l)(d.pageId),class:"notion-breadcrumb"},{default:e.withCtx(()=>[d.icon?(e.openBlock(),e.createBlock(V,{key:0,block:d.block,class:"notion-breadcrumb-icon"},null,8,["block"])):e.createCommentVNode("",!0),d.title?(e.openBlock(),e.createElementBlock("span",xt,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0)]),_:2},1032,["href"])),u<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||[]),i=e.computed(()=>a.value.domain),s=e.computed(()=>c.value.find(f=>f.id==="title")?.values[0]||""),d=e.computed(()=>{let f=c.value.find(g=>g.id==="owner")?.values[0]||"";return i.value==="github.com"&&f&&(f=f.split("/").at(-1)||f),f}),u=e.computed(()=>c.value.find(f=>f.id==="updated_at")?.values[0]),m=e.computed(()=>u.value?Ve(u.value):null),r=e.computed(()=>i.value==="github.com"),k=e.computed(()=>i.value==="github.com"?"github":null),p=e.computed(()=>l.value&&c.value.length>0);return(h,f)=>p.value&&r.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(()=>[k.value?(e.openBlock(),e.createElementBlock("div",zt,[k.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(s.value),1),!t.inline&&(d.value||m.value)?(e.openBlock(),e.createElementBlock("div",Dt,[d.value?(e.openBlock(),e.createElementBlock("span",Rt,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0),d.value&&m.value?(e.openBlock(),e.createElementBlock("span",Ot," • ")):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("span",Mt,"Updated "+e.toDisplayString(m.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["href","class"])):(e.openBlock(),e.createElementBlock("div",Ut," [Unsupported external integration: "+e.toDisplayString(i.value||"unknown")+"] ",1))}}),Ht={key:0,class:"notion-frame"},Gt={key:0,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:i,recordMap:s}=_(),d=e.computed(()=>o.hideBlockId?"notion-block":`notion-block-${A(o.block.id)}`),u=e.computed(()=>o.block.format?.block_color?`notion-${o.block.format.block_color}`:void 0),m=e.computed(()=>o.block.properties?.title),r=e.computed(()=>o.block.properties?.checked?.[0]?.[0]==="Yes"),k=e.computed(()=>o.block.format||{}),p=e.computed(()=>k.value?.page_cover?l(k.value.page_cover,o.block):null),h=e.computed(()=>`center ${(1-(k.value?.page_cover_position||.5))*100}%`),f=e.computed(()=>o.block.type==="column"&&k.value?.column_ratio?{width:`calc(${k.value.column_ratio*100}% - 16px)`}:{});e.computed(()=>{const b=o.block.collection_id;return b&&s.collection[b]?C(s.collection[b].value?.name):"Untitled"});const g=e.computed(()=>o.block);return(b,B)=>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(i)?"dark-mode":"light-mode",d.value,t.className,k.value.page_full_width&&"notion-full-width",k.value.page_small_text&&"notion-small-text"))},[e.unref(c)?(e.openBlock(),e.createElementBlock("div",Ht,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).Header),{block:t.block},null,8,["block"])),p.value?(e.openBlock(),e.createElementBlock("div",Gt,[e.createElementVNode("img",{class:"notion-page-cover",src:p.value,alt:"page cover",style:e.normalizeStyle({objectPosition:h.value})},null,12,Wt)])):e.createCommentVNode("",!0),e.createElementVNode("div",qt,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-page",p.value?"notion-page-has-cover":"notion-page-no-cover",k.value.page_icon?"notion-page-has-icon":"notion-page-no-icon"))},[k.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:m.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",u.value,d.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:m.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",u.value,d.value))},[e.createElementVNode("span",Qt,[e.createVNode(E,{value:m.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",u.value,d.value))},[e.createElementVNode("span",Jt,[e.createVNode(E,{value:m.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",u.value,d.value))},[e.createElementVNode("span",vt,[e.createVNode(E,{value:m.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",u.value,d.value))},[m.value?(e.openBlock(),e.createBlock(E,{key:0,value:m.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",d.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:m.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",d.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:m.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",d.value))},[e.createElementVNode("div",to,[e.createElementVNode("div",oo,[e.createElementVNode("input",{type:"checkbox",checked:r.value,readonly:""},null,8,no)]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-to-do-body",r.value&&"notion-to-do-checked"))},[e.createVNode(E,{value:m.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",d.value))},[e.createElementVNode("summary",null,[e.createVNode(E,{value:m.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",u.value,d.value))},[e.createElementVNode("div",null,[e.createVNode(E,{value:m.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",u.value?`${u.value}_co`:void 0,d.value))},[e.createVNode(V,{block:t.block},null,8,["block"]),e.createElementVNode("div",ao,[e.createVNode(E,{value:m.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",d.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",d.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:g.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",d.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",d.value)),style:e.normalizeStyle(f.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(d.value)},null,8,["block","class"])):(e.openBlock(),e.createElementBlock("div",{key:24,class:e.normalizeClass(e.unref(y)("notion-block-fallback",d.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,i)=>{const s=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,d=>(e.openBlock(),e.createBlock(s,{key:d,blockId:d,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(i=>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]=i=>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:i,defaultPageIcon:s}=_(),d=e.ref(!1),u=e.ref(""),m=e.ref(null),r=e.ref(null),k=e.ref(null);let p=null;function h(B,w){return(...$)=>{p||(p=setTimeout(()=>{B(...$),p=null},w))}}async function f(){if(!u.value.trim()||!c){d.value=!1,m.value=null,r.value=null;return}d.value=!0;try{const B=await c({query:u.value,ancestorId:n.rootBlockId});if(B.error||B.errorId)r.value=B,m.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]));m.value={...B,results:Object.values($)},r.value=null}}catch(B){r.value=B,m.value=null}finally{d.value=!1}}const g=h(f,1e3);e.watch(u,B=>{if(!B.trim()){m.value=null,r.value=null,d.value=!1;return}g()}),e.onMounted(async()=>{c&&await c({query:"",ancestorId:n.rootBlockId})});function b(){u.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,[d.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:k,"onUpdate:modelValue":w[0]||(w[0]=$=>u.value=$),class:"searchInput",placeholder:"Search",onKeydown:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},null,544),[[e.vModelText,u.value]]),u.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)]),u.value.trim()&&m.value?(e.openBlock(),e.createElementBlock("div",So,[m.value.results.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.results,$=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:$.id,href:e.unref(i)($.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(s)},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(m.value.results.length),1),e.createTextVNode(" "+e.toDisplayString(m.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)])]))])):u.value.trim()&&r.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}=_(),i=e.computed(()=>q(n,o.block.id)),s=e.ref(!1);function d(){s.value=!0}function u(){s.value=!1}function m(r){(r.metaKey||r.ctrlKey)&&(r.key==="p"||r.key==="k")&&(r.preventDefault(),d())}return e.onMounted(()=>{window.addEventListener("keydown",m)}),e.onUnmounted(()=>{window.removeEventListener("keydown",m)}),(r,k)=>(e.openBlock(),e.createElementBlock("header",To,[e.createElementVNode("div",Lo,[i.value?(e.openBlock(),e.createElementBlock("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(p,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.active?"div":e.unref(a).PageLink),e.mergeProps({ref_for:!0},p.active?{}:{href:e.unref(l)(p.pageId)},{class:e.unref(y)("breadcrumb",p.active&&"active")}),{default:e.withCtx(()=>[p.icon?(e.openBlock(),e.createBlock(V,{key:0,block:p.block,class:"icon"},null,8,["block"])):e.createCommentVNode("",!0),p.title?(e.openBlock(),e.createElementBlock("span",Ro,e.toDisplayString(p.title),1)):e.createCommentVNode("",!0)]),_:2},1040,["class"])),h<i.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:d},[(e.openBlock(),e.createElementBlock("svg",Uo,[...k[0]||(k[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(r.$slots,"header-right")]),s.value?(e.openBlock(),e.createBlock(Ao,{key:1,"is-open":s.value,"root-block-id":t.block.id,onClose:u},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}},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}),(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,i)=>(e.openBlock(),e.createElementBlock("span",{key:i,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}=_(),i=e.computed(()=>o.collectionView.format||{}),s=e.computed(()=>i.value.gallery_cover||{type:"none"}),d=e.computed(()=>i.value.gallery_cover_size||"medium"),u=e.computed(()=>i.value.gallery_cover_aspect||"cover"),m=e.computed(()=>i.value.gallery_properties||[]),r=e.computed(()=>{if(s.value.type==="page_cover"){const p=o.block.format?.page_cover;if(p)return{src:l(p,o.block),alt:o.block.properties?.title?.[0]?.[0]||"notion image"}}return null}),k=e.computed(()=>a(o.block.id));return(p,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c).PageLink),{href:k.value,class:e.normalizeClass(e.unref(y)("notion-collection-card",`notion-collection-card-size-${d.value}`,t.className))},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(T,{src:r.value.src,alt:r.value.alt,style:e.normalizeStyle({objectFit:u.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(m.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:i,value:{value:s,type:d}})=>{const u=s===void 0,m=s?.range,r=u?"uncategorized":m?s.range?.start_date||s.range?.end_date:s?.value||s,k=n[`results:${d}:${r}`];let p=!u&&(m||s?.value||s),h=t.schema[c];if(d==="checkbox"&&s&&(p="Yes"),m){h={type:"text",name:"text"};try{r&&(p=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(new Date(r)))}catch{p=r}}return{collectionGroup:k,schema:h,value:p||"No description",hidden:i,collection:t,collectionView:o,collectionData:n,blockIds:k?.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||[]),i=e.computed(()=>o.collectionView.format||{}),s=e.computed(()=>i.value.gallery_cover_size||"medium");return(d,u)=>a.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value,(m,r)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:r},{ref_for:!0},m),{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-${s.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.blockIds,k=>(e.openBlock(),e.createBlock(D,{key:k,block:e.unref(n).block[k]?.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-${s.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,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)])]))}}),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),i=e.computed(()=>c.value?O(o.collection,o.collectionView,o.collectionData):[]),s=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),d=e.computed(()=>o.collectionView.format?.list_properties?.filter(u=>u.visible)||[]);return(u,m)=>c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(r,k)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:k},{ref_for:!0},r),{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(r.blockIds,p=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:p,href:e.unref(a)(p),class:"notion-list-item notion-page-link"},{default:e.withCtx(()=>[e.createElementVNode("div",dn,[e.createVNode(V,{block:e.unref(n).block[p]?.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[p]?.value?.properties?.title,block:e.unref(n).block[p]?.value,collection:t.collection},null,8,["schema","data","block","collection"])]),e.createElementVNode("div",mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.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[p]?.value?.properties?.[h.property],block:e.unref(n).block[p]?.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(s.value,r=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:r,href:e.unref(a)(r),class:"notion-list-item notion-page-link"},{default:e.withCtx(()=>[e.createElementVNode("div",hn,[e.createVNode(V,{block:e.unref(n).block[r]?.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[r]?.value?.properties?.title,block:e.unref(n).block[r]?.value,collection:t.collection},null,8,["schema","data","block","collection"])]),e.createElementVNode("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,k=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:k.property},[k.property!=="title"?(e.openBlock(),e.createElementBlock("div",gn,[e.createVNode(x,{schema:t.collection.schema[k.property],data:e.unref(n).block[r]?.value?.properties?.[k.property],block:e.unref(n).block[r]?.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),i=e.computed(()=>c.value?O(o.collection,o.collectionView,o.collectionData):[]),s=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),d=e.computed(()=>o.collectionView.format?.table_properties?o.collectionView.format.table_properties.filter(r=>r.visible&&o.collection.schema[r.property]):[{property:"title"}].concat(Object.keys(o.collection.schema).filter(r=>r!=="title").map(r=>({property:r}))));function u(r){const k={};return r.width?k.width=`${r.width}px`:r.property==="title"?k.width="280px":k.width="200px",k}const m=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0",paddingRight:o.padding?`${o.padding}px`:"0"}));return(r,k)=>c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(p,h)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:h},{ref_for:!0},p,{"summary-props":{style:m.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)},[d.value.length?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.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(u(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(p.blockIds,f=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"notion-table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.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(u(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)},[d.value.length?(e.openBlock(),e.createElementBlock("div",xn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,p=>(e.openBlock(),e.createElementBlock("div",{key:p.property,class:"notion-table-th"},[e.createElementVNode("div",{class:"notion-table-view-header-cell",style:e.normalizeStyle(u(p))},[e.createElementVNode("div",In,[e.createVNode(oe,{schema:t.collection.schema[p.property]},null,8,["schema"])])],4)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,p=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"notion-table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.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(u(h))},[e.createVNode(x,{schema:t.collection.schema[h.property],data:e.unref(n).block[p]?.value?.properties?.[h.property],block:e.unref(n).block[p]?.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):[]),i=e.computed(()=>o.collectionView.format||{}),s=e.computed(()=>i.value.board_cover_size||"medium"),d=e.computed(()=>i.value.board_columns||i.value.board_groups2||[]),u=k=>{const p=`results:${k?.value?.type}:${k?.value?.value||"uncategorized"}`;return o.collectionData[p]||{blockIds:[]}},m=k=>{const p=u(k);return p.total||p.blockIds?.length||0},r=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0"}));return(k,p)=>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:r.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-board-view",`notion-board-view-size-${s.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Dn,[e.createElementVNode("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.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(m(g)),1)]))]))),128))])]),p[0]||(p[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(d.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(u(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-${s.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Gn,[e.createElementVNode("div",Wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.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(m(h)),1)]))]))),128))])]),p[1]||(p[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(d.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(u(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"})}));
|
|
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,c)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;const l=Object.getOwnPropertyDescriptor(t,n),r=Object.getOwnPropertyDescriptor(o,n);!ie(l,r)&&c||Object.defineProperty(t,n,r)},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 c=n===""?"":`with ${n.trim()}() `,l=de.bind(null,c,o.toString());Object.defineProperty(l,"name",pe);const{writable:r,enumerable:i,configurable:s}=me;Object.defineProperty(t,"toString",{value:l,writable:r,enumerable:i,configurable:s})};function ue(t,o,{ignoreNonConfigurable:n=!1}={}){const{name:c}=t;for(const l of Reflect.ownKeys(o))re(t,o,l,n);return se(t,o),ke(t,o,c),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:c}={}){if(c===0)return t;if(typeof c=="number"&&Number.isFinite(c)){if(c>I)throw new TypeError(`The \`maxAge\` option cannot exceed ${I}.`);if(c<0)throw new TypeError("The `maxAge` option should not be a negative number.")}const l=function(...r){const i=o?o(r):r[0],s=be(n,i);if(s)return s.data;const k=t.apply(this,r),p=typeof c=="function"?c(...r):c;if(p!==void 0&&p!==Number.POSITIVE_INFINITY){if(!Number.isFinite(p))throw new TypeError("The `maxAge` function must return a finite number, `0`, or `Infinity`.");if(p<=0)return k;if(p>I)throw new TypeError(`The \`maxAge\` function result cannot exceed ${I}.`)}if(n.set(i,{data:k,maxAge:p===void 0||p===Number.POSITIVE_INFINITY?Number.POSITIVE_INFINITY:Date.now()+p}),p!==void 0&&p!==Number.POSITIVE_INFINITY){const m=setTimeout(()=>{n.delete(i),U.get(l)?.delete(m)},p);m.unref?.();const a=U.get(l)??new Set;a.add(m),U.set(l,a)}return k};return ue(l,t,{ignoreNonConfigurable:!0}),fe.set(l,n),he.set(l,o??(r=>r[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:c,data:l,hash:r}=n.groups,i=c.split(";"),s=i.at(-1)==="base64";s&&i.pop();const k=i.shift()?.toLowerCase()??"",m=[...i.map(u=>{let[d,h=""]=u.split("=").map(f=>f.trim());return d==="charset"&&(h=h.toLowerCase(),h===Be)?"":`${d}${h?`=${h}`:""}`}).filter(Boolean)];s&&m.push("base64"),(m.length>0||k&&k!==ye)&&m.unshift(k);const a=o||!r?"":`#${r}`;return`data:${m.join(";")},${s?l.trim():l}${a}`};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 i=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let s=0,k="";for(;;){const m=i.exec(l.pathname);if(!m)break;const a=m[0],u=m.index,d=l.pathname.slice(s,u);k+=d.replace(/\/{2,}/g,"/"),k+=a,s=u+a.length}const p=l.pathname.slice(s,l.pathname.length);k+=p.replace(/\/{2,}/g,"/"),l.pathname=k}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 i=l.pathname.split("/").filter(Boolean),s=i.at(-1);s&&j(s,o.removeDirectoryIndex)&&(i.pop(),l.pathname=i.length>0?`/${i.join("/")}/`:"/")}if(o.removePath&&(l.pathname="/"),o.transformPath&&typeof o.transformPath=="function"){const i=l.pathname.split("/").filter(Boolean),s=o.transformPath(i);l.pathname=s?.length>0?`/${s.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 i of[...l.searchParams.keys()])j(i,o.removeQueryParameters)&&l.searchParams.delete(i);if(!Array.isArray(o.keepQueryParameters)&&o.removeQueryParameters===!0&&(l.search=""),Array.isArray(o.keepQueryParameters)&&o.keepQueryParameters.length>0)for(const i of[...l.searchParams.keys()])j(i,o.keepQueryParameters)||l.searchParams.delete(i);if(o.sortQueryParameters){const i=l.search;l.searchParams.sort();try{l.search=decodeURIComponent(l.search)}catch{}const s=i.slice(1).split("&").filter(k=>k&&!k.includes("="));for(const k of s){const p=decodeURIComponent(k);l.search=l.search.replace(`?${p}=`,`?${p}`).replace(`&${p}=`,`&${p}`)}}o.removeTrailingSlash&&(l.pathname=l.pathname.replace(/\/$/,"")),o.removeExplicitPort&&l.port&&(l.port="");const r=t;return t=l.toString(),!o.removeSingleSlash&&l.pathname==="/"&&!r.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,c,l,r,i,s,k;const p=t.collection_id||((c=(n=t.format)==null?void 0:n.collection_pointer)==null?void 0:c.id);if(p)return p;const m=(l=t?.view_ids)==null?void 0:l[0];if(m){const a=(i=(r=o.collection_view)==null?void 0:r[m])==null?void 0:i.value;if(a)return(k=(s=a.format)==null?void 0:s.collection_pointer)==null?void 0:k.id}return null}var C=t=>{var o;return t?Array.isArray(t)?(o=t?.reduce((n,c)=>n+(c[0]!=="⁍"&&c[0]!=="‣"?c[0]:""),""))!=null?o:"":t:""};function P(t,o){var n,c;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 r=(c=o.collection[l])==null?void 0:c.value;if(r)return C(r.name)}}return""}var Ne={header:0,sub_header:1,sub_sub_header:2},Ce=(t,o)=>{function n(i){return(i??[]).map(s=>{var k,p;const m=(k=o.block[s])==null?void 0:k.value;if(m){const{type:a}=m;if(a==="header"||a==="sub_header"||a==="sub_sub_header")return{id:s,type:a,text:C((p=m.properties)==null?void 0:p.title),indentLevel:Ne[a]};if(a==="transclusion_container"||a==="column_list"||a==="column")return n(m.content)}return null})}function c(i){return i.flatMap(s=>s==null?[]:Array.isArray(s)?c(s):[s])}const l=c(n(t.content)),r=[{actual:-1,effective:-1}];for(const i of l){const{indentLevel:s}=i,k=s;do{const p=r.at(-1),{actual:m,effective:a}=p;if(k>m)i.indentLevel=a+1,r.push({actual:k,effective:i.indentLevel});else if(k===m){i.indentLevel=a;break}else r.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,c,l;if((n=t.format)!=null&&n.page_icon)return(c=t.format)==null?void 0:c.page_icon;if(t.type==="collection_view_page"||t.type==="collection_view"){const r=H(t,o);if(r){const i=(l=o.collection[r])==null?void 0:l.value;if(i)return i.icon}}return null}var z=(t,o,{inclusive:n=!1}={})=>{var c,l;let r=t;for(;r;){if(n&&r?.type==="page")return r;const i=r.parent_id,s=r.parent_table;if(!i)break;if(s==="collection")r=(c=o.collection[i])==null?void 0:c.value;else if(r=(l=o.block[i])==null?void 0:l.value,r?.type==="page")return r}return null},A=t=>t.replaceAll("-",""),q=(t,o)=>{var n;const c=t.block,l=[];let r=o;do{const i=(n=c[r])==null?void 0:n.value;if(!i)break;const s=P(i,t),k=W(i,t);if(!(s||k))break;l.push({block:i,active:r===o,pageId:r,title:s,icon:k});const p=z(i,t),m=p?.id;if(!m)break;r=m}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 c=o.parent_table==="space"?"block":o.parent_table;return(c==="collection"||c==="team")&&(c="block"),n.searchParams.set("table",c),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)),c=X(n);o.pathname=`/image/${encodeURIComponent(c)}`,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,c=t.match(n);if(c&&c[2]?.length===11)return c[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:c,forceCustomImages:l,components:r,zoom:i}=_(),s=e.computed(()=>!c||!o.src?null:n?.preview_images?.[o.src]??n?.preview_images?.[X(o.src)]),k=e.ref(null),p=m=>{o.zoomable&&k.value&&i&&i.attach(k.value)};return(m,a)=>s.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:`${s.value.originalHeight/s.value.originalWidth*100}%`,height:t.height?`${t.height}px`:void 0})},[e.createElementVNode("img",{class:"lazy-image-preview",src:s.value.dataURIBase64,alt:t.alt,decoding:"async"},null,8,Ae),e.createElementVNode("img",{ref_key:"imageRef",ref:k,class:"lazy-image-real",src:t.src,alt:t.alt,width:s.value.originalWidth,height:s.value.originalHeight,decoding:"async",loading:"lazy",onLoad:p},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:k,class:e.normalizeClass(t.className),style:e.normalizeStyle(t.style),src:t.src,alt:t.alt,loading:"lazy",decoding:"async",onLoad:p},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:c,darkMode:l}=_(),r=e.computed(()=>W(o.block,n)?.trim()||o.defaultIcon),i=e.computed(()=>P(o.block,n)),s=e.computed(()=>r.value&&(M(r.value)||r.value.startsWith("/icons/"))),k=e.computed(()=>{if(r.value){if(M(r.value))return c(r.value,o.block);if(r.value.startsWith("/icons/"))return`https://www.notion.so${r.value}?mode=${l?"dark":"light"}`}});return(p,m)=>r.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",s.value?"notion-page-icon-image":"notion-page-icon-span"))},[s.value?(e.openBlock(),e.createBlock(T,{key:0,src:k.value,alt:i.value||"page icon",className:e.unref(y)(t.className,"notion-page-icon")},null,8,["src","alt","className"])):r.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(y)(t.className,"notion-page-icon")),role:"img","aria-label":r.value},e.toDisplayString(r.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]),c=e.computed(()=>o.content[1]||[]),{recordMap:l,mapPageUrl:r,components:i}=_(),s=e.computed(()=>{const k=n.value,p=c.value,m=p?.find(d=>d[0]==="eoi");if(m){const d=m[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 a=p?.find(d=>d[0]==="p");if(a){const d=a[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=r(d);return e.h(i.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=r(d);return e.h(i.PageLink,{class:"notion-link notion-page-mention",href:f},()=>[e.h("span",{class:"notion-page-mention-text"},"Page")])}}if(!p?.length)return k;let u=k;for(const d of p)switch(d[0]){case"b":u=e.h("b",null,u);break;case"i":u=e.h("i",null,u);break;case"s":u=e.h("s",null,u);break;case"a":const f=d[1];f.startsWith("/")?u=e.h(i.PageLink,{class:"notion-link",href:f},u):u=e.h("a",{class:"notion-link",href:f,target:"_blank",rel:"noopener noreferrer"},u);break;case"c":u=e.h("code",{class:"notion-inline-code"},u);break;case"_":u=e.h("span",{class:"notion-inline-underscore"},u);break;case"h":const g=d[1];u=e.h("span",{class:`notion-${g}`},u);break}return u});return(k,p)=>typeof s.value=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.value),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.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,(c,l)=>(e.openBlock(),e.createBlock(Me,{key:l,content:c},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:c,components:l}=_(),r=e.computed(()=>{const a={position:"relative",display:"flex",justifyContent:"center",alignSelf:"center",width:"100%",maxWidth:"100%",flexDirection:"column"};if(o.block.format){const{block_aspect_ratio:u,block_height:d,block_width:h,block_full_width:f,block_page_width:g,block_preserve_scale:B}=o.block.format;if(f||g)f?a.width="100vw":a.width="100%",o.block.type==="video"?d?a.height=`${d}px`:u&&(a.paddingBottom=`${u*100}%`):u&&o.block.type!=="image"?a.paddingBottom=`${u*100}%`:d&&(a.height=`${d}px`);else{switch(o.block.format?.block_alignment){case"center":a.alignSelf="center";break;case"left":a.alignSelf="start";break;case"right":a.alignSelf="end";break}h&&(a.width=typeof h=="number"?`${h}px`:h)}}return a}),i=e.computed(()=>{const a={};return o.block.type==="image"?a.objectFit="cover":o.block.format?.block_preserve_scale&&(a.objectFit="contain"),a}),s=e.computed(()=>{let a=n.signed_urls?.[o.block.id]||o.block.properties?.source?.[0]?.[0];if(a&&o.block.space_id){const u=new URL(a);u.searchParams.set("spaceId",o.block.space_id),a=u.toString()}return a}),k=e.computed(()=>{if(o.block.type==="image"&&s.value){let a=s.value;return!a.includes(".gif")&&a.includes("file.notion.so")&&(a=o.block.properties?.source?.[0]?.[0]),c(a,o.block)}return s.value}),p=e.computed(()=>{const a=C(o.block.properties?.alt_text),u=C(o.block.properties?.caption);return a||u||"notion image"}),m=e.computed(()=>o.block.type==="video"&&s.value?ze(s.value):null);return(a,u)=>s.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(r.value)},[t.block.type==="image"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).Image),{key:0,src:k.value,alt:p.value,zoomable:t.zoomable,style:e.normalizeStyle(i.value)},null,8,["src","alt","zoomable","style"])):t.block.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[m.value?(e.openBlock(),e.createElementBlock("iframe",{key:0,class:"notion-asset-object-fit",style:e.normalizeStyle(i.value),src:`https://www.youtube.com/embed/${m.value}`,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,je)):(e.openBlock(),e.createElementBlock("video",{key:1,playsInline:"",controls:"",preload:"metadata",style:e.normalizeStyle(i.value),src:s.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(i.value),src:s.value,frameBorder:"0",allowFullScreen:"",loading:"lazy"},null,12,Ge)):t.block.type==="pdf"?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("a",{href:s.value,target:"_blank"},"View PDF",8,qe)])):e.createCommentVNode("",!0),e.renderSlot(a.$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},c={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:c},{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:c},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:c.entity}}],environment:{pattern:RegExp("\\$?"+o),alias:"constant"},variable:c.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"],r=c.variable[1].inside,i=0;i<l.length;i++)r[l[i]]=t.languages.bash[l[i]];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(m){return m=m.replace(/<inner>/g,function(){return o}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var c=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,l=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return c}),r=/\|?[ \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+r+"(?:"+l+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+l+r+")(?:"+l+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(c),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+l+")"+r+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+l+"$"),inside:{"table-header":{pattern:RegExp(c),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(m){["url","bold","italic","strike","code-snippet"].forEach(function(a){m!==a&&(t.languages.markdown[m].inside.content.inside[a]=t.languages.markdown[a])})}),t.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function a(u){if(!(!u||typeof u=="string"))for(var d=0,h=u.length;d<h;d++){var f=u[d];if(f.type!=="code"){a(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]}}}a(m.tokens)}),t.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var a="",u=0,d=m.classes.length;u<d;u++){var h=m.classes[u],f=/language-(.+)/.exec(h);if(f){a=f[1];break}}var g=t.languages[a];if(g)m.content=t.highlight(p(m.content),g,a);else if(a&&a!=="none"&&t.plugins.autoloader){var B="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=B,t.plugins.autoloader.loadLanguages(a,function(){var b=document.getElementById(B);b&&(b.innerHTML=t.highlight(b.textContent,t.languages[a],a))})}}});var i=RegExp(t.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},k=String.fromCodePoint||String.fromCharCode;function p(m){var a=m.replace(i,"");return a=a.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(u,d){if(d=d.toLowerCase(),d[0]==="#"){var h;return d[1]==="x"?h=parseInt(d.slice(2),16):h=Number(d.slice(1)),k(h)}else{var f=s[d];return f||u}}),a}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://,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)),c=e.computed(()=>o.block.properties?.language?.[0]?.[0]?.toLowerCase()||o.defaultLanguage||"typescript"),l=e.computed(()=>o.block.properties?.caption),r=e.ref(null),i=()=>{r.value&&le.highlightElement(r.value)};return e.onMounted(i),e.watch(n,i),e.watch(c,i),(s,k)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("pre",{class:e.normalizeClass(`language-${c.value}`)},[e.createElementVNode("code",{ref_key:"codeRef",ref:r,class:e.normalizeClass(`language-${c.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)),c=e.computed(()=>{const l=n.value;if(!l)return"";try{return ae.renderToString(l,{throwOnError:!1,displayMode:!o.inline})}catch(r){return console.error("KaTeX error",r),l}});return(l,r)=>t.inline?(e.openBlock(),e.createElementBlock("span",{key:0,class:"notion-equation notion-equation-inline",innerHTML:c.value},null,8,ot)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"notion-equation notion-equation-block",innerHTML:c.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)),c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Tn)),l=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Jn));return(r,i)=>(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(c),{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}=_(),c=e.computed(()=>H(o.block,n)),l=e.computed(()=>c.value?n.collection[c.value]?.value:null),r=e.computed(()=>o.block.view_ids||[]),i=e.ref(r.value[0]),s=e.computed(()=>i.value?n.collection_view[i.value]?.value:null),k=e.computed(()=>!c.value||!i.value?null:n.collection_query[c.value]?.[i.value]),p=e.computed(()=>l.value?C(l.value.name).trim():""),m=e.computed(()=>s.value?.format?.hide_linked_collection_name!==!0&&p.value),a=e.ref(typeof window<"u"?window.innerWidth:1024),u=()=>{a.value=window.innerWidth};e.onMounted(()=>{window.addEventListener("resize",u)}),e.onUnmounted(()=>{window.removeEventListener("resize",u)});const d=e.computed(()=>{const g=z(o.block,n)?.format?.page_full_width===!0;if(s.value?.type!=="table"&&s.value?.type!=="board")return{width:0,padding:0};const B=a.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=>{i.value=f};return(f,g)=>l.value&&s.value&&k.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y)("notion-collection-wrapper",t.className))},[r.value.length>1?(e.openBlock(),e.createElementBlock("div",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.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",i.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),m.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(p.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:s.value,collectionData:k.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}=_(),c=e.computed(()=>{const r=z(o.block,n);return r?Ce(r,n):[]}),l=e.computed(()=>o.block.format?.block_color);return(r,i)=>c.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(c.value,s=>(e.openBlock(),e.createElementBlock("a",{key:s.id,href:`#${e.unref(A)(s.id)}`,class:e.normalizeClass(e.unref(y)("notion-table-of-contents-item",`notion-table-of-contents-item-indent-level-${s.indentLevel}`))},[e.createElementVNode("span",{class:"notion-table-of-contents-item-body",style:e.normalizeStyle({marginLeft:`${s.indentLevel*24}px`})},e.toDisplayString(s.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:c}=_(),l=e.computed(()=>C(o.block.properties?.title)),r=e.computed(()=>C(o.block.properties?.description)),i=e.computed(()=>o.block.properties?.link?.[0]?.[0]);e.computed(()=>o.block.properties?.caption);const s=e.computed(()=>o.block.format?.bookmark_cover),k=e.computed(()=>o.block.format?.bookmark_icon);return(p,m)=>i.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(c).Link),{href:i.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),r.value?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_t,[k.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:e.unref(n)(k.value,t.block),class:"notion-bookmark-link-icon",alt:l.value},null,8,Et)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",$t,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0)])]),s.value?(e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(T,{src:e.unref(n)(s.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:c,mapPageUrl:l}=_(),r=e.computed(()=>q(n,o.block.id));return(i,s)=>r.value?(e.openBlock(),e.createElementBlock("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(k,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:k.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c).PageLink),{href:e.unref(l)(k.pageId),class:"notion-breadcrumb"},{default:e.withCtx(()=>[k.icon?(e.openBlock(),e.createBlock(V,{key:0,block:k.block,class:"notion-breadcrumb-icon"},null,8,["block"])):e.createCommentVNode("",!0),k.title?(e.openBlock(),e.createElementBlock("span",xt,e.toDisplayString(k.title),1)):e.createCommentVNode("",!0)]),_:2},1032,["href"])),p<r.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}=_(),c=e.computed(()=>o.block?.format||{}),l=e.computed(()=>c.value.original_url),r=e.computed(()=>c.value.attributes||[]),i=e.computed(()=>c.value.domain),s=e.computed(()=>r.value.find(f=>f.id==="title")?.values[0]||""),k=e.computed(()=>{let f=r.value.find(g=>g.id==="owner")?.values[0]||"";return i.value==="github.com"&&f&&(f=f.split("/").at(-1)||f),f}),p=e.computed(()=>r.value.find(f=>f.id==="updated_at")?.values[0]),m=e.computed(()=>p.value?Ve(p.value):null),a=e.computed(()=>i.value==="github.com"),u=e.computed(()=>i.value==="github.com"?"github":null),d=e.computed(()=>l.value&&r.value.length>0);return(h,f)=>d.value&&a.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(()=>[u.value?(e.openBlock(),e.createElementBlock("div",zt,[u.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(s.value),1),!t.inline&&(k.value||m.value)?(e.openBlock(),e.createElementBlock("div",Dt,[k.value?(e.openBlock(),e.createElementBlock("span",Rt,e.toDisplayString(k.value),1)):e.createCommentVNode("",!0),k.value&&m.value?(e.openBlock(),e.createElementBlock("span",Ot," • ")):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("span",Mt,"Updated "+e.toDisplayString(m.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["href","class"])):(e.openBlock(),e.createElementBlock("div",Ut," [Unsupported external integration: "+e.toDisplayString(i.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:c,mapImageUrl:l,fullPage:r,darkMode:i,recordMap:s,hideHeader:k}=_(),p=e.computed(()=>o.hideBlockId?"notion-block":`notion-block-${A(o.block.id)}`),m=e.computed(()=>o.block.format?.block_color?`notion-${o.block.format.block_color}`:void 0),a=e.computed(()=>o.block.properties?.title),u=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&&s.collection[b]?C(s.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(i)?"dark-mode":"light-mode",p.value,t.className,d.value.page_full_width&&"notion-full-width",d.value.page_small_text&&"notion-small-text"))},[e.unref(r)?(e.openBlock(),e.createElementBlock("div",Ht,[e.unref(k)?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:a.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",m.value,p.value)),href:e.unref(c)(t.block.id)},{default:e.withCtx(()=>[e.createVNode(V,{block:t.block},null,8,["block"]),e.createElementVNode("div",Kt,[e.createVNode(E,{value:a.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",m.value,p.value))},[e.createElementVNode("span",Qt,[e.createVNode(E,{value:a.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",m.value,p.value))},[e.createElementVNode("span",Jt,[e.createVNode(E,{value:a.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",m.value,p.value))},[e.createElementVNode("span",vt,[e.createVNode(E,{value:a.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",m.value,p.value))},[a.value?(e.openBlock(),e.createBlock(E,{key:0,value:a.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",p.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:a.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",p.value))},[e.createElementVNode("li",null,[e.createVNode(E,{value:a.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",p.value))},[e.createElementVNode("div",to,[e.createElementVNode("div",oo,[e.createElementVNode("input",{type:"checkbox",checked:u.value,readonly:""},null,8,no)]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-to-do-body",u.value&&"notion-to-do-checked"))},[e.createVNode(E,{value:a.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",p.value))},[e.createElementVNode("summary",null,[e.createVNode(E,{value:a.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",m.value,p.value))},[e.createElementVNode("div",null,[e.createVNode(E,{value:a.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",m.value?`${m.value}_co`:void 0,p.value))},[e.createVNode(V,{block:t.block},null,8,["block"]),e.createElementVNode("div",ao,[e.createVNode(E,{value:a.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",p.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",p.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",p.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",p.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(p.value)},null,8,["block","class"])):(e.openBlock(),e.createElementBlock("div",{key:24,class:e.normalizeClass(e.unref(y)("notion-block-fallback",p.value))},null,2))}}),io=e.defineComponent({__name:"NotionBlockRenderer",props:{blockId:{},level:{},zoom:{}},setup(t){const o=t,{recordMap:n}=_(),c=e.computed(()=>o.blockId||Object.keys(n.block)[0]),l=e.computed(()=>n.block[c.value]?.value);return(r,i)=>{const s=e.resolveComponent("NotionBlockRenderer",!0);return l.value?(e.openBlock(),e.createBlock(ro,{key:c.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,k=>(e.openBlock(),e.createBlock(s,{key:k,blockId:k,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 c(l){l.key==="Escape"&&n("close")}return e.onMounted(()=>{window.addEventListener("keydown",c)}),e.onUnmounted(()=>{window.removeEventListener("keydown",c)}),(l,r)=>(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:r[1]||(r[1]=e.withModifiers(i=>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:r[0]||(r[0]=i=>n("close")),"aria-label":"Close modal"},[...r[2]||(r[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[c,l]of o)n[c]=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}=_(),c=e.computed(()=>P(o.block,n));return(l,r)=>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"]),c.value?(e.openBlock(),e.createElementBlock("span",yo,e.toDisplayString(c.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,c=o,{components:l,searchNotion:r,mapPageUrl:i,defaultPageIcon:s}=_(),k=e.ref(!1),p=e.ref(""),m=e.ref(null),a=e.ref(null),u=e.ref(null);let d=null;function h(b,w){return(...$)=>{d||(d=setTimeout(()=>{b(...$),d=null},w))}}async function f(){if(!p.value.trim()||!r){k.value=!1,m.value=null,a.value=null;return}k.value=!0;try{const b=await r({query:p.value,ancestorId:n.rootBlockId});if(b.error||b.errorId)a.value=b,m.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]));m.value={...b,results:Object.values($)},a.value=null}}catch(b){a.value=b,m.value=null}finally{k.value=!1}}const g=h(f,1e3);e.watch(p,b=>{if(!b.trim()){m.value=null,a.value=null,k.value=!1;return}g()}),e.onMounted(async()=>{r&&await r({query:"",ancestorId:n.rootBlockId})});function B(){p.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]=$=>c("close"))},{default:e.withCtx(()=>[e.createElementVNode("div",_o,[e.createElementVNode("div",Eo,[e.createElementVNode("div",$o,[k.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:u,"onUpdate:modelValue":w[0]||(w[0]=$=>p.value=$),class:"searchInput",placeholder:"Search",onKeydown:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},null,544),[[e.vModelText,p.value]]),p.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)]),p.value.trim()&&m.value?(e.openBlock(),e.createElementBlock("div",So,[m.value.results.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.results,$=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:$.id,href:e.unref(i)($.page.id),class:"result notion-page-link",onClick:w[2]||(w[2]=N=>c("close"))},{default:e.withCtx(()=>[e.createVNode(wo,{block:$.page,"default-icon":e.unref(s)},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(m.value.results.length),1),e.createTextVNode(" "+e.toDisplayString(m.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)])]))])):p.value.trim()&&a.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:c,mapPageUrl:l,searchNotion:r}=_(),i=e.computed(()=>q(n,o.block.id)),s=e.ref(!1);function k(){s.value=!0}function p(){s.value=!1}function m(a){(a.metaKey||a.ctrlKey)&&(a.key==="p"||a.key==="k")&&(a.preventDefault(),k())}return e.onMounted(()=>{window.addEventListener("keydown",m)}),e.onUnmounted(()=>{window.removeEventListener("keydown",m)}),(a,u)=>(e.openBlock(),e.createElementBlock("header",To,[e.createElementVNode("div",Lo,[i.value?(e.openBlock(),e.createElementBlock("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(d,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d.pageId},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.active?"div":e.unref(c).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<i.value.length-1?(e.openBlock(),e.createElementBlock("span",Oo," / ")):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Mo,[e.unref(r)?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"notion-nav-button notion-search-button",onClick:k},[(e.openBlock(),e.createElementBlock("svg",Uo,[...u[0]||(u[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(a.$slots,"header-right")]),s.value?(e.openBlock(),e.createBlock(Ao,{key:1,"is-open":s.value,"root-block-id":t.block.id,onClose:p},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 c=null;return o.isImageZoomable&&typeof window<"u"&&(c=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:c,hideHeader:o.hideHeader}),(l,r)=>(e.openBlock(),e.createBlock(io,{level:0,zoom:t.isImageZoomable?e.unref(c):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(c,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(","),(r,i)=>(e.openBlock(),e.createElementBlock("span",{key:i,class:e.normalizeClass(e.unref(y)("notion-property-select-item",`notion-item-${r.trim().toLowerCase()}`))},e.toDisplayString(r.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:c,mapImageUrl:l,components:r}=_(),i=e.computed(()=>o.collectionView.format||{}),s=e.computed(()=>i.value.gallery_cover||{type:"none"}),k=e.computed(()=>i.value.gallery_cover_size||"medium"),p=e.computed(()=>i.value.gallery_cover_aspect||"cover"),m=e.computed(()=>i.value.gallery_properties||[]),a=e.computed(()=>{if(s.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}),u=e.computed(()=>c(o.block.id));return(d,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r).PageLink),{href:u.value,class:e.normalizeClass(e.unref(y)("notion-collection-card",`notion-collection-card-size-${k.value}`,t.className))},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("div",qo,[e.createVNode(T,{src:a.value.src,alt:a.value.alt,style:e.normalizeStyle({objectFit:p.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(m.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,c)=>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,...c){return(o?.format?.collection_groups||[]).map(({property:r,hidden:i,value:{value:s,type:k}})=>{const p=s===void 0,m=s?.range,a=p?"uncategorized":m?s.range?.start_date||s.range?.end_date:s?.value||s,u=n[`results:${k}:${a}`];let d=!p&&(m||s?.value||s),h=t.schema[r];if(k==="checkbox"&&s&&(d="Yes"),m){h={type:"text",name:"text"};try{a&&(d=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(new Date(a)))}catch{d=a}}return{collectionGroup:u,schema:h,value:d||"No description",hidden:i,collection:t,collectionView:o,collectionData:n,blockIds:u?.blockIds,...c}})}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}=_(),c=e.computed(()=>!!o.collectionView?.format?.collection_group_by),l=e.computed(()=>c.value?O(o.collection,o.collectionView,o.collectionData):[]),r=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),i=e.computed(()=>o.collectionView.format||{}),s=e.computed(()=>i.value.gallery_cover_size||"medium");return(k,p)=>c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.value,(m,a)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:a},{ref_for:!0},m),{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-${s.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.blockIds,u=>(e.openBlock(),e.createBlock(D,{key:u,block:e.unref(n).block[u]?.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-${s.value}`))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,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)])]))}}),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:c,components:l}=_(),r=e.computed(()=>!!o.collectionView?.format?.collection_group_by),i=e.computed(()=>r.value?O(o.collection,o.collectionView,o.collectionData):[]),s=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),k=e.computed(()=>o.collectionView.format?.list_properties?.filter(p=>p.visible)||[]);return(p,m)=>r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(a,u)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:u},{ref_for:!0},a),{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(a.blockIds,d=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:d,href:e.unref(c)(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(k.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(s.value,a=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l).PageLink),{key:a,href:e.unref(c)(a),class:"notion-list-item notion-page-link"},{default:e.withCtx(()=>[e.createElementVNode("div",hn,[e.createVNode(V,{block:e.unref(n).block[a]?.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[a]?.value?.properties?.title,block:e.unref(n).block[a]?.value,collection:t.collection},null,8,["schema","data","block","collection"])]),e.createElementVNode("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.property},[u.property!=="title"?(e.openBlock(),e.createElementBlock("div",gn,[e.createVNode(x,{schema:t.collection.schema[u.property],data:e.unref(n).block[a]?.value?.properties?.[u.property],block:e.unref(n).block[a]?.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}=_(),c=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"})),r=e.computed(()=>!!o.collectionView?.format?.collection_group_by),i=e.computed(()=>r.value?O(o.collection,o.collectionView,o.collectionData):[]),s=e.computed(()=>o.collectionData.collection_group_results?.blockIds||o.collectionData.blockIds||[]),k=e.computed(()=>o.collectionView.format?.table_properties?o.collectionView.format.table_properties.filter(a=>a.visible&&o.collection.schema[a.property]):[{property:"title"}].concat(Object.keys(o.collection.schema).filter(a=>a!=="title").map(a=>({property:a}))));function p(a){const u={};return a.width?u.width=`${a.width}px`:a.property==="title"?u.width="280px":u.width="200px",u}const m=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0",paddingRight:o.padding?`${o.padding}px`:"0"}));return(a,u)=>r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(d,h)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:h},{ref_for:!0},d,{"summary-props":{style:m.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:"notion-table",style:e.normalizeStyle(c.value)},[e.createElementVNode("div",{class:"notion-table-view",style:e.normalizeStyle(l.value)},[k.value.length?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.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(p(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(k.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(p(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(c.value)},[e.createElementVNode("div",{class:"notion-table-view",style:e.normalizeStyle(l.value)},[k.value.length?(e.openBlock(),e.createElementBlock("div",xn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.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(p(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(s.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"notion-table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.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(p(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:c}=_(),l=e.computed(()=>!!o.collectionView?.format?.collection_group_by),r=e.computed(()=>l.value?O(o.collection,o.collectionView,o.collectionData):[]),i=e.computed(()=>o.collectionView.format||{}),s=e.computed(()=>i.value.board_cover_size||"medium"),k=e.computed(()=>i.value.board_columns||i.value.board_groups2||[]),p=u=>{const d=`results:${u?.value?.type}:${u?.value?.value||"uncategorized"}`;return o.collectionData[d]||{blockIds:[]}},m=u=>{const d=p(u);return d.total||d.blockIds?.length||0},a=e.computed(()=>({paddingLeft:o.padding?`${o.padding}px`:"0"}));return(u,d)=>l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(h,f)=>(e.openBlock(),e.createBlock(R,e.mergeProps({key:f},{ref_for:!0},h,{"summary-props":{style:a.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[e.createElementVNode("div",{class:e.normalizeClass(e.unref(y)("notion-board-view",`notion-board-view-size-${s.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Dn,[e.createElementVNode("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.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(m(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(k.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(p(g).blockIds,b=>(e.openBlock(),e.createBlock(D,{key:b,block:e.unref(c).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-${s.value}`)),style:e.normalizeStyle(n.value)},[e.createElementVNode("div",Gn,[e.createElementVNode("div",Wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.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(m(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(k.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(p(h).blockIds,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.unref(c).block[g]?.value?(e.openBlock(),e.createBlock(D,{key:0,block:e.unref(c).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"})}));
|