From f0b0ce8406677c936ea0a5a0b6f31311e11db8b1 Mon Sep 17 00:00:00 2001 From: Chun Date: Thu, 11 Apr 2024 12:08:37 +0800 Subject: [PATCH] update --- 05-restful/404.html | 2 +- .../{index-BBhYVIJ4.js => index-CTBKgxrZ.js} | 14 +++++++------- ...ols-CemI06Hp.js => DrawingControls-CwStMqrz.js} | 2 +- ...gLayer-C8CbKT5s.js => DrawingLayer-pMDckV8h.js} | 2 +- ...view-C05gdWf_.js => DrawingPreview-DOv9aIwT.js} | 2 +- ...Display-BdeEY5Sw.js => NoteDisplay-DVesK58r.js} | 2 +- ...intStyle-M7jeBLz1.js => PrintStyle-C5A1Lxy8.js} | 2 +- ...idesShow-D-sR6O06.js => SlidesShow-aZvHWNC2.js} | 6 +++--- .../{bottom-DXdIwbm1.js => bottom-DYeMWyTH.js} | 2 +- .../slidev/{play-CGBDlsHN.js => play-DSehltPn.js} | 4 ++-- ...presenter-DwcU7Ppu.js => presenter-BJ0i69ip.js} | 2 +- .../{print-Db79bZhK.js => print-2cNOs_aZ.js} | 4 ++-- .../{print-Blm48ouN.js => print-Ss9g6xiG.js} | 2 +- 05-restful/index.html | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) rename 05-restful/assets/{index-BBhYVIJ4.js => index-CTBKgxrZ.js} (77%) rename 05-restful/assets/slidev/{DrawingControls-CemI06Hp.js => DrawingControls-CwStMqrz.js} (96%) rename 05-restful/assets/slidev/{DrawingLayer-C8CbKT5s.js => DrawingLayer-pMDckV8h.js} (91%) rename 05-restful/assets/slidev/{DrawingPreview-C05gdWf_.js => DrawingPreview-DOv9aIwT.js} (89%) rename 05-restful/assets/slidev/{NoteDisplay-BdeEY5Sw.js => NoteDisplay-DVesK58r.js} (97%) rename 05-restful/assets/slidev/{PrintStyle-M7jeBLz1.js => PrintStyle-C5A1Lxy8.js} (87%) rename 05-restful/assets/slidev/{SlidesShow-D-sR6O06.js => SlidesShow-aZvHWNC2.js} (98%) rename 05-restful/assets/slidev/{bottom-DXdIwbm1.js => bottom-DYeMWyTH.js} (93%) rename 05-restful/assets/slidev/{play-CGBDlsHN.js => play-DSehltPn.js} (85%) rename 05-restful/assets/slidev/{presenter-DwcU7Ppu.js => presenter-BJ0i69ip.js} (95%) rename 05-restful/assets/slidev/{print-Db79bZhK.js => print-2cNOs_aZ.js} (89%) rename 05-restful/assets/slidev/{print-Blm48ouN.js => print-Ss9g6xiG.js} (92%) diff --git a/05-restful/404.html b/05-restful/404.html index f1ca625..28bbc61 100644 --- a/05-restful/404.html +++ b/05-restful/404.html @@ -7,7 +7,7 @@ - + diff --git a/05-restful/assets/index-BBhYVIJ4.js b/05-restful/assets/index-CTBKgxrZ.js similarity index 77% rename from 05-restful/assets/index-BBhYVIJ4.js rename to 05-restful/assets/index-CTBKgxrZ.js index 68f9e94..590fb3d 100644 --- a/05-restful/assets/index-BBhYVIJ4.js +++ b/05-restful/assets/index-CTBKgxrZ.js @@ -1,8 +1,8 @@ -import{n as De,y as Fn,z as v,A as Nn,t as U,B as ee,C as _e,D as Rn,E as Hn,G as Un,H as jn,I as d,J as b,K as zn,L as qn,M as Wn,N as Vn,O as ie,P as ni,Q as Gn,R as Kn,d as ns,b as ge,e as r,f as me,h as Ri,o as S,c as T,k as A,q as P,s as L,i as je,S as Yn,T as Zn,U as Xn,g as Jn,l as Hi,m as Ui,V as _,W as Hs,X as Qn,Y as tr,Z as er,_ as sr,$ as ir,a0 as nr,a1 as rr,a2 as et,a3 as ji,a4 as ar,a5 as rs,a6 as lr,a7 as or,a8 as cr,r as hr,a9 as ur,aa as dr,u as pr}from"./modules/vue-BoI2EFOv.js";import{_ as fr,a as gr}from"./modules/unplugin-icons-CfAESjuq.js";import{T as mr}from"./modules/shiki-DdzKTf6Q.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const a of n)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function s(n){const a={};return n.integrity&&(a.integrity=n.integrity),n.referrerPolicy&&(a.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?a.credentials="include":n.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(n){if(n.ep)return;n.ep=!0;const a=s(n);fetch(n.href,a)}})();function xs(t,e={},s){for(const i in t){const n=t[i],a=s?`${s}:${i}`:i;typeof n=="object"&&n!==null?xs(n,e,a):typeof n=="function"&&(e[a]=n)}return e}const kr={run:t=>t()},_r=()=>kr,zi=typeof console.createTask<"u"?console.createTask:_r;function yr(t,e){const s=e.shift(),i=zi(s);return t.reduce((n,a)=>n.then(()=>i.run(()=>a(...e))),Promise.resolve())}function vr(t,e){const s=e.shift(),i=zi(s);return Promise.all(t.map(n=>i.run(()=>n(...e))))}function ds(t,e){for(const s of[...t])s(e)}class wr{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,s,i={}){if(!e||typeof s!="function")return()=>{};const n=e;let a;for(;this._deprecatedHooks[e];)a=this._deprecatedHooks[e],e=a.to;if(a&&!i.allowDeprecated){let l=a.message;l||(l=`${n} hook has been deprecated`+(a.to?`, please use ${a.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(l)||(console.warn(l),this._deprecatedMessages.add(l))}if(!s.name)try{Object.defineProperty(s,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(s),()=>{s&&(this.removeHook(e,s),s=void 0)}}hookOnce(e,s){let i,n=(...a)=>(typeof i=="function"&&i(),i=void 0,n=void 0,s(...a));return i=this.hook(e,n),i}removeHook(e,s){if(this._hooks[e]){const i=this._hooks[e].indexOf(s);i!==-1&&this._hooks[e].splice(i,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,s){this._deprecatedHooks[e]=typeof s=="string"?{to:s}:s;const i=this._hooks[e]||[];delete this._hooks[e];for(const n of i)this.hook(e,n)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const s in e)this.deprecateHook(s,e[s])}addHooks(e){const s=xs(e),i=Object.keys(s).map(n=>this.hook(n,s[n]));return()=>{for(const n of i.splice(0,i.length))n()}}removeHooks(e){const s=xs(e);for(const i in s)this.removeHook(i,s[i])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...s){return s.unshift(e),this.callHookWith(yr,e,...s)}callHookParallel(e,...s){return s.unshift(e),this.callHookWith(vr,e,...s)}callHookWith(e,s,...i){const n=this._before||this._after?{name:s,args:i,context:{}}:void 0;this._before&&ds(this._before,n);const a=e(s in this._hooks?[...this._hooks[s]]:[],i);return a instanceof Promise?a.finally(()=>{this._after&&n&&ds(this._after,n)}):(this._after&&n&&ds(this._after,n),a)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const s=this._before.indexOf(e);s!==-1&&this._before.splice(s,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const s=this._after.indexOf(e);s!==-1&&this._after.splice(s,1)}}}}function br(){return new wr}function xr(t){return Array.isArray(t)?t:[t]}const $r=["title","titleTemplate","script","style","noscript"],ze=["base","meta","link","style","script","noscript"],Ar=["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"],Sr=["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"],qi=["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"],Mr=typeof window<"u";function Us(t){let e=9;for(let s=0;s>>9)+65536).toString(16).substring(1,8).toLowerCase()}function ri(t){return t._h||Us(t._d?t._d:`${t.tag}:${t.textContent||t.innerHTML||""}:${Object.entries(t.props).map(([e,s])=>`${e}:${String(s)}`).join(",")}`)}function Wi(t,e){const{props:s,tag:i}=t;if(Sr.includes(i))return i;if(i==="link"&&s.rel==="canonical")return"canonical";if(s.charset)return"charset";const n=["id"];i==="meta"&&n.push("name","property","http-equiv");for(const a of n)if(typeof s[a]<"u"){const l=String(s[a]);return e&&!e(l)?!1:`${i}:${a}:${l}`}return!1}function ai(t,e){return t==null?e||null:typeof t=="function"?t(e):t}async function Er(t,e,s){const i={tag:t,props:await Vi(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[["script","noscript","style"].includes(t)?"innerHTML":"textContent"]:e},["templateParams","titleTemplate"].includes(t))};return qi.forEach(n=>{const a=typeof i.props[n]<"u"?i.props[n]:s[n];typeof a<"u"&&((!["innerHTML","textContent","children"].includes(n)||$r.includes(i.tag))&&(i[n==="children"?"innerHTML":n]=a),delete i.props[n])}),i.props.body&&(i.tagPosition="bodyClose",delete i.props.body),i.tag==="script"&&typeof i.innerHTML=="object"&&(i.innerHTML=JSON.stringify(i.innerHTML),i.props.type=i.props.type||"application/json"),Array.isArray(i.props.content)?i.props.content.map(n=>({...i,props:{...i.props,content:n}})):i}function Cr(t){return typeof t=="object"&&!Array.isArray(t)&&(t=Object.keys(t).filter(e=>t[e])),(Array.isArray(t)?t.join(" "):t).split(" ").filter(e=>e.trim()).filter(Boolean).join(" ")}async function Vi(t,e){for(const s of Object.keys(t)){if(s==="class"){t[s]=Cr(t[s]);continue}if(t[s]instanceof Promise&&(t[s]=await t[s]),!e&&!qi.includes(s)){const i=String(t[s]),n=s.startsWith("data-");i==="true"||i===""?t[s]=n?"true":!0:t[s]||(n&&i==="false"?t[s]="false":delete t[s])}}return t}const Tr=10;async function Dr(t){const e=[];return Object.entries(t.resolvedInput).filter(([s,i])=>typeof i<"u"&&Ar.includes(s)).forEach(([s,i])=>{const n=xr(i);e.push(...n.map(a=>Er(s,a,t)).flat())}),(await Promise.all(e)).flat().filter(Boolean).map((s,i)=>(s._e=t._i,t.mode&&(s._m=t.mode),s._p=(t._i<c&&c[h]||void 0,e):o=e[l],typeof o<"u"?(o||"").replace(/"/g,'\\"'):!1}let n=t;try{n=decodeURI(t)}catch{}return(n.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(l=>{const o=i(l.slice(1));typeof o=="string"&&(t=t.replace(new RegExp(`\\${l}(\\W|$)`,"g"),(c,h)=>`${o}${h}`).trim())}),t.includes(Qt)&&(t.endsWith(Qt)&&(t=t.slice(0,-Qt.length).trim()),t.startsWith(Qt)&&(t=t.slice(Qt.length).trim()),t=t.replace(new RegExp(`\\${Qt}\\s*\\${Qt}`,"g"),Qt),t=qe(t,{separator:s},s)),t}async function Lr(t){const e={tag:t.tagName.toLowerCase(),props:await Vi(t.getAttributeNames().reduce((s,i)=>({...s,[i]:t.getAttribute(i)}),{})),innerHTML:t.innerHTML};return e._d=Wi(e),e}async function Or(t,e={}){var u;const s=e.document||t.resolvedOptions.document;if(!s)return;const i={shouldRender:t.dirty,tags:[]};if(await t.hooks.callHook("dom:beforeRender",i),!i.shouldRender)return;const n=(await t.resolveTags()).map(p=>({tag:p,id:ze.includes(p.tag)?ri(p):p.tag,shouldRender:!0}));let a=t._dom;if(!a){a={elMap:{htmlAttrs:s.documentElement,bodyAttrs:s.body}};for(const p of["body","head"]){const g=(u=s==null?void 0:s[p])==null?void 0:u.children;for(const f of[...g].filter(m=>ze.includes(m.tagName.toLowerCase())))a.elMap[f.getAttribute("data-hid")||ri(await Lr(f))]=f}}a.pendingSideEffects={...a.sideEffects||{}},a.sideEffects={};function l(p,g,f){const m=`${p}:${g}`;a.sideEffects[m]=f,delete a.pendingSideEffects[m]}function o({id:p,$el:g,tag:f}){const m=f.tag.endsWith("Attrs");a.elMap[p]=g,m||(["textContent","innerHTML"].forEach(k=>{f[k]&&f[k]!==g[k]&&(g[k]=f[k])}),l(p,"el",()=>{a.elMap[p].remove(),delete a.elMap[p]})),Object.entries(f.props).forEach(([k,y])=>{const w=`attr:${k}`;if(k==="class")for(const $ of(y||"").split(" ").filter(Boolean))m&&l(p,`${w}:${$}`,()=>g.classList.remove($)),!g.classList.contains($)&&g.classList.add($);else g.getAttribute(k)!==y&&g.setAttribute(k,y===!0?"":String(y)),m&&l(p,w,()=>g.removeAttribute(k))})}const c=[],h={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const p of n){const{tag:g,shouldRender:f,id:m}=p;if(f){if(g.tag==="title"){s.title=g.textContent;continue}p.$el=p.$el||a.elMap[m],p.$el?o(p):ze.includes(g.tag)&&c.push(p)}}for(const p of c){const g=p.tag.tagPosition||"head";p.$el=s.createElement(p.tag.tag),o(p),h[g]=h[g]||s.createDocumentFragment(),h[g].appendChild(p.$el)}for(const p of n)await t.hooks.callHook("dom:renderTag",p,s,l);h.head&&s.head.appendChild(h.head),h.bodyOpen&&s.body.insertBefore(h.bodyOpen,s.body.firstChild),h.bodyClose&&s.body.appendChild(h.bodyClose),Object.values(a.pendingSideEffects).forEach(p=>p()),t._dom=a,t.dirty=!1,await t.hooks.callHook("dom:rendered",{renders:n})}async function Br(t,e={}){const s=e.delayFn||(i=>setTimeout(i,10));return t._domUpdatePromise=t._domUpdatePromise||new Promise(i=>s(async()=>{await Or(t,e),delete t._domUpdatePromise,i()}))}function Ir(t){return e=>{var i,n;const s=((n=(i=e.resolvedOptions.document)==null?void 0:i.head.querySelector('script[id="unhead:payload"]'))==null?void 0:n.innerHTML)||!1;return s&&e.push(JSON.parse(s)),{mode:"client",hooks:{"entries:updated":function(a){Br(a,t)}}}}}const Fr=["templateParams","htmlAttrs","bodyAttrs"],Nr={hooks:{"tag:normalise":function({tag:t}){["hid","vmid","key"].forEach(i=>{t.props[i]&&(t.key=t.props[i],delete t.props[i])});const s=Wi(t)||(t.key?`${t.tag}:${t.key}`:!1);s&&(t._d=s)},"tags:resolve":function(t){const e={};t.tags.forEach(i=>{const n=(i.key?`${i.tag}:${i.key}`:i._d)||i._p,a=e[n];if(a){let o=i==null?void 0:i.tagDuplicateStrategy;if(!o&&Fr.includes(i.tag)&&(o="merge"),o==="merge"){const c=a.props;["class","style"].forEach(h=>{c[h]&&(i.props[h]?(h==="style"&&!c[h].endsWith(";")&&(c[h]+=";"),i.props[h]=`${c[h]} ${i.props[h]}`):i.props[h]=c[h])}),e[n].props={...c,...i.props};return}else if(i._e===a._e){a._duped=a._duped||[],i._d=`${a._d}:${a._duped.length+1}`,a._duped.push(i);return}else if(Ke(i)>Ke(a))return}const l=Object.keys(i.props).length+(i.innerHTML?1:0)+(i.textContent?1:0);if(ze.includes(i.tag)&&l===0){delete e[n];return}e[n]=i});const s=[];Object.values(e).forEach(i=>{const n=i._duped;delete i._duped,s.push(i),n&&s.push(...n)}),t.tags=s,t.tags=t.tags.filter(i=>!(i.tag==="meta"&&(i.props.name||i.props.property)&&!i.props.content))}}},Rr={mode:"server",hooks:{"tags:resolve":function(t){const e={};t.tags.filter(s=>["titleTemplate","templateParams","title"].includes(s.tag)&&s._m==="server").forEach(s=>{e[s.tag]=s.tag.startsWith("title")?s.textContent:s.props}),Object.keys(e).length&&t.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},Hr=["script","link","bodyAttrs"];function Ur(t){const e={},s={};return Object.entries(t.props).forEach(([i,n])=>{i.startsWith("on")&&typeof n=="function"?(Gi.includes(i)&&(e[i]=`this.dataset.${i} = true`),s[i]=n):e[i]=n}),{props:e,eventHandlers:s}}const jr=t=>({hooks:{"tags:resolve":function(e){for(const s of e.tags)if(Hr.includes(s.tag)){const{props:i,eventHandlers:n}=Ur(s);s.props=i,Object.keys(n).length&&((s.props.src||s.props.href)&&(s.key=s.key||Us(s.props.src||s.props.href)),s._eventHandlers=n)}},"dom:renderTag":function(e,s,i){if(!e.tag._eventHandlers)return;const n=e.tag.tag==="bodyAttrs"?s.defaultView:e.$el;Object.entries(e.tag._eventHandlers).forEach(([a,l])=>{const o=`${e.tag._d||e.tag._p}:${a}`,c=a.slice(2).toLowerCase(),h=`data-h-${c}`;if(i(e.id,o,()=>{}),e.$el.hasAttribute(h))return;e.$el.setAttribute(h,"");let u;const p=g=>{l(g),u==null||u.disconnect()};a in e.$el.dataset?p(new Event(a.replace("on",""))):Gi.includes(a)&&typeof MutationObserver<"u"?(u=new MutationObserver(g=>{g.some(m=>m.attributeName===`data-${a}`)&&(p(new Event(a.replace("on",""))),u==null||u.disconnect())}),u.observe(e.$el,{attributes:!0})):n.addEventListener(c,p),i(e.id,o,()=>{u==null||u.disconnect(),n.removeEventListener(c,p),e.$el.removeAttribute(h)})})}}}),zr=["link","style","script","noscript"],qr={hooks:{"tag:normalise":({tag:t})=>{t.key&&zr.includes(t.tag)&&(t.props["data-hid"]=t._h=Us(t.key))}}},Wr={hooks:{"tags:resolve":t=>{const e=s=>{var i;return(i=t.tags.find(n=>n._d===s))==null?void 0:i._p};for(const{prefix:s,offset:i}of Pr)for(const n of t.tags.filter(a=>typeof a.tagPriority=="string"&&a.tagPriority.startsWith(s))){const a=e(n.tagPriority.replace(s,""));typeof a<"u"&&(n._p=a+i)}t.tags.sort((s,i)=>s._p-i._p).sort((s,i)=>Ke(s)-Ke(i))}}},Vr={meta:"content",link:"href",htmlAttrs:"lang"},Gr=t=>({hooks:{"tags:resolve":e=>{var o;const{tags:s}=e,i=(o=s.find(c=>c.tag==="title"))==null?void 0:o.textContent,n=s.findIndex(c=>c.tag==="templateParams"),a=n!==-1?s[n].props:{},l=a.separator||"|";delete a.separator,a.pageTitle=qe(a.pageTitle||i||"",a,l);for(const c of s.filter(h=>h.processTemplateParams!==!1)){const h=Vr[c.tag];h&&typeof c.props[h]=="string"?c.props[h]=qe(c.props[h],a,l):(c.processTemplateParams===!0||["titleTemplate","title"].includes(c.tag))&&["innerHTML","textContent"].forEach(u=>{typeof c[u]=="string"&&(c[u]=qe(c[u],a,l))})}t._templateParams=a,t._separator=l,e.tags=s.filter(c=>c.tag!=="templateParams")}}}),Kr={hooks:{"tags:resolve":t=>{const{tags:e}=t;let s=e.findIndex(n=>n.tag==="titleTemplate");const i=e.findIndex(n=>n.tag==="title");if(i!==-1&&s!==-1){const n=ai(e[s].textContent,e[i].textContent);n!==null?e[i].textContent=n||e[i].textContent:delete e[i]}else if(s!==-1){const n=ai(e[s].textContent);n!==null&&(e[s].textContent=n,e[s].tag="title",s=-1)}s!==-1&&delete e[s],t.tags=e.filter(Boolean)}}},Yr={hooks:{"tags:afterResolve":function(t){for(const e of t.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&["application/ld+json","application/json"].includes(e.props.type)?e.innerHTML=e.innerHTML.replace(/{o.dirty=!0,e.callHook("entries:updated",o)};let n=0,a=[];const l=[],o={plugins:l,dirty:!1,resolvedOptions:t,hooks:e,headEntries(){return a},use(c){const h=typeof c=="function"?c(o):c;(!h.key||!l.some(u=>u.key===h.key))&&(l.push(h),ci(h.mode,s)&&e.addHooks(h.hooks||{}))},push(c,h){h==null||delete h.head;const u={_i:n++,input:c,...h};return ci(u.mode,s)&&(a.push(u),i()),{dispose(){a=a.filter(p=>p._i!==u._i),e.callHook("entries:updated",o),i()},patch(p){a=a.map(g=>(g._i===u._i&&(g.input=u.input=p),g)),i()}}},async resolveTags(){const c={tags:[],entries:[...a]};await e.callHook("entries:resolve",c);for(const h of c.entries){const u=h.resolvedInput||h.input;if(h.resolvedInput=await(h.transform?h.transform(u):u),h.resolvedInput)for(const p of await Dr(h)){const g={tag:p,entry:h,resolvedOptions:o.resolvedOptions};await e.callHook("tag:normalise",g),c.tags.push(g.tag)}}return await e.callHook("tags:beforeResolve",c),await e.callHook("tags:resolve",c),await e.callHook("tags:afterResolve",c),c.tags},ssr:s};return[Nr,Rr,jr,qr,Wr,Gr,Kr,Yr,...(t==null?void 0:t.plugins)||[]].forEach(c=>o.use(c)),o.hooks.callHook("init",o),o}function Jr(){return Ki}const Qr=Fn.startsWith("3");function ta(t){return typeof t=="function"?t():v(t)}function Ye(t,e=""){if(t instanceof Promise)return t;const s=ta(t);return!t||!s?s:Array.isArray(s)?s.map(i=>Ye(i,e)):typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,n])=>i==="titleTemplate"||i.startsWith("on")?[i,v(n)]:[i,Ye(n,i)])):s}const ea={hooks:{"entries:resolve":function(t){for(const e of t.entries)e.resolvedInput=Ye(e.input)}}},Yi="usehead";function sa(t){return{install(s){Qr&&(s.config.globalProperties.$unhead=t,s.config.globalProperties.$head=t,s.provide(Yi,t))}}.install}function ia(t={}){t.domDelayFn=t.domDelayFn||(s=>De(()=>setTimeout(()=>s(),0)));const e=Zr(t);return e.use(ea),e.install=sa(e),e}const hi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ui="__unhead_injection_handler__";function na(){if(ui in hi)return hi[ui]();const t=Nn(Yi);return t||console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."),t||Jr()}function ra(t,e={}){const s=e.head||na();if(s)return s.ssr?s.push(t,e):aa(s,t,e)}function aa(t,e,s={}){const i=U(!1),n=U({});ee(()=>{n.value=i.value?{}:Ye(e)});const a=t.push(n.value,s);return _e(n,o=>{a.patch(o)}),jn()&&(Rn(()=>{a.dispose()}),Hn(()=>{i.value=!0}),Un(()=>{i.value=!1})),a}function la(...t){return ca(t).reduce((e,s)=>e+s,0)}function oa(t){return t=t??[],Array.isArray(t)?t:[t]}function ca(t){return oa(t).flat(1)}function ha(t){return t!=null}function ua(t,e){return Object.fromEntries(Object.entries(t).map(([s,i])=>e(s,i)).filter(ha))}const N={theme:"default",title:"Software Architecture",titleTemplate:"%s - Slidev",addons:[],remoteAssets:!1,monaco:"dev",monacoTypesSource:"local",monacoTypesAdditionalPackages:[],download:!1,export:{},info:!1,highlighter:"shiki",lineNumbers:!1,colorSchema:"auto",routerMode:"history",aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:"",selectable:!1,themeConfig:{},fonts:{sans:['"Avenir Next"','"Nunito Sans"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:['"Fira Code"',"ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"],webfonts:["Avenir Next","Nunito Sans","Fira Code"],provider:"google",local:["Avenir Next"],italic:!1,weights:["200","400","600"]},favicon:"https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png",drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:"https://www.plantuml.com/plantuml",codeCopy:!0,record:"dev",css:"unocss",presenter:!0,htmlAttrs:{},editor:!0,layout:"cover"},Zi=N.aspectRatio??16/9,da=N.canvasWidth??980,_f=Math.ceil(da/Zi),pa=d(()=>ua(N.themeConfig||{},(t,e)=>[`--slidev-theme-${t}`,e]));function Xi(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)}function lt(t,e,s){Object.defineProperty(t,e,{value:s,writable:!0,enumerable:!1})}const oe=b({page:0,clicks:0});let fa=[],ga=[];lt(oe,"$syncUp",!0);lt(oe,"$syncDown",!0);lt(oe,"$paused",!1);lt(oe,"$onSet",t=>fa.push(t));lt(oe,"$onPatch",t=>ga.push(t));Xi();lt(oe,"$patch",async()=>!1);function Ji(t,e,s=!1){const i=[];let n=!1,a=!1,l,o;const c=b(e);function h(f){i.push(f)}function u(f,m){c[f]!==m&&(clearTimeout(l),n=!0,c[f]=m,l=setTimeout(()=>n=!1,0))}function p(f){n||(clearTimeout(o),a=!0,Object.entries(f).forEach(([m,k])=>{c[m]=k}),o=setTimeout(()=>a=!1,0))}function g(f){let m;s?s&&window.addEventListener("storage",y=>{y&&y.key===f&&y.newValue&&p(JSON.parse(y.newValue))}):(m=new BroadcastChannel(f),m.addEventListener("message",y=>p(y.data)));function k(){!s&&m&&!a?m.postMessage(zn(c)):s&&!a&&window.localStorage.setItem(f,JSON.stringify(c)),n||i.forEach(y=>y(c))}if(_e(c,k,{deep:!0,flush:"sync"}),s){const y=window.localStorage.getItem(f);y&&p(JSON.parse(y))}}return{init:g,onPatch:h,patch:u,state:c}}const{init:ma,onPatch:ka,patch:we,state:yf}=Ji(oe,{page:1,clicks:0,viewerPage:1,viewerClicks:0}),ce=b({});let _a=[],ya=[];lt(ce,"$syncUp",!0);lt(ce,"$syncDown",!0);lt(ce,"$paused",!1);lt(ce,"$onSet",t=>_a.push(t));lt(ce,"$onPatch",t=>ya.push(t));Xi();lt(ce,"$patch",async()=>!1);const{init:va,onPatch:wa,patch:Qi,state:tn}=Ji(ce,{},!1),ba="modulepreload",xa=function(t){return"/sa2024/05-restful/"+t},di={},Pe=function(e,s,i){let n=Promise.resolve();if(s&&s.length>0){const a=document.getElementsByTagName("link");n=Promise.all(s.map(l=>{if(l=xa(l),l in di)return;di[l]=!0;const o=l.endsWith(".css"),c=o?'[rel="stylesheet"]':"";if(!!i)for(let p=a.length-1;p>=0;p--){const g=a[p];if(g.href===l&&(!o||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":ba,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((p,g)=>{u.addEventListener("load",p),u.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}return n.then(()=>e()).catch(a=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a})},E=(t,e)=>{const s=t.__vccOpts||t;for(const[i,n]of e)s[i]=n;return s};function vf(){const t=U(Date.now()),e=qn({interval:1e3}),s=d(()=>{const n=(e.value-t.value)/1e3,a=Math.floor(n%60).toString().padStart(2,"0");return`${Math.floor(n/60).toString().padStart(2,"0")}:${a}`});function i(){t.value=e.value}return{timer:s,resetTimer:i}}function en(t=5){const e=[],s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=s.length;for(let n=0;nn.max||0))}}}function Ca(t){var n,a;if((n=t==null?void 0:t.meta)!=null&&n.__clicksContext)return t.meta.__clicksContext;const e=+((t==null?void 0:t.path)??$s),s=d({get(){var o;const l=+(((o=Zt.value)==null?void 0:o.path)??Number.NaN);return!l||Number.isNaN(l)?0:l===e?ke.value:l>e?$s:0},set(l){var c;+(((c=Zt.value)==null?void 0:c.path)??Number.NaN)===e&&(ke.value=l)}}),i=on(s,(a=t==null?void 0:t.meta)==null?void 0:a.clicks);return t!=null&&t.meta&&(t.meta.__clicksContext=i),i}function Ta(t,e=0){var s;return on(U(e),(s=t==null?void 0:t.meta)==null?void 0:s.clicks)}const Da=Vn(Ta());function D(){const t=ie(nn),e=ni(t,"nav"),s=ie(js,Da).value,i=ni(s,"current"),n=ie(sn),a=ie(rn),l=ie(an,{}),o=ie(Sa,void 0),c=ie(Aa,U(1));return{$slidev:t,$nav:e,$clicksContext:s,$clicks:i,$page:n,$route:o,$renderContext:a,$frontmatter:l,$scale:c}}function O(t){var n,a;Gn(an,t);const{$slidev:e,$page:s}=D(),i=e.nav.rawRoutes.find(l=>l.path===String(s.value));if((a=(n=i==null?void 0:i.meta)==null?void 0:n.slide)!=null&&a.frontmatter){for(const l of Object.keys(i.meta.slide.frontmatter))l in t||delete i.meta.slide.frontmatter[l];Object.assign(i.meta.slide.frontmatter,t)}}function B(t,e){return{...Kn(t,e===0?Ea:ln),frontmatter:t}}function pi(t){return t.startsWith("/")?"/sa2024/05-restful/"+t.slice(1):t}function Pa(t,e=!1){const s=t&&["#","rgb","hsl"].some(n=>t.indexOf(n)===0),i={background:s?t:void 0,color:t&&!s?"white":void 0,backgroundImage:s?void 0:t?e?`linear-gradient(#0005, #0008), url(${pi(t)})`:`url("${pi(t)}")`:void 0,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"};return i.background||delete i.background,i}const La={class:"my-auto w-full"},Oa=ns({__name:"cover",props:{background:{default:""}},setup(t){D();const e=t,s=d(()=>Pa(e.background,!0));return(i,n)=>(S(),ge("div",{class:"slidev-layout cover",style:Ri(s.value)},[r("div",La,[me(i.$slots,"default")])],4))}}),Ba=E(Oa,[["__file","/opt/homebrew/lib/node_modules/@slidev/theme-default/layouts/cover.vue"]]),_t=b({theme:"default",layout:"cover"}),Ia=b({layout:d(()=>_t.layout),transition:d(()=>_t.transition),class:d(()=>_t.class),clicks:d(()=>_t.clicks),name:d(()=>_t.name),preload:d(()=>_t.preload),slide:{index:0,content:"",note:"",title:"Software Architecture",level:1,noteHTML:"",raw:"",frontmatter:_t,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),Fa=r("h1",null,"Software Architecture",-1),Na=r("h2",null,"REST and Spring HATEOAS",-1),Ra={__name:"1",setup(t){return O(_t),D(),(e,s)=>(S(),T(Ba,P(L(v(B)(v(_t),0))),{default:A(()=>[Fa,Na]),_:1},16))}},Ha=E(Ra,[["__file","/@slidev/slides/1.md"]]),Ua="/sa2024/05-restful/assets/07-petclinic-cs-BOEsrYmK.png",ja="/sa2024/05-restful/assets/07-petclinic-C1GbFER0.png",za=ns({__name:"two-cols",props:{class:{type:String},layoutClass:{type:String}},setup(t){const e=t;return(s,i)=>(S(),ge("div",{class:je(["slidev-layout two-columns w-full h-full grid grid-cols-2",e.layoutClass])},[r("div",{class:je(["col-left",e.class])},[me(s.$slots,"default")],2),r("div",{class:je(["col-right",e.class])},[me(s.$slots,"right")],2)],2))}}),pt=E(za,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/layouts/two-cols.vue"]]),yt=b({layout:"two-cols"}),qa=b({layout:d(()=>yt.layout),transition:d(()=>yt.transition),class:d(()=>yt.class),clicks:d(()=>yt.clicks),name:d(()=>yt.name),preload:d(()=>yt.preload),slide:{index:1,content:"",note:"",title:"回顾",level:1,noteHTML:"",raw:"",frontmatter:yt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:11,id:1,no:2},__clicksContext:null,__preloaded:!1}),Wa=r("h1",null,"回顾",-1),Va=r("p",null,[r("br"),r("br")],-1),Ga=r("img",{src:Ua,class:"m-10 h-50"},null,-1),Ka=r("img",{src:ja,class:"m-20 h-60"},null,-1),Ya=r("br",null,null,-1),Za=r("div",{style:{"text-align":"right"}},"spring-petclinic/spring-framework-petclinic",-1),Xa={__name:"2",setup(t){return O(yt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(yt),1))),{right:A(i=>[Ka,Ya,Za]),default:A(()=>[Wa,Va,Ga]),_:1},16))}},Ja=E(Xa,[["__file","/@slidev/slides/2.md"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function cn(t){return typeof t>"u"||t===null}function Qa(t){return typeof t=="object"&&t!==null}function tl(t){return Array.isArray(t)?t:cn(t)?[]:[t]}function el(t,e){var s,i,n,a;if(e)for(a=Object.keys(e),s=0,i=a.length;s{for(const a of n)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function s(n){const a={};return n.integrity&&(a.integrity=n.integrity),n.referrerPolicy&&(a.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?a.credentials="include":n.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(n){if(n.ep)return;n.ep=!0;const a=s(n);fetch(n.href,a)}})();function xs(t,e={},s){for(const i in t){const n=t[i],a=s?`${s}:${i}`:i;typeof n=="object"&&n!==null?xs(n,e,a):typeof n=="function"&&(e[a]=n)}return e}const kr={run:t=>t()},_r=()=>kr,zi=typeof console.createTask<"u"?console.createTask:_r;function yr(t,e){const s=e.shift(),i=zi(s);return t.reduce((n,a)=>n.then(()=>i.run(()=>a(...e))),Promise.resolve())}function vr(t,e){const s=e.shift(),i=zi(s);return Promise.all(t.map(n=>i.run(()=>n(...e))))}function ds(t,e){for(const s of[...t])s(e)}class wr{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,s,i={}){if(!e||typeof s!="function")return()=>{};const n=e;let a;for(;this._deprecatedHooks[e];)a=this._deprecatedHooks[e],e=a.to;if(a&&!i.allowDeprecated){let l=a.message;l||(l=`${n} hook has been deprecated`+(a.to?`, please use ${a.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(l)||(console.warn(l),this._deprecatedMessages.add(l))}if(!s.name)try{Object.defineProperty(s,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(s),()=>{s&&(this.removeHook(e,s),s=void 0)}}hookOnce(e,s){let i,n=(...a)=>(typeof i=="function"&&i(),i=void 0,n=void 0,s(...a));return i=this.hook(e,n),i}removeHook(e,s){if(this._hooks[e]){const i=this._hooks[e].indexOf(s);i!==-1&&this._hooks[e].splice(i,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,s){this._deprecatedHooks[e]=typeof s=="string"?{to:s}:s;const i=this._hooks[e]||[];delete this._hooks[e];for(const n of i)this.hook(e,n)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const s in e)this.deprecateHook(s,e[s])}addHooks(e){const s=xs(e),i=Object.keys(s).map(n=>this.hook(n,s[n]));return()=>{for(const n of i.splice(0,i.length))n()}}removeHooks(e){const s=xs(e);for(const i in s)this.removeHook(i,s[i])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...s){return s.unshift(e),this.callHookWith(yr,e,...s)}callHookParallel(e,...s){return s.unshift(e),this.callHookWith(vr,e,...s)}callHookWith(e,s,...i){const n=this._before||this._after?{name:s,args:i,context:{}}:void 0;this._before&&ds(this._before,n);const a=e(s in this._hooks?[...this._hooks[s]]:[],i);return a instanceof Promise?a.finally(()=>{this._after&&n&&ds(this._after,n)}):(this._after&&n&&ds(this._after,n),a)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const s=this._before.indexOf(e);s!==-1&&this._before.splice(s,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const s=this._after.indexOf(e);s!==-1&&this._after.splice(s,1)}}}}function br(){return new wr}function xr(t){return Array.isArray(t)?t:[t]}const $r=["title","titleTemplate","script","style","noscript"],ze=["base","meta","link","style","script","noscript"],Ar=["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"],Sr=["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"],qi=["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"],Mr=typeof window<"u";function Us(t){let e=9;for(let s=0;s>>9)+65536).toString(16).substring(1,8).toLowerCase()}function ri(t){return t._h||Us(t._d?t._d:`${t.tag}:${t.textContent||t.innerHTML||""}:${Object.entries(t.props).map(([e,s])=>`${e}:${String(s)}`).join(",")}`)}function Wi(t,e){const{props:s,tag:i}=t;if(Sr.includes(i))return i;if(i==="link"&&s.rel==="canonical")return"canonical";if(s.charset)return"charset";const n=["id"];i==="meta"&&n.push("name","property","http-equiv");for(const a of n)if(typeof s[a]<"u"){const l=String(s[a]);return e&&!e(l)?!1:`${i}:${a}:${l}`}return!1}function ai(t,e){return t==null?e||null:typeof t=="function"?t(e):t}async function Cr(t,e,s){const i={tag:t,props:await Vi(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[["script","noscript","style"].includes(t)?"innerHTML":"textContent"]:e},["templateParams","titleTemplate"].includes(t))};return qi.forEach(n=>{const a=typeof i.props[n]<"u"?i.props[n]:s[n];typeof a<"u"&&((!["innerHTML","textContent","children"].includes(n)||$r.includes(i.tag))&&(i[n==="children"?"innerHTML":n]=a),delete i.props[n])}),i.props.body&&(i.tagPosition="bodyClose",delete i.props.body),i.tag==="script"&&typeof i.innerHTML=="object"&&(i.innerHTML=JSON.stringify(i.innerHTML),i.props.type=i.props.type||"application/json"),Array.isArray(i.props.content)?i.props.content.map(n=>({...i,props:{...i.props,content:n}})):i}function Er(t){return typeof t=="object"&&!Array.isArray(t)&&(t=Object.keys(t).filter(e=>t[e])),(Array.isArray(t)?t.join(" "):t).split(" ").filter(e=>e.trim()).filter(Boolean).join(" ")}async function Vi(t,e){for(const s of Object.keys(t)){if(s==="class"){t[s]=Er(t[s]);continue}if(t[s]instanceof Promise&&(t[s]=await t[s]),!e&&!qi.includes(s)){const i=String(t[s]),n=s.startsWith("data-");i==="true"||i===""?t[s]=n?"true":!0:t[s]||(n&&i==="false"?t[s]="false":delete t[s])}}return t}const Tr=10;async function Dr(t){const e=[];return Object.entries(t.resolvedInput).filter(([s,i])=>typeof i<"u"&&Ar.includes(s)).forEach(([s,i])=>{const n=xr(i);e.push(...n.map(a=>Cr(s,a,t)).flat())}),(await Promise.all(e)).flat().filter(Boolean).map((s,i)=>(s._e=t._i,t.mode&&(s._m=t.mode),s._p=(t._i<c&&c[h]||void 0,e):o=e[l],typeof o<"u"?(o||"").replace(/"/g,'\\"'):!1}let n=t;try{n=decodeURI(t)}catch{}return(n.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(l=>{const o=i(l.slice(1));typeof o=="string"&&(t=t.replace(new RegExp(`\\${l}(\\W|$)`,"g"),(c,h)=>`${o}${h}`).trim())}),t.includes(Qt)&&(t.endsWith(Qt)&&(t=t.slice(0,-Qt.length).trim()),t.startsWith(Qt)&&(t=t.slice(Qt.length).trim()),t=t.replace(new RegExp(`\\${Qt}\\s*\\${Qt}`,"g"),Qt),t=qe(t,{separator:s},s)),t}async function Lr(t){const e={tag:t.tagName.toLowerCase(),props:await Vi(t.getAttributeNames().reduce((s,i)=>({...s,[i]:t.getAttribute(i)}),{})),innerHTML:t.innerHTML};return e._d=Wi(e),e}async function Or(t,e={}){var u;const s=e.document||t.resolvedOptions.document;if(!s)return;const i={shouldRender:t.dirty,tags:[]};if(await t.hooks.callHook("dom:beforeRender",i),!i.shouldRender)return;const n=(await t.resolveTags()).map(p=>({tag:p,id:ze.includes(p.tag)?ri(p):p.tag,shouldRender:!0}));let a=t._dom;if(!a){a={elMap:{htmlAttrs:s.documentElement,bodyAttrs:s.body}};for(const p of["body","head"]){const g=(u=s==null?void 0:s[p])==null?void 0:u.children;for(const f of[...g].filter(m=>ze.includes(m.tagName.toLowerCase())))a.elMap[f.getAttribute("data-hid")||ri(await Lr(f))]=f}}a.pendingSideEffects={...a.sideEffects||{}},a.sideEffects={};function l(p,g,f){const m=`${p}:${g}`;a.sideEffects[m]=f,delete a.pendingSideEffects[m]}function o({id:p,$el:g,tag:f}){const m=f.tag.endsWith("Attrs");a.elMap[p]=g,m||(["textContent","innerHTML"].forEach(k=>{f[k]&&f[k]!==g[k]&&(g[k]=f[k])}),l(p,"el",()=>{a.elMap[p].remove(),delete a.elMap[p]})),Object.entries(f.props).forEach(([k,y])=>{const w=`attr:${k}`;if(k==="class")for(const $ of(y||"").split(" ").filter(Boolean))m&&l(p,`${w}:${$}`,()=>g.classList.remove($)),!g.classList.contains($)&&g.classList.add($);else g.getAttribute(k)!==y&&g.setAttribute(k,y===!0?"":String(y)),m&&l(p,w,()=>g.removeAttribute(k))})}const c=[],h={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const p of n){const{tag:g,shouldRender:f,id:m}=p;if(f){if(g.tag==="title"){s.title=g.textContent;continue}p.$el=p.$el||a.elMap[m],p.$el?o(p):ze.includes(g.tag)&&c.push(p)}}for(const p of c){const g=p.tag.tagPosition||"head";p.$el=s.createElement(p.tag.tag),o(p),h[g]=h[g]||s.createDocumentFragment(),h[g].appendChild(p.$el)}for(const p of n)await t.hooks.callHook("dom:renderTag",p,s,l);h.head&&s.head.appendChild(h.head),h.bodyOpen&&s.body.insertBefore(h.bodyOpen,s.body.firstChild),h.bodyClose&&s.body.appendChild(h.bodyClose),Object.values(a.pendingSideEffects).forEach(p=>p()),t._dom=a,t.dirty=!1,await t.hooks.callHook("dom:rendered",{renders:n})}async function Br(t,e={}){const s=e.delayFn||(i=>setTimeout(i,10));return t._domUpdatePromise=t._domUpdatePromise||new Promise(i=>s(async()=>{await Or(t,e),delete t._domUpdatePromise,i()}))}function Ir(t){return e=>{var i,n;const s=((n=(i=e.resolvedOptions.document)==null?void 0:i.head.querySelector('script[id="unhead:payload"]'))==null?void 0:n.innerHTML)||!1;return s&&e.push(JSON.parse(s)),{mode:"client",hooks:{"entries:updated":function(a){Br(a,t)}}}}}const Fr=["templateParams","htmlAttrs","bodyAttrs"],Nr={hooks:{"tag:normalise":function({tag:t}){["hid","vmid","key"].forEach(i=>{t.props[i]&&(t.key=t.props[i],delete t.props[i])});const s=Wi(t)||(t.key?`${t.tag}:${t.key}`:!1);s&&(t._d=s)},"tags:resolve":function(t){const e={};t.tags.forEach(i=>{const n=(i.key?`${i.tag}:${i.key}`:i._d)||i._p,a=e[n];if(a){let o=i==null?void 0:i.tagDuplicateStrategy;if(!o&&Fr.includes(i.tag)&&(o="merge"),o==="merge"){const c=a.props;["class","style"].forEach(h=>{c[h]&&(i.props[h]?(h==="style"&&!c[h].endsWith(";")&&(c[h]+=";"),i.props[h]=`${c[h]} ${i.props[h]}`):i.props[h]=c[h])}),e[n].props={...c,...i.props};return}else if(i._e===a._e){a._duped=a._duped||[],i._d=`${a._d}:${a._duped.length+1}`,a._duped.push(i);return}else if(Ke(i)>Ke(a))return}const l=Object.keys(i.props).length+(i.innerHTML?1:0)+(i.textContent?1:0);if(ze.includes(i.tag)&&l===0){delete e[n];return}e[n]=i});const s=[];Object.values(e).forEach(i=>{const n=i._duped;delete i._duped,s.push(i),n&&s.push(...n)}),t.tags=s,t.tags=t.tags.filter(i=>!(i.tag==="meta"&&(i.props.name||i.props.property)&&!i.props.content))}}},Rr={mode:"server",hooks:{"tags:resolve":function(t){const e={};t.tags.filter(s=>["titleTemplate","templateParams","title"].includes(s.tag)&&s._m==="server").forEach(s=>{e[s.tag]=s.tag.startsWith("title")?s.textContent:s.props}),Object.keys(e).length&&t.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},Hr=["script","link","bodyAttrs"];function Ur(t){const e={},s={};return Object.entries(t.props).forEach(([i,n])=>{i.startsWith("on")&&typeof n=="function"?(Gi.includes(i)&&(e[i]=`this.dataset.${i} = true`),s[i]=n):e[i]=n}),{props:e,eventHandlers:s}}const jr=t=>({hooks:{"tags:resolve":function(e){for(const s of e.tags)if(Hr.includes(s.tag)){const{props:i,eventHandlers:n}=Ur(s);s.props=i,Object.keys(n).length&&((s.props.src||s.props.href)&&(s.key=s.key||Us(s.props.src||s.props.href)),s._eventHandlers=n)}},"dom:renderTag":function(e,s,i){if(!e.tag._eventHandlers)return;const n=e.tag.tag==="bodyAttrs"?s.defaultView:e.$el;Object.entries(e.tag._eventHandlers).forEach(([a,l])=>{const o=`${e.tag._d||e.tag._p}:${a}`,c=a.slice(2).toLowerCase(),h=`data-h-${c}`;if(i(e.id,o,()=>{}),e.$el.hasAttribute(h))return;e.$el.setAttribute(h,"");let u;const p=g=>{l(g),u==null||u.disconnect()};a in e.$el.dataset?p(new Event(a.replace("on",""))):Gi.includes(a)&&typeof MutationObserver<"u"?(u=new MutationObserver(g=>{g.some(m=>m.attributeName===`data-${a}`)&&(p(new Event(a.replace("on",""))),u==null||u.disconnect())}),u.observe(e.$el,{attributes:!0})):n.addEventListener(c,p),i(e.id,o,()=>{u==null||u.disconnect(),n.removeEventListener(c,p),e.$el.removeAttribute(h)})})}}}),zr=["link","style","script","noscript"],qr={hooks:{"tag:normalise":({tag:t})=>{t.key&&zr.includes(t.tag)&&(t.props["data-hid"]=t._h=Us(t.key))}}},Wr={hooks:{"tags:resolve":t=>{const e=s=>{var i;return(i=t.tags.find(n=>n._d===s))==null?void 0:i._p};for(const{prefix:s,offset:i}of Pr)for(const n of t.tags.filter(a=>typeof a.tagPriority=="string"&&a.tagPriority.startsWith(s))){const a=e(n.tagPriority.replace(s,""));typeof a<"u"&&(n._p=a+i)}t.tags.sort((s,i)=>s._p-i._p).sort((s,i)=>Ke(s)-Ke(i))}}},Vr={meta:"content",link:"href",htmlAttrs:"lang"},Gr=t=>({hooks:{"tags:resolve":e=>{var o;const{tags:s}=e,i=(o=s.find(c=>c.tag==="title"))==null?void 0:o.textContent,n=s.findIndex(c=>c.tag==="templateParams"),a=n!==-1?s[n].props:{},l=a.separator||"|";delete a.separator,a.pageTitle=qe(a.pageTitle||i||"",a,l);for(const c of s.filter(h=>h.processTemplateParams!==!1)){const h=Vr[c.tag];h&&typeof c.props[h]=="string"?c.props[h]=qe(c.props[h],a,l):(c.processTemplateParams===!0||["titleTemplate","title"].includes(c.tag))&&["innerHTML","textContent"].forEach(u=>{typeof c[u]=="string"&&(c[u]=qe(c[u],a,l))})}t._templateParams=a,t._separator=l,e.tags=s.filter(c=>c.tag!=="templateParams")}}}),Kr={hooks:{"tags:resolve":t=>{const{tags:e}=t;let s=e.findIndex(n=>n.tag==="titleTemplate");const i=e.findIndex(n=>n.tag==="title");if(i!==-1&&s!==-1){const n=ai(e[s].textContent,e[i].textContent);n!==null?e[i].textContent=n||e[i].textContent:delete e[i]}else if(s!==-1){const n=ai(e[s].textContent);n!==null&&(e[s].textContent=n,e[s].tag="title",s=-1)}s!==-1&&delete e[s],t.tags=e.filter(Boolean)}}},Yr={hooks:{"tags:afterResolve":function(t){for(const e of t.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&["application/ld+json","application/json"].includes(e.props.type)?e.innerHTML=e.innerHTML.replace(/{o.dirty=!0,e.callHook("entries:updated",o)};let n=0,a=[];const l=[],o={plugins:l,dirty:!1,resolvedOptions:t,hooks:e,headEntries(){return a},use(c){const h=typeof c=="function"?c(o):c;(!h.key||!l.some(u=>u.key===h.key))&&(l.push(h),ci(h.mode,s)&&e.addHooks(h.hooks||{}))},push(c,h){h==null||delete h.head;const u={_i:n++,input:c,...h};return ci(u.mode,s)&&(a.push(u),i()),{dispose(){a=a.filter(p=>p._i!==u._i),e.callHook("entries:updated",o),i()},patch(p){a=a.map(g=>(g._i===u._i&&(g.input=u.input=p),g)),i()}}},async resolveTags(){const c={tags:[],entries:[...a]};await e.callHook("entries:resolve",c);for(const h of c.entries){const u=h.resolvedInput||h.input;if(h.resolvedInput=await(h.transform?h.transform(u):u),h.resolvedInput)for(const p of await Dr(h)){const g={tag:p,entry:h,resolvedOptions:o.resolvedOptions};await e.callHook("tag:normalise",g),c.tags.push(g.tag)}}return await e.callHook("tags:beforeResolve",c),await e.callHook("tags:resolve",c),await e.callHook("tags:afterResolve",c),c.tags},ssr:s};return[Nr,Rr,jr,qr,Wr,Gr,Kr,Yr,...(t==null?void 0:t.plugins)||[]].forEach(c=>o.use(c)),o.hooks.callHook("init",o),o}function Jr(){return Ki}const Qr=Fn.startsWith("3");function ta(t){return typeof t=="function"?t():v(t)}function Ye(t,e=""){if(t instanceof Promise)return t;const s=ta(t);return!t||!s?s:Array.isArray(s)?s.map(i=>Ye(i,e)):typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,n])=>i==="titleTemplate"||i.startsWith("on")?[i,v(n)]:[i,Ye(n,i)])):s}const ea={hooks:{"entries:resolve":function(t){for(const e of t.entries)e.resolvedInput=Ye(e.input)}}},Yi="usehead";function sa(t){return{install(s){Qr&&(s.config.globalProperties.$unhead=t,s.config.globalProperties.$head=t,s.provide(Yi,t))}}.install}function ia(t={}){t.domDelayFn=t.domDelayFn||(s=>De(()=>setTimeout(()=>s(),0)));const e=Zr(t);return e.use(ea),e.install=sa(e),e}const hi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ui="__unhead_injection_handler__";function na(){if(ui in hi)return hi[ui]();const t=Nn(Yi);return t||console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."),t||Jr()}function ra(t,e={}){const s=e.head||na();if(s)return s.ssr?s.push(t,e):aa(s,t,e)}function aa(t,e,s={}){const i=U(!1),n=U({});ee(()=>{n.value=i.value?{}:Ye(e)});const a=t.push(n.value,s);return _e(n,o=>{a.patch(o)}),jn()&&(Rn(()=>{a.dispose()}),Hn(()=>{i.value=!0}),Un(()=>{i.value=!1})),a}function la(...t){return ca(t).reduce((e,s)=>e+s,0)}function oa(t){return t=t??[],Array.isArray(t)?t:[t]}function ca(t){return oa(t).flat(1)}function ha(t){return t!=null}function ua(t,e){return Object.fromEntries(Object.entries(t).map(([s,i])=>e(s,i)).filter(ha))}const N={theme:"default",title:"Software Architecture",titleTemplate:"%s - Slidev",addons:[],remoteAssets:!1,monaco:"dev",monacoTypesSource:"local",monacoTypesAdditionalPackages:[],download:!1,export:{},info:!1,highlighter:"shiki",lineNumbers:!1,colorSchema:"auto",routerMode:"history",aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:"",selectable:!1,themeConfig:{},fonts:{sans:['"Avenir Next"','"Nunito Sans"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:['"Fira Code"',"ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"],webfonts:["Avenir Next","Nunito Sans","Fira Code"],provider:"google",local:["Avenir Next"],italic:!1,weights:["200","400","600"]},favicon:"https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png",drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:"https://www.plantuml.com/plantuml",codeCopy:!0,record:"dev",css:"unocss",presenter:!0,htmlAttrs:{},editor:!0,layout:"cover"},Zi=N.aspectRatio??16/9,da=N.canvasWidth??980,_f=Math.ceil(da/Zi),pa=d(()=>ua(N.themeConfig||{},(t,e)=>[`--slidev-theme-${t}`,e]));function Xi(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)}function lt(t,e,s){Object.defineProperty(t,e,{value:s,writable:!0,enumerable:!1})}const oe=b({page:0,clicks:0});let fa=[],ga=[];lt(oe,"$syncUp",!0);lt(oe,"$syncDown",!0);lt(oe,"$paused",!1);lt(oe,"$onSet",t=>fa.push(t));lt(oe,"$onPatch",t=>ga.push(t));Xi();lt(oe,"$patch",async()=>!1);function Ji(t,e,s=!1){const i=[];let n=!1,a=!1,l,o;const c=b(e);function h(f){i.push(f)}function u(f,m){c[f]!==m&&(clearTimeout(l),n=!0,c[f]=m,l=setTimeout(()=>n=!1,0))}function p(f){n||(clearTimeout(o),a=!0,Object.entries(f).forEach(([m,k])=>{c[m]=k}),o=setTimeout(()=>a=!1,0))}function g(f){let m;s?s&&window.addEventListener("storage",y=>{y&&y.key===f&&y.newValue&&p(JSON.parse(y.newValue))}):(m=new BroadcastChannel(f),m.addEventListener("message",y=>p(y.data)));function k(){!s&&m&&!a?m.postMessage(zn(c)):s&&!a&&window.localStorage.setItem(f,JSON.stringify(c)),n||i.forEach(y=>y(c))}if(_e(c,k,{deep:!0,flush:"sync"}),s){const y=window.localStorage.getItem(f);y&&p(JSON.parse(y))}}return{init:g,onPatch:h,patch:u,state:c}}const{init:ma,onPatch:ka,patch:we,state:yf}=Ji(oe,{page:1,clicks:0,viewerPage:1,viewerClicks:0}),ce=b({});let _a=[],ya=[];lt(ce,"$syncUp",!0);lt(ce,"$syncDown",!0);lt(ce,"$paused",!1);lt(ce,"$onSet",t=>_a.push(t));lt(ce,"$onPatch",t=>ya.push(t));Xi();lt(ce,"$patch",async()=>!1);const{init:va,onPatch:wa,patch:Qi,state:tn}=Ji(ce,{},!1),ba="modulepreload",xa=function(t){return"/sa2024/05-restful/"+t},di={},Pe=function(e,s,i){let n=Promise.resolve();if(s&&s.length>0){const a=document.getElementsByTagName("link");n=Promise.all(s.map(l=>{if(l=xa(l),l in di)return;di[l]=!0;const o=l.endsWith(".css"),c=o?'[rel="stylesheet"]':"";if(!!i)for(let p=a.length-1;p>=0;p--){const g=a[p];if(g.href===l&&(!o||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":ba,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((p,g)=>{u.addEventListener("load",p),u.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}return n.then(()=>e()).catch(a=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a})},C=(t,e)=>{const s=t.__vccOpts||t;for(const[i,n]of e)s[i]=n;return s};function vf(){const t=U(Date.now()),e=qn({interval:1e3}),s=d(()=>{const n=(e.value-t.value)/1e3,a=Math.floor(n%60).toString().padStart(2,"0");return`${Math.floor(n/60).toString().padStart(2,"0")}:${a}`});function i(){t.value=e.value}return{timer:s,resetTimer:i}}function en(t=5){const e=[],s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=s.length;for(let n=0;nn.max||0))}}}function Ea(t){var n,a;if((n=t==null?void 0:t.meta)!=null&&n.__clicksContext)return t.meta.__clicksContext;const e=+((t==null?void 0:t.path)??$s),s=d({get(){var o;const l=+(((o=Zt.value)==null?void 0:o.path)??Number.NaN);return!l||Number.isNaN(l)?0:l===e?ke.value:l>e?$s:0},set(l){var c;+(((c=Zt.value)==null?void 0:c.path)??Number.NaN)===e&&(ke.value=l)}}),i=on(s,(a=t==null?void 0:t.meta)==null?void 0:a.clicks);return t!=null&&t.meta&&(t.meta.__clicksContext=i),i}function Ta(t,e=0){var s;return on(U(e),(s=t==null?void 0:t.meta)==null?void 0:s.clicks)}const Da=Vn(Ta());function D(){const t=ie(nn),e=ni(t,"nav"),s=ie(js,Da).value,i=ni(s,"current"),n=ie(sn),a=ie(rn),l=ie(an,{}),o=ie(Sa,void 0),c=ie(Aa,U(1));return{$slidev:t,$nav:e,$clicksContext:s,$clicks:i,$page:n,$route:o,$renderContext:a,$frontmatter:l,$scale:c}}function O(t){var n,a;Gn(an,t);const{$slidev:e,$page:s}=D(),i=e.nav.rawRoutes.find(l=>l.path===String(s.value));if((a=(n=i==null?void 0:i.meta)==null?void 0:n.slide)!=null&&a.frontmatter){for(const l of Object.keys(i.meta.slide.frontmatter))l in t||delete i.meta.slide.frontmatter[l];Object.assign(i.meta.slide.frontmatter,t)}}function B(t,e){return{...Kn(t,e===0?Ca:ln),frontmatter:t}}function pi(t){return t.startsWith("/")?"/sa2024/05-restful/"+t.slice(1):t}function Pa(t,e=!1){const s=t&&["#","rgb","hsl"].some(n=>t.indexOf(n)===0),i={background:s?t:void 0,color:t&&!s?"white":void 0,backgroundImage:s?void 0:t?e?`linear-gradient(#0005, #0008), url(${pi(t)})`:`url("${pi(t)}")`:void 0,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"};return i.background||delete i.background,i}const La={class:"my-auto w-full"},Oa=ns({__name:"cover",props:{background:{default:""}},setup(t){D();const e=t,s=d(()=>Pa(e.background,!0));return(i,n)=>(S(),ge("div",{class:"slidev-layout cover",style:Ri(s.value)},[r("div",La,[me(i.$slots,"default")])],4))}}),Ba=C(Oa,[["__file","/opt/homebrew/lib/node_modules/@slidev/theme-default/layouts/cover.vue"]]),_t=b({theme:"default",layout:"cover"}),Ia=b({layout:d(()=>_t.layout),transition:d(()=>_t.transition),class:d(()=>_t.class),clicks:d(()=>_t.clicks),name:d(()=>_t.name),preload:d(()=>_t.preload),slide:{index:0,content:"",note:"",title:"Software Architecture",level:1,noteHTML:"",raw:"",frontmatter:_t,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),Fa=r("h1",null,"Software Architecture",-1),Na=r("h2",null,"REST and Spring HATEOAS",-1),Ra={__name:"1",setup(t){return O(_t),D(),(e,s)=>(S(),T(Ba,P(L(v(B)(v(_t),0))),{default:A(()=>[Fa,Na]),_:1},16))}},Ha=C(Ra,[["__file","/@slidev/slides/1.md"]]),Ua="/sa2024/05-restful/assets/07-petclinic-cs-BOEsrYmK.png",ja="/sa2024/05-restful/assets/07-petclinic-C1GbFER0.png",za=ns({__name:"two-cols",props:{class:{type:String},layoutClass:{type:String}},setup(t){const e=t;return(s,i)=>(S(),ge("div",{class:je(["slidev-layout two-columns w-full h-full grid grid-cols-2",e.layoutClass])},[r("div",{class:je(["col-left",e.class])},[me(s.$slots,"default")],2),r("div",{class:je(["col-right",e.class])},[me(s.$slots,"right")],2)],2))}}),pt=C(za,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/layouts/two-cols.vue"]]),yt=b({layout:"two-cols"}),qa=b({layout:d(()=>yt.layout),transition:d(()=>yt.transition),class:d(()=>yt.class),clicks:d(()=>yt.clicks),name:d(()=>yt.name),preload:d(()=>yt.preload),slide:{index:1,content:"",note:"",title:"回顾",level:1,noteHTML:"",raw:"",frontmatter:yt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:11,id:1,no:2},__clicksContext:null,__preloaded:!1}),Wa=r("h1",null,"回顾",-1),Va=r("p",null,[r("br"),r("br")],-1),Ga=r("img",{src:Ua,class:"m-10 h-50"},null,-1),Ka=r("img",{src:ja,class:"m-20 h-60"},null,-1),Ya=r("br",null,null,-1),Za=r("div",{style:{"text-align":"right"}},"spring-petclinic/spring-framework-petclinic",-1),Xa={__name:"2",setup(t){return O(yt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(yt),1))),{right:A(i=>[Ka,Ya,Za]),default:A(()=>[Wa,Va,Ga]),_:1},16))}},Ja=C(Xa,[["__file","/@slidev/slides/2.md"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function cn(t){return typeof t>"u"||t===null}function Qa(t){return typeof t=="object"&&t!==null}function tl(t){return Array.isArray(t)?t:cn(t)?[]:[t]}function el(t,e){var s,i,n,a;if(e)for(a=Object.keys(e),s=0,i=a.length;s=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Bl=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Il(t){return!(t===null||!Bl.test(t)||t[t.length-1]==="_")}function Fl(t){var e,s;return e=t.replace(/_/g,"").toLowerCase(),s=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?s===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:s*parseFloat(e,10)}var Nl=/^[-+]?[0-9]+e/;function Rl(t,e){var s;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(zs.isNegativeZero(t))return"-0.0";return s=t.toString(10),Nl.test(s)?s.replace("e",".e"):s}function Hl(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||zs.isNegativeZero(t))}var Ul=new J("tag:yaml.org,2002:float",{kind:"scalar",resolve:Il,construct:Fl,predicate:Hl,represent:Rl,defaultStyle:"lowercase"}),jl=yl.extend({implicit:[xl,Ml,Ol,Ul]}),zl=jl,un=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ql(t){return t===null?!1:un.exec(t)!==null||dn.exec(t)!==null}function Wl(t){var e,s,i,n,a,l,o,c=0,h=null,u,p,g;if(e=un.exec(t),e===null&&(e=dn.exec(t)),e===null)throw new Error("Date resolve error");if(s=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(s,i,n));if(a=+e[4],l=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=+e[10],p=+(e[11]||0),h=(u*60+p)*6e4,e[9]==="-"&&(h=-h)),g=new Date(Date.UTC(s,i,n,a,l,o,c)),h&&g.setTime(g.getTime()-h),g}function Vl(t){return t.toISOString()}var Gl=new J("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ql,construct:Wl,instanceOf:Date,represent:Vl});function Kl(t){return t==="<<"||t===null}var Yl=new J("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Kl}),qs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +`+t.mark.snippet),i+" "+s):i}function Le(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=hn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Le.prototype=Object.create(Error.prototype);Le.prototype.constructor=Le;Le.prototype.toString=function(e){return this.name+": "+hn(this,e)};var ae=Le,hl=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ul=["scalar","sequence","mapping"];function dl(t){var e={};return t!==null&&Object.keys(t).forEach(function(s){t[s].forEach(function(i){e[String(i)]=s})}),e}function pl(t,e){if(e=e||{},Object.keys(e).forEach(function(s){if(hl.indexOf(s)===-1)throw new ae('Unknown option "'+s+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(s){return s},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=dl(e.styleAliases||null),ul.indexOf(this.kind)===-1)throw new ae('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var J=pl;function fi(t,e){var s=[];return t[e].forEach(function(i){var n=s.length;s.forEach(function(a,l){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=l)}),s[n]=i}),s}function fl(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,s;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,s=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Bl=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Il(t){return!(t===null||!Bl.test(t)||t[t.length-1]==="_")}function Fl(t){var e,s;return e=t.replace(/_/g,"").toLowerCase(),s=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?s===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:s*parseFloat(e,10)}var Nl=/^[-+]?[0-9]+e/;function Rl(t,e){var s;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(zs.isNegativeZero(t))return"-0.0";return s=t.toString(10),Nl.test(s)?s.replace("e",".e"):s}function Hl(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||zs.isNegativeZero(t))}var Ul=new J("tag:yaml.org,2002:float",{kind:"scalar",resolve:Il,construct:Fl,predicate:Hl,represent:Rl,defaultStyle:"lowercase"}),jl=yl.extend({implicit:[xl,Ml,Ol,Ul]}),zl=jl,un=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ql(t){return t===null?!1:un.exec(t)!==null||dn.exec(t)!==null}function Wl(t){var e,s,i,n,a,l,o,c=0,h=null,u,p,g;if(e=un.exec(t),e===null&&(e=dn.exec(t)),e===null)throw new Error("Date resolve error");if(s=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(s,i,n));if(a=+e[4],l=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=+e[10],p=+(e[11]||0),h=(u*60+p)*6e4,e[9]==="-"&&(h=-h)),g=new Date(Date.UTC(s,i,n,a,l,o,c)),h&&g.setTime(g.getTime()-h),g}function Vl(t){return t.toISOString()}var Gl=new J("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ql,construct:Wl,instanceOf:Date,represent:Vl});function Kl(t){return t==="<<"||t===null}var Yl=new J("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Kl}),qs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function Zl(t){if(t===null)return!1;var e,s,i=0,n=t.length,a=qs;for(s=0;s64)){if(e<0)return!1;i+=6}return i%8===0}function Xl(t){var e,s,i=t.replace(/[\r\n=]/g,""),n=i.length,a=qs,l=0,o=[];for(e=0;e>16&255),o.push(l>>8&255),o.push(l&255)),l=l<<6|a.indexOf(i.charAt(e));return s=n%4*6,s===0?(o.push(l>>16&255),o.push(l>>8&255),o.push(l&255)):s===18?(o.push(l>>10&255),o.push(l>>2&255)):s===12&&o.push(l>>4&255),new Uint8Array(o)}function Jl(t){var e="",s=0,i,n,a=t.length,l=qs;for(i=0;i>18&63],e+=l[s>>12&63],e+=l[s>>6&63],e+=l[s&63]),s=(s<<8)+t[i];return n=a%3,n===0?(e+=l[s>>18&63],e+=l[s>>12&63],e+=l[s>>6&63],e+=l[s&63]):n===2?(e+=l[s>>10&63],e+=l[s>>4&63],e+=l[s<<2&63],e+=l[64]):n===1&&(e+=l[s>>2&63],e+=l[s<<4&63],e+=l[64],e+=l[64]),e}function Ql(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var to=new J("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Zl,construct:Xl,predicate:Ql,represent:Jl}),eo=Object.prototype.hasOwnProperty,so=Object.prototype.toString;function io(t){if(t===null)return!0;var e=[],s,i,n,a,l,o=t;for(s=0,i=o.length;si<=t).sort((i,n)=>i-n)}const yo=["title"],vo=ns({__name:"CodeBlockWrapper",props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:"last"},startLine:{type:Number,default:1},lines:{type:Boolean,default:N.lineNumbers},at:{type:[String,Number],default:"+1"},maxHeight:{type:String,default:void 0}},setup(t){const e=t,{$clicksContext:s}=D(),i=U(),n=en();Yn(()=>{s.unregister(n)}),ee(()=>{var c;(c=i.value)==null||c.classList.toggle("slidev-code-line-numbers",e.lines)}),Zn(()=>{var f;if(!s||s.disabled||!((f=e.ranges)!=null&&f.length))return;const{start:c,end:h,delta:u}=s.resolve(e.at,e.ranges.length-1);s.register(n,{max:h,delta:u});const p=d(()=>s.disabled?e.ranges.length-1:Math.max(0,s.current-c+1)),g=d(()=>e.finally==="last"?e.ranges.at(-1):e.finally.toString());ee(()=>{if(!i.value)return;let m=e.ranges[p.value]??g.value;const k=m==="hide";i.value.classList.toggle(pe,k),k&&(m=e.ranges[p.value+1]??g.value);const w=i.value.querySelector(".shiki-dark")?Array.from(i.value.querySelectorAll(".shiki")):[i.value],$=e.startLine;for(const M of w){const j=Array.from(M.querySelectorAll("code > .line")),H=_o(j.length+$-1,m);if(j.forEach((z,ot)=>{const K=H.includes(ot+$);z.classList.toggle(Ce,!0),z.classList.toggle("highlighted",K),z.classList.toggle("dishonored",!K)}),e.maxHeight){const z=Array.from(M.querySelectorAll(".line.highlighted"));z.reduce((K,st)=>st.offsetHeight+K,0)>i.value.offsetHeight?z[0].scrollIntoView({behavior:"smooth",block:"start"}):z.length>0&&z[Math.round((z.length-1)/2)].scrollIntoView({behavior:"smooth",block:"center"})}}})});const{copied:a,copy:l}=Xn();function o(){var h,u;const c=(u=(h=i.value)==null?void 0:h.querySelector(".slidev-code"))==null?void 0:u.textContent;c&&l(c)}return(c,h)=>{const u=fr,p=gr;return S(),ge("div",{ref_key:"el",ref:i,class:je(["slidev-code-wrapper relative group",{"slidev-code-line-numbers":e.lines}]),style:Ri({"max-height":e.maxHeight,"overflow-y":e.maxHeight?"scroll":void 0,"--start":e.startLine})},[me(c.$slots,"default"),v(N).codeCopy?(S(),ge("button",{key:0,class:"slidev-code-copy absolute top-0 right-0 transition opacity-0 group-hover:opacity-20 hover:!opacity-100",title:v(a)?"Copied":"Copy",onClick:h[0]||(h[0]=g=>o())},[v(a)?(S(),T(u,{key:0,class:"p-2 w-8 h-8"})):(S(),T(p,{key:1,class:"p-2 w-8 h-8"}))],8,yo)):Jn("v-if",!0)],6)}}}),pn=E(vo,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/builtin/CodeBlockWrapper.vue"]]),wo="/sa2024/05-restful/assets/07-manong-BM1NENVW.png",vt=b({layout:"two-cols"}),bo=b({layout:d(()=>vt.layout),transition:d(()=>vt.transition),class:d(()=>vt.class),clicks:d(()=>vt.clicks),name:d(()=>vt.name),preload:d(()=>vt.preload),slide:{index:2,content:"",note:"",title:"问题一",level:1,noteHTML:"",raw:"",frontmatter:vt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:30,id:2,no:3},__clicksContext:null,__preloaded:!1}),xo=r("h1",null,"问题一",-1),$o=r("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[r("code",{class:"language-html"},[r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"<"),r("span",{style:{"--shiki-dark":"#FDAEB7","--shiki-light":"#B31D28"}},"petclinic:layout"),r("span",{style:{"--shiki-dark":"#BD976A","--shiki-light":"#B07D48"}}," pageName"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"="),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"owners"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">")]),_(` +`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}var go=new Array(256),mo=new Array(256);for(var ue=0;ue<256;ue++)go[ue]=gi(ue)?1:0,mo[ue]=gi(ue);function ko(t){return Array.from(new Set(t))}function mi(...t){let e,s,i;t.length===1?(e=0,i=1,[s]=t):[e,s,i=1]=t;const n=[];let a=e;for(;ai<=t).sort((i,n)=>i-n)}const yo=["title"],vo=ns({__name:"CodeBlockWrapper",props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:"last"},startLine:{type:Number,default:1},lines:{type:Boolean,default:N.lineNumbers},at:{type:[String,Number],default:"+1"},maxHeight:{type:String,default:void 0}},setup(t){const e=t,{$clicksContext:s}=D(),i=U(),n=en();Yn(()=>{s.unregister(n)}),ee(()=>{var c;(c=i.value)==null||c.classList.toggle("slidev-code-line-numbers",e.lines)}),Zn(()=>{var f;if(!s||s.disabled||!((f=e.ranges)!=null&&f.length))return;const{start:c,end:h,delta:u}=s.resolve(e.at,e.ranges.length-1);s.register(n,{max:h,delta:u});const p=d(()=>s.disabled?e.ranges.length-1:Math.max(0,s.current-c+1)),g=d(()=>e.finally==="last"?e.ranges.at(-1):e.finally.toString());ee(()=>{if(!i.value)return;let m=e.ranges[p.value]??g.value;const k=m==="hide";i.value.classList.toggle(pe,k),k&&(m=e.ranges[p.value+1]??g.value);const w=i.value.querySelector(".shiki-dark")?Array.from(i.value.querySelectorAll(".shiki")):[i.value],$=e.startLine;for(const M of w){const j=Array.from(M.querySelectorAll("code > .line")),H=_o(j.length+$-1,m);if(j.forEach((z,ot)=>{const K=H.includes(ot+$);z.classList.toggle(Ee,!0),z.classList.toggle("highlighted",K),z.classList.toggle("dishonored",!K)}),e.maxHeight){const z=Array.from(M.querySelectorAll(".line.highlighted"));z.reduce((K,st)=>st.offsetHeight+K,0)>i.value.offsetHeight?z[0].scrollIntoView({behavior:"smooth",block:"start"}):z.length>0&&z[Math.round((z.length-1)/2)].scrollIntoView({behavior:"smooth",block:"center"})}}})});const{copied:a,copy:l}=Xn();function o(){var h,u;const c=(u=(h=i.value)==null?void 0:h.querySelector(".slidev-code"))==null?void 0:u.textContent;c&&l(c)}return(c,h)=>{const u=fr,p=gr;return S(),ge("div",{ref_key:"el",ref:i,class:je(["slidev-code-wrapper relative group",{"slidev-code-line-numbers":e.lines}]),style:Ri({"max-height":e.maxHeight,"overflow-y":e.maxHeight?"scroll":void 0,"--start":e.startLine})},[me(c.$slots,"default"),v(N).codeCopy?(S(),ge("button",{key:0,class:"slidev-code-copy absolute top-0 right-0 transition opacity-0 group-hover:opacity-20 hover:!opacity-100",title:v(a)?"Copied":"Copy",onClick:h[0]||(h[0]=g=>o())},[v(a)?(S(),T(u,{key:0,class:"p-2 w-8 h-8"})):(S(),T(p,{key:1,class:"p-2 w-8 h-8"}))],8,yo)):Jn("v-if",!0)],6)}}}),pn=C(vo,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/builtin/CodeBlockWrapper.vue"]]),wo="/sa2024/05-restful/assets/07-manong-BM1NENVW.png",vt=b({layout:"two-cols"}),bo=b({layout:d(()=>vt.layout),transition:d(()=>vt.transition),class:d(()=>vt.class),clicks:d(()=>vt.clicks),name:d(()=>vt.name),preload:d(()=>vt.preload),slide:{index:2,content:"",note:"",title:"问题一",level:1,noteHTML:"",raw:"",frontmatter:vt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:30,id:2,no:3},__clicksContext:null,__preloaded:!1}),xo=r("h1",null,"问题一",-1),$o=r("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[r("code",{class:"language-html"},[r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"<"),r("span",{style:{"--shiki-dark":"#FDAEB7","--shiki-light":"#B31D28"}},"petclinic:layout"),r("span",{style:{"--shiki-dark":"#BD976A","--shiki-light":"#B07D48"}}," pageName"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"="),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"owners"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," <"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"h2"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," <"),r("span",{style:{"--shiki-dark":"#FDAEB7","--shiki-light":"#B31D28"}},"c:if"),r("span",{style:{"--shiki-dark":"#BD976A","--shiki-light":"#B07D48"}}," test"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"="),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"${owner['new']}"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}},"New "),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},""),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," Owner")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ")]),_(` @@ -24,7 +24,7 @@ import{n as De,y as Fn,z as v,A as Nn,t as U,B as ee,C as _e,D as Rn,E as Hn,G a `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ")]),_(` -`),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")])])],-1),Ao=r("p",null,[r("br"),r("br"),r("img",{src:wo,class:"m-10 h-70"})],-1),So=r("div",{style:{"text-align":"center"}},"展示层页面与计算逻辑混杂",-1),Mo={__name:"3",setup(t){return O(vt),D(),(e,s)=>{const i=pn;return S(),T(pt,P(L(v(B)(v(vt),2))),{right:A(n=>[Ao,So]),default:A(()=>[xo,Hi(i,Ui({},{ranges:[]}),{default:A(()=>[$o]),_:1},16)]),_:1},16)}}},Eo=E(Mo,[["__file","/@slidev/slides/3.md"]]),Co={},To={class:"slidev-layout default"};function Do(t,e){return S(),ge("div",To,[me(t.$slots,"default")])}const G=E(Co,[["render",Do],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/layouts/default.vue"]]),wt=b({}),Po=b({layout:d(()=>wt.layout),transition:d(()=>wt.transition),class:d(()=>wt.class),clicks:d(()=>wt.clicks),name:d(()=>wt.name),preload:d(()=>wt.preload),slide:{index:3,content:"",note:"",title:"问题二",level:1,noteHTML:"",raw:"",frontmatter:wt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:72,id:3,no:4},__clicksContext:null,__preloaded:!1}),Lo=r("h1",null,"问题二",-1),Oo=r("br",null,null,-1),Bo=r("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[r("code",{class:"language-java"},[r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," @"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}},"GetMapping"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"("),r("span",{style:{"--shiki-dark":"#C99076","--shiki-light":"#A65E2B"}},"value"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ="),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},' "'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"/pets/new"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")")]),_(` +`),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")])])],-1),Ao=r("p",null,[r("br"),r("br"),r("img",{src:wo,class:"m-10 h-70"})],-1),So=r("div",{style:{"text-align":"center"}},"展示层页面与计算逻辑混杂",-1),Mo={__name:"3",setup(t){return O(vt),D(),(e,s)=>{const i=pn;return S(),T(pt,P(L(v(B)(v(vt),2))),{right:A(n=>[Ao,So]),default:A(()=>[xo,Hi(i,Ui({},{ranges:[]}),{default:A(()=>[$o]),_:1},16)]),_:1},16)}}},Co=C(Mo,[["__file","/@slidev/slides/3.md"]]),Eo={},To={class:"slidev-layout default"};function Do(t,e){return S(),ge("div",To,[me(t.$slots,"default")])}const G=C(Eo,[["render",Do],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/layouts/default.vue"]]),wt=b({}),Po=b({layout:d(()=>wt.layout),transition:d(()=>wt.transition),class:d(()=>wt.class),clicks:d(()=>wt.clicks),name:d(()=>wt.name),preload:d(()=>wt.preload),slide:{index:3,content:"",note:"",title:"问题二",level:1,noteHTML:"",raw:"",frontmatter:wt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:72,id:3,no:4},__clicksContext:null,__preloaded:!1}),Lo=r("h1",null,"问题二",-1),Oo=r("br",null,null,-1),Bo=r("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[r("code",{class:"language-java"},[r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," @"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}},"GetMapping"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"("),r("span",{style:{"--shiki-dark":"#C99076","--shiki-light":"#A65E2B"}},"value"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ="),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},' "'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"/pets/new"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}}," public"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," String "),r("span",{style:{"--shiki-dark":"#80A665","--shiki-light":"#59873A"}},"initCreationForm"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"("),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}},"Owner owner"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," ModelMap model"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," {"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ..."),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," }")]),_(` `),r("span",{class:"line"}),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," @"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}},"PostMapping"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"("),r("span",{style:{"--shiki-dark":"#C99076","--shiki-light":"#A65E2B"}},"value"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ="),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},' "'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"/pets/new"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," {"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ..."),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," }")]),_(` @@ -33,7 +33,7 @@ import{n as De,y as Fn,z as v,A as Nn,t as U,B as ee,C as _e,D as Rn,E as Hn,G a `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}}," public"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," String "),r("span",{style:{"--shiki-dark":"#80A665","--shiki-light":"#59873A"}},"initUpdateForm"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"(@"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}},"PathVariable"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"("),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"petId"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}}," int"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," petId"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," ModelMap model"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," {"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ..."),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," }")]),_(` `),r("span",{class:"line"}),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," @"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}},"PostMapping"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"("),r("span",{style:{"--shiki-dark":"#C99076","--shiki-light":"#A65E2B"}},"value"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ="),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},' "'),r("span",{style:{"--shiki-dark":"#C98A7D","--shiki-light":"#B56959"}},"/pets/{petId}/edit"),r("span",{style:{"--shiki-dark":"#C98A7D99","--shiki-light":"#B5695999"}},'"'),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")")]),_(` -`),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}}," public"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," String "),r("span",{style:{"--shiki-dark":"#80A665","--shiki-light":"#59873A"}},"processUpdateForm"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"(@"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}},"Valid"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," Pet pet"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," BindingResult result"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," Owner owner"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," ModelMap model"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," {"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ..."),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," }")])])],-1),Io=r("br",null,null,-1),Fo=r("div",{style:{"text-align":"center"}},"用户接口并不标准",-1),No={__name:"4",setup(t){return O(wt),D(),(e,s)=>{const i=pn;return S(),T(G,P(L(v(B)(v(wt),3))),{default:A(()=>[Lo,Oo,Hi(i,Ui({},{ranges:[]}),{default:A(()=>[Bo]),_:1},16),Io,Fo]),_:1},16)}}},Ro=E(No,[["__file","/@slidev/slides/4.md"]]),Ho="/sa2024/05-restful/assets/07-petclinic-rest-BYsc00ZI.png",bt=b({}),Uo=b({layout:d(()=>bt.layout),transition:d(()=>bt.transition),class:d(()=>bt.class),clicks:d(()=>bt.clicks),name:d(()=>bt.name),preload:d(()=>bt.preload),slide:{index:4,content:"",note:"",title:"RESTful Petclinic",level:1,noteHTML:"",raw:"",frontmatter:bt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:93,id:4,no:5},__clicksContext:null,__preloaded:!1}),jo=r("h1",null,"RESTful Petclinic",-1),zo=r("div",{style:{"text-align":"left"}},"https://github.com/spring-petclinic/spring-petclinic-rest",-1),qo=r("img",{src:Ho,class:"m-10 h-70"},null,-1),Wo=r("div",{style:{"text-align":"right"}},"https://www.bilibili.com/video/BV1GE411G7hu/ 7:28",-1),Vo={__name:"5",setup(t){return O(bt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(bt),4))),{default:A(()=>[jo,zo,qo,Wo]),_:1},16))}},Go=E(Vo,[["__file","/@slidev/slides/5.md"]]),Ko="/sa2024/05-restful/assets/07-roy-fielding-BBuYwNli.png",xt=b({layout:"two-cols"}),Yo=b({layout:d(()=>xt.layout),transition:d(()=>xt.transition),class:d(()=>xt.class),clicks:d(()=>xt.clicks),name:d(()=>xt.name),preload:d(()=>xt.preload),slide:{index:5,content:"",note:"",title:"REST架构风格",level:1,noteHTML:"",raw:"",frontmatter:xt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:103,id:5,no:6},__clicksContext:null,__preloaded:!1}),Zo=r("h1",null,"REST架构风格",-1),Xo=r("br",null,null,-1),Jo=r("p",null,"Architectural Styles and the Design of Network-based Software Architectures",-1),Qo=r("div",{style:{"text-align":"right"}},"- Roy Thomas Fielding, 2000",-1),tc=r("br",null,null,-1),ec=r("p",null,"Roy Thomas Fielding: HTTP协议(1.0版和1.1版)的主要设计者、Apache服务器软件的作者之一、Apache基金会的第一任主席",-1),sc=r("p",null,[r("br"),r("br"),r("img",{src:Ko,class:"m-10 h-80"})],-1),ic={__name:"6",setup(t){return O(xt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(xt),5))),{right:A(i=>[sc]),default:A(()=>[Zo,Xo,Jo,Qo,tc,ec]),_:1},16))}},nc=E(ic,[["__file","/@slidev/slides/6.md"]]),$t=b({layout:"two-cols"}),rc=b({layout:d(()=>$t.layout),transition:d(()=>$t.transition),class:d(()=>$t.class),clicks:d(()=>$t.clicks),name:d(()=>$t.name),preload:d(()=>$t.preload),slide:{index:6,content:"",note:"",title:"REST",level:1,noteHTML:"",raw:"",frontmatter:$t,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:124,id:6,no:7},__clicksContext:null,__preloaded:!1}),ac=r("h1",null,"REST",-1),lc=r("br",null,null,-1),oc=r("p",null,[r("strong",null,"Re"),_("presentational "),r("strong",null,"S"),_("tate "),r("strong",null,"T"),_("ransfer,表现层状态转化")],-1),cc=r("p",null,"全称应为: Resource Representational State Transfer,资源表现层状态转化。",-1),hc=r("p",null,[r("a",{href:"http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm",target:"_blank",rel:"noopener"},"http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm")],-1),uc=r("p",null,[r("br"),r("br"),r("img",{src:"https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_process_view.gif",class:"m-10 h-80"})],-1),dc=r("br",null,null,-1),pc={__name:"7",setup(t){return O($t),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v($t),6))),{right:A(i=>[uc,dc]),default:A(()=>[ac,lc,oc,cc,hc]),_:1},16))}},fc=E(pc,[["__file","/@slidev/slides/7.md"]]),At=b({}),gc=b({layout:d(()=>At.layout),transition:d(()=>At.transition),class:d(()=>At.class),clicks:d(()=>At.clicks),name:d(()=>At.name),preload:d(()=>At.preload),slide:{index:7,content:"",note:"",title:"REST",level:1,noteHTML:"",raw:"",frontmatter:At,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:150,id:7,no:8},__clicksContext:null,__preloaded:!1}),mc=r("h1",null,"REST",-1),kc=r("ul",null,[r("li",null,[_("REST指的是一组架构约束条件和原则 "),r("ul",null,[r("li",null,"为设计一个功能强、性能好、适宜通信的Web应用"),r("li",null,"如果一个架构符合REST的约束条件和原则,我们就称它为RESTful架构")])]),r("li",null,[_("核心概念 "),r("ul",null,[r("li",null,"资源(Resources)"),r("li",null,"表现层(Representation)"),r("li",null,"状态转化(State Transfer)")])])],-1),_c={__name:"8",setup(t){return O(At),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(At),7))),{default:A(()=>[mc,kc]),_:1},16))}},yc=E(_c,[["__file","/@slidev/slides/8.md"]]),St=b({}),vc=b({layout:d(()=>St.layout),transition:d(()=>St.transition),class:d(()=>St.class),clicks:d(()=>St.clicks),name:d(()=>St.name),preload:d(()=>St.preload),slide:{index:8,content:"",note:"",title:"资源",level:1,noteHTML:"",raw:"",frontmatter:St,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:162,id:8,no:9},__clicksContext:null,__preloaded:!1}),wc=r("h1",null,"资源",-1),bc=r("br",null,null,-1),xc=r("p",null,"网络上的一个实体,或者说是网络上的一个具体信息,任何事物,只要有被引用到的必要,它就是一个资源。",-1),$c=r("ul",null,[r("li",null,"一段文本,一张图片,一首歌曲"),r("li",null,"数据库中的一行数据"),r("li",null,"一个手机号码,某用户的个人信息"),r("li",null,"一种服务")],-1),Ac={__name:"9",setup(t){return O(St),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(St),8))),{default:A(()=>[wc,bc,xc,$c]),_:1},16))}},Sc=E(Ac,[["__file","/@slidev/slides/9.md"]]),Mt=b({}),Mc=b({layout:d(()=>Mt.layout),transition:d(()=>Mt.transition),class:d(()=>Mt.class),clicks:d(()=>Mt.clicks),name:d(()=>Mt.name),preload:d(()=>Mt.preload),slide:{index:9,content:"",note:"",title:"资源标识",level:1,noteHTML:"",raw:"",frontmatter:Mt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:174,id:9,no:10},__clicksContext:null,__preloaded:!1}),Ec=r("h1",null,"资源标识",-1),Cc=r("br",null,null,-1),Tc=r("p",null,"要让一个资源可以被识别,需要有个唯一标识,在Web中这个唯一标识就是URI(Uniform Resource Identifier)",-1),Dc=r("ul",null,[r("li",null,[r("code",null,"http://www.ex.com/software/releases/latest.tar.gz")]),r("li",null,[r("code",null,"http://www.ex.com/map/roads/USA/CA/17_mile_drive")]),r("li",null,[r("code",null,"http://www.ex.com/search/cs578")]),r("li",null,[r("code",null,"http://www.ex.com/sales/2012/Q1")]),r("li",null,[r("code",null,"http://www.ex.com/relationships/Alice;Bob")])],-1),Pc={__name:"10",setup(t){return O(Mt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Mt),9))),{default:A(()=>[Ec,Cc,Tc,Dc]),_:1},16))}},Lc=E(Pc,[["__file","/@slidev/slides/10.md"]]),Et=b({}),Oc=b({layout:d(()=>Et.layout),transition:d(()=>Et.transition),class:d(()=>Et.class),clicks:d(()=>Et.clicks),name:d(()=>Et.name),preload:d(()=>Et.preload),slide:{index:10,content:"",note:"",title:"URI设计原则",level:1,noteHTML:"",raw:"",frontmatter:Et,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:187,id:10,no:11},__clicksContext:null,__preloaded:!1}),Bc=r("h1",null,"URI设计原则",-1),Ic=r("ul",null,[r("li",null,[_("易读 "),r("ul",null,[r("li",null,[r("code",null,"http://www.oschina.net/news/38119/oschina-translate-reward-plan")])])]),r("li",null,[_("表达资源的层级关系 "),r("ul",null,[r("li",null,[r("code",null,"https://github.com/git/git/commit/e3ae056f87e1d675913d08/orders/2012/10")])])]),r("li",null,[_("表示资源的同级关系 "),r("ul",null,[r("li",null,[r("code",null,"/git/block-sha1/sha1.h/compare/e3af72cda056f87e;bd63e61bdf38eb264")])])]),r("li",null,[_("表达资源的过滤 "),r("ul",null,[r("li",null,[r("code",null,"https://github.com/git/git/pulls?state=closed")])])])],-1),Fc={__name:"11",setup(t){return O(Et),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Et),10))),{default:A(()=>[Bc,Ic]),_:1},16))}},Nc=E(Fc,[["__file","/@slidev/slides/11.md"]]),Ct=b({}),Rc=b({layout:d(()=>Ct.layout),transition:d(()=>Ct.transition),class:d(()=>Ct.class),clicks:d(()=>Ct.clicks),name:d(()=>Ct.name),preload:d(()=>Ct.preload),slide:{index:11,content:"",note:"",title:"统一资源接口",level:1,noteHTML:"",raw:"",frontmatter:Ct,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:200,id:11,no:12},__clicksContext:null,__preloaded:!1}),Hc=r("h1",null,"统一资源接口",-1),Uc=r("ul",null,[r("li",null,"RESTFul架构应该遵循统一接口原则,统一接口包含了一组受限的预定义的操作,不论什么样的资源,都是通过使用相同的接口进行资源的访问。接口应该使用标准的HTTP方法如GET,PUT和POST,并遵循这些方法的语义。"),r("li",null,[_("如果按照HTTP方法的语义来暴露资源,那么接口将会拥有安全性和幂等性的特性 "),r("ul",null,[r("li",null,"GET和HEAD请求是安全的, 无论请求多少次,都不改变服务器状态"),r("li",null,"GET、HEAD、PUT和DELETE请求是幂等的,无论对资源操作多少次, 结果总是一样的,后面的请求并不会产生比第一次更多的影响")])])],-1),jc={__name:"12",setup(t){return O(Ct),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ct),11))),{default:A(()=>[Hc,Uc]),_:1},16))}},zc=E(jc,[["__file","/@slidev/slides/12.md"]]),Tt=b({}),qc=b({layout:d(()=>Tt.layout),transition:d(()=>Tt.transition),class:d(()=>Tt.class),clicks:d(()=>Tt.clicks),name:d(()=>Tt.name),preload:d(()=>Tt.preload),slide:{index:12,content:"",note:"",title:"GET",level:3,noteHTML:"",raw:"",frontmatter:Tt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:209,id:12,no:13},__clicksContext:null,__preloaded:!1}),Wc=r("h3",null,"GET",-1),Vc=r("p",null,"获取表示,变更时获取表示(缓存)。安全且幂等。",-1),Gc=r("ul",null,[r("li",null,[r("code",null,"200"),_("(OK) - 表示已在响应中发出")]),r("li",null,[r("code",null,"204"),_("(无内容) - 资源有空表示")]),r("li",null,[r("code",null,"301"),_("(Moved Permanently) - 资源的URI已被更新")]),r("li",null,[r("code",null,"303"),_("(See Other) - 其他(如,负载均衡)")]),r("li",null,[r("code",null,"304"),_("(not modified)- 资源未更改(缓存)")]),r("li",null,[r("code",null,"400"),_(" (bad request)- 指代坏请求(如,参数错误)")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"406"),_(" (not acceptable)- 服务端不支持所需表示")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")]),r("li",null,[r("code",null,"503"),_(" (Service Unavailable)- 服务端当前无法处理请求")])],-1),Kc={__name:"13",setup(t){return O(Tt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Tt),12))),{default:A(()=>[Wc,Vc,Gc]),_:1},16))}},Yc=E(Kc,[["__file","/@slidev/slides/13.md"]]),Dt=b({}),Zc=b({layout:d(()=>Dt.layout),transition:d(()=>Dt.transition),class:d(()=>Dt.class),clicks:d(()=>Dt.clicks),name:d(()=>Dt.name),preload:d(()=>Dt.preload),slide:{index:13,content:"",note:"",title:"POST",level:3,noteHTML:"",raw:"",frontmatter:Dt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:226,id:13,no:14},__clicksContext:null,__preloaded:!1}),Xc=r("h3",null,"POST",-1),Jc=r("p",null,"使用服务端管理的(自动产生)的实例号创建资源,或创建子资源,部分更新资源,如果没有被修改,则不过更新资源(乐观锁)。不安全且不幂等。",-1),Qc=r("ul",null,[r("li",null,[r("code",null,"200"),_("(OK)- 如果现有资源已被更改")]),r("li",null,[r("code",null,"201"),_("(created)- 如果新资源被创建")]),r("li",null,[r("code",null,"202"),_("(accepted)- 已接受处理请求但尚未完成(异步处理)")]),r("li",null,[r("code",null,"301"),_("(Moved Permanently)- 资源的URI被更新")]),r("li",null,[r("code",null,"303"),_("(See Other)- 其他(如,负载均衡)")]),r("li",null,[r("code",null,"400"),_("(bad request)- 指代坏请求")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"406"),_(" (not acceptable)- 服务端不支持所需表示")]),r("li",null,[r("code",null,"409"),_(" (conflict)- 通用冲突")]),r("li",null,[r("code",null,"412"),_(" (Precondition Failed)- 前置条件失败(如执行条件更新时的冲突)")]),r("li",null,[r("code",null,"415"),_(" (unsupported media type)- 接受到的表示不受支持")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")])],-1),th={__name:"14",setup(t){return O(Dt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Dt),13))),{default:A(()=>[Xc,Jc,Qc]),_:1},16))}},eh=E(th,[["__file","/@slidev/slides/14.md"]]),Pt=b({}),sh=b({layout:d(()=>Pt.layout),transition:d(()=>Pt.transition),class:d(()=>Pt.class),clicks:d(()=>Pt.clicks),name:d(()=>Pt.name),preload:d(()=>Pt.preload),slide:{index:14,content:"",note:"",title:"PUT",level:3,noteHTML:"",raw:"",frontmatter:Pt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:245,id:14,no:15},__clicksContext:null,__preloaded:!1}),ih=r("h3",null,"PUT",-1),nh=r("p",null,"用客户端管理的实例号创建一个资源,通过替换的方式更新资源,如果未被修改,则更新资源(乐观锁)。不安全但幂等。",-1),rh=r("ul",null,[r("li",null,[r("code",null,"200"),_(" (OK)- 如果已存在资源被更改")]),r("li",null,[r("code",null,"201"),_(" (created)- 如果新资源被创建")]),r("li",null,[r("code",null,"301"),_("(Moved Permanently)- 资源的URI已更改")]),r("li",null,[r("code",null,"303"),_(" (See Other)- 其他(如,负载均衡)")]),r("li",null,[r("code",null,"400"),_(" (bad request)- 指代坏请求")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"406"),_(" (not acceptable)- 服务端不支持所需表示")]),r("li",null,[r("code",null,"409"),_(" (conflict)- 通用冲突")]),r("li",null,[r("code",null,"412"),_(" (Precondition Failed)- 前置条件失败(如执行条件更新时的冲突)")]),r("li",null,[r("code",null,"415"),_(" (unsupported media type)- 接受到的表示不受支持")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")]),r("li",null,[r("code",null,"503"),_(" (Service Unavailable)- 服务当前无法处理请求")])],-1),ah={__name:"15",setup(t){return O(Pt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Pt),14))),{default:A(()=>[ih,nh,rh]),_:1},16))}},lh=E(ah,[["__file","/@slidev/slides/15.md"]]),Lt=b({}),oh=b({layout:d(()=>Lt.layout),transition:d(()=>Lt.transition),class:d(()=>Lt.class),clicks:d(()=>Lt.clicks),name:d(()=>Lt.name),preload:d(()=>Lt.preload),slide:{index:15,content:"",note:"",title:"DELETE",level:3,noteHTML:"",raw:"",frontmatter:Lt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:264,id:15,no:16},__clicksContext:null,__preloaded:!1}),ch=r("h3",null,"DELETE",-1),hh=r("p",null,"删除资源。不安全但幂等。",-1),uh=r("ul",null,[r("li",null,[r("code",null,"200"),_(" (OK)- 资源已被删除")]),r("li",null,[r("code",null,"301"),_(" (Moved Permanently)- 资源的URI已更改")]),r("li",null,[r("code",null,"303"),_(" (See Other)- 其他,如负载均衡")]),r("li",null,[r("code",null,"400"),_(" (bad request)- 指代坏请求")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"409"),_(" (conflict)- 通用冲突")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")]),r("li",null,[r("code",null,"503"),_(" (Service Unavailable)- 服务端当前无法处理请求")])],-1),dh={__name:"16",setup(t){return O(Lt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Lt),15))),{default:A(()=>[ch,hh,uh]),_:1},16))}},ph=E(dh,[["__file","/@slidev/slides/16.md"]]),Ot=b({}),fh=b({layout:d(()=>Ot.layout),transition:d(()=>Ot.transition),class:d(()=>Ot.class),clicks:d(()=>Ot.clicks),name:d(()=>Ot.name),preload:d(()=>Ot.preload),slide:{index:16,content:"",note:"",title:"指导意义",level:1,noteHTML:"",raw:"",frontmatter:Ot,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:279,id:16,no:17},__clicksContext:null,__preloaded:!1}),gh=r("h1",null,"指导意义",-1),mh=r("br",null,null,-1),kh=r("p",null,"统一资源接口要求使用标准的HTTP方法对资源进行操作,所以URI只应该来表示资源的名称,而不应该包括资源的操作。 通俗来说,URI不应该使用动作来描述。例如,",-1),_h=r("ul",null,[r("li",null,[r("code",null,"POST /getUser?id=1"),_(" => "),r("code",null,"GET /User/1")]),r("li",null,[r("code",null,"GET /newUser"),_(" => "),r("code",null,"POST /User")]),r("li",null,[r("code",null,"GET /updateUser"),_(" => "),r("code",null,"PUT /User/1")]),r("li",null,[r("code",null,"GET /deleteUser?id=2"),_(" => "),r("code",null,"DELETE /User/2")])],-1),yh={__name:"17",setup(t){return O(Ot),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ot),16))),{default:A(()=>[gh,mh,kh,_h]),_:1},16))}},vh=E(yh,[["__file","/@slidev/slides/17.md"]]),Bt=b({}),wh=b({layout:d(()=>Bt.layout),transition:d(()=>Bt.transition),class:d(()=>Bt.class),clicks:d(()=>Bt.clicks),name:d(()=>Bt.name),preload:d(()=>Bt.preload),slide:{index:17,content:"",note:"",title:"表现(Representation)/表述/表征",level:1,noteHTML:"",raw:"",frontmatter:Bt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:292,id:17,no:18},__clicksContext:null,__preloaded:!1}),bh=r("h1",null,"表现(Representation)/表述/表征",-1),xh=r("br",null,null,-1),$h={__name:"18",setup(t){return O(Bt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Bt),17))),{default:A(()=>[bh,xh,_(" “资源”是一种信息实体,它可以有多种外在表现形式。我们把“资源”具体呈现出来的形式,叫做它的“表现层”(Representation) - 文本可以用txt格式表现,也可以用HTML格式、XML格式、JSON格式表现,甚至可以采用二进制格式 - 图片可以用JPG格式表现,也可以用PNG格式表现 ")]),_:1},16))}},Ah=E($h,[["__file","/@slidev/slides/18.md"]]),It=b({}),Sh=b({layout:d(()=>It.layout),transition:d(()=>It.transition),class:d(()=>It.class),clicks:d(()=>It.clicks),name:d(()=>It.name),preload:d(()=>It.preload),slide:{index:18,content:"",note:"",title:"资源表述",level:1,noteHTML:"",raw:"",frontmatter:It,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:301,id:18,no:19},__clicksContext:null,__preloaded:!1}),Mh=r("h1",null,"资源表述",-1),Eh=r("ul",null,[r("li",null,"URI只代表资源的实体,不代表它的形式。严格地说,有些网址最后的“.html”后缀名是不必要的,因为这个后缀名表示格式,属于“表现层”范畴,而URI应该只代表“资源”的位置。"),r("li",null,"资源的表述包括数据和描述数据的元数据,例如,HTTP头“Content-Type” 就是这样一个元数据属性"),r("li",null,"客户端可以通过Accept头请求一种特定格式的表述,服务端则通过Content-Type告诉客户端资源的表述形式")],-1),Ch={__name:"19",setup(t){return O(It),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(It),18))),{default:A(()=>[Mh,Eh]),_:1},16))}},Th=E(Ch,[["__file","/@slidev/slides/19.md"]]),Dh="/sa2024/05-restful/assets/07-rep-json-ClbUNhlO.png",Ph="/sa2024/05-restful/assets/07-rep-xml-ClkifFKW.png",Ft=b({layout:"two-cols"}),Lh=b({layout:d(()=>Ft.layout),transition:d(()=>Ft.transition),class:d(()=>Ft.class),clicks:d(()=>Ft.clicks),name:d(()=>Ft.name),preload:d(()=>Ft.preload),slide:{index:19,content:"",note:"",title:"资源表述",level:1,noteHTML:"",raw:"",frontmatter:Ft,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:308,id:19,no:20},__clicksContext:null,__preloaded:!1}),Oh=r("h1",null,"资源表述",-1),Bh=r("br",null,null,-1),Ih=r("img",{src:Dh,class:"m-5 h-80"},null,-1),Fh=r("p",null,[r("br"),r("br"),r("br")],-1),Nh=r("img",{src:Ph,class:"m-10 h-80"},null,-1),Rh={__name:"20",setup(t){return O(Ft),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Ft),19))),{right:A(i=>[Fh,Nh]),default:A(()=>[Oh,Bh,_(" 同一资源 http://api.github.com/orgs/github 的不同表述 "),Ih]),_:1},16))}},Hh=E(Rh,[["__file","/@slidev/slides/20.md"]]),Uh="/sa2024/05-restful/assets/07-rep-notacc-DyXVbkS9.png",Nt=b({}),jh=b({layout:d(()=>Nt.layout),transition:d(()=>Nt.transition),class:d(()=>Nt.class),clicks:d(()=>Nt.clicks),name:d(()=>Nt.name),preload:d(()=>Nt.preload),slide:{index:20,content:"",note:"",title:"资源表述",level:1,noteHTML:"",raw:"",frontmatter:Nt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:329,id:20,no:21},__clicksContext:null,__preloaded:!1}),zh=r("h1",null,"资源表述",-1),qh=r("br",null,null,-1),Wh=r("p",null,"不支持的表述",-1),Vh=r("img",{src:Uh,class:"m-10 h-50"},null,-1),Gh={__name:"21",setup(t){return O(Nt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Nt),20))),{default:A(()=>[zh,qh,Wh,Vh]),_:1},16))}},Kh=E(Gh,[["__file","/@slidev/slides/21.md"]]),Yh="/sa2024/05-restful/assets/07-link-next-CtEPac4P.png",Rt=b({layout:"two-cols"}),Zh=b({layout:d(()=>Rt.layout),transition:d(()=>Rt.transition),class:d(()=>Rt.class),clicks:d(()=>Rt.clicks),name:d(()=>Rt.name),preload:d(()=>Rt.preload),slide:{index:21,content:"",note:"",title:"资源链接",level:1,noteHTML:"",raw:"",frontmatter:Rt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:343,id:21,no:22},__clicksContext:null,__preloaded:!1}),Xh=r("h1",null,"资源链接",-1),Jh=r("ul",null,[r("li",null,"当你浏览Web网页时,从一个连接跳到一个页面,再从另一个连接跳到另外一个页面,就是利用了超媒体的概念: 把一个个把资源链接起来"),r("li",null,"同样,我们在表述格式里边加入链接来引导客户端")],-1),Qh=r("p",null,"在Link头告诉客户端怎么访问下一页和最后一页的记录;在响应体里用url来链接项目所有者和项目地址",-1),tu=r("p",null,[r("br"),r("br"),r("img",{src:Yh,class:"m-0 h-100"})],-1),eu={__name:"22",setup(t){return O(Rt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Rt),21))),{right:A(i=>[tu]),default:A(()=>[Xh,Jh,Qh]),_:1},16))}},su=E(eu,[["__file","/@slidev/slides/22.md"]]),iu="/sa2024/05-restful/assets/07-link-payment-e0MB_Ndz.png",Ht=b({}),nu=b({layout:d(()=>Ht.layout),transition:d(()=>Ht.transition),class:d(()=>Ht.class),clicks:d(()=>Ht.clicks),name:d(()=>Ht.name),preload:d(()=>Ht.preload),slide:{index:22,content:"",note:"",title:"资源链接",level:1,noteHTML:"",raw:"",frontmatter:Ht,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:361,id:22,no:23},__clicksContext:null,__preloaded:!1}),ru=r("h1",null,"资源链接",-1),au=r("br",null,null,-1),lu=r("p",null,"创建订单后通过链接引导客户端如何去付款",-1),ou=r("img",{src:iu,class:"m-10 h-60"},null,-1),cu={__name:"23",setup(t){return O(Ht),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ht),22))),{default:A(()=>[ru,au,lu,ou]),_:1},16))}},hu=E(cu,[["__file","/@slidev/slides/23.md"]]),Ut=b({}),uu=b({layout:d(()=>Ut.layout),transition:d(()=>Ut.transition),class:d(()=>Ut.class),clicks:d(()=>Ut.clicks),name:d(()=>Ut.name),preload:d(()=>Ut.preload),slide:{index:23,content:"",note:"",title:"状态转移(State Transfer)",level:1,noteHTML:"",raw:"",frontmatter:Ut,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:373,id:23,no:24},__clicksContext:null,__preloaded:!1}),du=r("h1",null,"状态转移(State Transfer)",-1),pu=r("ul",null,[r("li",null,"状态应该区分应用状态和资源状态,客户端负责维护应用状态(购物车),而服务端维护资源状态(库存)。"),r("li",null,"客户端与服务端的交互必须是无状态的,并在每一次请求中包含处理该请求所需的一切信息。"),r("li",null,"服务端不需要在请求间保留应用状态,只有在接受到实际请求的时候,服务端才会关注应用状态。"),r("li",null,"这种无状态通信原则,使得服务端和中介能够理解独立的请求和响应。 在多次请求中,同一客户端也不再需要依赖于同一服务器,方便实现高可扩展和高可用性的服务端(下次讲)。")],-1),fu={__name:"24",setup(t){return O(Ut),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ut),23))),{default:A(()=>[du,pu]),_:1},16))}},gu=E(fu,[["__file","/@slidev/slides/24.md"]]),mu={},ku={class:"slidev-layout center h-full grid place-content-center"},_u={class:"my-auto"};function yu(t,e){return S(),ge("div",ku,[r("div",_u,[me(t.$slots,"default")])])}const vu=E(mu,[["render",yu],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/layouts/center.vue"]]),jt=b({layout:"center"}),wu=b({layout:d(()=>jt.layout),transition:d(()=>jt.transition),class:d(()=>jt.class),clicks:d(()=>jt.clicks),name:d(()=>jt.name),preload:d(()=>jt.preload),slide:{index:24,content:"",note:"",noteHTML:"",raw:"",frontmatter:jt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:381,id:24,no:25},__clicksContext:null,__preloaded:!1}),bu=r("br",null,null,-1),xu=r("div",{style:{"font-size":"38px"}},"状态转移(State Transfer): 客户端应用状态在服务端提供的超媒体的指引下发生变迁。服务端通过超媒体告诉客户端当前状态有哪些后续状态可以进入。",-1),$u={__name:"25",setup(t){return O(jt),D(),(e,s)=>(S(),T(vu,P(L(v(B)(v(jt),24))),{default:A(()=>[bu,xu]),_:1},16))}},Au=E($u,[["__file","/@slidev/slides/25.md"]]),Ie="/sa2024/05-restful/assets/07-scene-sVSmSOLF.png",zt=b({layout:"two-cols"}),Su=b({layout:d(()=>zt.layout),transition:d(()=>zt.transition),class:d(()=>zt.class),clicks:d(()=>zt.clicks),name:d(()=>zt.name),preload:d(()=>zt.preload),slide:{index:25,content:"",note:"",title:"一个完整的故事",level:1,noteHTML:"",raw:"",frontmatter:zt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:390,id:25,no:26},__clicksContext:null,__preloaded:!1}),Mu=r("h1",null,"一个完整的故事",-1),Eu=r("br",null,null,-1),Cu=r("p",null,"例如我订阅了一个人的博客,想要获取他发表的所有文章(这里“他发表的所有文章”就是一个资源Resource)。于是我就向他的服务发出请求,说“我要获取你发表的所有文章,最好是atom格式的”,这时候服务器向你返回了atom格式的文章列表第一页(这里“atom格式的文章列表”就是表征Representation)。",-1),Tu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Du={__name:"26",setup(t){return O(zt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(zt),25))),{right:A(i=>[Tu]),default:A(()=>[Mu,Eu,Cu]),_:1},16))}},Pu=E(Du,[["__file","/@slidev/slides/26.md"]]),qt=b({layout:"two-cols"}),Lu=b({layout:d(()=>qt.layout),transition:d(()=>qt.transition),class:d(()=>qt.class),clicks:d(()=>qt.clicks),name:d(()=>qt.name),preload:d(()=>qt.preload),slide:{index:26,content:"",note:"",title:"一个完整的故事-2",level:1,noteHTML:"",raw:"",frontmatter:qt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:404,id:26,no:27},__clicksContext:null,__preloaded:!1}),Ou=r("h1",null,"一个完整的故事-2",-1),Bu=r("br",null,null,-1),Iu=r("p",null,"你看到了第一页的页尾,想要看第二页,这时候有趣的事情就来了。如果服务器记录了应用的状态(stateful),那么你只要向服务询问“我要看下一页”,那么服务器自然就会返回第二页。类似的,如果你当前在第二页,想服务器请求“我要看下一页”,那就会得到第三页。",-1),Fu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Nu={__name:"27",setup(t){return O(qt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(qt),26))),{right:A(i=>[Fu]),default:A(()=>[Ou,Bu,Iu]),_:1},16))}},Ru=E(Nu,[["__file","/@slidev/slides/27.md"]]),Wt=b({layout:"two-cols"}),Hu=b({layout:d(()=>Wt.layout),transition:d(()=>Wt.transition),class:d(()=>Wt.class),clicks:d(()=>Wt.clicks),name:d(()=>Wt.name),preload:d(()=>Wt.preload),slide:{index:27,content:"",note:"",title:"一个完整的故事-3",level:1,noteHTML:"",raw:"",frontmatter:Wt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:418,id:27,no:28},__clicksContext:null,__preloaded:!1}),Uu=r("h1",null,"一个完整的故事-3",-1),ju=r("br",null,null,-1),zu=r("p",null,"但是REST的服务器恰恰是无状态的(stateless),服务器并没有保持你当前处于第几页,也就无法响应“下一页”这种具有状态性质的请求。因此客户端需要去维护当前应用的状态(application state),也就是“如何获取下一页资源”。",-1),qu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Wu={__name:"28",setup(t){return O(Wt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Wt),27))),{right:A(i=>[qu]),default:A(()=>[Uu,ju,zu]),_:1},16))}},Vu=E(Wu,[["__file","/@slidev/slides/28.md"]]),Vt=b({layout:"two-cols"}),Gu=b({layout:d(()=>Vt.layout),transition:d(()=>Vt.transition),class:d(()=>Vt.class),clicks:d(()=>Vt.clicks),name:d(()=>Vt.name),preload:d(()=>Vt.preload),slide:{index:28,content:"",note:"",title:"一个完整的故事-4",level:1,noteHTML:"",raw:"",frontmatter:Vt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:433,id:28,no:29},__clicksContext:null,__preloaded:!1}),Ku=r("h1",null,"一个完整的故事-4",-1),Yu=r("br",null,null,-1),Zu=r("p",null,"当然,“下一页资源”的业务逻辑必然是由服务端来提供。服务器在文章列表的atom表征中加入一个URI超链接(hyper link),指向下一页文章列表对应的资源。客户端就可以使用统一接口(Uniform Interface)的方式,从这个URI中获取到他想要的下一页文章列表资源。",-1),Xu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Ju={__name:"29",setup(t){return O(Vt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Vt),28))),{right:A(i=>[Xu]),default:A(()=>[Ku,Yu,Zu]),_:1},16))}},Qu=E(Ju,[["__file","/@slidev/slides/29.md"]]),Gt=b({layout:"two-cols"}),td=b({layout:d(()=>Gt.layout),transition:d(()=>Gt.transition),class:d(()=>Gt.class),clicks:d(()=>Gt.clicks),name:d(()=>Gt.name),preload:d(()=>Gt.preload),slide:{index:29,content:"",note:"",title:"一个完整的故事-5",level:1,noteHTML:"",raw:"",frontmatter:Gt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:447,id:29,no:30},__clicksContext:null,__preloaded:!1}),ed=r("h1",null,"一个完整的故事-5",-1),sd=r("br",null,null,-1),id=r("p",null,"上面的“能够进入下一页”就是应用的状态(State)。服务器把“能够进入下一页”这个状态以atom表征形式传输(Transfer)给客户端就是表征状态传输(REpresentational State Transfer)这个概念。",-1),nd=r("img",{src:Ie,class:"m-10 h-100"},null,-1),rd={__name:"30",setup(t){return O(Gt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Gt),29))),{right:A(i=>[nd]),default:A(()=>[ed,sd,id]),_:1},16))}},ad=E(rd,[["__file","/@slidev/slides/30.md"]]),Kt=b({}),ld=b({layout:d(()=>Kt.layout),transition:d(()=>Kt.transition),class:d(()=>Kt.class),clicks:d(()=>Kt.clicks),name:d(()=>Kt.name),preload:d(()=>Kt.preload),slide:{index:30,content:"",note:"",title:"Tutorial",level:1,noteHTML:"",raw:"",frontmatter:Kt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:463,id:30,no:31},__clicksContext:null,__preloaded:!1}),od=r("h1",null,"Tutorial",-1),cd=r("br",null,null,-1),hd=r("p",null,"Building REST services with Spring",-1),ud=r("p",null,[r("a",{href:"https://spring.io/guides/tutorials/rest/",target:"_blank",rel:"noopener"},"https://spring.io/guides/tutorials/rest/")],-1),dd={__name:"31",setup(t){return O(Kt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Kt),30))),{default:A(()=>[od,cd,hd,ud]),_:1},16))}},pd=E(dd,[["__file","/@slidev/slides/31.md"]]),Yt=b({}),fd=b({layout:d(()=>Yt.layout),transition:d(()=>Yt.transition),class:d(()=>Yt.class),clicks:d(()=>Yt.clicks),name:d(()=>Yt.name),preload:d(()=>Yt.preload),slide:{index:31,content:"",note:"",title:"Demo",level:1,noteHTML:"",raw:"",frontmatter:Yt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:473,id:31,no:32},__clicksContext:null,__preloaded:!1}),gd=r("h1",null,"Demo",-1),md=r("br",null,null,-1),kd=r("p",null,"spring-projects/spring-hateoas-examples",-1),_d=r("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[r("code",{class:"language-xml"},[r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"<"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"dependency"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">")]),_(` +`),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}}," public"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," String "),r("span",{style:{"--shiki-dark":"#80A665","--shiki-light":"#59873A"}},"processUpdateForm"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"(@"),r("span",{style:{"--shiki-dark":"#CB7676","--shiki-light":"#AB5959"}},"Valid"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," Pet pet"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," BindingResult result"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," Owner owner"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},","),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}}," ModelMap model"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},")"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," {"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," ..."),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," }")])])],-1),Io=r("br",null,null,-1),Fo=r("div",{style:{"text-align":"center"}},"用户接口并不标准",-1),No={__name:"4",setup(t){return O(wt),D(),(e,s)=>{const i=pn;return S(),T(G,P(L(v(B)(v(wt),3))),{default:A(()=>[Lo,Oo,Hi(i,Ui({},{ranges:[]}),{default:A(()=>[Bo]),_:1},16),Io,Fo]),_:1},16)}}},Ro=C(No,[["__file","/@slidev/slides/4.md"]]),Ho="/sa2024/05-restful/assets/07-petclinic-rest-BYsc00ZI.png",bt=b({}),Uo=b({layout:d(()=>bt.layout),transition:d(()=>bt.transition),class:d(()=>bt.class),clicks:d(()=>bt.clicks),name:d(()=>bt.name),preload:d(()=>bt.preload),slide:{index:4,content:"",note:"",title:"RESTful Petclinic",level:1,noteHTML:"",raw:"",frontmatter:bt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:93,id:4,no:5},__clicksContext:null,__preloaded:!1}),jo=r("h1",null,"RESTful Petclinic",-1),zo=r("div",{style:{"text-align":"left"}},"https://github.com/spring-petclinic/spring-petclinic-rest",-1),qo=r("img",{src:Ho,class:"m-10 h-70"},null,-1),Wo=r("div",{style:{"text-align":"right"}},"https://www.bilibili.com/video/BV1p5411S7Am 6:04",-1),Vo={__name:"5",setup(t){return O(bt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(bt),4))),{default:A(()=>[jo,zo,qo,Wo]),_:1},16))}},Go=C(Vo,[["__file","/@slidev/slides/5.md"]]),Ko="/sa2024/05-restful/assets/07-roy-fielding-BBuYwNli.png",xt=b({layout:"two-cols"}),Yo=b({layout:d(()=>xt.layout),transition:d(()=>xt.transition),class:d(()=>xt.class),clicks:d(()=>xt.clicks),name:d(()=>xt.name),preload:d(()=>xt.preload),slide:{index:5,content:"",note:"",title:"REST架构风格",level:1,noteHTML:"",raw:"",frontmatter:xt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:103,id:5,no:6},__clicksContext:null,__preloaded:!1}),Zo=r("h1",null,"REST架构风格",-1),Xo=r("br",null,null,-1),Jo=r("p",null,"Architectural Styles and the Design of Network-based Software Architectures",-1),Qo=r("div",{style:{"text-align":"right"}},"- Roy Thomas Fielding, 2000",-1),tc=r("br",null,null,-1),ec=r("p",null,"Roy Thomas Fielding: HTTP协议(1.0版和1.1版)的主要设计者、Apache服务器软件的作者之一、Apache基金会的第一任主席",-1),sc=r("p",null,[r("br"),r("br"),r("img",{src:Ko,class:"m-10 h-80"})],-1),ic={__name:"6",setup(t){return O(xt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(xt),5))),{right:A(i=>[sc]),default:A(()=>[Zo,Xo,Jo,Qo,tc,ec]),_:1},16))}},nc=C(ic,[["__file","/@slidev/slides/6.md"]]),$t=b({layout:"two-cols"}),rc=b({layout:d(()=>$t.layout),transition:d(()=>$t.transition),class:d(()=>$t.class),clicks:d(()=>$t.clicks),name:d(()=>$t.name),preload:d(()=>$t.preload),slide:{index:6,content:"",note:"",title:"REST",level:1,noteHTML:"",raw:"",frontmatter:$t,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:124,id:6,no:7},__clicksContext:null,__preloaded:!1}),ac=r("h1",null,"REST",-1),lc=r("br",null,null,-1),oc=r("p",null,[r("strong",null,"Re"),_("presentational "),r("strong",null,"S"),_("tate "),r("strong",null,"T"),_("ransfer,表现层状态转化")],-1),cc=r("p",null,"全称应为: Resource Representational State Transfer,资源表现层状态转化。",-1),hc=r("p",null,[r("a",{href:"http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm",target:"_blank",rel:"noopener"},"http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm")],-1),uc=r("p",null,[r("br"),r("br"),r("img",{src:"https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_process_view.gif",class:"m-10 h-80"})],-1),dc=r("br",null,null,-1),pc={__name:"7",setup(t){return O($t),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v($t),6))),{right:A(i=>[uc,dc]),default:A(()=>[ac,lc,oc,cc,hc]),_:1},16))}},fc=C(pc,[["__file","/@slidev/slides/7.md"]]),At=b({}),gc=b({layout:d(()=>At.layout),transition:d(()=>At.transition),class:d(()=>At.class),clicks:d(()=>At.clicks),name:d(()=>At.name),preload:d(()=>At.preload),slide:{index:7,content:"",note:"",title:"REST",level:1,noteHTML:"",raw:"",frontmatter:At,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:150,id:7,no:8},__clicksContext:null,__preloaded:!1}),mc=r("h1",null,"REST",-1),kc=r("ul",null,[r("li",null,[_("REST指的是一组架构约束条件和原则 "),r("ul",null,[r("li",null,"为设计一个功能强、性能好、适宜通信的Web应用"),r("li",null,"如果一个架构符合REST的约束条件和原则,我们就称它为RESTful架构")])]),r("li",null,[_("核心概念 "),r("ul",null,[r("li",null,"资源(Resources)"),r("li",null,"表现层(Representation)"),r("li",null,"状态转化(State Transfer)")])])],-1),_c={__name:"8",setup(t){return O(At),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(At),7))),{default:A(()=>[mc,kc]),_:1},16))}},yc=C(_c,[["__file","/@slidev/slides/8.md"]]),St=b({}),vc=b({layout:d(()=>St.layout),transition:d(()=>St.transition),class:d(()=>St.class),clicks:d(()=>St.clicks),name:d(()=>St.name),preload:d(()=>St.preload),slide:{index:8,content:"",note:"",title:"资源",level:1,noteHTML:"",raw:"",frontmatter:St,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:162,id:8,no:9},__clicksContext:null,__preloaded:!1}),wc=r("h1",null,"资源",-1),bc=r("br",null,null,-1),xc=r("p",null,"网络上的一个实体,或者说是网络上的一个具体信息,任何事物,只要有被引用到的必要,它就是一个资源。",-1),$c=r("ul",null,[r("li",null,"一段文本,一张图片,一首歌曲"),r("li",null,"数据库中的一行数据"),r("li",null,"一个手机号码,某用户的个人信息"),r("li",null,"一种服务")],-1),Ac={__name:"9",setup(t){return O(St),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(St),8))),{default:A(()=>[wc,bc,xc,$c]),_:1},16))}},Sc=C(Ac,[["__file","/@slidev/slides/9.md"]]),Mt=b({}),Mc=b({layout:d(()=>Mt.layout),transition:d(()=>Mt.transition),class:d(()=>Mt.class),clicks:d(()=>Mt.clicks),name:d(()=>Mt.name),preload:d(()=>Mt.preload),slide:{index:9,content:"",note:"",title:"资源标识",level:1,noteHTML:"",raw:"",frontmatter:Mt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:174,id:9,no:10},__clicksContext:null,__preloaded:!1}),Cc=r("h1",null,"资源标识",-1),Ec=r("br",null,null,-1),Tc=r("p",null,"要让一个资源可以被识别,需要有个唯一标识,在Web中这个唯一标识就是URI(Uniform Resource Identifier)",-1),Dc=r("ul",null,[r("li",null,[r("code",null,"http://www.ex.com/software/releases/latest.tar.gz")]),r("li",null,[r("code",null,"http://www.ex.com/map/roads/USA/CA/17_mile_drive")]),r("li",null,[r("code",null,"http://www.ex.com/search/cs578")]),r("li",null,[r("code",null,"http://www.ex.com/sales/2012/Q1")]),r("li",null,[r("code",null,"http://www.ex.com/relationships/Alice;Bob")])],-1),Pc={__name:"10",setup(t){return O(Mt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Mt),9))),{default:A(()=>[Cc,Ec,Tc,Dc]),_:1},16))}},Lc=C(Pc,[["__file","/@slidev/slides/10.md"]]),Ct=b({}),Oc=b({layout:d(()=>Ct.layout),transition:d(()=>Ct.transition),class:d(()=>Ct.class),clicks:d(()=>Ct.clicks),name:d(()=>Ct.name),preload:d(()=>Ct.preload),slide:{index:10,content:"",note:"",title:"URI设计原则",level:1,noteHTML:"",raw:"",frontmatter:Ct,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:187,id:10,no:11},__clicksContext:null,__preloaded:!1}),Bc=r("h1",null,"URI设计原则",-1),Ic=r("ul",null,[r("li",null,[_("易读 "),r("ul",null,[r("li",null,[r("code",null,"http://www.oschina.net/news/38119/oschina-translate-reward-plan")])])]),r("li",null,[_("表达资源的层级关系 "),r("ul",null,[r("li",null,[r("code",null,"https://github.com/git/git/commit/e3ae056f87e1d675913d08/orders/2012/10")])])]),r("li",null,[_("表示资源的同级关系 "),r("ul",null,[r("li",null,[r("code",null,"/git/block-sha1/sha1.h/compare/e3af72cda056f87e;bd63e61bdf38eb264")])])]),r("li",null,[_("表达资源的过滤 "),r("ul",null,[r("li",null,[r("code",null,"https://github.com/git/git/pulls?state=closed")])])])],-1),Fc={__name:"11",setup(t){return O(Ct),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ct),10))),{default:A(()=>[Bc,Ic]),_:1},16))}},Nc=C(Fc,[["__file","/@slidev/slides/11.md"]]),Et=b({}),Rc=b({layout:d(()=>Et.layout),transition:d(()=>Et.transition),class:d(()=>Et.class),clicks:d(()=>Et.clicks),name:d(()=>Et.name),preload:d(()=>Et.preload),slide:{index:11,content:"",note:"",title:"统一资源接口",level:1,noteHTML:"",raw:"",frontmatter:Et,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:200,id:11,no:12},__clicksContext:null,__preloaded:!1}),Hc=r("h1",null,"统一资源接口",-1),Uc=r("ul",null,[r("li",null,"RESTFul架构应该遵循统一接口原则,统一接口包含了一组受限的预定义的操作,不论什么样的资源,都是通过使用相同的接口进行资源的访问。接口应该使用标准的HTTP方法如GET,PUT和POST,并遵循这些方法的语义。"),r("li",null,[_("如果按照HTTP方法的语义来暴露资源,那么接口将会拥有安全性和幂等性的特性 "),r("ul",null,[r("li",null,"GET和HEAD请求是安全的, 无论请求多少次,都不改变服务器状态"),r("li",null,"GET、HEAD、PUT和DELETE请求是幂等的,无论对资源操作多少次, 结果总是一样的,后面的请求并不会产生比第一次更多的影响")])])],-1),jc={__name:"12",setup(t){return O(Et),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Et),11))),{default:A(()=>[Hc,Uc]),_:1},16))}},zc=C(jc,[["__file","/@slidev/slides/12.md"]]),Tt=b({}),qc=b({layout:d(()=>Tt.layout),transition:d(()=>Tt.transition),class:d(()=>Tt.class),clicks:d(()=>Tt.clicks),name:d(()=>Tt.name),preload:d(()=>Tt.preload),slide:{index:12,content:"",note:"",title:"GET",level:3,noteHTML:"",raw:"",frontmatter:Tt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:209,id:12,no:13},__clicksContext:null,__preloaded:!1}),Wc=r("h3",null,"GET",-1),Vc=r("p",null,"获取表示,变更时获取表示(缓存)。安全且幂等。",-1),Gc=r("ul",null,[r("li",null,[r("code",null,"200"),_("(OK) - 表示已在响应中发出")]),r("li",null,[r("code",null,"204"),_("(无内容) - 资源有空表示")]),r("li",null,[r("code",null,"301"),_("(Moved Permanently) - 资源的URI已被更新")]),r("li",null,[r("code",null,"303"),_("(See Other) - 其他(如,负载均衡)")]),r("li",null,[r("code",null,"304"),_("(not modified)- 资源未更改(缓存)")]),r("li",null,[r("code",null,"400"),_(" (bad request)- 指代坏请求(如,参数错误)")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"406"),_(" (not acceptable)- 服务端不支持所需表示")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")]),r("li",null,[r("code",null,"503"),_(" (Service Unavailable)- 服务端当前无法处理请求")])],-1),Kc={__name:"13",setup(t){return O(Tt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Tt),12))),{default:A(()=>[Wc,Vc,Gc]),_:1},16))}},Yc=C(Kc,[["__file","/@slidev/slides/13.md"]]),Dt=b({}),Zc=b({layout:d(()=>Dt.layout),transition:d(()=>Dt.transition),class:d(()=>Dt.class),clicks:d(()=>Dt.clicks),name:d(()=>Dt.name),preload:d(()=>Dt.preload),slide:{index:13,content:"",note:"",title:"POST",level:3,noteHTML:"",raw:"",frontmatter:Dt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:226,id:13,no:14},__clicksContext:null,__preloaded:!1}),Xc=r("h3",null,"POST",-1),Jc=r("p",null,"使用服务端管理的(自动产生)的实例号创建资源,或创建子资源,部分更新资源,如果没有被修改,则不过更新资源(乐观锁)。不安全且不幂等。",-1),Qc=r("ul",null,[r("li",null,[r("code",null,"200"),_("(OK)- 如果现有资源已被更改")]),r("li",null,[r("code",null,"201"),_("(created)- 如果新资源被创建")]),r("li",null,[r("code",null,"202"),_("(accepted)- 已接受处理请求但尚未完成(异步处理)")]),r("li",null,[r("code",null,"301"),_("(Moved Permanently)- 资源的URI被更新")]),r("li",null,[r("code",null,"303"),_("(See Other)- 其他(如,负载均衡)")]),r("li",null,[r("code",null,"400"),_("(bad request)- 指代坏请求")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"406"),_(" (not acceptable)- 服务端不支持所需表示")]),r("li",null,[r("code",null,"409"),_(" (conflict)- 通用冲突")]),r("li",null,[r("code",null,"412"),_(" (Precondition Failed)- 前置条件失败(如执行条件更新时的冲突)")]),r("li",null,[r("code",null,"415"),_(" (unsupported media type)- 接受到的表示不受支持")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")])],-1),th={__name:"14",setup(t){return O(Dt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Dt),13))),{default:A(()=>[Xc,Jc,Qc]),_:1},16))}},eh=C(th,[["__file","/@slidev/slides/14.md"]]),Pt=b({}),sh=b({layout:d(()=>Pt.layout),transition:d(()=>Pt.transition),class:d(()=>Pt.class),clicks:d(()=>Pt.clicks),name:d(()=>Pt.name),preload:d(()=>Pt.preload),slide:{index:14,content:"",note:"",title:"PUT",level:3,noteHTML:"",raw:"",frontmatter:Pt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:245,id:14,no:15},__clicksContext:null,__preloaded:!1}),ih=r("h3",null,"PUT",-1),nh=r("p",null,"用客户端管理的实例号创建一个资源,通过替换的方式更新资源,如果未被修改,则更新资源(乐观锁)。不安全但幂等。",-1),rh=r("ul",null,[r("li",null,[r("code",null,"200"),_(" (OK)- 如果已存在资源被更改")]),r("li",null,[r("code",null,"201"),_(" (created)- 如果新资源被创建")]),r("li",null,[r("code",null,"301"),_("(Moved Permanently)- 资源的URI已更改")]),r("li",null,[r("code",null,"303"),_(" (See Other)- 其他(如,负载均衡)")]),r("li",null,[r("code",null,"400"),_(" (bad request)- 指代坏请求")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"406"),_(" (not acceptable)- 服务端不支持所需表示")]),r("li",null,[r("code",null,"409"),_(" (conflict)- 通用冲突")]),r("li",null,[r("code",null,"412"),_(" (Precondition Failed)- 前置条件失败(如执行条件更新时的冲突)")]),r("li",null,[r("code",null,"415"),_(" (unsupported media type)- 接受到的表示不受支持")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")]),r("li",null,[r("code",null,"503"),_(" (Service Unavailable)- 服务当前无法处理请求")])],-1),ah={__name:"15",setup(t){return O(Pt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Pt),14))),{default:A(()=>[ih,nh,rh]),_:1},16))}},lh=C(ah,[["__file","/@slidev/slides/15.md"]]),Lt=b({}),oh=b({layout:d(()=>Lt.layout),transition:d(()=>Lt.transition),class:d(()=>Lt.class),clicks:d(()=>Lt.clicks),name:d(()=>Lt.name),preload:d(()=>Lt.preload),slide:{index:15,content:"",note:"",title:"DELETE",level:3,noteHTML:"",raw:"",frontmatter:Lt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:264,id:15,no:16},__clicksContext:null,__preloaded:!1}),ch=r("h3",null,"DELETE",-1),hh=r("p",null,"删除资源。不安全但幂等。",-1),uh=r("ul",null,[r("li",null,[r("code",null,"200"),_(" (OK)- 资源已被删除")]),r("li",null,[r("code",null,"301"),_(" (Moved Permanently)- 资源的URI已更改")]),r("li",null,[r("code",null,"303"),_(" (See Other)- 其他,如负载均衡")]),r("li",null,[r("code",null,"400"),_(" (bad request)- 指代坏请求")]),r("li",null,[r("code",null,"404"),_(" (not found)- 资源不存在")]),r("li",null,[r("code",null,"409"),_(" (conflict)- 通用冲突")]),r("li",null,[r("code",null,"500"),_(" (internal server error)- 通用错误响应")]),r("li",null,[r("code",null,"503"),_(" (Service Unavailable)- 服务端当前无法处理请求")])],-1),dh={__name:"16",setup(t){return O(Lt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Lt),15))),{default:A(()=>[ch,hh,uh]),_:1},16))}},ph=C(dh,[["__file","/@slidev/slides/16.md"]]),Ot=b({}),fh=b({layout:d(()=>Ot.layout),transition:d(()=>Ot.transition),class:d(()=>Ot.class),clicks:d(()=>Ot.clicks),name:d(()=>Ot.name),preload:d(()=>Ot.preload),slide:{index:16,content:"",note:"",title:"指导意义",level:1,noteHTML:"",raw:"",frontmatter:Ot,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:279,id:16,no:17},__clicksContext:null,__preloaded:!1}),gh=r("h1",null,"指导意义",-1),mh=r("br",null,null,-1),kh=r("p",null,"统一资源接口要求使用标准的HTTP方法对资源进行操作,所以URI只应该来表示资源的名称,而不应该包括资源的操作。 通俗来说,URI不应该使用动作来描述。例如,",-1),_h=r("ul",null,[r("li",null,[r("code",null,"POST /getUser?id=1"),_(" => "),r("code",null,"GET /User/1")]),r("li",null,[r("code",null,"GET /newUser"),_(" => "),r("code",null,"POST /User")]),r("li",null,[r("code",null,"GET /updateUser"),_(" => "),r("code",null,"PUT /User/1")]),r("li",null,[r("code",null,"GET /deleteUser?id=2"),_(" => "),r("code",null,"DELETE /User/2")])],-1),yh={__name:"17",setup(t){return O(Ot),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ot),16))),{default:A(()=>[gh,mh,kh,_h]),_:1},16))}},vh=C(yh,[["__file","/@slidev/slides/17.md"]]),Bt=b({}),wh=b({layout:d(()=>Bt.layout),transition:d(()=>Bt.transition),class:d(()=>Bt.class),clicks:d(()=>Bt.clicks),name:d(()=>Bt.name),preload:d(()=>Bt.preload),slide:{index:17,content:"",note:"",title:"表现(Representation)/表述/表征",level:1,noteHTML:"",raw:"",frontmatter:Bt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:292,id:17,no:18},__clicksContext:null,__preloaded:!1}),bh=r("h1",null,"表现(Representation)/表述/表征",-1),xh=r("br",null,null,-1),$h={__name:"18",setup(t){return O(Bt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Bt),17))),{default:A(()=>[bh,xh,_(" “资源”是一种信息实体,它可以有多种外在表现形式。我们把“资源”具体呈现出来的形式,叫做它的“表现层”(Representation) - 文本可以用txt格式表现,也可以用HTML格式、XML格式、JSON格式表现,甚至可以采用二进制格式 - 图片可以用JPG格式表现,也可以用PNG格式表现 ")]),_:1},16))}},Ah=C($h,[["__file","/@slidev/slides/18.md"]]),It=b({}),Sh=b({layout:d(()=>It.layout),transition:d(()=>It.transition),class:d(()=>It.class),clicks:d(()=>It.clicks),name:d(()=>It.name),preload:d(()=>It.preload),slide:{index:18,content:"",note:"",title:"资源表述",level:1,noteHTML:"",raw:"",frontmatter:It,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:301,id:18,no:19},__clicksContext:null,__preloaded:!1}),Mh=r("h1",null,"资源表述",-1),Ch=r("ul",null,[r("li",null,"URI只代表资源的实体,不代表它的形式。严格地说,有些网址最后的“.html”后缀名是不必要的,因为这个后缀名表示格式,属于“表现层”范畴,而URI应该只代表“资源”的位置。"),r("li",null,"资源的表述包括数据和描述数据的元数据,例如,HTTP头“Content-Type” 就是这样一个元数据属性"),r("li",null,"客户端可以通过Accept头请求一种特定格式的表述,服务端则通过Content-Type告诉客户端资源的表述形式")],-1),Eh={__name:"19",setup(t){return O(It),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(It),18))),{default:A(()=>[Mh,Ch]),_:1},16))}},Th=C(Eh,[["__file","/@slidev/slides/19.md"]]),Dh="/sa2024/05-restful/assets/07-rep-json-ClbUNhlO.png",Ph="/sa2024/05-restful/assets/07-rep-xml-ClkifFKW.png",Ft=b({layout:"two-cols"}),Lh=b({layout:d(()=>Ft.layout),transition:d(()=>Ft.transition),class:d(()=>Ft.class),clicks:d(()=>Ft.clicks),name:d(()=>Ft.name),preload:d(()=>Ft.preload),slide:{index:19,content:"",note:"",title:"资源表述",level:1,noteHTML:"",raw:"",frontmatter:Ft,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:308,id:19,no:20},__clicksContext:null,__preloaded:!1}),Oh=r("h1",null,"资源表述",-1),Bh=r("br",null,null,-1),Ih=r("img",{src:Dh,class:"m-5 h-80"},null,-1),Fh=r("p",null,[r("br"),r("br"),r("br")],-1),Nh=r("img",{src:Ph,class:"m-10 h-80"},null,-1),Rh={__name:"20",setup(t){return O(Ft),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Ft),19))),{right:A(i=>[Fh,Nh]),default:A(()=>[Oh,Bh,_(" 同一资源 http://api.github.com/orgs/github 的不同表述 "),Ih]),_:1},16))}},Hh=C(Rh,[["__file","/@slidev/slides/20.md"]]),Uh="/sa2024/05-restful/assets/07-rep-notacc-DyXVbkS9.png",Nt=b({}),jh=b({layout:d(()=>Nt.layout),transition:d(()=>Nt.transition),class:d(()=>Nt.class),clicks:d(()=>Nt.clicks),name:d(()=>Nt.name),preload:d(()=>Nt.preload),slide:{index:20,content:"",note:"",title:"资源表述",level:1,noteHTML:"",raw:"",frontmatter:Nt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:329,id:20,no:21},__clicksContext:null,__preloaded:!1}),zh=r("h1",null,"资源表述",-1),qh=r("br",null,null,-1),Wh=r("p",null,"不支持的表述",-1),Vh=r("img",{src:Uh,class:"m-10 h-50"},null,-1),Gh={__name:"21",setup(t){return O(Nt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Nt),20))),{default:A(()=>[zh,qh,Wh,Vh]),_:1},16))}},Kh=C(Gh,[["__file","/@slidev/slides/21.md"]]),Yh="/sa2024/05-restful/assets/07-link-next-CtEPac4P.png",Rt=b({layout:"two-cols"}),Zh=b({layout:d(()=>Rt.layout),transition:d(()=>Rt.transition),class:d(()=>Rt.class),clicks:d(()=>Rt.clicks),name:d(()=>Rt.name),preload:d(()=>Rt.preload),slide:{index:21,content:"",note:"",title:"资源链接",level:1,noteHTML:"",raw:"",frontmatter:Rt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:343,id:21,no:22},__clicksContext:null,__preloaded:!1}),Xh=r("h1",null,"资源链接",-1),Jh=r("ul",null,[r("li",null,"当你浏览Web网页时,从一个连接跳到一个页面,再从另一个连接跳到另外一个页面,就是利用了超媒体的概念: 把一个个把资源链接起来"),r("li",null,"同样,我们在表述格式里边加入链接来引导客户端")],-1),Qh=r("p",null,"在Link头告诉客户端怎么访问下一页和最后一页的记录;在响应体里用url来链接项目所有者和项目地址",-1),tu=r("p",null,[r("br"),r("br"),r("img",{src:Yh,class:"m-0 h-100"})],-1),eu={__name:"22",setup(t){return O(Rt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Rt),21))),{right:A(i=>[tu]),default:A(()=>[Xh,Jh,Qh]),_:1},16))}},su=C(eu,[["__file","/@slidev/slides/22.md"]]),iu="/sa2024/05-restful/assets/07-link-payment-e0MB_Ndz.png",Ht=b({}),nu=b({layout:d(()=>Ht.layout),transition:d(()=>Ht.transition),class:d(()=>Ht.class),clicks:d(()=>Ht.clicks),name:d(()=>Ht.name),preload:d(()=>Ht.preload),slide:{index:22,content:"",note:"",title:"资源链接",level:1,noteHTML:"",raw:"",frontmatter:Ht,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:361,id:22,no:23},__clicksContext:null,__preloaded:!1}),ru=r("h1",null,"资源链接",-1),au=r("br",null,null,-1),lu=r("p",null,"创建订单后通过链接引导客户端如何去付款",-1),ou=r("img",{src:iu,class:"m-10 h-60"},null,-1),cu={__name:"23",setup(t){return O(Ht),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ht),22))),{default:A(()=>[ru,au,lu,ou]),_:1},16))}},hu=C(cu,[["__file","/@slidev/slides/23.md"]]),Ut=b({}),uu=b({layout:d(()=>Ut.layout),transition:d(()=>Ut.transition),class:d(()=>Ut.class),clicks:d(()=>Ut.clicks),name:d(()=>Ut.name),preload:d(()=>Ut.preload),slide:{index:23,content:"",note:"",title:"状态转移(State Transfer)",level:1,noteHTML:"",raw:"",frontmatter:Ut,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:373,id:23,no:24},__clicksContext:null,__preloaded:!1}),du=r("h1",null,"状态转移(State Transfer)",-1),pu=r("ul",null,[r("li",null,"状态应该区分应用状态和资源状态,客户端负责维护应用状态(购物车),而服务端维护资源状态(库存)。"),r("li",null,"客户端与服务端的交互必须是无状态的,并在每一次请求中包含处理该请求所需的一切信息。"),r("li",null,"服务端不需要在请求间保留应用状态,只有在接受到实际请求的时候,服务端才会关注应用状态。"),r("li",null,"这种无状态通信原则,使得服务端和中介能够理解独立的请求和响应。 在多次请求中,同一客户端也不再需要依赖于同一服务器,方便实现高可扩展和高可用性的服务端(下次讲)。")],-1),fu={__name:"24",setup(t){return O(Ut),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Ut),23))),{default:A(()=>[du,pu]),_:1},16))}},gu=C(fu,[["__file","/@slidev/slides/24.md"]]),mu={},ku={class:"slidev-layout center h-full grid place-content-center"},_u={class:"my-auto"};function yu(t,e){return S(),ge("div",ku,[r("div",_u,[me(t.$slots,"default")])])}const vu=C(mu,[["render",yu],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/layouts/center.vue"]]),jt=b({layout:"center"}),wu=b({layout:d(()=>jt.layout),transition:d(()=>jt.transition),class:d(()=>jt.class),clicks:d(()=>jt.clicks),name:d(()=>jt.name),preload:d(()=>jt.preload),slide:{index:24,content:"",note:"",noteHTML:"",raw:"",frontmatter:jt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:381,id:24,no:25},__clicksContext:null,__preloaded:!1}),bu=r("br",null,null,-1),xu=r("div",{style:{"font-size":"38px"}},"状态转移(State Transfer): 客户端应用状态在服务端提供的超媒体的指引下发生变迁。服务端通过超媒体告诉客户端当前状态有哪些后续状态可以进入。",-1),$u={__name:"25",setup(t){return O(jt),D(),(e,s)=>(S(),T(vu,P(L(v(B)(v(jt),24))),{default:A(()=>[bu,xu]),_:1},16))}},Au=C($u,[["__file","/@slidev/slides/25.md"]]),Ie="/sa2024/05-restful/assets/07-scene-sVSmSOLF.png",zt=b({layout:"two-cols"}),Su=b({layout:d(()=>zt.layout),transition:d(()=>zt.transition),class:d(()=>zt.class),clicks:d(()=>zt.clicks),name:d(()=>zt.name),preload:d(()=>zt.preload),slide:{index:25,content:"",note:"",title:"一个完整的故事",level:1,noteHTML:"",raw:"",frontmatter:zt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:390,id:25,no:26},__clicksContext:null,__preloaded:!1}),Mu=r("h1",null,"一个完整的故事",-1),Cu=r("br",null,null,-1),Eu=r("p",null,"例如我订阅了一个人的博客,想要获取他发表的所有文章(这里“他发表的所有文章”就是一个资源Resource)。于是我就向他的服务发出请求,说“我要获取你发表的所有文章,最好是atom格式的”,这时候服务器向你返回了atom格式的文章列表第一页(这里“atom格式的文章列表”就是表征Representation)。",-1),Tu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Du={__name:"26",setup(t){return O(zt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(zt),25))),{right:A(i=>[Tu]),default:A(()=>[Mu,Cu,Eu]),_:1},16))}},Pu=C(Du,[["__file","/@slidev/slides/26.md"]]),qt=b({layout:"two-cols"}),Lu=b({layout:d(()=>qt.layout),transition:d(()=>qt.transition),class:d(()=>qt.class),clicks:d(()=>qt.clicks),name:d(()=>qt.name),preload:d(()=>qt.preload),slide:{index:26,content:"",note:"",title:"一个完整的故事-2",level:1,noteHTML:"",raw:"",frontmatter:qt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:404,id:26,no:27},__clicksContext:null,__preloaded:!1}),Ou=r("h1",null,"一个完整的故事-2",-1),Bu=r("br",null,null,-1),Iu=r("p",null,"你看到了第一页的页尾,想要看第二页,这时候有趣的事情就来了。如果服务器记录了应用的状态(stateful),那么你只要向服务询问“我要看下一页”,那么服务器自然就会返回第二页。类似的,如果你当前在第二页,想服务器请求“我要看下一页”,那就会得到第三页。",-1),Fu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Nu={__name:"27",setup(t){return O(qt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(qt),26))),{right:A(i=>[Fu]),default:A(()=>[Ou,Bu,Iu]),_:1},16))}},Ru=C(Nu,[["__file","/@slidev/slides/27.md"]]),Wt=b({layout:"two-cols"}),Hu=b({layout:d(()=>Wt.layout),transition:d(()=>Wt.transition),class:d(()=>Wt.class),clicks:d(()=>Wt.clicks),name:d(()=>Wt.name),preload:d(()=>Wt.preload),slide:{index:27,content:"",note:"",title:"一个完整的故事-3",level:1,noteHTML:"",raw:"",frontmatter:Wt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:418,id:27,no:28},__clicksContext:null,__preloaded:!1}),Uu=r("h1",null,"一个完整的故事-3",-1),ju=r("br",null,null,-1),zu=r("p",null,"但是REST的服务器恰恰是无状态的(stateless),服务器并没有保持你当前处于第几页,也就无法响应“下一页”这种具有状态性质的请求。因此客户端需要去维护当前应用的状态(application state),也就是“如何获取下一页资源”。",-1),qu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Wu={__name:"28",setup(t){return O(Wt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Wt),27))),{right:A(i=>[qu]),default:A(()=>[Uu,ju,zu]),_:1},16))}},Vu=C(Wu,[["__file","/@slidev/slides/28.md"]]),Vt=b({layout:"two-cols"}),Gu=b({layout:d(()=>Vt.layout),transition:d(()=>Vt.transition),class:d(()=>Vt.class),clicks:d(()=>Vt.clicks),name:d(()=>Vt.name),preload:d(()=>Vt.preload),slide:{index:28,content:"",note:"",title:"一个完整的故事-4",level:1,noteHTML:"",raw:"",frontmatter:Vt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:433,id:28,no:29},__clicksContext:null,__preloaded:!1}),Ku=r("h1",null,"一个完整的故事-4",-1),Yu=r("br",null,null,-1),Zu=r("p",null,"当然,“下一页资源”的业务逻辑必然是由服务端来提供。服务器在文章列表的atom表征中加入一个URI超链接(hyper link),指向下一页文章列表对应的资源。客户端就可以使用统一接口(Uniform Interface)的方式,从这个URI中获取到他想要的下一页文章列表资源。",-1),Xu=r("img",{src:Ie,class:"m-10 h-100"},null,-1),Ju={__name:"29",setup(t){return O(Vt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Vt),28))),{right:A(i=>[Xu]),default:A(()=>[Ku,Yu,Zu]),_:1},16))}},Qu=C(Ju,[["__file","/@slidev/slides/29.md"]]),Gt=b({layout:"two-cols"}),td=b({layout:d(()=>Gt.layout),transition:d(()=>Gt.transition),class:d(()=>Gt.class),clicks:d(()=>Gt.clicks),name:d(()=>Gt.name),preload:d(()=>Gt.preload),slide:{index:29,content:"",note:"",title:"一个完整的故事-5",level:1,noteHTML:"",raw:"",frontmatter:Gt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:447,id:29,no:30},__clicksContext:null,__preloaded:!1}),ed=r("h1",null,"一个完整的故事-5",-1),sd=r("br",null,null,-1),id=r("p",null,"上面的“能够进入下一页”就是应用的状态(State)。服务器把“能够进入下一页”这个状态以atom表征形式传输(Transfer)给客户端就是表征状态传输(REpresentational State Transfer)这个概念。",-1),nd=r("img",{src:Ie,class:"m-10 h-100"},null,-1),rd={__name:"30",setup(t){return O(Gt),D(),(e,s)=>(S(),T(pt,P(L(v(B)(v(Gt),29))),{right:A(i=>[nd]),default:A(()=>[ed,sd,id]),_:1},16))}},ad=C(rd,[["__file","/@slidev/slides/30.md"]]),Kt=b({}),ld=b({layout:d(()=>Kt.layout),transition:d(()=>Kt.transition),class:d(()=>Kt.class),clicks:d(()=>Kt.clicks),name:d(()=>Kt.name),preload:d(()=>Kt.preload),slide:{index:30,content:"",note:"",title:"Tutorial",level:1,noteHTML:"",raw:"",frontmatter:Kt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:463,id:30,no:31},__clicksContext:null,__preloaded:!1}),od=r("h1",null,"Tutorial",-1),cd=r("br",null,null,-1),hd=r("p",null,"Building REST services with Spring",-1),ud=r("p",null,[r("a",{href:"https://spring.io/guides/tutorials/rest/",target:"_blank",rel:"noopener"},"https://spring.io/guides/tutorials/rest/")],-1),dd={__name:"31",setup(t){return O(Kt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Kt),30))),{default:A(()=>[od,cd,hd,ud]),_:1},16))}},pd=C(dd,[["__file","/@slidev/slides/31.md"]]),Yt=b({}),fd=b({layout:d(()=>Yt.layout),transition:d(()=>Yt.transition),class:d(()=>Yt.class),clicks:d(()=>Yt.clicks),name:d(()=>Yt.name),preload:d(()=>Yt.preload),slide:{index:31,content:"",note:"",title:"Demo",level:1,noteHTML:"",raw:"",frontmatter:Yt,filepath:"/Users/chun/Develop/software-architecture-explained-with-spring/05-restful.md",start:473,id:31,no:32},__clicksContext:null,__preloaded:!1}),gd=r("h1",null,"Demo",-1),md=r("br",null,null,-1),kd=r("p",null,"spring-projects/spring-hateoas-examples",-1),_d=r("pre",{class:"shiki shiki-themes vitesse-dark vitesse-light slidev-code",style:{"--shiki-dark":"#dbd7caee","--shiki-light":"#393a34","--shiki-dark-bg":"#121212","--shiki-light-bg":"#ffffff"}},[r("code",{class:"language-xml"},[r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"<"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"dependency"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," <"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"groupId"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}},"org.springframework.boot"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," <"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"artifactId"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}},"spring-boot-starter-hateoas"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")]),_(` @@ -41,10 +41,10 @@ import{n as De,y as Fn,z as v,A as Nn,t as U,B as ee,C as _e,D as Rn,E as Hn,G a `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"<"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"dependency"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," <"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"groupId"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}},"org.projectlombok"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")]),_(` `),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}}," <"),r("span",{style:{"--shiki-dark":"#4D9375","--shiki-light":"#1E754F"}},"artifactId"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},">"),r("span",{style:{"--shiki-dark":"#DBD7CAEE","--shiki-light":"#393A34"}},"lombok"),r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")]),_(` -`),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")])])],-1),yd=r("div",{style:{"text-align":"right"}},"https://www.bilibili.com/video/BV1GE411G7hu?p=4 ",-1),vd={__name:"32",setup(t){return O(Yt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Yt),31))),{default:A(()=>[gd,md,kd,_d,yd]),_:1},16))}},wd=E(vd,[["__file","/@slidev/slides/32.md"]]),Y=[{path:"1",name:"page-1",component:Ha,meta:Ia},{path:"2",name:"page-2",component:Ja,meta:qa},{path:"3",name:"page-3",component:Eo,meta:bo},{path:"4",name:"page-4",component:Ro,meta:Po},{path:"5",name:"page-5",component:Go,meta:Uo},{path:"6",name:"page-6",component:nc,meta:Yo},{path:"7",name:"page-7",component:fc,meta:rc},{path:"8",name:"page-8",component:yc,meta:gc},{path:"9",name:"page-9",component:Sc,meta:vc},{path:"10",name:"page-10",component:Lc,meta:Mc},{path:"11",name:"page-11",component:Nc,meta:Oc},{path:"12",name:"page-12",component:zc,meta:Rc},{path:"13",name:"page-13",component:Yc,meta:qc},{path:"14",name:"page-14",component:eh,meta:Zc},{path:"15",name:"page-15",component:lh,meta:sh},{path:"16",name:"page-16",component:ph,meta:oh},{path:"17",name:"page-17",component:vh,meta:fh},{path:"18",name:"page-18",component:Ah,meta:wh},{path:"19",name:"page-19",component:Th,meta:Sh},{path:"20",name:"page-20",component:Hh,meta:Lh},{path:"21",name:"page-21",component:Kh,meta:jh},{path:"22",name:"page-22",component:su,meta:Zh},{path:"23",name:"page-23",component:hu,meta:nu},{path:"24",name:"page-24",component:gu,meta:uu},{path:"25",name:"page-25",component:Au,meta:wu},{path:"26",name:"page-26",component:Pu,meta:Su},{path:"27",name:"page-27",component:Ru,meta:Lu},{path:"28",name:"page-28",component:Vu,meta:Hu},{path:"29",name:"page-29",component:Qu,meta:Gu},{path:"30",name:"page-30",component:ad,meta:td},{path:"31",name:"page-31",component:pd,meta:ld},{path:"32",name:"page-32",component:wd,meta:fd}].map(Hs),bd=[].map(Hs),We=[{name:"play",path:"/",component:()=>Pe(()=>import("./slidev/play-CGBDlsHN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),children:[...Y,...bd]},{name:"print",path:"/print",component:()=>Pe(()=>import("./slidev/print-Db79bZhK.js"),__vite__mapDeps([11,1,4,9,3,6,7,12]))},{path:"",redirect:{path:"/1"}},{path:"/:pathMatch(.*)",redirect:{path:"/1"}}];{let t=function(e){if(!N.remote||N.remote===e.query.password)return!0;if(N.remote&&e.query.password===void 0){const s=prompt("Enter password");if(N.remote===s)return!0}return e.params.no?{path:`/${e.params.no}`}:{path:""}};We.push({path:"/presenter/print",component:()=>Pe(()=>import("./slidev/print-Blm48ouN.js"),__vite__mapDeps([13,1,14,15,3,6,7]))}),We.push({name:"presenter",path:"/presenter/:no",component:()=>Pe(()=>import("./slidev/presenter-DwcU7Ppu.js"),__vite__mapDeps([16,3,1,2,4,5,6,7,8,14,15,17,18,19])),beforeEnter:t}),We.push({path:"/presenter",redirect:{path:"/presenter/1"}})}const nt=Qn({history:tr("/sa2024/05-restful/"),routes:We}),fn=U(!1);function xd(t,e,{mode:s="replace"}={}){return d({get(){const i=nt.currentRoute.value.query[t];return i==null?e??null:Array.isArray(i)?i.filter(Boolean):i},set(i){De(()=>{nt[v(s)]({query:{...nt.currentRoute.value.query,[t]:i}})})}})}var $d=Object.defineProperty,ki=Object.getOwnPropertySymbols,Ad=Object.prototype.hasOwnProperty,Sd=Object.prototype.propertyIsEnumerable,_i=(t,e,s)=>e in t?$d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ss=(t,e)=>{for(var s in e||(e={}))Ad.call(e,s)&&_i(t,s,e[s]);if(ki)for(var s of ki(e))Sd.call(e,s)&&_i(t,s,e[s]);return t},Md=()=>({emit(t,...e){for(let s=0,i=this.events[t]||[],n=i.length;s{var i;this.events[t]=(i=this.events[t])==null?void 0:i.filter(n=>e!==n)}}});function yi(t,e,s,i=n=>n){return t*i(.5-e*(.5-s))}function Ed(t){return[-t[0],-t[1]]}function dt(t,e){return[t[0]+e[0],t[1]+e[1]]}function at(t,e){return[t[0]-e[0],t[1]-e[1]]}function ut(t,e){return[t[0]*e,t[1]*e]}function Cd(t,e){return[t[0]/e,t[1]/e]}function xe(t){return[t[1],-t[0]]}function vi(t,e){return t[0]*e[0]+t[1]*e[1]}function Td(t,e){return t[0]===e[0]&&t[1]===e[1]}function Dd(t){return Math.hypot(t[0],t[1])}function Pd(t){return t[0]*t[0]+t[1]*t[1]}function wi(t,e){return Pd(at(t,e))}function gn(t){return Cd(t,Dd(t))}function Ld(t,e){return Math.hypot(t[1]-e[1],t[0]-e[0])}function $e(t,e,s){let i=Math.sin(s),n=Math.cos(s),a=t[0]-e[0],l=t[1]-e[1],o=a*n-l*i,c=a*i+l*n;return[o+e[0],c+e[1]]}function Ms(t,e,s){return dt(t,ut(at(e,t),s))}function bi(t,e,s){return dt(t,ut(e,s))}var{min:de,PI:Od}=Math,xi=.275,Ae=Od+1e-4;function Bd(t,e={}){let{size:s=16,smoothing:i=.5,thinning:n=.5,simulatePressure:a=!0,easing:l=C=>C,start:o={},end:c={},last:h=!1}=e,{cap:u=!0,easing:p=C=>C*(2-C)}=o,{cap:g=!0,easing:f=C=>--C*C*C+1}=c;if(t.length===0||s<=0)return[];let m=t[t.length-1].runningLength,k=o.taper===!1?0:o.taper===!0?Math.max(s,m):o.taper,y=c.taper===!1?0:c.taper===!0?Math.max(s,m):c.taper,w=Math.pow(s*i,2),$=[],M=[],j=t.slice(0,10).reduce((C,W)=>{let F=W.pressure;if(a){let R=de(1,W.distance/s),cs=de(1,1-R);F=de(1,C+(cs-C)*(R*xi))}return(C+F)/2},t[0].pressure),H=yi(s,n,t[t.length-1].pressure,l),z,ot=t[0].vector,K=t[0].point,st=K,ft=K,gt=st,X=!1;for(let C=0;Cw)&&($.push(ft),K=ft),gt=dt(F,ii),(C<=1||wi(st,gt)>w)&&(M.push(gt),st=gt),j=W,ot=R}let I=t[0].point.slice(0,2),q=t.length>1?t[t.length-1].point.slice(0,2):dt(t[0].point,[1,1]),Xt=[],ct=[];if(t.length===1){if(!(k||y)||h){let C=bi(I,gn(xe(at(I,q))),-(z||H)),W=[];for(let F=1/13,R=F;R<=1;R+=F)W.push($e(C,I,Ae*2*R));return W}}else{if(!(k||y&&t.length===1))if(u)for(let W=1/13,F=W;F<=1;F+=W){let R=$e(M[0],I,Ae*F);Xt.push(R)}else{let W=at($[0],M[0]),F=ut(W,.5),R=ut(W,.51);Xt.push(at(I,F),at(I,R),dt(I,R),dt(I,F))}let C=xe(Ed(t[t.length-1].vector));if(y||k&&t.length===1)ct.push(q);else if(g){let W=bi(q,C,H);for(let F=1/29,R=F;R<1;R+=F)ct.push($e(W,q,Ae*3*R))}else ct.push(dt(q,ut(C,H)),dt(q,ut(C,H*.99)),at(q,ut(C,H*.99)),at(q,ut(C,H)))}return $.concat(ct,M.reverse(),Xt)}function Id(t,e={}){var s;let{streamline:i=.5,size:n=16,last:a=!1}=e;if(t.length===0)return[];let l=.15+(1-i)*.85,o=Array.isArray(t[0])?t:t.map(({x:f,y:m,pressure:k=.5})=>[f,m,k]);if(o.length===2){let f=o[1];o=o.slice(0,-1);for(let m=1;m<5;m++)o.push(Ms(o[0],f,m/4))}o.length===1&&(o=[...o,[...dt(o[0],[1,1]),...o[0].slice(2)]]);let c=[{point:[o[0][0],o[0][1]],pressure:o[0][2]>=0?o[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],h=!1,u=0,p=c[0],g=o.length-1;for(let f=1;f=0?o[f][2]:.5,vector:gn(at(p.point,m)),distance:k,runningLength:u},c.push(p)}return c[0].vector=((s=c[1])==null?void 0:s.vector)||[0,0],c}function Fd(t,e={}){return Bd(Id(t,e),e)}function Ze(t,e){return t-e}function Nd(t){return t<0?-1:1}function Xe(t){return[Math.abs(t),Nd(t)]}function mn(){const t=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}var Rd=2,kt=Rd,ye=class{constructor(t){this.drauu=t,this.event=void 0,this.point=void 0,this.start=void 0,this.el=null}onSelected(t){}onUnselected(){}onStart(t){}onMove(t){return!1}onEnd(t){}get brush(){return this.drauu.brush}get shiftPressed(){return this.drauu.shiftPressed}get altPressed(){return this.drauu.altPressed}get svgElement(){return this.drauu.el}getMousePosition(t){var e,s,i;const n=this.drauu.el,a=(e=this.drauu.options.coordinateScale)!=null?e:1,l=(s=this.drauu.options.offset)!=null?s:{x:0,y:0};if(this.drauu.options.coordinateTransform===!1){const o=this.drauu.el.getBoundingClientRect();return{x:(t.pageX-o.left+l.x)*a,y:(t.pageY-o.top+l.y)*a,pressure:t.pressure}}else{const o=this.drauu.svgPoint;o.x=t.clientX+l.x,o.y=t.clientY+l.y;const c=o.matrixTransform((i=n.getScreenCTM())==null?void 0:i.inverse());return{x:c.x*a,y:c.y*a,pressure:t.pressure}}}createElement(t,e){var s;const i=document.createElementNS("http://www.w3.org/2000/svg",t),n=e?Ss(Ss({},this.brush),e):this.brush;return i.setAttribute("fill",(s=n.fill)!=null?s:"transparent"),i.setAttribute("stroke",n.color),i.setAttribute("stroke-width",n.size.toString()),i.setAttribute("stroke-linecap","round"),n.dasharray&&i.setAttribute("stroke-dasharray",n.dasharray),i}attr(t,e){this.el.setAttribute(t,typeof e=="string"?e:e.toFixed(kt))}_setEvent(t){this.event=t,this.point=this.getMousePosition(t)}_eventDown(t){return this._setEvent(t),this.start=this.point,this.onStart(this.point)}_eventMove(t){return this._setEvent(t),this.onMove(this.point)}_eventUp(t){return this._setEvent(t),this.onEnd(this.point)}},Hd=class kn extends ye{constructor(){super(...arguments),this.points=[]}onStart(e){return this.el=document.createElementNS("http://www.w3.org/2000/svg","path"),this.points=[e],this.attr("fill",this.brush.color),this.attr("d",this.getSvgData(this.points)),this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&this.points.push(e),this.attr("d",this.getSvgData(this.points)),!0}onEnd(){const e=this.el;return this.el=null,!!e}getSvgData(e){return kn.getSvgData(e,this.brush)}static getSvgData(e,s){const i=Fd(e,Ss({size:s.size,thinning:.9,simulatePressure:!1,start:{taper:5},end:{taper:5}},s.stylusOptions));if(!i.length)return"";const n=i.reduce((a,[l,o],c,h)=>{const[u,p]=h[(c+1)%h.length];return a.push(l,o,(l+u)/2,(o+p)/2),a},["M",...i[0],"Q"]);return n.push("Z"),n.map(a=>typeof a=="number"?a.toFixed(2):a).join(" ")}},Ud=class extends ye{onStart(t){return this.el=this.createElement("ellipse"),this.attr("cx",t.x),this.attr("cy",t.y),this.el}onMove(t){if(!this.el||!this.start)return!1;let[e,s]=Xe(t.x-this.start.x),[i,n]=Xe(t.y-this.start.y);if(this.shiftPressed){const a=Math.min(e,i);e=a,i=a}if(this.altPressed)this.attr("cx",this.start.x),this.attr("cy",this.start.y),this.attr("rx",e),this.attr("ry",i);else{const[a,l]=[this.start.x,this.start.x+e*s].sort(Ze),[o,c]=[this.start.y,this.start.y+i*n].sort(Ze);this.attr("cx",(a+l)/2),this.attr("cy",(o+c)/2),this.attr("rx",(l-a)/2),this.attr("ry",(c-o)/2)}return!0}onEnd(){const t=this.el;return this.el=null,!(!t||!t.getTotalLength())}};function _n(t,e){const s=document.createElementNS("http://www.w3.org/2000/svg","defs"),i=document.createElementNS("http://www.w3.org/2000/svg","marker"),n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("fill",e),i.setAttribute("id",t),i.setAttribute("viewBox","0 -5 10 10"),i.setAttribute("refX","5"),i.setAttribute("refY","0"),i.setAttribute("markerWidth","4"),i.setAttribute("markerHeight","4"),i.setAttribute("orient","auto"),n.setAttribute("d","M0,-5L10,0L0,5"),i.appendChild(n),s.appendChild(i),s}var jd=class extends ye{onStart(t){if(this.el=this.createElement("line",{fill:"transparent"}),this.attr("x1",t.x),this.attr("y1",t.y),this.attr("x2",t.x),this.attr("y2",t.y),this.brush.arrowEnd){const e=mn(),s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.append(_n(e,this.brush.color)),s.append(this.el),this.attr("marker-end",`url(#${e})`),s}return this.el}onMove(t){if(!this.el)return!1;let{x:e,y:s}=t;if(this.shiftPressed){const i=t.x-this.start.x,n=t.y-this.start.y;if(n!==0){let a=i/n;a=Math.round(a),Math.abs(a)<=1?(e=this.start.x+n*a,s=this.start.y+n):(e=this.start.x+i,s=this.start.y)}}return this.altPressed?(this.attr("x1",this.start.x*2-e),this.attr("y1",this.start.y*2-s),this.attr("x2",e),this.attr("y2",s)):(this.attr("x1",this.start.x),this.attr("y1",this.start.y),this.attr("x2",e),this.attr("y2",s)),!0}onEnd(){const t=this.el;return this.el=null,!(!t||t.getTotalLength()<5)}},zd=class extends ye{onStart(t){return this.el=this.createElement("rect"),this.brush.cornerRadius&&(this.attr("rx",this.brush.cornerRadius),this.attr("ry",this.brush.cornerRadius)),this.attr("x",t.x),this.attr("y",t.y),this.el}onMove(t){if(!this.el||!this.start)return!1;let[e,s]=Xe(t.x-this.start.x),[i,n]=Xe(t.y-this.start.y);if(this.shiftPressed){const a=Math.min(e,i);e=a,i=a}if(this.altPressed)this.attr("x",this.start.x-e),this.attr("y",this.start.y-i),this.attr("width",e*2),this.attr("height",i*2);else{const[a,l]=[this.start.x,this.start.x+e*s].sort(Ze),[o,c]=[this.start.y,this.start.y+i*n].sort(Ze);this.attr("x",a),this.attr("y",o),this.attr("width",l-a),this.attr("height",c-o)}return!0}onEnd(){const t=this.el;return this.el=null,!(!t||!t.getTotalLength())}};function qd(t,e){const s=t.x-e.x,i=t.y-e.y;return s*s+i*i}function Wd(t,e,s){let i=e.x,n=e.y,a=s.x-i,l=s.y-n;if(a!==0||l!==0){const o=((t.x-i)*a+(t.y-n)*l)/(a*a+l*l);o>1?(i=s.x,n=s.y):o>0&&(i+=a*o,n+=l*o)}return a=t.x-i,l=t.y-n,a*a+l*l}function Vd(t,e){let s=t[0];const i=[s];let n;for(let a=1,l=t.length;ae&&(i.push(n),s=n);return s!==n&&n&&i.push(n),i}function Es(t,e,s,i,n){let a=i,l=0;for(let o=e+1;oa&&(l=o,a=c)}a>i&&(l-e>1&&Es(t,e,l,i,n),n.push(t[l]),s-l>1&&Es(t,l,s,i,n))}function Gd(t,e){const s=t.length-1,i=[t[0]];return Es(t,0,s,e,i),i.push(t[s]),i}function $i(t,e,s=!1){if(t.length<=2)return t;const i=e!==void 0?e*e:1;return t=s?t:Vd(t,i),t=Gd(t,i),t}var Kd=class ne extends ye{constructor(){super(...arguments),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement("path",{fill:"transparent"}),this.points=[e],this.brush.arrowEnd){this.arrowId=mn();const s=_n(this.arrowId,this.brush.color);this.el.appendChild(s)}return this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&(this.points.push(e),this.count+=1),this.count>5&&(this.points=$i(this.points,1,!0),this.count=0),this.attr("d",ne.toSvgData(this.points)),!0}onEnd(){const e=this.el;return this.el=null,!(!e||(e.setAttribute("d",ne.toSvgData($i(this.points,1,!0))),!e.getTotalLength()))}static line(e,s){const i=s.x-e.x,n=s.y-e.y;return{length:Math.sqrt(i**2+n**2),angle:Math.atan2(n,i)}}static controlPoint(e,s,i,n){const a=s||e,l=i||e,o=.2,c=ne.line(a,l),h=c.angle+(n?Math.PI:0),u=c.length*o,p=e.x+Math.cos(h)*u,g=e.y+Math.sin(h)*u;return{x:p,y:g}}static bezierCommand(e,s,i){const n=ne.controlPoint(i[s-1],i[s-2],e),a=ne.controlPoint(e,i[s-1],i[s+1],!0);return`C ${n.x.toFixed(kt)},${n.y.toFixed(kt)} ${a.x.toFixed(kt)},${a.y.toFixed(kt)} ${e.x.toFixed(kt)},${e.y.toFixed(kt)}`}static toSvgData(e){return e.reduce((s,i,n,a)=>n===0?`M ${i.x.toFixed(kt)},${i.y.toFixed(kt)}`:`${s} ${ne.bezierCommand(i,n,a)}`,"")}},Yd=class extends ye{constructor(){super(...arguments),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(t){const e=(s,i)=>{if(s&&s.length)for(let n=0;nt.forEach(e=>this.drauu._restoreNode(e)),redo:()=>t.forEach(e=>this.drauu._removeNode(e))}}checkAndEraseElement(){if(this.pathFragments.length)for(let t=0;t!this._erased.includes(t.element))),this._erased.length>0}lineLineIntersect(t,e){const s=t.x1,i=t.x2,n=e.x1,a=e.x2,l=t.y1,o=t.y2,c=e.y1,h=e.y2,u=(s-i)*(c-h)-(l-o)*(n-a),p=(s*o-l*i)*(n-a)-(s-i)*(n*h-c*a),g=(s*o-l*i)*(c-h)-(l-o)*(n*h-c*a),f=(m,k,y)=>m>=k&&m<=y?!0:m>=y&&m<=k;if(u===0)return!1;{const m={x:p/u,y:g/u};return f(m.x,s,i)&&f(m.y,l,o)&&f(m.x,n,a)&&f(m.y,c,h)}}};function Zd(t){return{draw:new Kd(t),stylus:new Hd(t),line:new jd(t),rectangle:new zd(t),ellipse:new Ud(t),eraseLine:new Yd(t)}}var Xd=class{constructor(t={}){this.options=t,this.el=null,this.svgPoint=null,this.eventEl=null,this.shiftPressed=!1,this.altPressed=!1,this.drawing=!1,this._emitter=Md(),this._originalPointerId=null,this._models=Zd(this),this._opStack=[],this._opIndex=0,this._disposables=[],this._elements=[],this.options.brush||(this.options.brush={color:"black",size:3,mode:"stylus"}),t.el&&this.mount(t.el,t.eventTarget,t.window)}get model(){return this._models[this.mode]}get mounted(){return!!this.el}get mode(){return this.options.brush.mode||"stylus"}set mode(t){this._models[this.mode].onUnselected(),this.options.brush.mode=t,this.model.onSelected(this.el)}get brush(){return this.options.brush}set brush(t){this.options.brush=t}resolveSelector(t){return typeof t=="string"?document.querySelector(t):t||null}mount(t,e,s=window){if(this.el)throw new Error("[drauu] already mounted, unmount previous target first");if(this.el=this.resolveSelector(t),!this.el)throw new Error("[drauu] target element not found");if(this.el.tagName.toLocaleLowerCase()!=="svg")throw new Error("[drauu] can only mount to a SVG element");if(!this.el.createSVGPoint)throw new Error("[drauu] SVG element must be create by document.createElementNS('http://www.w3.org/2000/svg', 'svg')");this.svgPoint=this.el.createSVGPoint();const i=this.resolveSelector(e)||this.el,n=this.eventStart.bind(this),a=this.eventMove.bind(this),l=this.eventEnd.bind(this),o=this.eventKeyboard.bind(this);i.addEventListener("pointerdown",n,{passive:!1}),s.addEventListener("pointermove",a,{passive:!1}),s.addEventListener("pointerup",l,{passive:!1}),s.addEventListener("pointercancel",l,{passive:!1}),s.addEventListener("keydown",o,!1),s.addEventListener("keyup",o,!1),this._disposables.push(()=>{i.removeEventListener("pointerdown",n),s.removeEventListener("pointermove",a),s.removeEventListener("pointerup",l),s.removeEventListener("pointercancel",l),s.removeEventListener("keydown",o,!1),s.removeEventListener("keyup",o,!1)}),this._emitter.emit("mounted")}unmount(){this._disposables.forEach(t=>t()),this._disposables.length=0,this._elements.length=0,this.el=null,this._emitter.emit("unmounted")}on(t,e){return this._emitter.on(t,e)}undo(){return!this.canUndo()||this.drawing?!1:(this._opStack[--this._opIndex].undo(),this._emitter.emit("changed"),!0)}redo(){return!this.canRedo()||this.drawing?!1:(this._opStack[this._opIndex++].redo(),this._emitter.emit("changed"),!0)}canRedo(){return this._opIndex0}eventMove(t){!this.acceptsInput(t)||!this.drawing||this.model._eventMove(t)&&(t.stopPropagation(),t.preventDefault(),this._emitter.emit("changed"))}eventStart(t){this.acceptsInput(t)&&(t.stopPropagation(),t.preventDefault(),this._currentNode&&this.cancel(),this.drawing=!0,this._originalPointerId=t.pointerId,this._emitter.emit("start"),this._currentNode=this.model._eventDown(t),this._currentNode&&this.mode!=="eraseLine"&&this.el.appendChild(this._currentNode),this._emitter.emit("changed"))}eventEnd(t){if(!this.acceptsInput(t)||!this.drawing)return;const e=this.model._eventUp(t);if(!e)this.cancel();else if(e===!0){const s=this._currentNode;this._appendNode(s),this.commit({undo:()=>this._removeNode(s),redo:()=>this._restoreNode(s)})}else this.commit(e);this.drawing=!1,this._emitter.emit("end"),this._emitter.emit("changed"),this._originalPointerId=null}acceptsInput(t){return(!this.options.acceptsInputTypes||this.options.acceptsInputTypes.includes(t.pointerType))&&!(this._originalPointerId&&this._originalPointerId!==t.pointerId)}eventKeyboard(t){this.shiftPressed===t.shiftKey&&this.altPressed===t.altKey||(this.shiftPressed=t.shiftKey,this.altPressed=t.altKey,this.model.point&&this.model.onMove(this.model.point)&&this._emitter.emit("changed"))}commit(t){this._opStack.length=this._opIndex,this._opStack.push(t),this._opIndex++;const e=this._currentNode;this._currentNode=void 0,this._emitter.emit("committed",e)}clear(){this._opStack.length=0,this._opIndex=0,this.cancel(),this.el.innerHTML="",this._emitter.emit("changed")}cancel(){this._currentNode&&(this.el.removeChild(this._currentNode),this._currentNode=void 0,this._emitter.emit("canceled"))}dump(){return this.el.innerHTML}load(t){this.clear(),this.el.innerHTML=t}_appendNode(t){const e=this._elements.at(-1);e?e.after(t):this.el.append(t);const s=this._elements.push(t)-1;t.dataset.drauu_index=s.toString()}_removeNode(t){t.remove(),this._elements[+t.dataset.drauu_index]=null}_restoreNode(t){const e=+t.dataset.drauu_index;this._elements[e]=t;for(let s=e-1;s>=0;s--){const i=this._elements[s];if(i){i.after(t);return}}this.el.prepend(t)}};function Jd(t){return new Xd(t)}const bf=U(!1),xf=U(!1),$f=U(!1),Qd=U(!1),Af=U(!0),Sf=er({xs:460,...ar}),Ai=sr(),Mf=ir(),Ef=d(()=>Ai.height.value-Ai.width.value/Zi>120),Cf=nr(rs?document.body:null),Cs=rr(),tp=d(()=>{var t,e;return["INPUT","TEXTAREA"].includes(((t=Cs.value)==null?void 0:t.tagName)||"")||((e=Cs.value)==null?void 0:e.classList.contains("CodeMirror-code"))}),Tf=d(()=>{var t;return["BUTTON","A"].includes(((t=Cs.value)==null?void 0:t.tagName)||"")});et("slidev-camera","default",{listenToStorageChanges:!1});et("slidev-mic","default",{listenToStorageChanges:!1});const Df=et("slidev-scale",0),Pf=et("slidev-presenter-cursor",!0,{listenToStorageChanges:!1}),Lf=et("slidev-show-editor",!1,{listenToStorageChanges:!1}),Of=et("slidev-editor-vertical",!1,{listenToStorageChanges:!1});et("slidev-editor-width",rs?window.innerWidth*.4:318,{listenToStorageChanges:!1});et("slidev-editor-height",rs?window.innerHeight*.4:300,{listenToStorageChanges:!1});const Je=et("slidev-presenter-font-size",1,{listenToStorageChanges:!1}),Re=et("slidev-presenter-layout",1,{listenToStorageChanges:!1});function Bf(){Re.value=Re.value+1,Re.value>2&&(Re.value=1)}function If(){Je.value=Math.min(2,Je.value+.1)}function Ff(){Je.value=Math.max(.5,Je.value-.1)}const Nf=ji(Qd),Ts=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93","#ffffff","#000000"],Ds=et("slidev-drawing-enabled",!1),Rf=et("slidev-drawing-pinned",!1),ep=U(!1),sp=U(!1),ip=U(!1),Qe=U(!1),ts=lr(et("slidev-drawing-brush",{color:Ts[0],size:4,mode:"stylus"})),Si=U("stylus"),yn=d(()=>N.drawings.syncAll||le.value);let Oe=!1;const Se=d({get(){return Si.value},set(t){Si.value=t,t==="arrow"?(Z.mode="line",ts.arrowEnd=!0):(Z.mode=t,ts.arrowEnd=!1)}}),np=b({brush:ts,acceptsInputTypes:d(()=>Ds.value&&(!N.drawings.presenterOnly||le.value)?void 0:["pen"]),coordinateTransform:!1}),Z=Hs(Jd(np));function rp(){Z.clear(),yn.value&&Qi(V.value,"")}function Ws(){var t;sp.value=Z.canRedo(),ep.value=Z.canUndo(),ip.value=!!((t=Z.el)!=null&&t.children.length)}function ap(t){Oe=!0;const e=tn[t||V.value];e!=null?Z.load(e):Z.clear(),Ws(),Oe=!1}Z.on("changed",()=>{if(Ws(),!Oe){const t=Z.dump(),e=V.value;(tn[e]||"")!==t&&yn.value&&Qi(e,Z.dump())}});wa(t=>{Oe=!0,t[V.value]!=null&&Z.load(t[V.value]||""),Oe=!1,Ws()});De(()=>{_e(V,()=>{Z.mounted&&ap()},{immediate:!0})});Z.on("start",()=>Qe.value=!0);Z.on("end",()=>Qe.value=!1);window.addEventListener("keydown",t=>{if(!Ds.value||tp.value)return;const e=!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.metaKey;let s=!0;t.code==="KeyZ"&&(t.ctrlKey||t.metaKey)?t.shiftKey?Z.redo():Z.undo():t.code==="Escape"?Ds.value=!1:t.code==="KeyL"&&e?Se.value="line":t.code==="KeyA"&&e?Se.value="arrow":t.code==="KeyS"&&e?Se.value="stylus":t.code==="KeyR"&&e?Se.value="rectangle":t.code==="KeyE"&&e?Se.value="ellipse":t.code==="KeyC"&&e?rp():t.code.startsWith("Digit")&&e&&+t.code[5]<=Ts.length?ts.color=Ts[+t.code[5]-1]:s=!1,s&&(t.preventDefault(),t.stopPropagation())},!1);const Ps=U(0);De(()=>{nt.afterEach(async()=>{await De(),Ps.value+=1})});const vn=U(0),as=U(0),mt=d(()=>nt.currentRoute.value),lp=d(()=>mt.value.query.print!==void 0),op=d(()=>mt.value.query.print==="clicks"),Hf=d(()=>mt.value.query.embedded!==void 0),le=d(()=>mt.value.path.startsWith("/presenter")),cp=d(()=>mt.value.path.startsWith("/notes")),hp=d(()=>mt.value.query.password),Uf=d(()=>!le.value&&(!N.remote||hp.value===N.remote)),Mi=xd("clicks","0"),ke=d({get(){if(te.value.disabled)return $s;let t=+(Mi.value||0);return Number.isNaN(t)&&(t=0),t},set(t){Mi.value=t.toString()}}),jf=d(()=>Y.length),up=d(()=>mt.value.path),V=d(()=>Number.parseInt(up.value.split(/\//g).slice(-1)[0])||1);d(()=>ls(V.value));const Zt=d(()=>Y.find(t=>t.path===`${V.value}`)),zf=d(()=>{var t,e,s;return(s=(e=(t=Zt.value)==null?void 0:t.meta)==null?void 0:e.slide)==null?void 0:s.id});d(()=>{var t,e;return((e=(t=Zt.value)==null?void 0:t.meta)==null?void 0:e.layout)||(V.value===1?"cover":"default")});const qf=d(()=>Y.find(t=>t.path===`${Math.min(Y.length,V.value+1)}`)),dp=d(()=>Y.find(t=>t.path===`${Math.max(1,V.value-1)}`)),te=d(()=>Ca(Zt.value)),Vs=d(()=>te.value.current),Be=d(()=>te.value.total),Wf=d(()=>V.valueV.value>1||Vs.value>0),pp=d(()=>Y.filter(t=>{var e,s;return(s=(e=t.meta)==null?void 0:e.slide)==null?void 0:s.title}).reduce((t,e)=>(Zs(t,e),t),[])),fp=d(()=>Xs(pp.value,Zt.value));d(()=>Js(fp.value));const Gf=d(()=>yp(vn.value,Zt.value,dp.value));_e(Zt,(t,e)=>{vn.value=Number(t==null?void 0:t.path)-Number(e==null?void 0:e.path)});async function wn(){as.value=1,Be.value<=ke.value?await Gs():ke.value+=1}async function bn(){as.value=-1,ke.value<=0?await Ks():ke.value-=1}function ls(t){return le.value?`/presenter/${t}`:`/${t}`}async function Gs(){as.value=1,V.value.3||a>75?s.value==="left"?wn():bn():(l/window.innerHeight>.4||l>200)&&(s.value==="down"?Ks():Gs())}})}async function gp(){const{saveAs:t}=await Pe(()=>import("./modules/file-saver-CvNQQnEe.js").then(e=>e.F),__vite__mapDeps([]));t(typeof N.download=="string"?N.download:N.exportFilename?`${N.exportFilename}.pdf`:"/sa2024/05-restful/slidev-exported.pdf",`${N.title}.pdf`)}async function mp(t){var e,s;if(t==null){const i=(s=(e=Zt.value)==null?void 0:e.meta)==null?void 0:s.slide;if(!i)return!1;t=`${i.filepath}:${i.start}`}return await fetch(`/__open-in-editor?file=${encodeURIComponent(t)}`),!0}function Zs(t,e,s=1){var n,a,l,o,c,h,u;const i=(a=(n=e.meta)==null?void 0:n.slide)==null?void 0:a.level;i&&i>s&&t.length>0?Zs(t[t.length-1].children,e,s+1):t.push({children:[],level:s,path:e.path,hideInToc:!!((c=(o=(l=e.meta)==null?void 0:l.slide)==null?void 0:o.frontmatter)!=null&&c.hideInToc),title:(u=(h=e.meta)==null?void 0:h.slide)==null?void 0:u.title})}function Xs(t,e,s=!1,i){return t.map(n=>{const a={...n,active:n.path===(e==null?void 0:e.path),hasActiveParent:s};return a.children.length>0&&(a.children=Xs(a.children,e,a.active||a.hasActiveParent,a)),i&&(a.active||a.activeParent)&&(i.activeParent=!0),a})}function Js(t,e=1){return t.filter(s=>!s.hideInToc).map(s=>({...s,children:Js(s.children,e+1)}))}const kp={"slide-left":"slide-left | slide-right","slide-right":"slide-right | slide-left","slide-up":"slide-up | slide-down","slide-down":"slide-down | slide-up"};function _p(t,e=!1){if(!t||(typeof t=="string"&&(t={name:t}),!t.name))return;let s=t.name.includes("|")?t.name:kp[t.name]||t.name;if(s.includes("|")){const[i,n]=s.split("|").map(a=>a.trim());s=e?n:i}if(s)return{...t,name:s}}function yp(t,e,s){var n,a;let i=t>0?(n=s==null?void 0:s.meta)==null?void 0:n.transition:(a=e==null?void 0:e.meta)==null?void 0:a.transition;return i||(i=N.transition),_p(i,t<0)}function vp(){const t=N.titleTemplate.replace("%s",N.title||"Slidev");ra({title:t,htmlAttrs:N.htmlAttrs}),ma(`${t} - shared`),va(`${t} - drawings`);const e=`${location.origin}_${en()}`;function s(){cp.value||!le.value&&!Ma.includes(location.host.split(":")[0])||(le.value?(we("page",+V.value),we("clicks",te.value.current)):(we("viewerPage",+V.value),we("viewerClicks",te.value.current)),we("lastUpdate",{id:e,type:le.value?"presenter":"viewer",time:new Date().getTime()}))}nt.afterEach(s),_e(te,s),ka(i=>{var a;nt.currentRoute.value.path.match(/^\/(\d+|presenter)\/?/)&&((a=i.lastUpdate)==null?void 0:a.type)==="presenter"&&(+i.page!=+V.value||+te.value.current!=+i.clicks)&&(fn.value=!1,nt.replace({path:ls(i.page),query:{...nt.currentRoute.value.query,clicks:i.clicks||0}}))})}const wp=ns({__name:"App",setup(t){return vp(),ee(()=>{for(const[e,s]of Object.entries(pa.value))document.body.style.setProperty(e,s.toString())}),(e,s)=>{const i=hr("RouterView");return S(),T(i)}}}),bp=E(wp,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/App.vue"]]);function xp(t){function e(){document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)}e(),window.addEventListener("resize",e),t.app.use(ur),t.app.use(mr)}function xn(t,e,s){var i;return((i=t.instance)==null?void 0:i.$).provides[e]??s}function $p(){return{install(t){t.directive("click",{name:"v-click",mounted(e,s){const i=Ve(e,s,s.value);if(i==null)return;e.classList.toggle(Ce,!0);const n=Array.isArray(i.clicks)?i.clicks:[i.clicks,void 0];e.dataset.slidevClicksStart=String(n[0]),n[1]!=null&&(e.dataset.slidevClicksEnd=String(n[1])),ee(()=>{const a=i.isActive.value,l=i.isCurrent.value,o=a&&!l;i.flagHide?(e.classList.toggle(i.flagFade?be:pe,a),e.classList.toggle(ps,a)):e.classList.toggle(i.flagFade?be:pe,!a),e.classList.toggle(fs,l),e.classList.toggle(gs,o)})},unmounted:ks}),t.directive("after",{name:"v-after",mounted(e,s){const i=Ve(e,s,s.value,!0);i!=null&&(e.classList.toggle(Ce,!0),ee(()=>{const n=i.isActive.value,a=i.isCurrent.value,l=n&&!a;i.flagHide?(e.classList.toggle(i.flagFade?be:pe,n),e.classList.toggle(ps,n)):e.classList.toggle(i.flagFade?be:pe,!n),e.classList.toggle(fs,a),e.classList.toggle(gs,l)}))},unmounted:ks}),t.directive("click-hide",{name:"v-click-hide",mounted(e,s){const i=Ve(e,s,s.value,!1,!0);i!=null&&(e.classList.toggle(Ce,!0),ee(()=>{const n=i.isActive.value,a=i.isCurrent.value,l=n&&!a;e.classList.toggle(i.flagFade?be:pe,n),e.classList.toggle(ps,n),e.classList.toggle(fs,a),e.classList.toggle(gs,l)}))},unmounted:ks})}}}function ms(t,e){return Array.isArray(t)?t[0]<=e&&ems(c,a.current)),isCurrent:d(()=>Ap(c,a.current)),isShown:d(()=>n?!ms(c,a.current):ms(c,a.current)),flagFade:l,flagHide:n};return a.register(t,u),u}function ks(t,e){var i;t.classList.toggle(Ce,!1);const s=(i=xn(e,js))==null?void 0:i.value;s==null||s.unregister(t)}function $n(){return Math.floor(Math.random()*2**31)}class Sp{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}function Ls(t,e,s){if(t&&t.length){const[i,n]=e,a=Math.PI/180*s,l=Math.cos(a),o=Math.sin(a);for(const c of t){const[h,u]=c;c[0]=(h-i)*l-(u-n)*o+i,c[1]=(h-i)*o+(u-n)*l+n}}}function Mp(t,e,s){const i=[];t.forEach(n=>i.push(...n)),Ls(i,e,s)}function Ep(t,e){return t[0]===e[0]&&t[1]===e[1]}function Cp(t,e,s,i=1){const n=s,a=Math.max(e,.1),l=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(n)for(const h of l)Ls(h,o,n);const c=Tp(l,a,i);if(n){for(const h of l)Ls(h,o,-n);Mp(c,o,-n)}return c}function Tp(t,e,s){const i=[];for(const h of t){const u=[...h];Ep(u[0],u[u.length-1])||u.push([u[0][0],u[0][1]]),u.length>2&&i.push(u)}const n=[];e=Math.max(e,.1);const a=[];for(const h of i)for(let u=0;uh.yminu.ymin?1:h.xu.x?1:h.ymax===u.ymax?0:(h.ymax-u.ymax)/Math.abs(h.ymax-u.ymax)),!a.length)return n;let l=[],o=a[0].ymin,c=0;for(;l.length||a.length;){if(a.length){let h=-1;for(let p=0;po);p++)h=p;a.splice(0,h+1).forEach(p=>{l.push({s:o,edge:p})})}if(l=l.filter(h=>!(h.edge.ymax<=o)),l.sort((h,u)=>h.edge.x===u.edge.x?0:(h.edge.x-u.edge.x)/Math.abs(h.edge.x-u.edge.x)),(s!==1||c%e===0)&&l.length>1)for(let h=0;h=l.length)break;const p=l[h].edge,g=l[u].edge;n.push([[Math.round(p.x),o],[Math.round(g.x),o]])}o+=s,l.forEach(h=>{h.edge.x=h.edge.x+s*h.edge.islope}),c++}return n}function Fe(t,e){var s;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=e.strokeWidth*4),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&(((s=e.randomizer)===null||s===void 0?void 0:s.next())||Math.random())>.7&&(a=n),Cp(t,n,i,a||1)}class Qs{constructor(e){this.helper=e}fillPolygons(e,s){return this._fillPolygons(e,s)}_fillPolygons(e,s){const i=Fe(e,s);return{type:"fillSketch",ops:this.renderLines(i,s)}}renderLines(e,s){const i=[];for(const n of e)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],s));return i}}function os(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class Dp extends Qs{fillPolygons(e,s){let i=s.hachureGap;i<0&&(i=s.strokeWidth*4),i=Math.max(i,.1);const n=Object.assign({},s,{hachureGap:i}),a=Fe(e,n),l=Math.PI/180*s.hachureAngle,o=[],c=i*.5*Math.cos(l),h=i*.5*Math.sin(l);for(const[p,g]of a)os([p,g])&&o.push([[p[0]-c,p[1]+h],[...g]],[[p[0]+c,p[1]-h],[...g]]);return{type:"fillSketch",ops:this.renderLines(o,s)}}}class Pp extends Qs{fillPolygons(e,s){const i=this._fillPolygons(e,s),n=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),a=this._fillPolygons(e,n);return i.ops=i.ops.concat(a.ops),i}}class Lp{constructor(e){this.helper=e}fillPolygons(e,s){s=Object.assign({},s,{hachureAngle:0});const i=Fe(e,s);return this.dotsOnLines(i,s)}dotsOnLines(e,s){const i=[];let n=s.hachureGap;n<0&&(n=s.strokeWidth*4),n=Math.max(n,.1);let a=s.fillWeight;a<0&&(a=s.strokeWidth/2);const l=n/4;for(const o of e){const c=os(o),h=c/n,u=Math.ceil(h)-1,p=c-u*n,g=(o[0][0]+o[1][0])/2-n/4,f=Math.min(o[0][1],o[1][1]);for(let m=0;m{const o=os(l),c=Math.floor(o/(i+n)),h=(o+n-c*(i+n))/2;let u=l[0],p=l[1];u[0]>p[0]&&(u=l[1],p=l[0]);const g=Math.atan((p[1]-u[1])/(p[0]-u[0]));for(let f=0;f{const l=os(a),o=Math.round(l/(2*s));let c=a[0],h=a[1];c[0]>h[0]&&(c=a[1],h=a[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let p=0;pu%2?h+s:h+e);a.push({key:"C",data:c}),e=c[4],s=c[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],s=o[3];break;case"q":{const c=o.map((h,u)=>u%2?h+s:h+e);a.push({key:"Q",data:c}),e=c[2],s=c[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],s=o[6];break;case"a":e+=o[5],s+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,s]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),s=o[0];break;case"v":s+=o[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],s=o[3];break;case"s":{const c=o.map((h,u)=>u%2?h+s:h+e);a.push({key:"S",data:c}),e=c[2],s=c[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],s=o[1];break;case"t":e+=o[0],s+=o[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,s=n;break}return a}function Mn(t){const e=[];let s="",i=0,n=0,a=0,l=0,o=0,c=0;for(const{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[i,n]=u,[a,l]=u;break;case"C":e.push({key:"C",data:[...u]}),i=u[4],n=u[5],o=u[2],c=u[3];break;case"L":e.push({key:"L",data:[...u]}),[i,n]=u;break;case"H":i=u[0],e.push({key:"L",data:[i,n]});break;case"V":n=u[0],e.push({key:"L",data:[i,n]});break;case"S":{let p=0,g=0;s==="C"||s==="S"?(p=i+(i-o),g=n+(n-c)):(p=i,g=n),e.push({key:"C",data:[p,g,...u]}),o=u[0],c=u[1],i=u[2],n=u[3];break}case"T":{const[p,g]=u;let f=0,m=0;s==="Q"||s==="T"?(f=i+(i-o),m=n+(n-c)):(f=i,m=n);const k=i+2*(f-i)/3,y=n+2*(m-n)/3,w=p+2*(f-p)/3,$=g+2*(m-g)/3;e.push({key:"C",data:[k,y,w,$,p,g]}),o=f,c=m,i=p,n=g;break}case"Q":{const[p,g,f,m]=u,k=i+2*(p-i)/3,y=n+2*(g-n)/3,w=f+2*(p-f)/3,$=m+2*(g-m)/3;e.push({key:"C",data:[k,y,w,$,f,m]}),o=p,c=g,i=f,n=m;break}case"A":{const p=Math.abs(u[0]),g=Math.abs(u[1]),f=u[2],m=u[3],k=u[4],y=u[5],w=u[6];p===0||g===0?(e.push({key:"C",data:[i,n,y,w,y,w]}),i=y,n=w):(i!==y||n!==w)&&(En(i,n,y,w,p,g,f,m,k).forEach(function(M){e.push({key:"C",data:M})}),i=y,n=w);break}case"Z":e.push({key:"Z",data:[]}),i=a,n=l;break}s=h}return e}function Rp(t){return Math.PI*t/180}function Me(t,e,s){const i=t*Math.cos(s)-e*Math.sin(s),n=t*Math.sin(s)+e*Math.cos(s);return[i,n]}function En(t,e,s,i,n,a,l,o,c,h){const u=Rp(l);let p=[],g=0,f=0,m=0,k=0;if(h)[g,f,m,k]=h;else{[t,e]=Me(t,e,-u),[s,i]=Me(s,i,-u);const X=(t-s)/2,I=(e-i)/2;let q=X*X/(n*n)+I*I/(a*a);q>1&&(q=Math.sqrt(q),n=q*n,a=q*a);const Xt=o===c?-1:1,ct=n*n,C=a*a,W=ct*C-ct*I*I-C*X*X,F=ct*I*I+C*X*X,R=Xt*Math.sqrt(Math.abs(W/F));m=R*n*I/a+(t+s)/2,k=R*-a*X/n+(e+i)/2,g=Math.asin(parseFloat(((e-k)/a).toFixed(9))),f=Math.asin(parseFloat(((i-k)/a).toFixed(9))),tf&&(g=g-Math.PI*2),!c&&f>g&&(f=f-Math.PI*2)}let y=f-g;if(Math.abs(y)>Math.PI*120/180){const X=f,I=s,q=i;c&&f>g?f=g+Math.PI*120/180*1:f=g+Math.PI*120/180*-1,s=m+n*Math.cos(f),i=k+a*Math.sin(f),p=En(s,i,I,q,n,a,l,0,c,[f,X,m,k])}y=f-g;const w=Math.cos(g),$=Math.sin(g),M=Math.cos(f),j=Math.sin(f),H=Math.tan(y/4),z=4/3*n*H,ot=4/3*a*H,K=[t,e],st=[t+z*$,e-ot*w],ft=[s+z*j,i-ot*M],gt=[s,i];if(st[0]=2*K[0]-st[0],st[1]=2*K[1]-st[1],h)return[st,ft,gt].concat(p);{p=[st,ft,gt].concat(p);const X=[];for(let I=0;I2){const n=[];for(let a=0;aMath.PI*2&&(f=0,m=Math.PI*2);const k=Math.PI*2/c.curveStepCount,y=Math.min(k/2,(m-f)/2),w=Li(y,h,u,p,g,f,m,1,c);if(!c.disableMultiStroke){const $=Li(y,h,u,p,g,f,m,1.5,c);w.push(...$)}return l&&(o?w.push(...se(h,u,h+p*Math.cos(f),u+g*Math.sin(f),c),...se(h,u,h+p*Math.cos(m),u+g*Math.sin(m),c)):w.push({op:"lineTo",data:[h,u]},{op:"lineTo",data:[h+p*Math.cos(f),u+g*Math.sin(f)]})),{type:"path",ops:w}}function Ti(t,e){const s=Mn(Sn(ti(t))),i=[];let n=[0,0],a=[0,0];for(const{key:l,data:o}of s)switch(l){case"M":{a=[o[0],o[1]],n=[o[0],o[1]];break}case"L":i.push(...se(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[c,h,u,p,g,f]=o;i.push(...Vp(c,h,u,p,g,f,a,e)),a=[g,f];break}case"Z":i.push(...se(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break}return{type:"path",ops:i}}function ys(t,e){const s=[];for(const i of t)if(i.length){const n=e.maxRandomnessOffset||0,a=i.length;if(a>2){s.push({op:"move",data:[i[0][0]+x(n,e),i[0][1]+x(n,e)]});for(let l=1;lMath.PI*2&&(p=0,g=Math.PI*2);const f=(g-p)/l.curveStepCount,m=[];for(let k=p;k<=g;k=k+f)m.push([o+h*Math.cos(k),c+u*Math.sin(k)]);return m.push([o+h*Math.cos(g),c+u*Math.sin(g)]),m.push([o,c]),fe([m],l)}function zp(t,e){return x(t,e)}function qp(t,e,s){return es(t,e,s)}function Wp(t,e,s,i,n){return se(t,e,s,i,n,!0)}function Di(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Dn(t){return t.randomizer||(t.randomizer=new Sp(t.seed||0)),t.randomizer.next()}function es(t,e,s,i=1){return s.roughness*i*(Dn(s)*(e-t)+t)}function x(t,e,s=1){return es(-t,t,e,s)}function se(t,e,s,i,n,a=!1){const l=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=Fs(t,e,s,i,n,!0,!1);if(l)return o;const c=Fs(t,e,s,i,n,!0,!0);return o.concat(c)}function Fs(t,e,s,i,n,a,l){const o=Math.pow(t-s,2)+Math.pow(e-i,2),c=Math.sqrt(o);let h=1;c<200?h=1:c>500?h=.4:h=-.0016668*c+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>o&&(u=c/10);const p=u/2,g=.2+Dn(n)*.2;let f=n.bowing*n.maxRandomnessOffset*(i-e)/200,m=n.bowing*n.maxRandomnessOffset*(t-s)/200;f=x(f,n,h),m=x(m,n,h);const k=[],y=()=>x(p,n,h),w=()=>x(u,n,h),$=n.preserveVertices;return a&&(l?k.push({op:"move",data:[t+($?0:y()),e+($?0:y())]}):k.push({op:"move",data:[t+($?0:x(u,n,h)),e+($?0:x(u,n,h))]})),l?k.push({op:"bcurveTo",data:[f+t+(s-t)*g+y(),m+e+(i-e)*g+y(),f+t+2*(s-t)*g+y(),m+e+2*(i-e)*g+y(),s+($?0:y()),i+($?0:y())]}):k.push({op:"bcurveTo",data:[f+t+(s-t)*g+w(),m+e+(i-e)*g+w(),f+t+2*(s-t)*g+w(),m+e+2*(i-e)*g+w(),s+($?0:w()),i+($?0:w())]}),k}function Ue(t,e,s){if(!t.length)return[];const i=[];i.push([t[0][0]+x(e,s),t[0][1]+x(e,s)]),i.push([t[0][0]+x(e,s),t[0][1]+x(e,s)]);for(let n=1;n3){const a=[],l=1-s.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&n.push(a):n.push(a),n.push(t[e+3])}else{const l=t[e+0],o=t[e+1],c=t[e+2],h=t[e+3],u=re(l,o,.5),p=re(o,c,.5),g=re(c,h,.5),f=re(u,p,.5),m=re(p,g,.5),k=re(f,m,.5);Ns([l,u,f,k],0,s,n),Ns([k,m,g,h],0,s,n)}return n}function Zp(t,e){return is(t,0,t.length,e)}function is(t,e,s,i,n){const a=n||[],l=t[e],o=t[s-1];let c=0,h=1;for(let u=e+1;uc&&(c=p,h=u)}return Math.sqrt(c)>i?(is(t,e,h+1,i,a),is(t,h,s,i,a)):(a.length||a.push(l),a.push(o)),a}function Rs(t,e=.15,s){const i=[],n=(t.length-1)/3;for(let a=0;a0?is(i,0,i.length,s):i}function Xp(t,e,s){const i=ti(t),n=Mn(Sn(i)),a=[];let l=[],o=[0,0],c=[];const h=()=>{c.length>=4&&l.push(...Rs(c,e)),c=[]},u=()=>{h(),l.length&&(a.push(l),l=[])};for(const{key:g,data:f}of n)switch(g){case"M":u(),o=[f[0],f[1]],l.push(o);break;case"L":h(),l.push([f[0],f[1]]);break;case"C":if(!c.length){const m=l.length?l[l.length-1]:o;c.push([m[0],m[1]])}c.push([f[0],f[1]]),c.push([f[2],f[3]]),c.push([f[4],f[5]]);break;case"Z":h(),l.push([o[0],o[1]]);break}if(u(),!s)return a;const p=[];for(const g of a){const f=Zp(g,s);f.length&&p.push(f)}return p}const it="none";class Jp{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return $n()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,s,i){return{shape:e,sets:s||[],options:i||this.defaultOptions}}line(e,s,i,n,a){const l=this._o(a);return this._d("line",[rt(e,s,i,n,l)],l)}rectangle(e,s,i,n,a){const l=this._o(a),o=[],c=Cn(e,s,i,n,l);if(l.fill){const h=[[e,s],[e+i,s],[e+i,s+n],[e,s+n]];l.fillStyle==="solid"?o.push(ys([h],l)):o.push(fe([h],l))}return l.stroke!==it&&o.push(c),this._d("rectangle",o,l)}ellipse(e,s,i,n,a){const l=this._o(a),o=[],c=Tn(i,n,l),h=Is(e,s,l,c);if(l.fill)if(l.fillStyle==="solid"){const u=Is(e,s,l,c).opset;u.type="fillPath",o.push(u)}else o.push(fe([h.estimatedPoints],l));return l.stroke!==it&&o.push(h.opset),this._d("ellipse",o,l)}circle(e,s,i,n){const a=this.ellipse(e,s,i,i,n);return a.shape="circle",a}linearPath(e,s){const i=this._o(s);return this._d("linearPath",[Te(e,!1,i)],i)}arc(e,s,i,n,a,l,o=!1,c){const h=this._o(c),u=[],p=Ci(e,s,i,n,a,l,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const g=Object.assign({},h);g.disableMultiStroke=!0;const f=Ci(e,s,i,n,a,l,!0,!1,g);f.type="fillPath",u.push(f)}else u.push(jp(e,s,i,n,a,l,h));return h.stroke!==it&&u.push(p),this._d("arc",u,h)}curve(e,s){const i=this._o(s),n=[],a=Ei(e,i);if(i.fill&&i.fill!==it)if(i.fillStyle==="solid"){const l=Ei(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else{const l=[],o=e;if(o.length){const h=typeof o[0][0]=="number"?[o]:o;for(const u of h)u.length<3?l.push(...u):u.length===3?l.push(...Rs(Oi([u[0],u[0],u[1],u[2]]),10,(1+i.roughness)/2)):l.push(...Rs(Oi(u),10,(1+i.roughness)/2))}l.length&&n.push(fe([l],i))}return i.stroke!==it&&n.push(a),this._d("curve",n,i)}polygon(e,s){const i=this._o(s),n=[],a=Te(e,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(ys([e],i)):n.push(fe([e],i))),i.stroke!==it&&n.push(a),this._d("polygon",n,i)}path(e,s){const i=this._o(s),n=[];if(!e)return this._d("path",n,i);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==it,l=i.stroke!==it,o=!!(i.simplification&&i.simplification<1),c=o?4-4*(i.simplification||1):(1+i.roughness)/2,h=Xp(e,1,c),u=Ti(e,i);if(a)if(i.fillStyle==="solid")if(h.length===1){const p=Ti(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else n.push(ys(h,i));else n.push(fe(h,i));return l&&(o?h.forEach(p=>{n.push(Te(p,!1,i))}):n.push(u)),this._d("path",n,i)}opsToPath(e,s){let i="";for(const n of e.ops){const a=typeof s=="number"&&s>=0?n.data.map(l=>+l.toFixed(s)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `;break}}return i.trim()}toPaths(e){const s=e.sets||[],i=e.options||this.defaultOptions,n=[];for(const a of s){let l=null;switch(a.type){case"path":l={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:it};break;case"fillPath":l={d:this.opsToPath(a),stroke:it,strokeWidth:0,fill:i.fill||it};break;case"fillSketch":l=this.fillSketch(a,i);break}l&&n.push(l)}return n}fillSketch(e,s){let i=s.fillWeight;return i<0&&(i=s.strokeWidth/2),{d:this.opsToPath(e),stroke:s.fill||it,strokeWidth:i,fill:it}}_mergedShape(e){return e.filter((s,i)=>i===0?!0:s.op!=="move")}}const Pn="http://www.w3.org/2000/svg",Qp=800;let vs=null;function tf(){return vs||(vs=new Jp().defaultOptions),vs}function ws(t,e,s){return{...tf(),maxRandomnessOffset:2,roughness:t==="highlight"?3:1.5,bowing:1,stroke:"#000",strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:t!=="double",disableMultiStrokeFill:!1,seed:e,...s}}function ef(t){const e=t.padding;if(e||e===0){if(typeof e=="number")return[e,e,e,e];if(Array.isArray(e)){const s=e;if(s.length)switch(s.length){case 4:return[...s];case 1:return[s[0],s[0],s[0],s[0]];case 2:return[...s,...s];case 3:return[...s,s[1]];default:return[s[0],s[1],s[2],s[3]]}}}return[5,5,5,5]}function sf(t,e,s,i,n,a){const l=[];let o=s.strokeWidth||2;const c=ef(s),h=s.animate===void 0?!0:!!s.animate,u=s.iterations||2,p=s.rtl?1:0,g=ws("single",a,s);switch(s.type){case"underline":{const f=e.y+e.h+c[2];for(let m=p;m$.setAttribute(M,j);for(const $ of f){const M=document.createElementNS(Pn,"path");if(w(M,"d",$),w(M,"fill","none"),w(M,"stroke",s.color||"currentColor"),w(M,"stroke-width",`${o}`),s.opacity!==void 0&&w(M,"style",`opacity:${s.opacity}`),h){const j=M.getTotalLength();m.push(j),y+=j}t.appendChild(M),k.push(M)}if(h){let $=0;for(let M=0;MsetTimeout(e,t))}function nf(t){const e=[];for(const s of t){let i="";for(const n of s.ops){const a=n.data;switch(n.op){case"move":i.trim()&&e.push(i.trim()),i=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `;break}}i.trim()&&e.push(i.trim())}return e}function rf(){if(!window.__rno_kf_s){const t=window.__rno_kf_s=document.createElement("style");t.textContent="@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }",document.head.appendChild(t)}}var af=Object.defineProperty,lf=(t,e,s)=>e in t?af(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ht=(t,e,s)=>(lf(t,typeof e!="symbol"?e+"":e,s),s);class of{constructor(e,s){ht(this,"_state","unattached"),ht(this,"_config"),ht(this,"_resizing",!1),ht(this,"_ro"),ht(this,"_seed",$n()),ht(this,"_e"),ht(this,"_svg"),ht(this,"_lastSizes",[]),ht(this,"_animationDelay",0),ht(this,"_resizeListener",()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state==="showing"&&this.haveRectsChanged()&&this.show()},400))}),ht(this,"pendingRefresh"),this._e=e,this._config=JSON.parse(JSON.stringify(s)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,s){this._config[e]!==s&&(this._config[e]=s,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" ")))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state==="unattached"&&this._e.parentElement){rf();const e=this._svg=document.createElementNS(Pn,"svg");e.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" "));const s=e.style;s.position="absolute",s.top="0",s.left="0",s.overflow="visible",s.pointerEvents="none",s.width="100px",s.height="100px";const i=this._config.type==="highlight";if(this._e.insertAdjacentElement(i?"beforebegin":"afterend",e),this._state="not-showing",i){const n=window.getComputedStyle(this._e).position;(!n||n==="static")&&(this._e.style.position="relative")}this.attachListeners()}}detachListeners(){window.removeEventListener("resize",this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener("resize",this._resizeListener,{passive:!0}),!this._ro&&"ResizeObserver"in window&&(this._ro=new window.ResizeObserver(e=>{for(const s of e)s.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){const e=this.rects();if(e.length===this._lastSizes.length){for(let s=0;sMath.round(n)===Math.round(a);return i(e.x,s.x)&&i(e.y,s.y)&&i(e.w,s.w)&&i(e.h,s.h)}isShowing(){return this._state!=="not-showing"}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case"unattached":break;case"showing":this.hide(),this._svg&&await this.render(this._svg,!0);break;case"not-showing":this.attach(),this._svg&&await this.render(this._svg,!1);break}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state="not-showing"}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state="unattached",this.detachListeners()}async render(e,s){let i=this._config;s&&(i=JSON.parse(JSON.stringify(this._config)),i.animate=!1);const n=this.rects();let a=0;n.forEach(h=>a+=h.w);const l=i.animationDuration||Qp;let o=0;const c=[];for(let h=0;hObject.assign(t,{type:"box"}),circle:t=>Object.assign(t,{type:"circle"}),underline:t=>Object.assign(t,{type:"underline"}),highlight:t=>Object.assign(t,{type:"highlight"}),"strike-through":t=>Object.assign(t,{type:"strike-through"}),"crossed-off":t=>Object.assign(t,{type:"crossed-off"}),bracket:t=>Object.assign(t,{type:"bracket"}),strike:t=>Object.assign(t,{type:"strike-through"}),cross:t=>Object.assign(t,{type:"crossed-off"}),crossed:t=>Object.assign(t,{type:"crossed-off"}),linethrough:t=>Object.assign(t,{type:"strike-through"}),"line-through":t=>Object.assign(t,{type:"strike-through"}),black:t=>tt(t,"text-black"),blue:t=>tt(t,"text-blue"),cyan:t=>tt(t,"text-cyan"),gray:t=>tt(t,"text-gray"),green:t=>tt(t,"text-green"),indigo:t=>tt(t,"text-indigo"),lime:t=>tt(t,"text-lime"),orange:t=>tt(t,"text-orange"),pink:t=>tt(t,"text-pink"),purple:t=>tt(t,"text-purple"),red:t=>tt(t,"text-red"),teal:t=>tt(t,"text-teal"),white:t=>tt(t,"text-white"),yellow:t=>tt(t,"text-yellow")},hf=[[/^delay-?(\d+)?$/,(t,e,s)=>{const i=(t[1]?Number.parseInt(t[1]):s)||300;return e.delay=i,e}],[/^(?:op|opacity)-?(\d+)?$/,(t,e,s)=>{const i=(t[1]?Number.parseInt(t[1]):s)||100;return e.opacity=i/100,e}]];function uf(){return{install(t){t.directive("mark",{name:"v-mark",mounted:(e,s)=>{const i=d(()=>{const l=typeof s.value=="object"&&!Array.isArray(s.value)?{...s.value}:{at:s.value};let o={at:l.at};const c=Object.entries(s.modifiers).filter(([u,p])=>{if(Ii[u])return o=Ii[u](o,p),!1;for(const[g,f]of hf){const m=u.match(g);if(m)return o=f(m,o,p),!1}return!0});c.length&&console.warn("[Slidev] Invalid modifiers for v-mark:",c);const h={...o,...l};return h.type||(h.type="underline"),h}),n=cf(e,i.value),a=Ve(e,s,i.value.at);if(!a){console.error("[Slidev] Invalid value for v-mark:",i.value.at);return}ee(()=>{let l;i.value.class&&(n.class=i.value.class),i.value.color&&(n.color=i.value.color);const o=i.value.at;if(o===!0)l=!0;else if(o===!1)l=!1;else if(a)l=a.isActive.value;else{console.error("[Slidev] Invalid value for v-mark:",o);return}l!=null&&(l?n.show():n.hide())})}})}}}const Fi=dr(),bs=et("slidev-color-schema","auto"),Ni=d(()=>N.colorSchema!=="auto"),Ln=d({get(){return Ni.value?N.colorSchema==="dark":bs.value==="auto"?Fi.value:bs.value==="dark"},set(t){Ni.value||(bs.value=t===Fi.value?"auto":t?"dark":"light")}}),Yf=ji(Ln);rs&&_e(Ln,t=>{const e=document.querySelector("html");e.classList.toggle("dark",t),e.classList.toggle("light",!t)},{immediate:!0});function df(t){const e=d(()=>t.value.path),s=d(()=>Y.length),i=d(()=>Number.parseInt(e.value.split(/\//g).slice(-1)[0])||1),n=d(()=>ls(i.value)),a=d(()=>Y.find(g=>g.path===`${i.value}`)??Y.at(-1)??Y[0]),l=d(()=>{var g,f,m;return(m=(f=(g=a.value)==null?void 0:g.meta)==null?void 0:f.slide)==null?void 0:m.id}),o=d(()=>{var g,f;return((f=(g=a.value)==null?void 0:g.meta)==null?void 0:f.layout)||(i.value===1?"cover":"default")}),c=d(()=>Y.find(g=>g.path===`${Math.min(Y.length,i.value+1)}`)),h=d(()=>Y.filter(g=>{var f,m;return(m=(f=g.meta)==null?void 0:f.slide)==null?void 0:m.title}).reduce((g,f)=>(Zs(g,f),g),[])),u=d(()=>Xs(h.value,a.value)),p=d(()=>Js(u.value));return{rawRoutes:Y,route:t,path:e,total:s,clicksContext:te,clicks:Vs,clicksTotal:Be,currentPage:i,currentPath:n,currentRoute:a,currentSlideId:l,currentLayout:o,nextRoute:c,rawTree:h,treeWithActiveStatuses:u,tree:p,go:Ys,downloadPDF:gp,next:wn,nextSlide:Gs,openInEditor:mp,prev:bn,prevSlide:Ks}}function pf(t){return{nav:df(t),configs:N,themeConfigs:d(()=>N.themeConfig)}}function ff(){return{install(t){const e=b(pf(mt));t.provide(rn,U("none")),t.provide(nn,e),t.provide(sn,d(()=>e.nav.currentPage))}}}const he=pr(bp);he.use(nt);he.use(ia());he.use($p());he.use(uf());he.use(ff());xp({app:he,router:nt});he.mount("#app");export{Af as $,ra as A,jf as B,$s as C,vf as D,te as E,Zt as F,Wf as G,qf as H,ke as I,yf as J,Pf as K,Re as L,Ca as M,zf as N,Je as O,If as P,Ff as Q,V as R,Gs as S,Ks as T,Ds as U,Yf as V,Nf as W,$f as X,Ys as Y,Mf as Z,E as _,bf as a,Tf as a0,tp as a1,Cf as a2,as as a3,Sf as a4,Cs as a5,hp as a6,Vf as a7,Ni as a8,Ln as a9,le as aa,ts as ab,Uf as ac,Bf as ad,gp as ae,fn as af,Gf as ag,Sa as ah,sn as ai,rn as aj,wf as ak,js as al,Se as am,Ts as an,ep as ao,sp as ap,ip as aq,rp as ar,Rf as as,Z as at,D as au,ap as av,tn as aw,xf as b,N as c,Lf as d,Pe as e,lp as f,Qe as g,Hf as h,Ef as i,Df as j,Of as k,_f as l,da as m,wn as n,nn as o,bn as p,df as q,Ta as r,Qd as s,Zi as t,Kf as u,mt as v,Ai as w,_o as x,Y as y,Aa as z}; +`),r("span",{class:"line"},[r("span",{style:{"--shiki-dark":"#666666","--shiki-light":"#999999"}},"")])])],-1),yd=r("div",{style:{"text-align":"right"}},"https://www.bilibili.com/video/BV1GE411G7hu?p=4 ",-1),vd={__name:"32",setup(t){return O(Yt),D(),(e,s)=>(S(),T(G,P(L(v(B)(v(Yt),31))),{default:A(()=>[gd,md,kd,_d,yd]),_:1},16))}},wd=C(vd,[["__file","/@slidev/slides/32.md"]]),Y=[{path:"1",name:"page-1",component:Ha,meta:Ia},{path:"2",name:"page-2",component:Ja,meta:qa},{path:"3",name:"page-3",component:Co,meta:bo},{path:"4",name:"page-4",component:Ro,meta:Po},{path:"5",name:"page-5",component:Go,meta:Uo},{path:"6",name:"page-6",component:nc,meta:Yo},{path:"7",name:"page-7",component:fc,meta:rc},{path:"8",name:"page-8",component:yc,meta:gc},{path:"9",name:"page-9",component:Sc,meta:vc},{path:"10",name:"page-10",component:Lc,meta:Mc},{path:"11",name:"page-11",component:Nc,meta:Oc},{path:"12",name:"page-12",component:zc,meta:Rc},{path:"13",name:"page-13",component:Yc,meta:qc},{path:"14",name:"page-14",component:eh,meta:Zc},{path:"15",name:"page-15",component:lh,meta:sh},{path:"16",name:"page-16",component:ph,meta:oh},{path:"17",name:"page-17",component:vh,meta:fh},{path:"18",name:"page-18",component:Ah,meta:wh},{path:"19",name:"page-19",component:Th,meta:Sh},{path:"20",name:"page-20",component:Hh,meta:Lh},{path:"21",name:"page-21",component:Kh,meta:jh},{path:"22",name:"page-22",component:su,meta:Zh},{path:"23",name:"page-23",component:hu,meta:nu},{path:"24",name:"page-24",component:gu,meta:uu},{path:"25",name:"page-25",component:Au,meta:wu},{path:"26",name:"page-26",component:Pu,meta:Su},{path:"27",name:"page-27",component:Ru,meta:Lu},{path:"28",name:"page-28",component:Vu,meta:Hu},{path:"29",name:"page-29",component:Qu,meta:Gu},{path:"30",name:"page-30",component:ad,meta:td},{path:"31",name:"page-31",component:pd,meta:ld},{path:"32",name:"page-32",component:wd,meta:fd}].map(Hs),bd=[].map(Hs),We=[{name:"play",path:"/",component:()=>Pe(()=>import("./slidev/play-DSehltPn.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),children:[...Y,...bd]},{name:"print",path:"/print",component:()=>Pe(()=>import("./slidev/print-2cNOs_aZ.js"),__vite__mapDeps([11,1,4,9,3,6,7,12]))},{path:"",redirect:{path:"/1"}},{path:"/:pathMatch(.*)",redirect:{path:"/1"}}];{let t=function(e){if(!N.remote||N.remote===e.query.password)return!0;if(N.remote&&e.query.password===void 0){const s=prompt("Enter password");if(N.remote===s)return!0}return e.params.no?{path:`/${e.params.no}`}:{path:""}};We.push({path:"/presenter/print",component:()=>Pe(()=>import("./slidev/print-Ss9g6xiG.js"),__vite__mapDeps([13,1,14,15,3,6,7]))}),We.push({name:"presenter",path:"/presenter/:no",component:()=>Pe(()=>import("./slidev/presenter-BJ0i69ip.js"),__vite__mapDeps([16,3,1,2,4,5,6,7,8,14,15,17,18,19])),beforeEnter:t}),We.push({path:"/presenter",redirect:{path:"/presenter/1"}})}const nt=Qn({history:tr("/sa2024/05-restful/"),routes:We}),fn=U(!1);function xd(t,e,{mode:s="replace"}={}){return d({get(){const i=nt.currentRoute.value.query[t];return i==null?e??null:Array.isArray(i)?i.filter(Boolean):i},set(i){De(()=>{nt[v(s)]({query:{...nt.currentRoute.value.query,[t]:i}})})}})}var $d=Object.defineProperty,ki=Object.getOwnPropertySymbols,Ad=Object.prototype.hasOwnProperty,Sd=Object.prototype.propertyIsEnumerable,_i=(t,e,s)=>e in t?$d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ss=(t,e)=>{for(var s in e||(e={}))Ad.call(e,s)&&_i(t,s,e[s]);if(ki)for(var s of ki(e))Sd.call(e,s)&&_i(t,s,e[s]);return t},Md=()=>({emit(t,...e){for(let s=0,i=this.events[t]||[],n=i.length;s{var i;this.events[t]=(i=this.events[t])==null?void 0:i.filter(n=>e!==n)}}});function yi(t,e,s,i=n=>n){return t*i(.5-e*(.5-s))}function Cd(t){return[-t[0],-t[1]]}function dt(t,e){return[t[0]+e[0],t[1]+e[1]]}function at(t,e){return[t[0]-e[0],t[1]-e[1]]}function ut(t,e){return[t[0]*e,t[1]*e]}function Ed(t,e){return[t[0]/e,t[1]/e]}function xe(t){return[t[1],-t[0]]}function vi(t,e){return t[0]*e[0]+t[1]*e[1]}function Td(t,e){return t[0]===e[0]&&t[1]===e[1]}function Dd(t){return Math.hypot(t[0],t[1])}function Pd(t){return t[0]*t[0]+t[1]*t[1]}function wi(t,e){return Pd(at(t,e))}function gn(t){return Ed(t,Dd(t))}function Ld(t,e){return Math.hypot(t[1]-e[1],t[0]-e[0])}function $e(t,e,s){let i=Math.sin(s),n=Math.cos(s),a=t[0]-e[0],l=t[1]-e[1],o=a*n-l*i,c=a*i+l*n;return[o+e[0],c+e[1]]}function Ms(t,e,s){return dt(t,ut(at(e,t),s))}function bi(t,e,s){return dt(t,ut(e,s))}var{min:de,PI:Od}=Math,xi=.275,Ae=Od+1e-4;function Bd(t,e={}){let{size:s=16,smoothing:i=.5,thinning:n=.5,simulatePressure:a=!0,easing:l=E=>E,start:o={},end:c={},last:h=!1}=e,{cap:u=!0,easing:p=E=>E*(2-E)}=o,{cap:g=!0,easing:f=E=>--E*E*E+1}=c;if(t.length===0||s<=0)return[];let m=t[t.length-1].runningLength,k=o.taper===!1?0:o.taper===!0?Math.max(s,m):o.taper,y=c.taper===!1?0:c.taper===!0?Math.max(s,m):c.taper,w=Math.pow(s*i,2),$=[],M=[],j=t.slice(0,10).reduce((E,W)=>{let F=W.pressure;if(a){let R=de(1,W.distance/s),cs=de(1,1-R);F=de(1,E+(cs-E)*(R*xi))}return(E+F)/2},t[0].pressure),H=yi(s,n,t[t.length-1].pressure,l),z,ot=t[0].vector,K=t[0].point,st=K,ft=K,gt=st,X=!1;for(let E=0;Ew)&&($.push(ft),K=ft),gt=dt(F,ii),(E<=1||wi(st,gt)>w)&&(M.push(gt),st=gt),j=W,ot=R}let I=t[0].point.slice(0,2),q=t.length>1?t[t.length-1].point.slice(0,2):dt(t[0].point,[1,1]),Xt=[],ct=[];if(t.length===1){if(!(k||y)||h){let E=bi(I,gn(xe(at(I,q))),-(z||H)),W=[];for(let F=1/13,R=F;R<=1;R+=F)W.push($e(E,I,Ae*2*R));return W}}else{if(!(k||y&&t.length===1))if(u)for(let W=1/13,F=W;F<=1;F+=W){let R=$e(M[0],I,Ae*F);Xt.push(R)}else{let W=at($[0],M[0]),F=ut(W,.5),R=ut(W,.51);Xt.push(at(I,F),at(I,R),dt(I,R),dt(I,F))}let E=xe(Cd(t[t.length-1].vector));if(y||k&&t.length===1)ct.push(q);else if(g){let W=bi(q,E,H);for(let F=1/29,R=F;R<1;R+=F)ct.push($e(W,q,Ae*3*R))}else ct.push(dt(q,ut(E,H)),dt(q,ut(E,H*.99)),at(q,ut(E,H*.99)),at(q,ut(E,H)))}return $.concat(ct,M.reverse(),Xt)}function Id(t,e={}){var s;let{streamline:i=.5,size:n=16,last:a=!1}=e;if(t.length===0)return[];let l=.15+(1-i)*.85,o=Array.isArray(t[0])?t:t.map(({x:f,y:m,pressure:k=.5})=>[f,m,k]);if(o.length===2){let f=o[1];o=o.slice(0,-1);for(let m=1;m<5;m++)o.push(Ms(o[0],f,m/4))}o.length===1&&(o=[...o,[...dt(o[0],[1,1]),...o[0].slice(2)]]);let c=[{point:[o[0][0],o[0][1]],pressure:o[0][2]>=0?o[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],h=!1,u=0,p=c[0],g=o.length-1;for(let f=1;f=0?o[f][2]:.5,vector:gn(at(p.point,m)),distance:k,runningLength:u},c.push(p)}return c[0].vector=((s=c[1])==null?void 0:s.vector)||[0,0],c}function Fd(t,e={}){return Bd(Id(t,e),e)}function Ze(t,e){return t-e}function Nd(t){return t<0?-1:1}function Xe(t){return[Math.abs(t),Nd(t)]}function mn(){const t=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}var Rd=2,kt=Rd,ye=class{constructor(t){this.drauu=t,this.event=void 0,this.point=void 0,this.start=void 0,this.el=null}onSelected(t){}onUnselected(){}onStart(t){}onMove(t){return!1}onEnd(t){}get brush(){return this.drauu.brush}get shiftPressed(){return this.drauu.shiftPressed}get altPressed(){return this.drauu.altPressed}get svgElement(){return this.drauu.el}getMousePosition(t){var e,s,i;const n=this.drauu.el,a=(e=this.drauu.options.coordinateScale)!=null?e:1,l=(s=this.drauu.options.offset)!=null?s:{x:0,y:0};if(this.drauu.options.coordinateTransform===!1){const o=this.drauu.el.getBoundingClientRect();return{x:(t.pageX-o.left+l.x)*a,y:(t.pageY-o.top+l.y)*a,pressure:t.pressure}}else{const o=this.drauu.svgPoint;o.x=t.clientX+l.x,o.y=t.clientY+l.y;const c=o.matrixTransform((i=n.getScreenCTM())==null?void 0:i.inverse());return{x:c.x*a,y:c.y*a,pressure:t.pressure}}}createElement(t,e){var s;const i=document.createElementNS("http://www.w3.org/2000/svg",t),n=e?Ss(Ss({},this.brush),e):this.brush;return i.setAttribute("fill",(s=n.fill)!=null?s:"transparent"),i.setAttribute("stroke",n.color),i.setAttribute("stroke-width",n.size.toString()),i.setAttribute("stroke-linecap","round"),n.dasharray&&i.setAttribute("stroke-dasharray",n.dasharray),i}attr(t,e){this.el.setAttribute(t,typeof e=="string"?e:e.toFixed(kt))}_setEvent(t){this.event=t,this.point=this.getMousePosition(t)}_eventDown(t){return this._setEvent(t),this.start=this.point,this.onStart(this.point)}_eventMove(t){return this._setEvent(t),this.onMove(this.point)}_eventUp(t){return this._setEvent(t),this.onEnd(this.point)}},Hd=class kn extends ye{constructor(){super(...arguments),this.points=[]}onStart(e){return this.el=document.createElementNS("http://www.w3.org/2000/svg","path"),this.points=[e],this.attr("fill",this.brush.color),this.attr("d",this.getSvgData(this.points)),this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&this.points.push(e),this.attr("d",this.getSvgData(this.points)),!0}onEnd(){const e=this.el;return this.el=null,!!e}getSvgData(e){return kn.getSvgData(e,this.brush)}static getSvgData(e,s){const i=Fd(e,Ss({size:s.size,thinning:.9,simulatePressure:!1,start:{taper:5},end:{taper:5}},s.stylusOptions));if(!i.length)return"";const n=i.reduce((a,[l,o],c,h)=>{const[u,p]=h[(c+1)%h.length];return a.push(l,o,(l+u)/2,(o+p)/2),a},["M",...i[0],"Q"]);return n.push("Z"),n.map(a=>typeof a=="number"?a.toFixed(2):a).join(" ")}},Ud=class extends ye{onStart(t){return this.el=this.createElement("ellipse"),this.attr("cx",t.x),this.attr("cy",t.y),this.el}onMove(t){if(!this.el||!this.start)return!1;let[e,s]=Xe(t.x-this.start.x),[i,n]=Xe(t.y-this.start.y);if(this.shiftPressed){const a=Math.min(e,i);e=a,i=a}if(this.altPressed)this.attr("cx",this.start.x),this.attr("cy",this.start.y),this.attr("rx",e),this.attr("ry",i);else{const[a,l]=[this.start.x,this.start.x+e*s].sort(Ze),[o,c]=[this.start.y,this.start.y+i*n].sort(Ze);this.attr("cx",(a+l)/2),this.attr("cy",(o+c)/2),this.attr("rx",(l-a)/2),this.attr("ry",(c-o)/2)}return!0}onEnd(){const t=this.el;return this.el=null,!(!t||!t.getTotalLength())}};function _n(t,e){const s=document.createElementNS("http://www.w3.org/2000/svg","defs"),i=document.createElementNS("http://www.w3.org/2000/svg","marker"),n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("fill",e),i.setAttribute("id",t),i.setAttribute("viewBox","0 -5 10 10"),i.setAttribute("refX","5"),i.setAttribute("refY","0"),i.setAttribute("markerWidth","4"),i.setAttribute("markerHeight","4"),i.setAttribute("orient","auto"),n.setAttribute("d","M0,-5L10,0L0,5"),i.appendChild(n),s.appendChild(i),s}var jd=class extends ye{onStart(t){if(this.el=this.createElement("line",{fill:"transparent"}),this.attr("x1",t.x),this.attr("y1",t.y),this.attr("x2",t.x),this.attr("y2",t.y),this.brush.arrowEnd){const e=mn(),s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.append(_n(e,this.brush.color)),s.append(this.el),this.attr("marker-end",`url(#${e})`),s}return this.el}onMove(t){if(!this.el)return!1;let{x:e,y:s}=t;if(this.shiftPressed){const i=t.x-this.start.x,n=t.y-this.start.y;if(n!==0){let a=i/n;a=Math.round(a),Math.abs(a)<=1?(e=this.start.x+n*a,s=this.start.y+n):(e=this.start.x+i,s=this.start.y)}}return this.altPressed?(this.attr("x1",this.start.x*2-e),this.attr("y1",this.start.y*2-s),this.attr("x2",e),this.attr("y2",s)):(this.attr("x1",this.start.x),this.attr("y1",this.start.y),this.attr("x2",e),this.attr("y2",s)),!0}onEnd(){const t=this.el;return this.el=null,!(!t||t.getTotalLength()<5)}},zd=class extends ye{onStart(t){return this.el=this.createElement("rect"),this.brush.cornerRadius&&(this.attr("rx",this.brush.cornerRadius),this.attr("ry",this.brush.cornerRadius)),this.attr("x",t.x),this.attr("y",t.y),this.el}onMove(t){if(!this.el||!this.start)return!1;let[e,s]=Xe(t.x-this.start.x),[i,n]=Xe(t.y-this.start.y);if(this.shiftPressed){const a=Math.min(e,i);e=a,i=a}if(this.altPressed)this.attr("x",this.start.x-e),this.attr("y",this.start.y-i),this.attr("width",e*2),this.attr("height",i*2);else{const[a,l]=[this.start.x,this.start.x+e*s].sort(Ze),[o,c]=[this.start.y,this.start.y+i*n].sort(Ze);this.attr("x",a),this.attr("y",o),this.attr("width",l-a),this.attr("height",c-o)}return!0}onEnd(){const t=this.el;return this.el=null,!(!t||!t.getTotalLength())}};function qd(t,e){const s=t.x-e.x,i=t.y-e.y;return s*s+i*i}function Wd(t,e,s){let i=e.x,n=e.y,a=s.x-i,l=s.y-n;if(a!==0||l!==0){const o=((t.x-i)*a+(t.y-n)*l)/(a*a+l*l);o>1?(i=s.x,n=s.y):o>0&&(i+=a*o,n+=l*o)}return a=t.x-i,l=t.y-n,a*a+l*l}function Vd(t,e){let s=t[0];const i=[s];let n;for(let a=1,l=t.length;ae&&(i.push(n),s=n);return s!==n&&n&&i.push(n),i}function Cs(t,e,s,i,n){let a=i,l=0;for(let o=e+1;oa&&(l=o,a=c)}a>i&&(l-e>1&&Cs(t,e,l,i,n),n.push(t[l]),s-l>1&&Cs(t,l,s,i,n))}function Gd(t,e){const s=t.length-1,i=[t[0]];return Cs(t,0,s,e,i),i.push(t[s]),i}function $i(t,e,s=!1){if(t.length<=2)return t;const i=e!==void 0?e*e:1;return t=s?t:Vd(t,i),t=Gd(t,i),t}var Kd=class ne extends ye{constructor(){super(...arguments),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement("path",{fill:"transparent"}),this.points=[e],this.brush.arrowEnd){this.arrowId=mn();const s=_n(this.arrowId,this.brush.color);this.el.appendChild(s)}return this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&(this.points.push(e),this.count+=1),this.count>5&&(this.points=$i(this.points,1,!0),this.count=0),this.attr("d",ne.toSvgData(this.points)),!0}onEnd(){const e=this.el;return this.el=null,!(!e||(e.setAttribute("d",ne.toSvgData($i(this.points,1,!0))),!e.getTotalLength()))}static line(e,s){const i=s.x-e.x,n=s.y-e.y;return{length:Math.sqrt(i**2+n**2),angle:Math.atan2(n,i)}}static controlPoint(e,s,i,n){const a=s||e,l=i||e,o=.2,c=ne.line(a,l),h=c.angle+(n?Math.PI:0),u=c.length*o,p=e.x+Math.cos(h)*u,g=e.y+Math.sin(h)*u;return{x:p,y:g}}static bezierCommand(e,s,i){const n=ne.controlPoint(i[s-1],i[s-2],e),a=ne.controlPoint(e,i[s-1],i[s+1],!0);return`C ${n.x.toFixed(kt)},${n.y.toFixed(kt)} ${a.x.toFixed(kt)},${a.y.toFixed(kt)} ${e.x.toFixed(kt)},${e.y.toFixed(kt)}`}static toSvgData(e){return e.reduce((s,i,n,a)=>n===0?`M ${i.x.toFixed(kt)},${i.y.toFixed(kt)}`:`${s} ${ne.bezierCommand(i,n,a)}`,"")}},Yd=class extends ye{constructor(){super(...arguments),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(t){const e=(s,i)=>{if(s&&s.length)for(let n=0;nt.forEach(e=>this.drauu._restoreNode(e)),redo:()=>t.forEach(e=>this.drauu._removeNode(e))}}checkAndEraseElement(){if(this.pathFragments.length)for(let t=0;t!this._erased.includes(t.element))),this._erased.length>0}lineLineIntersect(t,e){const s=t.x1,i=t.x2,n=e.x1,a=e.x2,l=t.y1,o=t.y2,c=e.y1,h=e.y2,u=(s-i)*(c-h)-(l-o)*(n-a),p=(s*o-l*i)*(n-a)-(s-i)*(n*h-c*a),g=(s*o-l*i)*(c-h)-(l-o)*(n*h-c*a),f=(m,k,y)=>m>=k&&m<=y?!0:m>=y&&m<=k;if(u===0)return!1;{const m={x:p/u,y:g/u};return f(m.x,s,i)&&f(m.y,l,o)&&f(m.x,n,a)&&f(m.y,c,h)}}};function Zd(t){return{draw:new Kd(t),stylus:new Hd(t),line:new jd(t),rectangle:new zd(t),ellipse:new Ud(t),eraseLine:new Yd(t)}}var Xd=class{constructor(t={}){this.options=t,this.el=null,this.svgPoint=null,this.eventEl=null,this.shiftPressed=!1,this.altPressed=!1,this.drawing=!1,this._emitter=Md(),this._originalPointerId=null,this._models=Zd(this),this._opStack=[],this._opIndex=0,this._disposables=[],this._elements=[],this.options.brush||(this.options.brush={color:"black",size:3,mode:"stylus"}),t.el&&this.mount(t.el,t.eventTarget,t.window)}get model(){return this._models[this.mode]}get mounted(){return!!this.el}get mode(){return this.options.brush.mode||"stylus"}set mode(t){this._models[this.mode].onUnselected(),this.options.brush.mode=t,this.model.onSelected(this.el)}get brush(){return this.options.brush}set brush(t){this.options.brush=t}resolveSelector(t){return typeof t=="string"?document.querySelector(t):t||null}mount(t,e,s=window){if(this.el)throw new Error("[drauu] already mounted, unmount previous target first");if(this.el=this.resolveSelector(t),!this.el)throw new Error("[drauu] target element not found");if(this.el.tagName.toLocaleLowerCase()!=="svg")throw new Error("[drauu] can only mount to a SVG element");if(!this.el.createSVGPoint)throw new Error("[drauu] SVG element must be create by document.createElementNS('http://www.w3.org/2000/svg', 'svg')");this.svgPoint=this.el.createSVGPoint();const i=this.resolveSelector(e)||this.el,n=this.eventStart.bind(this),a=this.eventMove.bind(this),l=this.eventEnd.bind(this),o=this.eventKeyboard.bind(this);i.addEventListener("pointerdown",n,{passive:!1}),s.addEventListener("pointermove",a,{passive:!1}),s.addEventListener("pointerup",l,{passive:!1}),s.addEventListener("pointercancel",l,{passive:!1}),s.addEventListener("keydown",o,!1),s.addEventListener("keyup",o,!1),this._disposables.push(()=>{i.removeEventListener("pointerdown",n),s.removeEventListener("pointermove",a),s.removeEventListener("pointerup",l),s.removeEventListener("pointercancel",l),s.removeEventListener("keydown",o,!1),s.removeEventListener("keyup",o,!1)}),this._emitter.emit("mounted")}unmount(){this._disposables.forEach(t=>t()),this._disposables.length=0,this._elements.length=0,this.el=null,this._emitter.emit("unmounted")}on(t,e){return this._emitter.on(t,e)}undo(){return!this.canUndo()||this.drawing?!1:(this._opStack[--this._opIndex].undo(),this._emitter.emit("changed"),!0)}redo(){return!this.canRedo()||this.drawing?!1:(this._opStack[this._opIndex++].redo(),this._emitter.emit("changed"),!0)}canRedo(){return this._opIndex0}eventMove(t){!this.acceptsInput(t)||!this.drawing||this.model._eventMove(t)&&(t.stopPropagation(),t.preventDefault(),this._emitter.emit("changed"))}eventStart(t){this.acceptsInput(t)&&(t.stopPropagation(),t.preventDefault(),this._currentNode&&this.cancel(),this.drawing=!0,this._originalPointerId=t.pointerId,this._emitter.emit("start"),this._currentNode=this.model._eventDown(t),this._currentNode&&this.mode!=="eraseLine"&&this.el.appendChild(this._currentNode),this._emitter.emit("changed"))}eventEnd(t){if(!this.acceptsInput(t)||!this.drawing)return;const e=this.model._eventUp(t);if(!e)this.cancel();else if(e===!0){const s=this._currentNode;this._appendNode(s),this.commit({undo:()=>this._removeNode(s),redo:()=>this._restoreNode(s)})}else this.commit(e);this.drawing=!1,this._emitter.emit("end"),this._emitter.emit("changed"),this._originalPointerId=null}acceptsInput(t){return(!this.options.acceptsInputTypes||this.options.acceptsInputTypes.includes(t.pointerType))&&!(this._originalPointerId&&this._originalPointerId!==t.pointerId)}eventKeyboard(t){this.shiftPressed===t.shiftKey&&this.altPressed===t.altKey||(this.shiftPressed=t.shiftKey,this.altPressed=t.altKey,this.model.point&&this.model.onMove(this.model.point)&&this._emitter.emit("changed"))}commit(t){this._opStack.length=this._opIndex,this._opStack.push(t),this._opIndex++;const e=this._currentNode;this._currentNode=void 0,this._emitter.emit("committed",e)}clear(){this._opStack.length=0,this._opIndex=0,this.cancel(),this.el.innerHTML="",this._emitter.emit("changed")}cancel(){this._currentNode&&(this.el.removeChild(this._currentNode),this._currentNode=void 0,this._emitter.emit("canceled"))}dump(){return this.el.innerHTML}load(t){this.clear(),this.el.innerHTML=t}_appendNode(t){const e=this._elements.at(-1);e?e.after(t):this.el.append(t);const s=this._elements.push(t)-1;t.dataset.drauu_index=s.toString()}_removeNode(t){t.remove(),this._elements[+t.dataset.drauu_index]=null}_restoreNode(t){const e=+t.dataset.drauu_index;this._elements[e]=t;for(let s=e-1;s>=0;s--){const i=this._elements[s];if(i){i.after(t);return}}this.el.prepend(t)}};function Jd(t){return new Xd(t)}const bf=U(!1),xf=U(!1),$f=U(!1),Qd=U(!1),Af=U(!0),Sf=er({xs:460,...ar}),Ai=sr(),Mf=ir(),Cf=d(()=>Ai.height.value-Ai.width.value/Zi>120),Ef=nr(rs?document.body:null),Es=rr(),tp=d(()=>{var t,e;return["INPUT","TEXTAREA"].includes(((t=Es.value)==null?void 0:t.tagName)||"")||((e=Es.value)==null?void 0:e.classList.contains("CodeMirror-code"))}),Tf=d(()=>{var t;return["BUTTON","A"].includes(((t=Es.value)==null?void 0:t.tagName)||"")});et("slidev-camera","default",{listenToStorageChanges:!1});et("slidev-mic","default",{listenToStorageChanges:!1});const Df=et("slidev-scale",0),Pf=et("slidev-presenter-cursor",!0,{listenToStorageChanges:!1}),Lf=et("slidev-show-editor",!1,{listenToStorageChanges:!1}),Of=et("slidev-editor-vertical",!1,{listenToStorageChanges:!1});et("slidev-editor-width",rs?window.innerWidth*.4:318,{listenToStorageChanges:!1});et("slidev-editor-height",rs?window.innerHeight*.4:300,{listenToStorageChanges:!1});const Je=et("slidev-presenter-font-size",1,{listenToStorageChanges:!1}),Re=et("slidev-presenter-layout",1,{listenToStorageChanges:!1});function Bf(){Re.value=Re.value+1,Re.value>2&&(Re.value=1)}function If(){Je.value=Math.min(2,Je.value+.1)}function Ff(){Je.value=Math.max(.5,Je.value-.1)}const Nf=ji(Qd),Ts=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93","#ffffff","#000000"],Ds=et("slidev-drawing-enabled",!1),Rf=et("slidev-drawing-pinned",!1),ep=U(!1),sp=U(!1),ip=U(!1),Qe=U(!1),ts=lr(et("slidev-drawing-brush",{color:Ts[0],size:4,mode:"stylus"})),Si=U("stylus"),yn=d(()=>N.drawings.syncAll||le.value);let Oe=!1;const Se=d({get(){return Si.value},set(t){Si.value=t,t==="arrow"?(Z.mode="line",ts.arrowEnd=!0):(Z.mode=t,ts.arrowEnd=!1)}}),np=b({brush:ts,acceptsInputTypes:d(()=>Ds.value&&(!N.drawings.presenterOnly||le.value)?void 0:["pen"]),coordinateTransform:!1}),Z=Hs(Jd(np));function rp(){Z.clear(),yn.value&&Qi(V.value,"")}function Ws(){var t;sp.value=Z.canRedo(),ep.value=Z.canUndo(),ip.value=!!((t=Z.el)!=null&&t.children.length)}function ap(t){Oe=!0;const e=tn[t||V.value];e!=null?Z.load(e):Z.clear(),Ws(),Oe=!1}Z.on("changed",()=>{if(Ws(),!Oe){const t=Z.dump(),e=V.value;(tn[e]||"")!==t&&yn.value&&Qi(e,Z.dump())}});wa(t=>{Oe=!0,t[V.value]!=null&&Z.load(t[V.value]||""),Oe=!1,Ws()});De(()=>{_e(V,()=>{Z.mounted&&ap()},{immediate:!0})});Z.on("start",()=>Qe.value=!0);Z.on("end",()=>Qe.value=!1);window.addEventListener("keydown",t=>{if(!Ds.value||tp.value)return;const e=!t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.metaKey;let s=!0;t.code==="KeyZ"&&(t.ctrlKey||t.metaKey)?t.shiftKey?Z.redo():Z.undo():t.code==="Escape"?Ds.value=!1:t.code==="KeyL"&&e?Se.value="line":t.code==="KeyA"&&e?Se.value="arrow":t.code==="KeyS"&&e?Se.value="stylus":t.code==="KeyR"&&e?Se.value="rectangle":t.code==="KeyE"&&e?Se.value="ellipse":t.code==="KeyC"&&e?rp():t.code.startsWith("Digit")&&e&&+t.code[5]<=Ts.length?ts.color=Ts[+t.code[5]-1]:s=!1,s&&(t.preventDefault(),t.stopPropagation())},!1);const Ps=U(0);De(()=>{nt.afterEach(async()=>{await De(),Ps.value+=1})});const vn=U(0),as=U(0),mt=d(()=>nt.currentRoute.value),lp=d(()=>mt.value.query.print!==void 0),op=d(()=>mt.value.query.print==="clicks"),Hf=d(()=>mt.value.query.embedded!==void 0),le=d(()=>mt.value.path.startsWith("/presenter")),cp=d(()=>mt.value.path.startsWith("/notes")),hp=d(()=>mt.value.query.password),Uf=d(()=>!le.value&&(!N.remote||hp.value===N.remote)),Mi=xd("clicks","0"),ke=d({get(){if(te.value.disabled)return $s;let t=+(Mi.value||0);return Number.isNaN(t)&&(t=0),t},set(t){Mi.value=t.toString()}}),jf=d(()=>Y.length),up=d(()=>mt.value.path),V=d(()=>Number.parseInt(up.value.split(/\//g).slice(-1)[0])||1);d(()=>ls(V.value));const Zt=d(()=>Y.find(t=>t.path===`${V.value}`)),zf=d(()=>{var t,e,s;return(s=(e=(t=Zt.value)==null?void 0:t.meta)==null?void 0:e.slide)==null?void 0:s.id});d(()=>{var t,e;return((e=(t=Zt.value)==null?void 0:t.meta)==null?void 0:e.layout)||(V.value===1?"cover":"default")});const qf=d(()=>Y.find(t=>t.path===`${Math.min(Y.length,V.value+1)}`)),dp=d(()=>Y.find(t=>t.path===`${Math.max(1,V.value-1)}`)),te=d(()=>Ea(Zt.value)),Vs=d(()=>te.value.current),Be=d(()=>te.value.total),Wf=d(()=>V.valueV.value>1||Vs.value>0),pp=d(()=>Y.filter(t=>{var e,s;return(s=(e=t.meta)==null?void 0:e.slide)==null?void 0:s.title}).reduce((t,e)=>(Zs(t,e),t),[])),fp=d(()=>Xs(pp.value,Zt.value));d(()=>Js(fp.value));const Gf=d(()=>yp(vn.value,Zt.value,dp.value));_e(Zt,(t,e)=>{vn.value=Number(t==null?void 0:t.path)-Number(e==null?void 0:e.path)});async function wn(){as.value=1,Be.value<=ke.value?await Gs():ke.value+=1}async function bn(){as.value=-1,ke.value<=0?await Ks():ke.value-=1}function ls(t){return le.value?`/presenter/${t}`:`/${t}`}async function Gs(){as.value=1,V.value.3||a>75?s.value==="left"?wn():bn():(l/window.innerHeight>.4||l>200)&&(s.value==="down"?Ks():Gs())}})}async function gp(){const{saveAs:t}=await Pe(()=>import("./modules/file-saver-CvNQQnEe.js").then(e=>e.F),__vite__mapDeps([]));t(typeof N.download=="string"?N.download:N.exportFilename?`${N.exportFilename}.pdf`:"/sa2024/05-restful/slidev-exported.pdf",`${N.title}.pdf`)}async function mp(t){var e,s;if(t==null){const i=(s=(e=Zt.value)==null?void 0:e.meta)==null?void 0:s.slide;if(!i)return!1;t=`${i.filepath}:${i.start}`}return await fetch(`/__open-in-editor?file=${encodeURIComponent(t)}`),!0}function Zs(t,e,s=1){var n,a,l,o,c,h,u;const i=(a=(n=e.meta)==null?void 0:n.slide)==null?void 0:a.level;i&&i>s&&t.length>0?Zs(t[t.length-1].children,e,s+1):t.push({children:[],level:s,path:e.path,hideInToc:!!((c=(o=(l=e.meta)==null?void 0:l.slide)==null?void 0:o.frontmatter)!=null&&c.hideInToc),title:(u=(h=e.meta)==null?void 0:h.slide)==null?void 0:u.title})}function Xs(t,e,s=!1,i){return t.map(n=>{const a={...n,active:n.path===(e==null?void 0:e.path),hasActiveParent:s};return a.children.length>0&&(a.children=Xs(a.children,e,a.active||a.hasActiveParent,a)),i&&(a.active||a.activeParent)&&(i.activeParent=!0),a})}function Js(t,e=1){return t.filter(s=>!s.hideInToc).map(s=>({...s,children:Js(s.children,e+1)}))}const kp={"slide-left":"slide-left | slide-right","slide-right":"slide-right | slide-left","slide-up":"slide-up | slide-down","slide-down":"slide-down | slide-up"};function _p(t,e=!1){if(!t||(typeof t=="string"&&(t={name:t}),!t.name))return;let s=t.name.includes("|")?t.name:kp[t.name]||t.name;if(s.includes("|")){const[i,n]=s.split("|").map(a=>a.trim());s=e?n:i}if(s)return{...t,name:s}}function yp(t,e,s){var n,a;let i=t>0?(n=s==null?void 0:s.meta)==null?void 0:n.transition:(a=e==null?void 0:e.meta)==null?void 0:a.transition;return i||(i=N.transition),_p(i,t<0)}function vp(){const t=N.titleTemplate.replace("%s",N.title||"Slidev");ra({title:t,htmlAttrs:N.htmlAttrs}),ma(`${t} - shared`),va(`${t} - drawings`);const e=`${location.origin}_${en()}`;function s(){cp.value||!le.value&&!Ma.includes(location.host.split(":")[0])||(le.value?(we("page",+V.value),we("clicks",te.value.current)):(we("viewerPage",+V.value),we("viewerClicks",te.value.current)),we("lastUpdate",{id:e,type:le.value?"presenter":"viewer",time:new Date().getTime()}))}nt.afterEach(s),_e(te,s),ka(i=>{var a;nt.currentRoute.value.path.match(/^\/(\d+|presenter)\/?/)&&((a=i.lastUpdate)==null?void 0:a.type)==="presenter"&&(+i.page!=+V.value||+te.value.current!=+i.clicks)&&(fn.value=!1,nt.replace({path:ls(i.page),query:{...nt.currentRoute.value.query,clicks:i.clicks||0}}))})}const wp=ns({__name:"App",setup(t){return vp(),ee(()=>{for(const[e,s]of Object.entries(pa.value))document.body.style.setProperty(e,s.toString())}),(e,s)=>{const i=hr("RouterView");return S(),T(i)}}}),bp=C(wp,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/App.vue"]]);function xp(t){function e(){document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)}e(),window.addEventListener("resize",e),t.app.use(ur),t.app.use(mr)}function xn(t,e,s){var i;return((i=t.instance)==null?void 0:i.$).provides[e]??s}function $p(){return{install(t){t.directive("click",{name:"v-click",mounted(e,s){const i=Ve(e,s,s.value);if(i==null)return;e.classList.toggle(Ee,!0);const n=Array.isArray(i.clicks)?i.clicks:[i.clicks,void 0];e.dataset.slidevClicksStart=String(n[0]),n[1]!=null&&(e.dataset.slidevClicksEnd=String(n[1])),ee(()=>{const a=i.isActive.value,l=i.isCurrent.value,o=a&&!l;i.flagHide?(e.classList.toggle(i.flagFade?be:pe,a),e.classList.toggle(ps,a)):e.classList.toggle(i.flagFade?be:pe,!a),e.classList.toggle(fs,l),e.classList.toggle(gs,o)})},unmounted:ks}),t.directive("after",{name:"v-after",mounted(e,s){const i=Ve(e,s,s.value,!0);i!=null&&(e.classList.toggle(Ee,!0),ee(()=>{const n=i.isActive.value,a=i.isCurrent.value,l=n&&!a;i.flagHide?(e.classList.toggle(i.flagFade?be:pe,n),e.classList.toggle(ps,n)):e.classList.toggle(i.flagFade?be:pe,!n),e.classList.toggle(fs,a),e.classList.toggle(gs,l)}))},unmounted:ks}),t.directive("click-hide",{name:"v-click-hide",mounted(e,s){const i=Ve(e,s,s.value,!1,!0);i!=null&&(e.classList.toggle(Ee,!0),ee(()=>{const n=i.isActive.value,a=i.isCurrent.value,l=n&&!a;e.classList.toggle(i.flagFade?be:pe,n),e.classList.toggle(ps,n),e.classList.toggle(fs,a),e.classList.toggle(gs,l)}))},unmounted:ks})}}}function ms(t,e){return Array.isArray(t)?t[0]<=e&&ems(c,a.current)),isCurrent:d(()=>Ap(c,a.current)),isShown:d(()=>n?!ms(c,a.current):ms(c,a.current)),flagFade:l,flagHide:n};return a.register(t,u),u}function ks(t,e){var i;t.classList.toggle(Ee,!1);const s=(i=xn(e,js))==null?void 0:i.value;s==null||s.unregister(t)}function $n(){return Math.floor(Math.random()*2**31)}class Sp{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}function Ls(t,e,s){if(t&&t.length){const[i,n]=e,a=Math.PI/180*s,l=Math.cos(a),o=Math.sin(a);for(const c of t){const[h,u]=c;c[0]=(h-i)*l-(u-n)*o+i,c[1]=(h-i)*o+(u-n)*l+n}}}function Mp(t,e,s){const i=[];t.forEach(n=>i.push(...n)),Ls(i,e,s)}function Cp(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ep(t,e,s,i=1){const n=s,a=Math.max(e,.1),l=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(n)for(const h of l)Ls(h,o,n);const c=Tp(l,a,i);if(n){for(const h of l)Ls(h,o,-n);Mp(c,o,-n)}return c}function Tp(t,e,s){const i=[];for(const h of t){const u=[...h];Cp(u[0],u[u.length-1])||u.push([u[0][0],u[0][1]]),u.length>2&&i.push(u)}const n=[];e=Math.max(e,.1);const a=[];for(const h of i)for(let u=0;uh.yminu.ymin?1:h.xu.x?1:h.ymax===u.ymax?0:(h.ymax-u.ymax)/Math.abs(h.ymax-u.ymax)),!a.length)return n;let l=[],o=a[0].ymin,c=0;for(;l.length||a.length;){if(a.length){let h=-1;for(let p=0;po);p++)h=p;a.splice(0,h+1).forEach(p=>{l.push({s:o,edge:p})})}if(l=l.filter(h=>!(h.edge.ymax<=o)),l.sort((h,u)=>h.edge.x===u.edge.x?0:(h.edge.x-u.edge.x)/Math.abs(h.edge.x-u.edge.x)),(s!==1||c%e===0)&&l.length>1)for(let h=0;h=l.length)break;const p=l[h].edge,g=l[u].edge;n.push([[Math.round(p.x),o],[Math.round(g.x),o]])}o+=s,l.forEach(h=>{h.edge.x=h.edge.x+s*h.edge.islope}),c++}return n}function Fe(t,e){var s;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=e.strokeWidth*4),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&(((s=e.randomizer)===null||s===void 0?void 0:s.next())||Math.random())>.7&&(a=n),Ep(t,n,i,a||1)}class Qs{constructor(e){this.helper=e}fillPolygons(e,s){return this._fillPolygons(e,s)}_fillPolygons(e,s){const i=Fe(e,s);return{type:"fillSketch",ops:this.renderLines(i,s)}}renderLines(e,s){const i=[];for(const n of e)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],s));return i}}function os(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class Dp extends Qs{fillPolygons(e,s){let i=s.hachureGap;i<0&&(i=s.strokeWidth*4),i=Math.max(i,.1);const n=Object.assign({},s,{hachureGap:i}),a=Fe(e,n),l=Math.PI/180*s.hachureAngle,o=[],c=i*.5*Math.cos(l),h=i*.5*Math.sin(l);for(const[p,g]of a)os([p,g])&&o.push([[p[0]-c,p[1]+h],[...g]],[[p[0]+c,p[1]-h],[...g]]);return{type:"fillSketch",ops:this.renderLines(o,s)}}}class Pp extends Qs{fillPolygons(e,s){const i=this._fillPolygons(e,s),n=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),a=this._fillPolygons(e,n);return i.ops=i.ops.concat(a.ops),i}}class Lp{constructor(e){this.helper=e}fillPolygons(e,s){s=Object.assign({},s,{hachureAngle:0});const i=Fe(e,s);return this.dotsOnLines(i,s)}dotsOnLines(e,s){const i=[];let n=s.hachureGap;n<0&&(n=s.strokeWidth*4),n=Math.max(n,.1);let a=s.fillWeight;a<0&&(a=s.strokeWidth/2);const l=n/4;for(const o of e){const c=os(o),h=c/n,u=Math.ceil(h)-1,p=c-u*n,g=(o[0][0]+o[1][0])/2-n/4,f=Math.min(o[0][1],o[1][1]);for(let m=0;m{const o=os(l),c=Math.floor(o/(i+n)),h=(o+n-c*(i+n))/2;let u=l[0],p=l[1];u[0]>p[0]&&(u=l[1],p=l[0]);const g=Math.atan((p[1]-u[1])/(p[0]-u[0]));for(let f=0;f{const l=os(a),o=Math.round(l/(2*s));let c=a[0],h=a[1];c[0]>h[0]&&(c=a[1],h=a[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let p=0;pu%2?h+s:h+e);a.push({key:"C",data:c}),e=c[4],s=c[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],s=o[3];break;case"q":{const c=o.map((h,u)=>u%2?h+s:h+e);a.push({key:"Q",data:c}),e=c[2],s=c[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],s=o[6];break;case"a":e+=o[5],s+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,s]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),s=o[0];break;case"v":s+=o[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],s=o[3];break;case"s":{const c=o.map((h,u)=>u%2?h+s:h+e);a.push({key:"S",data:c}),e=c[2],s=c[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],s=o[1];break;case"t":e+=o[0],s+=o[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,s=n;break}return a}function Mn(t){const e=[];let s="",i=0,n=0,a=0,l=0,o=0,c=0;for(const{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[i,n]=u,[a,l]=u;break;case"C":e.push({key:"C",data:[...u]}),i=u[4],n=u[5],o=u[2],c=u[3];break;case"L":e.push({key:"L",data:[...u]}),[i,n]=u;break;case"H":i=u[0],e.push({key:"L",data:[i,n]});break;case"V":n=u[0],e.push({key:"L",data:[i,n]});break;case"S":{let p=0,g=0;s==="C"||s==="S"?(p=i+(i-o),g=n+(n-c)):(p=i,g=n),e.push({key:"C",data:[p,g,...u]}),o=u[0],c=u[1],i=u[2],n=u[3];break}case"T":{const[p,g]=u;let f=0,m=0;s==="Q"||s==="T"?(f=i+(i-o),m=n+(n-c)):(f=i,m=n);const k=i+2*(f-i)/3,y=n+2*(m-n)/3,w=p+2*(f-p)/3,$=g+2*(m-g)/3;e.push({key:"C",data:[k,y,w,$,p,g]}),o=f,c=m,i=p,n=g;break}case"Q":{const[p,g,f,m]=u,k=i+2*(p-i)/3,y=n+2*(g-n)/3,w=f+2*(p-f)/3,$=m+2*(g-m)/3;e.push({key:"C",data:[k,y,w,$,f,m]}),o=p,c=g,i=f,n=m;break}case"A":{const p=Math.abs(u[0]),g=Math.abs(u[1]),f=u[2],m=u[3],k=u[4],y=u[5],w=u[6];p===0||g===0?(e.push({key:"C",data:[i,n,y,w,y,w]}),i=y,n=w):(i!==y||n!==w)&&(Cn(i,n,y,w,p,g,f,m,k).forEach(function(M){e.push({key:"C",data:M})}),i=y,n=w);break}case"Z":e.push({key:"Z",data:[]}),i=a,n=l;break}s=h}return e}function Rp(t){return Math.PI*t/180}function Me(t,e,s){const i=t*Math.cos(s)-e*Math.sin(s),n=t*Math.sin(s)+e*Math.cos(s);return[i,n]}function Cn(t,e,s,i,n,a,l,o,c,h){const u=Rp(l);let p=[],g=0,f=0,m=0,k=0;if(h)[g,f,m,k]=h;else{[t,e]=Me(t,e,-u),[s,i]=Me(s,i,-u);const X=(t-s)/2,I=(e-i)/2;let q=X*X/(n*n)+I*I/(a*a);q>1&&(q=Math.sqrt(q),n=q*n,a=q*a);const Xt=o===c?-1:1,ct=n*n,E=a*a,W=ct*E-ct*I*I-E*X*X,F=ct*I*I+E*X*X,R=Xt*Math.sqrt(Math.abs(W/F));m=R*n*I/a+(t+s)/2,k=R*-a*X/n+(e+i)/2,g=Math.asin(parseFloat(((e-k)/a).toFixed(9))),f=Math.asin(parseFloat(((i-k)/a).toFixed(9))),tf&&(g=g-Math.PI*2),!c&&f>g&&(f=f-Math.PI*2)}let y=f-g;if(Math.abs(y)>Math.PI*120/180){const X=f,I=s,q=i;c&&f>g?f=g+Math.PI*120/180*1:f=g+Math.PI*120/180*-1,s=m+n*Math.cos(f),i=k+a*Math.sin(f),p=Cn(s,i,I,q,n,a,l,0,c,[f,X,m,k])}y=f-g;const w=Math.cos(g),$=Math.sin(g),M=Math.cos(f),j=Math.sin(f),H=Math.tan(y/4),z=4/3*n*H,ot=4/3*a*H,K=[t,e],st=[t+z*$,e-ot*w],ft=[s+z*j,i-ot*M],gt=[s,i];if(st[0]=2*K[0]-st[0],st[1]=2*K[1]-st[1],h)return[st,ft,gt].concat(p);{p=[st,ft,gt].concat(p);const X=[];for(let I=0;I2){const n=[];for(let a=0;aMath.PI*2&&(f=0,m=Math.PI*2);const k=Math.PI*2/c.curveStepCount,y=Math.min(k/2,(m-f)/2),w=Li(y,h,u,p,g,f,m,1,c);if(!c.disableMultiStroke){const $=Li(y,h,u,p,g,f,m,1.5,c);w.push(...$)}return l&&(o?w.push(...se(h,u,h+p*Math.cos(f),u+g*Math.sin(f),c),...se(h,u,h+p*Math.cos(m),u+g*Math.sin(m),c)):w.push({op:"lineTo",data:[h,u]},{op:"lineTo",data:[h+p*Math.cos(f),u+g*Math.sin(f)]})),{type:"path",ops:w}}function Ti(t,e){const s=Mn(Sn(ti(t))),i=[];let n=[0,0],a=[0,0];for(const{key:l,data:o}of s)switch(l){case"M":{a=[o[0],o[1]],n=[o[0],o[1]];break}case"L":i.push(...se(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[c,h,u,p,g,f]=o;i.push(...Vp(c,h,u,p,g,f,a,e)),a=[g,f];break}case"Z":i.push(...se(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break}return{type:"path",ops:i}}function ys(t,e){const s=[];for(const i of t)if(i.length){const n=e.maxRandomnessOffset||0,a=i.length;if(a>2){s.push({op:"move",data:[i[0][0]+x(n,e),i[0][1]+x(n,e)]});for(let l=1;lMath.PI*2&&(p=0,g=Math.PI*2);const f=(g-p)/l.curveStepCount,m=[];for(let k=p;k<=g;k=k+f)m.push([o+h*Math.cos(k),c+u*Math.sin(k)]);return m.push([o+h*Math.cos(g),c+u*Math.sin(g)]),m.push([o,c]),fe([m],l)}function zp(t,e){return x(t,e)}function qp(t,e,s){return es(t,e,s)}function Wp(t,e,s,i,n){return se(t,e,s,i,n,!0)}function Di(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Dn(t){return t.randomizer||(t.randomizer=new Sp(t.seed||0)),t.randomizer.next()}function es(t,e,s,i=1){return s.roughness*i*(Dn(s)*(e-t)+t)}function x(t,e,s=1){return es(-t,t,e,s)}function se(t,e,s,i,n,a=!1){const l=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=Fs(t,e,s,i,n,!0,!1);if(l)return o;const c=Fs(t,e,s,i,n,!0,!0);return o.concat(c)}function Fs(t,e,s,i,n,a,l){const o=Math.pow(t-s,2)+Math.pow(e-i,2),c=Math.sqrt(o);let h=1;c<200?h=1:c>500?h=.4:h=-.0016668*c+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>o&&(u=c/10);const p=u/2,g=.2+Dn(n)*.2;let f=n.bowing*n.maxRandomnessOffset*(i-e)/200,m=n.bowing*n.maxRandomnessOffset*(t-s)/200;f=x(f,n,h),m=x(m,n,h);const k=[],y=()=>x(p,n,h),w=()=>x(u,n,h),$=n.preserveVertices;return a&&(l?k.push({op:"move",data:[t+($?0:y()),e+($?0:y())]}):k.push({op:"move",data:[t+($?0:x(u,n,h)),e+($?0:x(u,n,h))]})),l?k.push({op:"bcurveTo",data:[f+t+(s-t)*g+y(),m+e+(i-e)*g+y(),f+t+2*(s-t)*g+y(),m+e+2*(i-e)*g+y(),s+($?0:y()),i+($?0:y())]}):k.push({op:"bcurveTo",data:[f+t+(s-t)*g+w(),m+e+(i-e)*g+w(),f+t+2*(s-t)*g+w(),m+e+2*(i-e)*g+w(),s+($?0:w()),i+($?0:w())]}),k}function Ue(t,e,s){if(!t.length)return[];const i=[];i.push([t[0][0]+x(e,s),t[0][1]+x(e,s)]),i.push([t[0][0]+x(e,s),t[0][1]+x(e,s)]);for(let n=1;n3){const a=[],l=1-s.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&n.push(a):n.push(a),n.push(t[e+3])}else{const l=t[e+0],o=t[e+1],c=t[e+2],h=t[e+3],u=re(l,o,.5),p=re(o,c,.5),g=re(c,h,.5),f=re(u,p,.5),m=re(p,g,.5),k=re(f,m,.5);Ns([l,u,f,k],0,s,n),Ns([k,m,g,h],0,s,n)}return n}function Zp(t,e){return is(t,0,t.length,e)}function is(t,e,s,i,n){const a=n||[],l=t[e],o=t[s-1];let c=0,h=1;for(let u=e+1;uc&&(c=p,h=u)}return Math.sqrt(c)>i?(is(t,e,h+1,i,a),is(t,h,s,i,a)):(a.length||a.push(l),a.push(o)),a}function Rs(t,e=.15,s){const i=[],n=(t.length-1)/3;for(let a=0;a0?is(i,0,i.length,s):i}function Xp(t,e,s){const i=ti(t),n=Mn(Sn(i)),a=[];let l=[],o=[0,0],c=[];const h=()=>{c.length>=4&&l.push(...Rs(c,e)),c=[]},u=()=>{h(),l.length&&(a.push(l),l=[])};for(const{key:g,data:f}of n)switch(g){case"M":u(),o=[f[0],f[1]],l.push(o);break;case"L":h(),l.push([f[0],f[1]]);break;case"C":if(!c.length){const m=l.length?l[l.length-1]:o;c.push([m[0],m[1]])}c.push([f[0],f[1]]),c.push([f[2],f[3]]),c.push([f[4],f[5]]);break;case"Z":h(),l.push([o[0],o[1]]);break}if(u(),!s)return a;const p=[];for(const g of a){const f=Zp(g,s);f.length&&p.push(f)}return p}const it="none";class Jp{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return $n()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,s,i){return{shape:e,sets:s||[],options:i||this.defaultOptions}}line(e,s,i,n,a){const l=this._o(a);return this._d("line",[rt(e,s,i,n,l)],l)}rectangle(e,s,i,n,a){const l=this._o(a),o=[],c=En(e,s,i,n,l);if(l.fill){const h=[[e,s],[e+i,s],[e+i,s+n],[e,s+n]];l.fillStyle==="solid"?o.push(ys([h],l)):o.push(fe([h],l))}return l.stroke!==it&&o.push(c),this._d("rectangle",o,l)}ellipse(e,s,i,n,a){const l=this._o(a),o=[],c=Tn(i,n,l),h=Is(e,s,l,c);if(l.fill)if(l.fillStyle==="solid"){const u=Is(e,s,l,c).opset;u.type="fillPath",o.push(u)}else o.push(fe([h.estimatedPoints],l));return l.stroke!==it&&o.push(h.opset),this._d("ellipse",o,l)}circle(e,s,i,n){const a=this.ellipse(e,s,i,i,n);return a.shape="circle",a}linearPath(e,s){const i=this._o(s);return this._d("linearPath",[Te(e,!1,i)],i)}arc(e,s,i,n,a,l,o=!1,c){const h=this._o(c),u=[],p=Ei(e,s,i,n,a,l,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const g=Object.assign({},h);g.disableMultiStroke=!0;const f=Ei(e,s,i,n,a,l,!0,!1,g);f.type="fillPath",u.push(f)}else u.push(jp(e,s,i,n,a,l,h));return h.stroke!==it&&u.push(p),this._d("arc",u,h)}curve(e,s){const i=this._o(s),n=[],a=Ci(e,i);if(i.fill&&i.fill!==it)if(i.fillStyle==="solid"){const l=Ci(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else{const l=[],o=e;if(o.length){const h=typeof o[0][0]=="number"?[o]:o;for(const u of h)u.length<3?l.push(...u):u.length===3?l.push(...Rs(Oi([u[0],u[0],u[1],u[2]]),10,(1+i.roughness)/2)):l.push(...Rs(Oi(u),10,(1+i.roughness)/2))}l.length&&n.push(fe([l],i))}return i.stroke!==it&&n.push(a),this._d("curve",n,i)}polygon(e,s){const i=this._o(s),n=[],a=Te(e,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(ys([e],i)):n.push(fe([e],i))),i.stroke!==it&&n.push(a),this._d("polygon",n,i)}path(e,s){const i=this._o(s),n=[];if(!e)return this._d("path",n,i);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==it,l=i.stroke!==it,o=!!(i.simplification&&i.simplification<1),c=o?4-4*(i.simplification||1):(1+i.roughness)/2,h=Xp(e,1,c),u=Ti(e,i);if(a)if(i.fillStyle==="solid")if(h.length===1){const p=Ti(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else n.push(ys(h,i));else n.push(fe(h,i));return l&&(o?h.forEach(p=>{n.push(Te(p,!1,i))}):n.push(u)),this._d("path",n,i)}opsToPath(e,s){let i="";for(const n of e.ops){const a=typeof s=="number"&&s>=0?n.data.map(l=>+l.toFixed(s)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `;break}}return i.trim()}toPaths(e){const s=e.sets||[],i=e.options||this.defaultOptions,n=[];for(const a of s){let l=null;switch(a.type){case"path":l={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:it};break;case"fillPath":l={d:this.opsToPath(a),stroke:it,strokeWidth:0,fill:i.fill||it};break;case"fillSketch":l=this.fillSketch(a,i);break}l&&n.push(l)}return n}fillSketch(e,s){let i=s.fillWeight;return i<0&&(i=s.strokeWidth/2),{d:this.opsToPath(e),stroke:s.fill||it,strokeWidth:i,fill:it}}_mergedShape(e){return e.filter((s,i)=>i===0?!0:s.op!=="move")}}const Pn="http://www.w3.org/2000/svg",Qp=800;let vs=null;function tf(){return vs||(vs=new Jp().defaultOptions),vs}function ws(t,e,s){return{...tf(),maxRandomnessOffset:2,roughness:t==="highlight"?3:1.5,bowing:1,stroke:"#000",strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:t!=="double",disableMultiStrokeFill:!1,seed:e,...s}}function ef(t){const e=t.padding;if(e||e===0){if(typeof e=="number")return[e,e,e,e];if(Array.isArray(e)){const s=e;if(s.length)switch(s.length){case 4:return[...s];case 1:return[s[0],s[0],s[0],s[0]];case 2:return[...s,...s];case 3:return[...s,s[1]];default:return[s[0],s[1],s[2],s[3]]}}}return[5,5,5,5]}function sf(t,e,s,i,n,a){const l=[];let o=s.strokeWidth||2;const c=ef(s),h=s.animate===void 0?!0:!!s.animate,u=s.iterations||2,p=s.rtl?1:0,g=ws("single",a,s);switch(s.type){case"underline":{const f=e.y+e.h+c[2];for(let m=p;m$.setAttribute(M,j);for(const $ of f){const M=document.createElementNS(Pn,"path");if(w(M,"d",$),w(M,"fill","none"),w(M,"stroke",s.color||"currentColor"),w(M,"stroke-width",`${o}`),s.opacity!==void 0&&w(M,"style",`opacity:${s.opacity}`),h){const j=M.getTotalLength();m.push(j),y+=j}t.appendChild(M),k.push(M)}if(h){let $=0;for(let M=0;MsetTimeout(e,t))}function nf(t){const e=[];for(const s of t){let i="";for(const n of s.ops){const a=n.data;switch(n.op){case"move":i.trim()&&e.push(i.trim()),i=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `;break}}i.trim()&&e.push(i.trim())}return e}function rf(){if(!window.__rno_kf_s){const t=window.__rno_kf_s=document.createElement("style");t.textContent="@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }",document.head.appendChild(t)}}var af=Object.defineProperty,lf=(t,e,s)=>e in t?af(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ht=(t,e,s)=>(lf(t,typeof e!="symbol"?e+"":e,s),s);class of{constructor(e,s){ht(this,"_state","unattached"),ht(this,"_config"),ht(this,"_resizing",!1),ht(this,"_ro"),ht(this,"_seed",$n()),ht(this,"_e"),ht(this,"_svg"),ht(this,"_lastSizes",[]),ht(this,"_animationDelay",0),ht(this,"_resizeListener",()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state==="showing"&&this.haveRectsChanged()&&this.show()},400))}),ht(this,"pendingRefresh"),this._e=e,this._config=JSON.parse(JSON.stringify(s)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,s){this._config[e]!==s&&(this._config[e]=s,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" ")))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state==="unattached"&&this._e.parentElement){rf();const e=this._svg=document.createElementNS(Pn,"svg");e.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" "));const s=e.style;s.position="absolute",s.top="0",s.left="0",s.overflow="visible",s.pointerEvents="none",s.width="100px",s.height="100px";const i=this._config.type==="highlight";if(this._e.insertAdjacentElement(i?"beforebegin":"afterend",e),this._state="not-showing",i){const n=window.getComputedStyle(this._e).position;(!n||n==="static")&&(this._e.style.position="relative")}this.attachListeners()}}detachListeners(){window.removeEventListener("resize",this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener("resize",this._resizeListener,{passive:!0}),!this._ro&&"ResizeObserver"in window&&(this._ro=new window.ResizeObserver(e=>{for(const s of e)s.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){const e=this.rects();if(e.length===this._lastSizes.length){for(let s=0;sMath.round(n)===Math.round(a);return i(e.x,s.x)&&i(e.y,s.y)&&i(e.w,s.w)&&i(e.h,s.h)}isShowing(){return this._state!=="not-showing"}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case"unattached":break;case"showing":this.hide(),this._svg&&await this.render(this._svg,!0);break;case"not-showing":this.attach(),this._svg&&await this.render(this._svg,!1);break}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state="not-showing"}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state="unattached",this.detachListeners()}async render(e,s){let i=this._config;s&&(i=JSON.parse(JSON.stringify(this._config)),i.animate=!1);const n=this.rects();let a=0;n.forEach(h=>a+=h.w);const l=i.animationDuration||Qp;let o=0;const c=[];for(let h=0;hObject.assign(t,{type:"box"}),circle:t=>Object.assign(t,{type:"circle"}),underline:t=>Object.assign(t,{type:"underline"}),highlight:t=>Object.assign(t,{type:"highlight"}),"strike-through":t=>Object.assign(t,{type:"strike-through"}),"crossed-off":t=>Object.assign(t,{type:"crossed-off"}),bracket:t=>Object.assign(t,{type:"bracket"}),strike:t=>Object.assign(t,{type:"strike-through"}),cross:t=>Object.assign(t,{type:"crossed-off"}),crossed:t=>Object.assign(t,{type:"crossed-off"}),linethrough:t=>Object.assign(t,{type:"strike-through"}),"line-through":t=>Object.assign(t,{type:"strike-through"}),black:t=>tt(t,"text-black"),blue:t=>tt(t,"text-blue"),cyan:t=>tt(t,"text-cyan"),gray:t=>tt(t,"text-gray"),green:t=>tt(t,"text-green"),indigo:t=>tt(t,"text-indigo"),lime:t=>tt(t,"text-lime"),orange:t=>tt(t,"text-orange"),pink:t=>tt(t,"text-pink"),purple:t=>tt(t,"text-purple"),red:t=>tt(t,"text-red"),teal:t=>tt(t,"text-teal"),white:t=>tt(t,"text-white"),yellow:t=>tt(t,"text-yellow")},hf=[[/^delay-?(\d+)?$/,(t,e,s)=>{const i=(t[1]?Number.parseInt(t[1]):s)||300;return e.delay=i,e}],[/^(?:op|opacity)-?(\d+)?$/,(t,e,s)=>{const i=(t[1]?Number.parseInt(t[1]):s)||100;return e.opacity=i/100,e}]];function uf(){return{install(t){t.directive("mark",{name:"v-mark",mounted:(e,s)=>{const i=d(()=>{const l=typeof s.value=="object"&&!Array.isArray(s.value)?{...s.value}:{at:s.value};let o={at:l.at};const c=Object.entries(s.modifiers).filter(([u,p])=>{if(Ii[u])return o=Ii[u](o,p),!1;for(const[g,f]of hf){const m=u.match(g);if(m)return o=f(m,o,p),!1}return!0});c.length&&console.warn("[Slidev] Invalid modifiers for v-mark:",c);const h={...o,...l};return h.type||(h.type="underline"),h}),n=cf(e,i.value),a=Ve(e,s,i.value.at);if(!a){console.error("[Slidev] Invalid value for v-mark:",i.value.at);return}ee(()=>{let l;i.value.class&&(n.class=i.value.class),i.value.color&&(n.color=i.value.color);const o=i.value.at;if(o===!0)l=!0;else if(o===!1)l=!1;else if(a)l=a.isActive.value;else{console.error("[Slidev] Invalid value for v-mark:",o);return}l!=null&&(l?n.show():n.hide())})}})}}}const Fi=dr(),bs=et("slidev-color-schema","auto"),Ni=d(()=>N.colorSchema!=="auto"),Ln=d({get(){return Ni.value?N.colorSchema==="dark":bs.value==="auto"?Fi.value:bs.value==="dark"},set(t){Ni.value||(bs.value=t===Fi.value?"auto":t?"dark":"light")}}),Yf=ji(Ln);rs&&_e(Ln,t=>{const e=document.querySelector("html");e.classList.toggle("dark",t),e.classList.toggle("light",!t)},{immediate:!0});function df(t){const e=d(()=>t.value.path),s=d(()=>Y.length),i=d(()=>Number.parseInt(e.value.split(/\//g).slice(-1)[0])||1),n=d(()=>ls(i.value)),a=d(()=>Y.find(g=>g.path===`${i.value}`)??Y.at(-1)??Y[0]),l=d(()=>{var g,f,m;return(m=(f=(g=a.value)==null?void 0:g.meta)==null?void 0:f.slide)==null?void 0:m.id}),o=d(()=>{var g,f;return((f=(g=a.value)==null?void 0:g.meta)==null?void 0:f.layout)||(i.value===1?"cover":"default")}),c=d(()=>Y.find(g=>g.path===`${Math.min(Y.length,i.value+1)}`)),h=d(()=>Y.filter(g=>{var f,m;return(m=(f=g.meta)==null?void 0:f.slide)==null?void 0:m.title}).reduce((g,f)=>(Zs(g,f),g),[])),u=d(()=>Xs(h.value,a.value)),p=d(()=>Js(u.value));return{rawRoutes:Y,route:t,path:e,total:s,clicksContext:te,clicks:Vs,clicksTotal:Be,currentPage:i,currentPath:n,currentRoute:a,currentSlideId:l,currentLayout:o,nextRoute:c,rawTree:h,treeWithActiveStatuses:u,tree:p,go:Ys,downloadPDF:gp,next:wn,nextSlide:Gs,openInEditor:mp,prev:bn,prevSlide:Ks}}function pf(t){return{nav:df(t),configs:N,themeConfigs:d(()=>N.themeConfig)}}function ff(){return{install(t){const e=b(pf(mt));t.provide(rn,U("none")),t.provide(nn,e),t.provide(sn,d(()=>e.nav.currentPage))}}}const he=pr(bp);he.use(nt);he.use(ia());he.use($p());he.use(uf());he.use(ff());xp({app:he,router:nt});he.mount("#app");export{Af as $,ra as A,jf as B,$s as C,vf as D,te as E,Zt as F,Wf as G,qf as H,ke as I,yf as J,Pf as K,Re as L,Ea as M,zf as N,Je as O,If as P,Ff as Q,V as R,Gs as S,Ks as T,Ds as U,Yf as V,Nf as W,$f as X,Ys as Y,Mf as Z,C as _,bf as a,Tf as a0,tp as a1,Ef as a2,as as a3,Sf as a4,Es as a5,hp as a6,Vf as a7,Ni as a8,Ln as a9,le as aa,ts as ab,Uf as ac,Bf as ad,gp as ae,fn as af,Gf as ag,Sa as ah,sn as ai,rn as aj,wf as ak,js as al,Se as am,Ts as an,ep as ao,sp as ap,ip as aq,rp as ar,Rf as as,Z as at,D as au,ap as av,tn as aw,xf as b,N as c,Lf as d,Pe as e,lp as f,Qe as g,Hf as h,Cf as i,Df as j,Of as k,_f as l,da as m,wn as n,nn as o,bn as p,df as q,Ta as r,Qd as s,Zi as t,Kf as u,mt as v,Ai as w,_o as x,Y as y,Aa as z}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/slidev/play-CGBDlsHN.js","assets/modules/vue-BoI2EFOv.js","assets/slidev/SlidesShow-D-sR6O06.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/slidev/bottom-DXdIwbm1.js","assets/slidev/DrawingPreview-C05gdWf_.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/SlidesShow-Do3DTZt5.css","assets/slidev/PrintStyle-M7jeBLz1.js","assets/play-CoA43pdi.css","assets/slidev/print-Db79bZhK.js","assets/print-Nssgrd1X.css","assets/slidev/print-Blm48ouN.js","assets/slidev/NoteDisplay-BdeEY5Sw.js","assets/NoteDisplay-C6AkVv8T.css","assets/slidev/presenter-DwcU7Ppu.js","assets/slidev/DrawingControls-CemI06Hp.js","assets/DrawingControls-BO6lw4N5.css","assets/presenter-BRsvFpoV.css"] + __vite__mapDeps.viteFileDeps = ["assets/slidev/play-DSehltPn.js","assets/modules/vue-BoI2EFOv.js","assets/slidev/SlidesShow-aZvHWNC2.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/slidev/bottom-DYeMWyTH.js","assets/slidev/DrawingPreview-DOv9aIwT.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/SlidesShow-Do3DTZt5.css","assets/slidev/PrintStyle-C5A1Lxy8.js","assets/play-CoA43pdi.css","assets/slidev/print-2cNOs_aZ.js","assets/print-Nssgrd1X.css","assets/slidev/print-Ss9g6xiG.js","assets/slidev/NoteDisplay-DVesK58r.js","assets/NoteDisplay-C6AkVv8T.css","assets/slidev/presenter-BJ0i69ip.js","assets/slidev/DrawingControls-CwStMqrz.js","assets/DrawingControls-BO6lw4N5.css","assets/presenter-BRsvFpoV.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/05-restful/assets/slidev/DrawingControls-CemI06Hp.js b/05-restful/assets/slidev/DrawingControls-CwStMqrz.js similarity index 96% rename from 05-restful/assets/slidev/DrawingControls-CemI06Hp.js rename to 05-restful/assets/slidev/DrawingControls-CwStMqrz.js index 4b70677..20fbac7 100644 --- a/05-restful/assets/slidev/DrawingControls-CemI06Hp.js +++ b/05-restful/assets/slidev/DrawingControls-CwStMqrz.js @@ -1 +1 @@ -import{r as j,z as P,A as G,B as H,C as J,D as O,E as T,F as Y,G as Q,H as W,I as X,J as Z}from"../modules/unplugin-icons-CfAESjuq.js";import{d as $,t as h,a2 as ee,ay as ne,b as z,f as se,h as B,z as e,o as f,c as y,k as o,l as s,i as l,e as r,x as te,ah as w,ai as oe,ae as le,F as ae,as as b,g as ie}from"../modules/vue-BoI2EFOv.js";import{L as re}from"../modules/shiki-DdzKTf6Q.js";import{_ as L,am as i,ab as m,an as ue,ao as ce,ap as de,aq as _e,ar as pe,as as u,U as _,at as D}from"../index-BBhYVIJ4.js";import{I as a,V as C}from"./SlidesShow-D-sR6O06.js";import"./bottom-DXdIwbm1.js";import"./DrawingPreview-C05gdWf_.js";const me=$({__name:"Draggable",props:{storageKey:{type:String,required:!1},initial:{type:Object,required:!1}},setup(x){const g=x,v=h(null),p=g.initial??{x:0,y:0},c=g.storageKey?ee(g.storageKey,p):h(p),{style:k}=ne(v,{initialValue:c});return(d,n)=>(f(),z("div",{ref_key:"el",ref:v,class:"fixed",style:B(e(k))},[se(d.$slots,"default")],4))}}),ge=L(me,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Draggable.vue"]]),we=r("svg",{width:"1em",height:"1em",class:"-mt-0.5",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24"},[r("path",{d:"M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z",fill:"currentColor"})],-1),fe=r("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},[r("line",{x1:"2",y1:"15",x2:"22",y2:"4",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round"}),r("line",{x1:"2",y1:"24",x2:"28",y2:"10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),r("line",{x1:"7",y1:"31",x2:"29",y2:"19",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round"})],-1),ve={class:"flex bg-main p-2"},be={class:"inline-block w-7 text-center"},ke={class:"pt-.5"},ye=$({__name:"DrawingControls",setup(x){function g(){D.undo()}function v(){D.redo()}let p="stylus";function c(d){i.value=d,_.value=!0,d!=="eraseLine"&&(p=d)}function k(d){m.color=d,_.value=!0,i.value=p}return(d,n)=>{const M=j,S=P,V=G,U=H,E=J,q=O,A=T,F=Y,I=Q,K=W,N=X,R=Z;return f(),y(ge,{class:l(["flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-20 border border-main",e(_)?"":e(u)?"opacity-40 hover:opacity-90":"opacity-0 pointer-events-none"]),"storage-key":"slidev-drawing-pos","initial-x":10,"initial-y":10},{default:o(()=>[s(a,{title:"Draw with stylus",class:l({shallow:e(i)!=="stylus"}),onClick:n[0]||(n[0]=t=>c("stylus"))},{default:o(()=>[s(M)]),_:1},8,["class"]),s(a,{title:"Draw a line",class:l({shallow:e(i)!=="line"}),onClick:n[1]||(n[1]=t=>c("line"))},{default:o(()=>[we]),_:1},8,["class"]),s(a,{title:"Draw an arrow",class:l({shallow:e(i)!=="arrow"}),onClick:n[2]||(n[2]=t=>c("arrow"))},{default:o(()=>[s(S)]),_:1},8,["class"]),s(a,{title:"Draw an ellipse",class:l({shallow:e(i)!=="ellipse"}),onClick:n[3]||(n[3]=t=>c("ellipse"))},{default:o(()=>[s(V)]),_:1},8,["class"]),s(a,{title:"Draw a rectangle",class:l({shallow:e(i)!=="rectangle"}),onClick:n[4]||(n[4]=t=>c("rectangle"))},{default:o(()=>[s(U)]),_:1},8,["class"]),s(a,{title:"Erase",class:l({shallow:e(i)!=="eraseLine"}),onClick:n[5]||(n[5]=t=>c("eraseLine"))},{default:o(()=>[s(E)]),_:1},8,["class"]),s(C),s(e(re),null,{popper:o(()=>[r("div",ve,[r("div",be,te(e(m).size),1),r("div",ke,[w(r("input",{"onUpdate:modelValue":n[6]||(n[6]=t=>e(m).size=t),type:"range",min:"1",max:"15",onChange:n[7]||(n[7]=t=>i.value=e(p))},null,544),[[oe,e(m).size]])])])]),default:o(()=>[s(a,{title:"Adjust stroke width",class:l({shallow:e(i)==="eraseLine"})},{default:o(()=>[fe]),_:1},8,["class"])]),_:1}),(f(!0),z(ae,null,le(e(ue),t=>(f(),y(a,{key:t,title:"Set brush color",class:l(e(m).color===t&&e(i)!=="eraseLine"?"active":"shallow"),onClick:Ce=>k(t)},{default:o(()=>[r("div",{class:l(["w-6 h-6 transition-all transform border",e(m).color!==t?"rounded-1/2 scale-85 border-white":"rounded-md border-gray-300/50"]),style:B(e(_)?{background:t}:{borderColor:t})},null,6)]),_:2},1032,["class","onClick"]))),128)),s(C),s(a,{title:"Undo",class:l({disabled:!e(ce)}),onClick:n[8]||(n[8]=t=>g())},{default:o(()=>[s(q)]),_:1},8,["class"]),s(a,{title:"Redo",class:l({disabled:!e(de)}),onClick:n[9]||(n[9]=t=>v())},{default:o(()=>[s(A)]),_:1},8,["class"]),s(a,{title:"Delete",class:l({disabled:!e(_e)}),onClick:n[10]||(n[10]=t=>e(pe)())},{default:o(()=>[s(F)]),_:1},8,["class"]),s(C),s(a,{title:e(u)?"Unpin drawing":"Pin drawing",class:l({shallow:!e(u)}),onClick:n[11]||(n[11]=t=>u.value=!e(u))},{default:o(()=>[w(s(I,{class:"transform -rotate-45"},null,512),[[b,e(u)]]),w(s(K,null,null,512),[[b,!e(u)]])]),_:1},8,["title","class"]),e(_)?(f(),y(a,{key:0,title:e(u)?"Drawing pinned":"Drawing unpinned",class:l({shallow:!e(_)}),onClick:n[12]||(n[12]=t=>_.value=!e(_))},{default:o(()=>[w(s(N,null,null,512),[[b,e(u)]]),w(s(R,null,null,512),[[b,!e(u)]])]),_:1},8,["title","class"])):ie("v-if",!0)]),_:1},8,["class"])}}}),Me=L(ye,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/DrawingControls.vue"]]);export{Me as default}; +import{r as j,z as P,A as G,B as H,C as J,D as O,E as T,F as Y,G as Q,H as W,I as X,J as Z}from"../modules/unplugin-icons-CfAESjuq.js";import{d as $,t as h,a2 as ee,ay as ne,b as z,f as se,h as B,z as e,o as f,c as y,k as o,l as s,i as l,e as r,x as te,ah as w,ai as oe,ae as le,F as ae,as as b,g as ie}from"../modules/vue-BoI2EFOv.js";import{L as re}from"../modules/shiki-DdzKTf6Q.js";import{_ as L,am as i,ab as m,an as ue,ao as ce,ap as de,aq as _e,ar as pe,as as u,U as _,at as D}from"../index-CTBKgxrZ.js";import{I as a,V as C}from"./SlidesShow-aZvHWNC2.js";import"./bottom-DYeMWyTH.js";import"./DrawingPreview-DOv9aIwT.js";const me=$({__name:"Draggable",props:{storageKey:{type:String,required:!1},initial:{type:Object,required:!1}},setup(x){const g=x,v=h(null),p=g.initial??{x:0,y:0},c=g.storageKey?ee(g.storageKey,p):h(p),{style:k}=ne(v,{initialValue:c});return(d,n)=>(f(),z("div",{ref_key:"el",ref:v,class:"fixed",style:B(e(k))},[se(d.$slots,"default")],4))}}),ge=L(me,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Draggable.vue"]]),we=r("svg",{width:"1em",height:"1em",class:"-mt-0.5",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24"},[r("path",{d:"M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z",fill:"currentColor"})],-1),fe=r("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},[r("line",{x1:"2",y1:"15",x2:"22",y2:"4",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round"}),r("line",{x1:"2",y1:"24",x2:"28",y2:"10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),r("line",{x1:"7",y1:"31",x2:"29",y2:"19",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round"})],-1),ve={class:"flex bg-main p-2"},be={class:"inline-block w-7 text-center"},ke={class:"pt-.5"},ye=$({__name:"DrawingControls",setup(x){function g(){D.undo()}function v(){D.redo()}let p="stylus";function c(d){i.value=d,_.value=!0,d!=="eraseLine"&&(p=d)}function k(d){m.color=d,_.value=!0,i.value=p}return(d,n)=>{const M=j,S=P,V=G,U=H,E=J,q=O,A=T,F=Y,I=Q,K=W,N=X,R=Z;return f(),y(ge,{class:l(["flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-20 border border-main",e(_)?"":e(u)?"opacity-40 hover:opacity-90":"opacity-0 pointer-events-none"]),"storage-key":"slidev-drawing-pos","initial-x":10,"initial-y":10},{default:o(()=>[s(a,{title:"Draw with stylus",class:l({shallow:e(i)!=="stylus"}),onClick:n[0]||(n[0]=t=>c("stylus"))},{default:o(()=>[s(M)]),_:1},8,["class"]),s(a,{title:"Draw a line",class:l({shallow:e(i)!=="line"}),onClick:n[1]||(n[1]=t=>c("line"))},{default:o(()=>[we]),_:1},8,["class"]),s(a,{title:"Draw an arrow",class:l({shallow:e(i)!=="arrow"}),onClick:n[2]||(n[2]=t=>c("arrow"))},{default:o(()=>[s(S)]),_:1},8,["class"]),s(a,{title:"Draw an ellipse",class:l({shallow:e(i)!=="ellipse"}),onClick:n[3]||(n[3]=t=>c("ellipse"))},{default:o(()=>[s(V)]),_:1},8,["class"]),s(a,{title:"Draw a rectangle",class:l({shallow:e(i)!=="rectangle"}),onClick:n[4]||(n[4]=t=>c("rectangle"))},{default:o(()=>[s(U)]),_:1},8,["class"]),s(a,{title:"Erase",class:l({shallow:e(i)!=="eraseLine"}),onClick:n[5]||(n[5]=t=>c("eraseLine"))},{default:o(()=>[s(E)]),_:1},8,["class"]),s(C),s(e(re),null,{popper:o(()=>[r("div",ve,[r("div",be,te(e(m).size),1),r("div",ke,[w(r("input",{"onUpdate:modelValue":n[6]||(n[6]=t=>e(m).size=t),type:"range",min:"1",max:"15",onChange:n[7]||(n[7]=t=>i.value=e(p))},null,544),[[oe,e(m).size]])])])]),default:o(()=>[s(a,{title:"Adjust stroke width",class:l({shallow:e(i)==="eraseLine"})},{default:o(()=>[fe]),_:1},8,["class"])]),_:1}),(f(!0),z(ae,null,le(e(ue),t=>(f(),y(a,{key:t,title:"Set brush color",class:l(e(m).color===t&&e(i)!=="eraseLine"?"active":"shallow"),onClick:Ce=>k(t)},{default:o(()=>[r("div",{class:l(["w-6 h-6 transition-all transform border",e(m).color!==t?"rounded-1/2 scale-85 border-white":"rounded-md border-gray-300/50"]),style:B(e(_)?{background:t}:{borderColor:t})},null,6)]),_:2},1032,["class","onClick"]))),128)),s(C),s(a,{title:"Undo",class:l({disabled:!e(ce)}),onClick:n[8]||(n[8]=t=>g())},{default:o(()=>[s(q)]),_:1},8,["class"]),s(a,{title:"Redo",class:l({disabled:!e(de)}),onClick:n[9]||(n[9]=t=>v())},{default:o(()=>[s(A)]),_:1},8,["class"]),s(a,{title:"Delete",class:l({disabled:!e(_e)}),onClick:n[10]||(n[10]=t=>e(pe)())},{default:o(()=>[s(F)]),_:1},8,["class"]),s(C),s(a,{title:e(u)?"Unpin drawing":"Pin drawing",class:l({shallow:!e(u)}),onClick:n[11]||(n[11]=t=>u.value=!e(u))},{default:o(()=>[w(s(I,{class:"transform -rotate-45"},null,512),[[b,e(u)]]),w(s(K,null,null,512),[[b,!e(u)]])]),_:1},8,["title","class"]),e(_)?(f(),y(a,{key:0,title:e(u)?"Drawing pinned":"Drawing unpinned",class:l({shallow:!e(_)}),onClick:n[12]||(n[12]=t=>_.value=!e(_))},{default:o(()=>[w(s(N,null,null,512),[[b,e(u)]]),w(s(R,null,null,512),[[b,!e(u)]])]),_:1},8,["title","class"])):ie("v-if",!0)]),_:1},8,["class"])}}}),Me=L(ye,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/DrawingControls.vue"]]);export{Me as default}; diff --git a/05-restful/assets/slidev/DrawingLayer-C8CbKT5s.js b/05-restful/assets/slidev/DrawingLayer-pMDckV8h.js similarity index 91% rename from 05-restful/assets/slidev/DrawingLayer-C8CbKT5s.js rename to 05-restful/assets/slidev/DrawingLayer-pMDckV8h.js index 3995713..e0ed6c9 100644 --- a/05-restful/assets/slidev/DrawingLayer-C8CbKT5s.js +++ b/05-restful/assets/slidev/DrawingLayer-pMDckV8h.js @@ -1 +1 @@ -import{d as r,t as l,T as i,C as u,D as c,b as m,i as d,z as o,o as p}from"../modules/vue-BoI2EFOv.js";import{au as _,at as a,av as f,U as s,_ as v}from"../index-BBhYVIJ4.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const g=r({__name:"DrawingLayer",setup(w){const t=_().$scale,e=l();return i(()=>{a.mount(e.value,e.value.parentElement),u(t,n=>a.options.coordinateScale=1/n,{immediate:!0}),f()}),c(()=>{a.unmount()}),(n,b)=>(p(),m("svg",{ref_key:"svg",ref:e,class:d(["w-full h-full absolute top-0",{"pointer-events-none":!o(s),"touch-none":o(s)}])},null,2))}}),D=v(g,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/DrawingLayer.vue"]]);export{D as default}; +import{d as r,t as l,T as i,C as u,D as c,b as m,i as d,z as o,o as p}from"../modules/vue-BoI2EFOv.js";import{au as _,at as a,av as f,U as s,_ as v}from"../index-CTBKgxrZ.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const g=r({__name:"DrawingLayer",setup(w){const t=_().$scale,e=l();return i(()=>{a.mount(e.value,e.value.parentElement),u(t,n=>a.options.coordinateScale=1/n,{immediate:!0}),f()}),c(()=>{a.unmount()}),(n,b)=>(p(),m("svg",{ref_key:"svg",ref:e,class:d(["w-full h-full absolute top-0",{"pointer-events-none":!o(s),"touch-none":o(s)}])},null,2))}}),D=v(g,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/DrawingLayer.vue"]]);export{D as default}; diff --git a/05-restful/assets/slidev/DrawingPreview-C05gdWf_.js b/05-restful/assets/slidev/DrawingPreview-DOv9aIwT.js similarity index 89% rename from 05-restful/assets/slidev/DrawingPreview-C05gdWf_.js rename to 05-restful/assets/slidev/DrawingPreview-DOv9aIwT.js index 2d171f3..645746e 100644 --- a/05-restful/assets/slidev/DrawingPreview-C05gdWf_.js +++ b/05-restful/assets/slidev/DrawingPreview-DOv9aIwT.js @@ -1 +1 @@ -import{d as n,z as r,o as t,b as s,g as a}from"../modules/vue-BoI2EFOv.js";import{aw as o,_ as i}from"../index-BBhYVIJ4.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const l=["innerHTML"],p=n({__name:"DrawingPreview",props:{page:{type:Number,required:!0}},setup(m){return(e,u)=>r(o)[e.page]?(t(),s("svg",{key:0,class:"w-full h-full absolute top-0 pointer-events-none",innerHTML:r(o)[e.page]},null,8,l)):a("v-if",!0)}}),v=i(p,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/DrawingPreview.vue"]]);export{v as default}; +import{d as n,z as r,o as t,b as s,g as a}from"../modules/vue-BoI2EFOv.js";import{aw as o,_ as i}from"../index-CTBKgxrZ.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const l=["innerHTML"],p=n({__name:"DrawingPreview",props:{page:{type:Number,required:!0}},setup(m){return(e,u)=>r(o)[e.page]?(t(),s("svg",{key:0,class:"w-full h-full absolute top-0 pointer-events-none",innerHTML:r(o)[e.page]},null,8,l)):a("v-if",!0)}}),v=i(p,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/DrawingPreview.vue"]]);export{v as default}; diff --git a/05-restful/assets/slidev/NoteDisplay-BdeEY5Sw.js b/05-restful/assets/slidev/NoteDisplay-DVesK58r.js similarity index 97% rename from 05-restful/assets/slidev/NoteDisplay-BdeEY5Sw.js rename to 05-restful/assets/slidev/NoteDisplay-DVesK58r.js index 682766c..cced496 100644 --- a/05-restful/assets/slidev/NoteDisplay-BdeEY5Sw.js +++ b/05-restful/assets/slidev/NoteDisplay-DVesK58r.js @@ -1 +1 @@ -import{d as D,I as q,t as M,C as H,n as T,T as B,b as m,i as p,e as L,x as b,o as d}from"../modules/vue-BoI2EFOv.js";import{C as w,_ as I}from"../index-BBhYVIJ4.js";const $=["innerHTML"],P=["textContent"],K=["textContent"],k="slidev-note-fade",r="slidev-note-click-mark",R=D({__name:"NoteDisplay",props:{class:{type:String,required:!1},noteHtml:{type:String,required:!1},note:{type:String,required:!1},placeholder:{type:String,required:!1},clicksContext:{type:null,required:!1},autoScroll:{type:Boolean,required:!1}},emits:["markerDblclick","markerClick"],setup(A,{emit:E}){const l=A,v=E,h=q(()=>{var s,n;return((s=l.clicksContext)==null?void 0:s.current)!=null&&((n=l.noteHtml)==null?void 0:n.includes("slidev-note-click-mark"))}),a=M(null);function g(){var S;if(!a.value||!h.value)return;const s=Array.from(a.value.querySelectorAll(`.${r}`)),n=+(((S=l.clicksContext)==null?void 0:S.current)??w),c=n<0||n>=w,y=new Set;function C(e){!e||e===a.value||(y.add(e),e.parentElement&&C(e.parentElement))}const _=new Map;for(const e of s){const t=e.parentElement,o=Number(e.dataset.clicks);_.set(o,e),C(t),Array.from(t.childNodes).forEach(f=>{if(f.nodeType===3){const x=document.createElement("span");x.textContent=f.textContent,t.insertBefore(x,f),f.remove()}})}const N=Array.from(a.value.querySelectorAll("*"));let i=0;const u=new Map;for(const e of N)u.has(i)||u.set(i,[]),u.get(i).push(e),e.classList.contains(r)&&(i=Number(e.dataset.clicks)||i+1);for(const[e,t]of u)c?t.forEach(o=>o.classList.remove(k)):t.forEach(o=>o.classList.toggle(k,y.has(o)?!1:e!==n));for(const[e,t]of _)t.classList.remove(k),t.classList.toggle(`${r}-past`,c?!1:en+1),t.ondblclick=o=>{v("markerDblclick",o,e),!o.defaultPrevented&&(l.clicksContext.current=e,o.stopPropagation(),o.stopImmediatePropagation())},t.onclick=o=>{v("markerClick",o,e)},l.autoScroll&&e===n&&t.scrollIntoView({block:"center",behavior:"smooth"})}return H(()=>{var s;return[l.noteHtml,(s=l.clicksContext)==null?void 0:s.current]},()=>{T(()=>{g()})},{immediate:!0}),B(()=>{g()}),(s,n)=>s.noteHtml?(d(),m("div",{key:0,ref_key:"noteDisplay",ref:a,class:p(["prose overflow-auto outline-none slidev-note",[l.class,h.value?"slidev-note-with-clicks":""]]),innerHTML:s.noteHtml},null,10,$)):s.note?(d(),m("div",{key:1,class:p(["prose overflow-auto outline-none slidev-note",l.class])},[L("p",{textContent:b(s.note)},null,8,P)],2)):(d(),m("div",{key:2,class:p(["prose overflow-auto outline-none opacity-50 italic select-none slidev-note",l.class])},[L("p",{textContent:b(l.placeholder||"No notes.")},null,8,K)],2))}}),F=I(R,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/NoteDisplay.vue"]]);export{F as N}; +import{d as D,I as q,t as M,C as H,n as T,T as B,b as m,i as p,e as L,x as b,o as d}from"../modules/vue-BoI2EFOv.js";import{C as w,_ as I}from"../index-CTBKgxrZ.js";const $=["innerHTML"],P=["textContent"],K=["textContent"],k="slidev-note-fade",r="slidev-note-click-mark",R=D({__name:"NoteDisplay",props:{class:{type:String,required:!1},noteHtml:{type:String,required:!1},note:{type:String,required:!1},placeholder:{type:String,required:!1},clicksContext:{type:null,required:!1},autoScroll:{type:Boolean,required:!1}},emits:["markerDblclick","markerClick"],setup(A,{emit:E}){const l=A,v=E,h=q(()=>{var s,n;return((s=l.clicksContext)==null?void 0:s.current)!=null&&((n=l.noteHtml)==null?void 0:n.includes("slidev-note-click-mark"))}),a=M(null);function g(){var S;if(!a.value||!h.value)return;const s=Array.from(a.value.querySelectorAll(`.${r}`)),n=+(((S=l.clicksContext)==null?void 0:S.current)??w),c=n<0||n>=w,y=new Set;function C(e){!e||e===a.value||(y.add(e),e.parentElement&&C(e.parentElement))}const _=new Map;for(const e of s){const t=e.parentElement,o=Number(e.dataset.clicks);_.set(o,e),C(t),Array.from(t.childNodes).forEach(f=>{if(f.nodeType===3){const x=document.createElement("span");x.textContent=f.textContent,t.insertBefore(x,f),f.remove()}})}const N=Array.from(a.value.querySelectorAll("*"));let i=0;const u=new Map;for(const e of N)u.has(i)||u.set(i,[]),u.get(i).push(e),e.classList.contains(r)&&(i=Number(e.dataset.clicks)||i+1);for(const[e,t]of u)c?t.forEach(o=>o.classList.remove(k)):t.forEach(o=>o.classList.toggle(k,y.has(o)?!1:e!==n));for(const[e,t]of _)t.classList.remove(k),t.classList.toggle(`${r}-past`,c?!1:en+1),t.ondblclick=o=>{v("markerDblclick",o,e),!o.defaultPrevented&&(l.clicksContext.current=e,o.stopPropagation(),o.stopImmediatePropagation())},t.onclick=o=>{v("markerClick",o,e)},l.autoScroll&&e===n&&t.scrollIntoView({block:"center",behavior:"smooth"})}return H(()=>{var s;return[l.noteHtml,(s=l.clicksContext)==null?void 0:s.current]},()=>{T(()=>{g()})},{immediate:!0}),B(()=>{g()}),(s,n)=>s.noteHtml?(d(),m("div",{key:0,ref_key:"noteDisplay",ref:a,class:p(["prose overflow-auto outline-none slidev-note",[l.class,h.value?"slidev-note-with-clicks":""]]),innerHTML:s.noteHtml},null,10,$)):s.note?(d(),m("div",{key:1,class:p(["prose overflow-auto outline-none slidev-note",l.class])},[L("p",{textContent:b(s.note)},null,8,P)],2)):(d(),m("div",{key:2,class:p(["prose overflow-auto outline-none opacity-50 italic select-none slidev-note",l.class])},[L("p",{textContent:b(l.placeholder||"No notes.")},null,8,K)],2))}}),F=I(R,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/NoteDisplay.vue"]]);export{F as N}; diff --git a/05-restful/assets/slidev/PrintStyle-M7jeBLz1.js b/05-restful/assets/slidev/PrintStyle-C5A1Lxy8.js similarity index 87% rename from 05-restful/assets/slidev/PrintStyle-M7jeBLz1.js rename to 05-restful/assets/slidev/PrintStyle-C5A1Lxy8.js index f456069..495a56a 100644 --- a/05-restful/assets/slidev/PrintStyle-M7jeBLz1.js +++ b/05-restful/assets/slidev/PrintStyle-C5A1Lxy8.js @@ -1 +1 @@ -import{d as a,o as l,c as o,k as r,V as p,x as t,z as s,v as _}from"../modules/vue-BoI2EFOv.js";import{m as c,l as d,_ as u}from"../index-BBhYVIJ4.js";const f=a({__name:"PrintStyle",setup(m){function i(n,{slots:e}){if(e.default)return _("style",e.default())}return(n,e)=>(l(),o(i,null,{default:r(()=>[p(" @page { size: "+t(s(c))+"px "+t(s(d))+"px; margin: 0px; } ",1)]),_:1}))}}),y=u(f,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintStyle.vue"]]);export{y as P}; +import{d as a,o as l,c as o,k as r,V as p,x as t,z as s,v as _}from"../modules/vue-BoI2EFOv.js";import{m as c,l as d,_ as u}from"../index-CTBKgxrZ.js";const f=a({__name:"PrintStyle",setup(m){function i(n,{slots:e}){if(e.default)return _("style",e.default())}return(n,e)=>(l(),o(i,null,{default:r(()=>[p(" @page { size: "+t(s(c))+"px "+t(s(d))+"px; margin: 0px; } ",1)]),_:1}))}}),y=u(f,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintStyle.vue"]]);export{y as P}; diff --git a/05-restful/assets/slidev/SlidesShow-D-sR6O06.js b/05-restful/assets/slidev/SlidesShow-aZvHWNC2.js similarity index 98% rename from 05-restful/assets/slidev/SlidesShow-D-sR6O06.js rename to 05-restful/assets/slidev/SlidesShow-aZvHWNC2.js index 7c18482..e3e1852 100644 --- a/05-restful/assets/slidev/SlidesShow-D-sR6O06.js +++ b/05-restful/assets/slidev/SlidesShow-aZvHWNC2.js @@ -1,13 +1,13 @@ -import{t as O,I as E,al as $,am as D,an as Lt,C as xe,ao as At,d as W,ap as Tt,B as lt,af as Nt,Q as Ot,b as f,e as C,f as he,h as fe,i as N,o as c,c as x,k as M,x as Q,m as ct,aq as ut,ab as ze,ar as Pt,l as w,ah as dt,as as ht,z as u,F as B,ae as Ee,at as Dt,g as b,j as pe,au as Vt,V as Pe,ad as Ft,av as jt,ac as Bt,N as De,r as Gt,aw as Kt,ax as Wt}from"../modules/vue-BoI2EFOv.js";import{y as oe,n as ge,p as ye,s as j,S as Ye,T as Xe,U as ee,V as ft,W as pt,X as ae,Y as Me,Z as _t,$ as zt,a0 as Ht,a1 as Ut,a2 as vt,t as Ce,f as Qt,m as Ie,l as Yt,c as ke,a3 as Je,z as Xt,_ as G,a4 as Ve,w as Re,R as we,r as Jt,C as Zt,a5 as de,j as Le,a6 as Ze,e as mt,h as Z,a7 as qt,G as es,a8 as ts,a9 as qe,aa as q,K as _e,ab as ss,ac as ns,L as os,ad as is,ae as rs,b as et,B as as,J as Ae,F as re,H as Te,af as tt,ag as ls,M as cs}from"../index-BBhYVIJ4.js";import{g as us,h as ds,i as hs,j as fs,k as ps,l as _s,m as vs,n as ms,o as gs,p as gt,q as ys,r as ks,s as ws,t as bs,u as Ss,v as xs,w as Ms,x as $s,y as Es}from"../modules/unplugin-icons-CfAESjuq.js";import{S as yt,g as kt,G as Cs,a as Is}from"./bottom-DXdIwbm1.js";import Rs from"./DrawingPreview-C05gdWf_.js";const be=O(1),Se=E(()=>oe.length),A=O(0),He=O(0);function Ls(){A.value>be.value&&(A.value-=1)}function As(){A.valuebe.value){let s=A.value-He.value;sSe.value&&(s=Se.value),A.value=s}}function Os(){const{escape:s,space:e,shift:t,left:n,right:o,up:i,down:r,enter:a,d:l,g:h,o:d,"`":_}=_t;let p=[{name:"next_space",key:$(e,D(t)),fn:ge,autoRepeat:!0},{name:"prev_space",key:$(e,t),fn:ye,autoRepeat:!0},{name:"next_right",key:$(o,D(t),D(j)),fn:ge,autoRepeat:!0},{name:"prev_left",key:$(n,D(t),D(j)),fn:ye,autoRepeat:!0},{name:"next_page_key",key:"pageDown",fn:ge,autoRepeat:!0},{name:"prev_page_key",key:"pageUp",fn:ye,autoRepeat:!0},{name:"next_down",key:$(r,D(j)),fn:Ye,autoRepeat:!0},{name:"prev_up",key:$(i,D(j)),fn:()=>Xe(!1),autoRepeat:!0},{name:"next_shift",key:$(o,t),fn:Ye,autoRepeat:!0},{name:"prev_shift",key:$(n,t),fn:()=>Xe(!1),autoRepeat:!0},{name:"toggle_dark",key:$(l,D(ee)),fn:ft},{name:"toggle_overview",key:$(Lt(d,_),D(ee)),fn:pt},{name:"hide_overview",key:$(s,D(ee)),fn:()=>j.value=!1},{name:"goto",key:$(h,D(ee)),fn:()=>ae.value=!ae.value},{name:"next_overview",key:$(o,j),fn:As},{name:"prev_overview",key:$(n,j),fn:Ls},{name:"up_overview",key:$(i,j),fn:Ts},{name:"down_overview",key:$(r,j),fn:Ns},{name:"goto_from_overview",key:$(a,j),fn:()=>{Me(A.value),j.value=!1}}];const v=new Set(p.map(k=>k.name));if(p.filter(k=>k.name&&v.has(k.name)).length===0){const k=["========== WARNING ==========","defineShortcutsSetup did not return any of the base shortcuts.","See https://sli.dev/custom/config-shortcuts.html for migration.",'If it is intentional, return at least one shortcut with one of the base names (e.g. name:"goto").'].join(` +import{t as O,I as E,al as $,am as D,an as Lt,C as xe,ao as At,d as W,ap as Tt,B as lt,af as Nt,Q as Ot,b as f,e as C,f as he,h as fe,i as N,o as c,c as x,k as M,x as Q,m as ct,aq as ut,ab as ze,ar as Pt,l as w,ah as dt,as as ht,z as u,F as B,ae as Ee,at as Dt,g as b,j as pe,au as Vt,V as Pe,ad as Ft,av as jt,ac as Bt,N as De,r as Gt,aw as Kt,ax as Wt}from"../modules/vue-BoI2EFOv.js";import{y as oe,n as ge,p as ye,s as j,S as Ye,T as Xe,U as ee,V as ft,W as pt,X as ae,Y as Me,Z as _t,$ as zt,a0 as Ht,a1 as Ut,a2 as vt,t as Ce,f as Qt,m as Ie,l as Yt,c as ke,a3 as Je,z as Xt,_ as G,a4 as Ve,w as Re,R as we,r as Jt,C as Zt,a5 as de,j as Le,a6 as Ze,e as mt,h as Z,a7 as qt,G as es,a8 as ts,a9 as qe,aa as q,K as _e,ab as ss,ac as ns,L as os,ad as is,ae as rs,b as et,B as as,J as Ae,F as re,H as Te,af as tt,ag as ls,M as cs}from"../index-CTBKgxrZ.js";import{g as us,h as ds,i as hs,j as fs,k as ps,l as _s,m as vs,n as ms,o as gs,p as gt,q as ys,r as ks,s as ws,t as bs,u as Ss,v as xs,w as Ms,x as $s,y as Es}from"../modules/unplugin-icons-CfAESjuq.js";import{S as yt,g as kt,G as Cs,a as Is}from"./bottom-DYeMWyTH.js";import Rs from"./DrawingPreview-DOv9aIwT.js";const be=O(1),Se=E(()=>oe.length),A=O(0),He=O(0);function Ls(){A.value>be.value&&(A.value-=1)}function As(){A.valuebe.value){let s=A.value-He.value;sSe.value&&(s=Se.value),A.value=s}}function Os(){const{escape:s,space:e,shift:t,left:n,right:o,up:i,down:r,enter:a,d:l,g:h,o:d,"`":_}=_t;let p=[{name:"next_space",key:$(e,D(t)),fn:ge,autoRepeat:!0},{name:"prev_space",key:$(e,t),fn:ye,autoRepeat:!0},{name:"next_right",key:$(o,D(t),D(j)),fn:ge,autoRepeat:!0},{name:"prev_left",key:$(n,D(t),D(j)),fn:ye,autoRepeat:!0},{name:"next_page_key",key:"pageDown",fn:ge,autoRepeat:!0},{name:"prev_page_key",key:"pageUp",fn:ye,autoRepeat:!0},{name:"next_down",key:$(r,D(j)),fn:Ye,autoRepeat:!0},{name:"prev_up",key:$(i,D(j)),fn:()=>Xe(!1),autoRepeat:!0},{name:"next_shift",key:$(o,t),fn:Ye,autoRepeat:!0},{name:"prev_shift",key:$(n,t),fn:()=>Xe(!1),autoRepeat:!0},{name:"toggle_dark",key:$(l,D(ee)),fn:ft},{name:"toggle_overview",key:$(Lt(d,_),D(ee)),fn:pt},{name:"hide_overview",key:$(s,D(ee)),fn:()=>j.value=!1},{name:"goto",key:$(h,D(ee)),fn:()=>ae.value=!ae.value},{name:"next_overview",key:$(o,j),fn:As},{name:"prev_overview",key:$(n,j),fn:Ls},{name:"up_overview",key:$(i,j),fn:Ts},{name:"down_overview",key:$(r,j),fn:Ns},{name:"goto_from_overview",key:$(a,j),fn:()=>{Me(A.value),j.value=!1}}];const v=new Set(p.map(k=>k.name));if(p.filter(k=>k.name&&v.has(k.name)).length===0){const k=["========== WARNING ==========","defineShortcutsSetup did not return any of the base shortcuts.","See https://sli.dev/custom/config-shortcuts.html for migration.",'If it is intentional, return at least one shortcut with one of the base names (e.g. name:"goto").'].join(` `);alert(k),console.warn(k)}return p}const wt=$(D(Ut),D(Ht),zt);function Ps(s,e,t=!1){typeof s=="string"&&(s=_t[s]);const n=$(s,wt);let o=0,i;const r=()=>{if(clearTimeout(i),!n.value){o=0;return}t&&(i=setTimeout(r,Math.max(1e3-o*250,150)),o++),e()};return xe(n,r,{flush:"sync"})}function Ds(s,e){return At(s,t=>{wt.value&&(t.repeat||e())})}function Jo(){const s=Os();new Map(s.map(t=>[t.key,t])).forEach(t=>{t.fn&&Ps(t.key,t.fn,t.autoRepeat)}),Ds("f",()=>vt.toggle())}const Vs=W({__name:"SlideContainer",props:{width:{type:Number},meta:{default:()=>({})},scale:{type:[Number,String]},isMain:{type:Boolean,default:!1}},setup(s){const e=s,t=O(),n=Tt(t),o=E(()=>e.width?e.width:n.width.value),i=E(()=>e.width?e.width/Ce:n.height.value);e.width&<(()=>{t.value&&(t.value.style.width=`${o.value}px`,t.value.style.height=`${i.value}px`)});const r=E(()=>o.value/i.value),a=E(()=>e.scale&&!Qt.value?e.scale:r.value({height:`${Yt}px`,width:`${Ie}px`,transform:`translate(-50%, -50%) scale(${a.value})`,"--slidev-slide-scale":a.value})),h=E(()=>({"select-none":!ke.selectable,"slidev-nav-go-forward":Je.value>0,"slidev-nav-go-backward":Je.value<0}));return e.isMain&&Nt(E(()=>` :root { --slidev-slide-scale: ${a.value}; } - `)),Ot(Xt,a),(d,_)=>(c(),f("div",{id:"slide-container",ref_key:"root",ref:t,class:N(["slidev-slides-container",h.value])},[C("div",{id:"slide-content",class:"slidev-slide-content",style:fe(l.value)},[he(d.$slots,"default")],4),he(d.$slots,"controls")],2))}}),Fs=G(Vs,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/SlideContainer.vue"]]),js={class:"sr-only"},Bs=W({__name:"IconButton",props:{title:{type:String,required:!0},icon:{type:String,required:!1},as:{type:String,required:!1}},setup(s){return(e,t)=>(c(),x(ut(e.as||"button"),ct({class:"slidev-icon-btn",title:e.title},e.$attrs),{default:M(()=>[C("span",js,Q(e.title),1),he(e.$slots,"default",{},()=>[C("div",{class:N(e.icon)},null,2)])]),_:3},16,["title"]))}}),V=G(Bs,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/IconButton.vue"]]),Gs=["onClick"],Ks={class:"text-green font-bold"},Ws={class:"opacity-50"},zs={key:1,class:"opacity-50"},Hs={key:0,class:"fixed top-4 right-4 text-gray-400 flex flex-col items-center gap-2"},Ne=4*16*2,st=2*16,Us=W({__name:"QuickOverview",props:{modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(s,{emit:e}){const o=ze(s,"modelValue",e);function i(){o.value=!1}function r(v){Me(v),i()}function a(v){return v===A.value}const l=Ve.smaller("xs"),h=Ve.smaller("sm"),d=E(()=>l.value?Re.width.value-Ne:h.value?(Re.width.value-Ne-st)/2:300),_=E(()=>Math.floor((Re.width.value-Ne)/(d.value+st))),p=O("");return Pt("keypress",v=>{if(!j.value){p.value="";return}if(v.key==="Enter"){v.preventDefault(),p.value?(r(+p.value),p.value=""):r(A.value);return}const g=Number.parseInt(v.key.replace(/[^0-9]/g,""));if(Number.isNaN(g)){p.value="";return}if(!p.value&&g===0)return;if(p.value+=String(g),+p.value>=oe.length){p.value="";return}const k=oe.findIndex(I=>I.path===p.value);k!==-1&&(A.value=k+1),+p.value*10>oe.length&&(r(+p.value),p.value="")}),lt(()=>{A.value=we.value,He.value=_.value}),(v,g)=>{const k=us,I=ds;return c(),f(B,null,[w(Dt,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 scale-102 !backdrop-blur-0px","leave-active-class":"duration-200 ease-in","leave-to-class":"opacity-0 scale-102 !backdrop-blur-0px",persisted:""},{default:M(()=>[dt(C("div",{class:"bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)]",onClick:g[0]||(g[0]=S=>i())},[C("div",{class:"grid gap-y-4 gap-x-8 w-full",style:fe(`grid-template-columns: repeat(auto-fit,minmax(${d.value}px,1fr))`)},[(c(!0),f(B,null,Ee(u(oe),(S,R)=>(c(),f("div",{key:S.path,class:"relative"},[C("div",{class:N(["inline-block border rounded overflow-hidden bg-main hover:border-primary transition",a(R+1)||u(A)===R+1?"border-primary":"border-main"]),onClick:y=>r(+S.path)},[(c(),x(Fs,{key:S.path,width:d.value,"clicks-disabled":!0,class:"pointer-events-none"},{default:M(()=>[S!=null&&S.component?(c(),x(u(yt),{key:0,is:S.component,"clicks-context":u(Jt)(S,u(Zt)),class:N(u(kt)(S)),route:S,"render-context":"overview"},null,8,["is","clicks-context","class","route"])):b("v-if",!0),w(Rs,{page:+S.path},null,8,["page"])]),_:2},1032,["width"]))],10,Gs),C("div",{class:"absolute top-0",style:fe(`left: ${d.value+5}px`)},[p.value&&String(R+1).startsWith(p.value)?(c(),f(B,{key:0},[C("span",Ks,Q(p.value),1),C("span",Ws,Q(String(R+1).slice(p.value.length)),1)],64)):(c(),f("span",zs,Q(R+1),1))],4)]))),128))],4)],512),[[ht,u(o)]])]),_:1}),u(o)?(c(),f("div",Hs,[w(V,{title:"Close",class:"text-2xl",onClick:i},{default:M(()=>[w(k)]),_:1}),w(V,{as:"a",title:"Slides Overview",target:"_blank",href:"/overview","tab-index":"-1",class:"text-2xl"},{default:M(()=>[w(I)]),_:1})])):b("v-if",!0)],64)}}}),Zo=G(Us,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/QuickOverview.vue"]]);function Y(s){return Array.isArray?Array.isArray(s):xt(s)==="[object Array]"}const Qs=1/0;function Ys(s){if(typeof s=="string")return s;let e=s+"";return e=="0"&&1/s==-Qs?"-0":e}function Xs(s){return s==null?"":Ys(s)}function U(s){return typeof s=="string"}function bt(s){return typeof s=="number"}function Js(s){return s===!0||s===!1||Zs(s)&&xt(s)=="[object Boolean]"}function St(s){return typeof s=="object"}function Zs(s){return St(s)&&s!==null}function F(s){return s!=null}function Oe(s){return!s.trim().length}function xt(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const qs="Incorrect 'index' type",en=s=>`Invalid value for key ${s}`,tn=s=>`Pattern length exceeds max of ${s}.`,sn=s=>`Missing ${s} property in key`,nn=s=>`Property 'weight' in key '${s}' must be a positive integer`,nt=Object.prototype.hasOwnProperty;class on{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{let o=Mt(n);this._keys.push(o),this._keyMap[o.id]=o,t+=o.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Mt(s){let e=null,t=null,n=null,o=1,i=null;if(U(s)||Y(s))n=s,e=ot(s),t=Fe(s);else{if(!nt.call(s,"name"))throw new Error(sn("name"));const r=s.name;if(n=r,nt.call(s,"weight")&&(o=s.weight,o<=0))throw new Error(nn(r));e=ot(r),t=Fe(r),i=s.getFn}return{path:e,id:t,weight:o,src:n,getFn:i}}function ot(s){return Y(s)?s:s.split(".")}function Fe(s){return Y(s)?s.join("."):s}function rn(s,e){let t=[],n=!1;const o=(i,r,a)=>{if(F(i))if(!r[a])t.push(i);else{let l=r[a];const h=i[l];if(!F(h))return;if(a===r.length-1&&(U(h)||bt(h)||Js(h)))t.push(Xs(h));else if(Y(h)){n=!0;for(let d=0,_=h.length;d<_;d+=1)o(h[d],r,a+1)}else r.length&&o(h,r,a+1)}};return o(s,U(e)?e.split("."):e,0),n?t:t[0]}const an={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ln={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(s,e)=>s.score===e.score?s.idx{this._keysMap[t.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,U(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();U(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t{let r=o.getFn?o.getFn(e):this.getFn(e,o.path);if(F(r)){if(Y(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:h,value:d}=l.pop();if(F(d))if(U(d)&&!Oe(d)){let _={v:d,i:h,n:this.norm.get(d)};a.push(_)}else Y(d)&&d.forEach((_,p)=>{l.push({nestedArrIndex:p,value:_})})}n.$[i]=a}else if(U(r)&&!Oe(r)){let a={v:r,n:this.norm.get(r)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function $t(s,e,{getFn:t=m.getFn,fieldNormWeight:n=m.fieldNormWeight}={}){const o=new Ue({getFn:t,fieldNormWeight:n});return o.setKeys(s.map(Mt)),o.setSources(e),o.create(),o}function fn(s,{getFn:e=m.getFn,fieldNormWeight:t=m.fieldNormWeight}={}){const{keys:n,records:o}=s,i=new Ue({getFn:e,fieldNormWeight:t});return i.setKeys(n),i.setIndexRecords(o),i}function ve(s,{errors:e=0,currentLocation:t=0,expectedLocation:n=0,distance:o=m.distance,ignoreLocation:i=m.ignoreLocation}={}){const r=e/s.length;if(i)return r;const a=Math.abs(n-t);return o?r+a/o:a?1:r}function pn(s=[],e=m.minMatchCharLength){let t=[],n=-1,o=-1,i=0;for(let r=s.length;i=e&&t.push([n,o]),n=-1)}return s[i-1]&&i-n>=e&&t.push([n,i-1]),t}const ne=32;function _n(s,e,t,{location:n=m.location,distance:o=m.distance,threshold:i=m.threshold,findAllMatches:r=m.findAllMatches,minMatchCharLength:a=m.minMatchCharLength,includeMatches:l=m.includeMatches,ignoreLocation:h=m.ignoreLocation}={}){if(e.length>ne)throw new Error(tn(ne));const d=e.length,_=s.length,p=Math.max(0,Math.min(n,_));let v=i,g=p;const k=a>1||l,I=k?Array(_):[];let S;for(;(S=s.indexOf(e,g))>-1;){let T=ve(e,{currentLocation:S,expectedLocation:p,distance:o,ignoreLocation:h});if(v=Math.min(T,v),g=S+d,k){let z=0;for(;z=ce;P-=1){let ie=P-1,se=t[s.charAt(ie)];if(k&&(I[ie]=+!!se),J[P]=(J[P+1]<<1|1)&se,T&&(J[P]|=(R[P+1]|R[P])<<1|1|R[P+1]),J[P]&K&&(y=ve(e,{errors:T,currentLocation:ie,expectedLocation:p,distance:o,ignoreLocation:h}),y<=v)){if(v=y,g=ie,g<=p)break;ce=Math.max(1,2*p-g)}}if(ve(e,{errors:T+1,currentLocation:p,expectedLocation:p,distance:o,ignoreLocation:h})>v)break;R=J}const X={isMatch:g>=0,score:Math.max(.001,y)};if(k){const T=pn(I,a);T.length?l&&(X.indices=T):X.isMatch=!1}return X}function vn(s){let e={};for(let t=0,n=s.length;t{this.chunks.push({pattern:p,alphabet:vn(p),startIndex:v})},_=this.pattern.length;if(_>ne){let p=0;const v=_%ne,g=_-v;for(;p{const{isMatch:S,score:R,indices:y}=_n(e,g,k,{location:o+I,distance:i,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:n,ignoreLocation:h});S&&(p=!0),_+=R,S&&y&&(d=[...d,...y])});let v={isMatch:p,score:p?_/this.chunks.length:1};return p&&n&&(v.indices=d),v}}class te{constructor(e){this.pattern=e}static isMultiMatch(e){return it(e,this.multiRegex)}static isSingleMatch(e){return it(e,this.singleRegex)}search(){}}function it(s,e){const t=s.match(e);return t?t[1]:null}class mn extends te{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class gn extends te{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class yn extends te{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class kn extends te{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class wn extends te{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class bn extends te{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Ct extends te{constructor(e,{location:t=m.location,threshold:n=m.threshold,distance:o=m.distance,includeMatches:i=m.includeMatches,findAllMatches:r=m.findAllMatches,minMatchCharLength:a=m.minMatchCharLength,isCaseSensitive:l=m.isCaseSensitive,ignoreLocation:h=m.ignoreLocation}={}){super(e),this._bitapSearch=new Et(e,{location:t,threshold:n,distance:o,includeMatches:i,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class It extends te{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n;const o=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,o.push([n,t-1]);const r=!!o.length;return{isMatch:r,score:r?0:1,indices:o}}}const je=[mn,It,yn,kn,bn,wn,gn,Ct],rt=je.length,Sn=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,xn="|";function Mn(s,e={}){return s.split(xn).map(t=>{let n=t.trim().split(Sn).filter(i=>i&&!!i.trim()),o=[];for(let i=0,r=n.length;i!!(s[$e.AND]||s[$e.OR]),In=s=>!!s[Ke.PATH],Rn=s=>!Y(s)&&St(s)&&!We(s),at=s=>({[$e.AND]:Object.keys(s).map(e=>({[e]:s[e]}))});function Rt(s,e,{auto:t=!0}={}){const n=o=>{let i=Object.keys(o);const r=In(o);if(!r&&i.length>1&&!We(o))return n(at(o));if(Rn(o)){const l=r?o[Ke.PATH]:i[0],h=r?o[Ke.PATTERN]:o[l];if(!U(h))throw new Error(en(l));const d={keyId:Fe(l),pattern:h};return t&&(d.searcher=Ge(h,e)),d}let a={children:[],operator:i[0]};return i.forEach(l=>{const h=o[l];Y(h)&&h.forEach(d=>{a.children.push(n(d))})}),a};return We(s)||(s=at(s)),n(s)}function Ln(s,{ignoreFieldNorm:e=m.ignoreFieldNorm}){s.forEach(t=>{let n=1;t.matches.forEach(({key:o,norm:i,score:r})=>{const a=o?o.weight:null;n*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(e?1:i))}),t.score=n})}function An(s,e){const t=s.matches;e.matches=[],F(t)&&t.forEach(n=>{if(!F(n.indices)||!n.indices.length)return;const{indices:o,value:i}=n;let r={indices:o,value:i};n.key&&(r.key=n.key.src),n.idx>-1&&(r.refIndex=n.idx),e.matches.push(r)})}function Tn(s,e){e.score=s.score}function Nn(s,e,{includeMatches:t=m.includeMatches,includeScore:n=m.includeScore}={}){const o=[];return t&&o.push(An),n&&o.push(Tn),s.map(i=>{const{idx:r}=i,a={item:e[r],refIndex:r};return o.length&&o.forEach(l=>{l(i,a)}),a})}class le{constructor(e,t={},n){this.options={...m,...t},this.options.useExtendedSearch,this._keyStore=new on(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Ue))throw new Error(qs);this._myIndex=t||$t(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){F(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let n=0,o=this._docs.length;n-1&&(l=l.slice(0,t)),Nn(l,this._docs,{includeMatches:n,includeScore:o})}_searchStringList(e){const t=Ge(e,this.options),{records:n}=this._myIndex,o=[];return n.forEach(({v:i,i:r,n:a})=>{if(!F(i))return;const{isMatch:l,score:h,indices:d}=t.searchIn(i);l&&o.push({item:i,idx:r,matches:[{score:h,value:i,norm:a,indices:d}]})}),o}_searchLogical(e){const t=Rt(e,this.options),n=(a,l,h)=>{if(!a.children){const{keyId:_,searcher:p}=a,v=this._findMatches({key:this._keyStore.get(_),value:this._myIndex.getValueForItemAtKeyId(l,_),searcher:p});return v&&v.length?[{idx:h,item:l,matches:v}]:[]}const d=[];for(let _=0,p=a.children.length;_{if(F(a)){let h=n(t,a,l);h.length&&(i[l]||(i[l]={idx:l,item:a,matches:[]},r.push(i[l])),h.forEach(({matches:d})=>{i[l].matches.push(...d)}))}}),r}_searchObjectList(e){const t=Ge(e,this.options),{keys:n,records:o}=this._myIndex,i=[];return o.forEach(({$:r,i:a})=>{if(!F(r))return;let l=[];n.forEach((h,d)=>{l.push(...this._findMatches({key:h,value:r[d],searcher:t}))}),l.length&&i.push({idx:a,item:r,matches:l})}),i}_findMatches({key:e,value:t,searcher:n}){if(!F(t))return[];let o=[];if(Y(t))t.forEach(({v:i,i:r,n:a})=>{if(!F(i))return;const{isMatch:l,score:h,indices:d}=n.searchIn(i);l&&o.push({score:h,key:e,value:i,idx:r,norm:a,indices:d})});else{const{v:i,n:r}=t,{isMatch:a,score:l,indices:h}=n.searchIn(i);a&&o.push({score:l,key:e,value:i,norm:r,indices:h})}return o}}le.version="7.0.0";le.createIndex=$t;le.parseIndex=fn;le.config=m;le.parseQuery=Rt;Cn(En);const On={key:0},Pn={key:1},Dn={key:2},Vn={key:3},Fn={key:4},jn={key:5},Bn={key:6},Gn={key:7},Kn={key:8},Wn={key:9},zn={key:10},Hn={key:11},Un={key:12},Qn={key:13},Yn={key:14},Xn={key:15},Jn={key:16},Zn={key:17},qn={key:18},eo={key:19},to={key:20},so={key:21},no={key:22},oo={key:23},io={key:24},ro={key:25},ao={key:26},lo={key:27},co={key:28},uo={key:29},ho={key:30},fo={key:31},po=W({__name:"titles",props:{no:{type:[Number,String],required:!0}},setup(s){return(e,t)=>(c(),f("div",null,[+e.no==1?(c(),f("p",On,"Software Architecture")):+e.no==2?(c(),f("p",Pn,"回顾")):+e.no==3?(c(),f("p",Dn,"问题一")):+e.no==4?(c(),f("p",Vn,"问题二")):+e.no==5?(c(),f("p",Fn,"RESTful Petclinic")):+e.no==6?(c(),f("p",jn,"REST架构风格")):+e.no==7?(c(),f("p",Bn,"REST")):+e.no==8?(c(),f("p",Gn,"REST")):+e.no==9?(c(),f("p",Kn,"资源")):+e.no==10?(c(),f("p",Wn,"资源标识")):+e.no==11?(c(),f("p",zn,"URI设计原则")):+e.no==12?(c(),f("p",Hn,"统一资源接口")):+e.no==13?(c(),f("p",Un,"GET")):+e.no==14?(c(),f("p",Qn,"POST")):+e.no==15?(c(),f("p",Yn,"PUT")):+e.no==16?(c(),f("p",Xn,"DELETE")):+e.no==17?(c(),f("p",Jn,"指导意义")):+e.no==18?(c(),f("p",Zn,"表现(Representation)/表述/表征")):+e.no==19?(c(),f("p",qn,"资源表述")):+e.no==20?(c(),f("p",eo,"资源表述")):+e.no==21?(c(),f("p",to,"资源表述")):+e.no==22?(c(),f("p",so,"资源链接")):+e.no==23?(c(),f("p",no,"资源链接")):+e.no==24?(c(),f("p",oo,"状态转移(State Transfer)")):+e.no==25?(c(),f("p",io,"undefined")):+e.no==26?(c(),f("p",ro,"一个完整的故事")):+e.no==27?(c(),f("p",ao,"一个完整的故事-2")):+e.no==28?(c(),f("p",lo,"一个完整的故事-3")):+e.no==29?(c(),f("p",co,"一个完整的故事-4")):+e.no==30?(c(),f("p",uo,"一个完整的故事-5")):+e.no==31?(c(),f("p",ho,"Tutorial")):+e.no==32?(c(),f("p",fo,"Demo")):b("v-if",!0)]))}}),_o=G(po,[["__file","/@slidev/titles.md"]]),vo={class:"bg-main transform",shadow:"~",p:"x-4 y-2",border:"~ transparent rounded dark:main"},mo=["value","disabled"],go=["border","onClick"],yo={"w-4":"","text-right":"",op50:"","text-sm":""},ko=W({__name:"Goto",setup(s){const e=O(),t=O(),n=O(),o=O(),i=O(""),r=O(0);function a(y){return y!=null}const l=E(()=>new le(oe.map(y=>{var L;return(L=y.meta)==null?void 0:L.slide}).filter(a),{keys:["no","title"],threshold:.3,shouldSort:!0,minMatchCharLength:1})),h=E(()=>i.value.startsWith("/")?i.value.substring(1):i.value),d=E(()=>l.value.search(h.value).map(y=>y.item)),_=E(()=>!!d.value.length);function p(){if(_.value){const y=d.value.at(r.value||0);y&&Me(y.no)}v()}function v(){i.value="",ae.value=!1}function g(y){y.preventDefault(),r.value++,r.value>=d.value.length&&(r.value=0),I()}function k(y){y.preventDefault(),r.value--,r.value<=-2&&(r.value=d.value.length-1),I()}function I(){var L;const y=(L=o.value)==null?void 0:L[r.value];y&&n.value&&(y.offsetTop+y.offsetHeight>n.value.offsetHeight+n.value.scrollTop?n.value.scrollTo({behavior:"smooth",top:y.offsetTop+y.offsetHeight-n.value.offsetHeight+1}):y.offsetTop{var L;y?(i.value="",r.value=0,setTimeout(()=>{var K;return(K=t.value)==null?void 0:K.focus()},0)):(L=t.value)==null||L.blur()}),xe(de,()=>{var y;(y=e.value)!=null&&y.contains(de.value)||v()}),(y,L)=>(c(),f("div",{id:"slidev-goto-dialog",ref_key:"container",ref:e,class:N(["fixed right-5 transition-all",u(ae)?"top-5":"-top-20"]),"w-90":"","max-w-90":"","min-w-90":""},[C("div",vo,[C("input",{id:"slidev-goto-input",ref_key:"input",ref:t,value:i.value,type:"text",disabled:!u(ae),class:N(["outline-none bg-transparent",{"text-red-400":!_.value&&i.value}]),placeholder:"Goto...",onKeydown:[pe(p,["enter"]),pe(v,["escape"]),pe(g,["down"]),pe(k,["up"])],onInput:S},null,42,mo)]),d.value.length>0?(c(),f("ul",{key:0,ref_key:"list",ref:n,class:"autocomplete-list",shadow:"~",border:"~ transparent rounded dark:main"},[(c(!0),f(B,null,Ee(d.value,(K,X)=>(c(),f("li",{ref_for:!0,ref_key:"items",ref:o,key:K.id,role:"button",tabindex:"0",p:"x-4 y-2","cursor-pointer":"",hover:"op100",flex:"~ gap-2","w-90":"","items-center":"",border:X===0?"":"t main",class:N(r.value===X?"bg-active op100":"op80"),onClick:Vt(T=>R(K.no),["stop","prevent"])},[C("div",yo,Q(K.no),1),w(u(_o),{no:K.no},null,8,["no"])],10,go))),128))],512)):b("v-if",!0)],2))}}),qo=G(ko,[["__scopeId","data-v-9ed224f5"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Goto.vue"]]),wo={class:"select-list"},bo={class:"title"},So={class:"items"},xo=["onClick"],Mo=W({__name:"SelectList",props:{modelValue:{type:[Object,String,Number]},title:{type:String},items:{type:Array}},setup(s,{emit:e}){const o=ze(s,"modelValue",e,{passive:!0});return(i,r)=>{const a=hs;return c(),f("div",wo,[C("div",bo,Q(s.title),1),C("div",So,[(c(!0),f(B,null,Ee(s.items,l=>(c(),f("div",{key:l.value,class:N(["item",{active:u(o)===l.value}]),onClick:()=>{var h;o.value=l.value,(h=l.onClick)==null||h.call(l)}},[w(a,{class:N(["text-green-500",{"opacity-0":u(o)!==l.value}])},null,8,["class"]),Pe(" "+Q(l.display||l.value),1)],10,xo))),128))])])}}}),$o=G(Mo,[["__scopeId","data-v-38e64e7e"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/SelectList.vue"]]),Eo={class:"text-sm"},Co=W({__name:"Settings",setup(s){const e=[{display:"Fit",value:0},{display:"1:1",value:1}];return(t,n)=>(c(),f("div",Eo,[w($o,{modelValue:u(Le),"onUpdate:modelValue":n[0]||(n[0]=o=>Ft(Le)?Le.value=o:null),title:"Scale",items:e},null,8,["modelValue"])]))}}),Io=G(Co,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Settings.vue"]]),Ro={key:0,class:"rounded-md bg-main shadow absolute bottom-10 left-0 z-20","dark:border":"~ main"},Lo=W({__name:"MenuButton",props:{modelValue:{default:!1},disabled:{default:!1}},setup(s,{emit:e}){const o=ze(s,"modelValue",e,{passive:!0}),i=O();return jt(i,()=>{o.value=!1}),(r,a)=>(c(),f("div",{ref_key:"el",ref:i,class:"flex relative"},[C("button",{class:N({disabled:s.disabled}),onClick:a[0]||(a[0]=l=>o.value=!u(o))},[he(r.$slots,"button",{class:N({disabled:s.disabled})})],2),(c(),x(Bt,null,[u(o)?(c(),f("div",Ro,[he(r.$slots,"menu")])):b("v-if",!0)],1024))],512))}}),Ao=G(Lo,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/MenuButton.vue"]]),To={},No={class:"w-1px opacity-10 bg-current m-1 lg:m-2"};function Oo(s,e){return c(),f("div",No)}const me=G(To,[["render",Oo],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/VerticalDivider.vue"]]),Po={render(){return[]}},Do={class:"h-40px flex",p:"l-1 t-0.5 r-2",text:"sm leading-2"},Vo={class:"my-auto"},Fo={class:"opacity-50"},jo=W({__name:"NavControls",props:{persist:{default:!1}},setup(s){const e=s,t=Ve.smaller("md"),{isFullscreen:n,toggle:o}=vt,i=E(()=>Ze.value?`?password=${Ze.value}`:""),r=E(()=>`/presenter/${we.value}${i.value}`),a=E(()=>`/${we.value}${i.value}`),l=O();function h(){l.value&&de.value&&l.value.contains(de.value)&&de.value.blur()}const d=E(()=>e.persist?"text-$slidev-controls-foreground bg-transparent":"rounded-md bg-main shadow dark:border dark:border-main"),_=De(),p=De();return mt(()=>import("./DrawingControls-CemI06Hp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(v=>p.value=v.default),(v,g)=>{const k=fs,I=ps,S=_s,R=vs,y=bs,L=ms,K=gs,X=gt,T=ys,z=ks,H=Ss,ce=Gt("RouterLink"),ue=xs,J=Ms,Qe=$s,P=Es,ie=ws;return c(),f("nav",{ref_key:"root",ref:l,class:"flex flex-col"},[C("div",{class:N(["flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:gap-1 lg:p-2",d.value]),onMouseleave:h},[u(Z)?b("v-if",!0):(c(),x(V,{key:0,title:u(n)?"Close fullscreen":"Enter fullscreen",onClick:u(o)},{default:M(()=>[u(n)?(c(),x(k,{key:0})):(c(),x(I,{key:1}))]),_:1},8,["title","onClick"])),w(V,{class:N({disabled:!u(qt)}),title:"Go to previous slide",onClick:u(ye)},{default:M(()=>[w(S)]),_:1},8,["class","onClick"]),w(V,{class:N({disabled:!u(es)}),title:"Go to next slide",onClick:u(ge)},{default:M(()=>[w(R)]),_:1},8,["class","onClick"]),u(Z)?b("v-if",!0):(c(),x(V,{key:1,title:"Show slide overview",onClick:g[0]||(g[0]=se=>u(pt)())},{default:M(()=>[w(y)]),_:1})),u(ts)?b("v-if",!0):(c(),x(V,{key:2,title:u(qe)?"Switch to light mode theme":"Switch to dark mode theme",onClick:g[1]||(g[1]=se=>u(ft)())},{default:M(()=>[u(qe)?(c(),x(L,{key:0})):(c(),x(K,{key:1}))]),_:1},8,["title"])),w(me),u(Z)?b("v-if",!0):(c(),f(B,{key:3},[!u(q)&&!u(t)&&_.value?(c(),f(B,{key:0},[w(u(_)),w(me)],64)):b("v-if",!0),u(q)?(c(),x(V,{key:1,title:u(_e)?"Hide presenter cursor":"Show presenter cursor",onClick:g[2]||(g[2]=se=>_e.value=!u(_e))},{default:M(()=>[u(_e)?(c(),x(X,{key:0})):(c(),x(T,{key:1}))]),_:1},8,["title"])):b("v-if",!0)],64)),(!u(ke).drawings.presenterOnly||u(q))&&!u(Z)?(c(),f(B,{key:4},[w(V,{class:"relative",title:u(ee)?"Hide drawing toolbar":"Show drawing toolbar",onClick:g[3]||(g[3]=se=>ee.value=!u(ee))},{default:M(()=>[w(z),u(ee)?(c(),f("div",{key:0,class:"absolute left-1 right-1 bottom-0 h-0.7 rounded-full",style:fe({background:u(ss).color})},null,4)):b("v-if",!0)]),_:1},8,["title"]),w(me)],64)):b("v-if",!0),u(Z)?b("v-if",!0):(c(),f(B,{key:5},[u(q)?(c(),x(ce,{key:0,to:a.value,class:"slidev-icon-btn",title:"Play Mode"},{default:M(()=>[w(H)]),_:1},8,["to"])):b("v-if",!0),u(ns)?(c(),x(ce,{key:1,to:r.value,class:"slidev-icon-btn",title:"Presenter Mode"},{default:M(()=>[w(ue)]),_:1},8,["to"])):b("v-if",!0),b("v-if",!0),u(q)?(c(),x(V,{key:3,title:"Toggle Presenter Layout",class:"aspect-ratio-initial",onClick:u(is)},{default:M(()=>[w(J),Pe(" "+Q(u(os)),1)]),_:1},8,["onClick"])):b("v-if",!0)],64)),(c(),f(B,{key:6},[u(ke).download?(c(),x(V,{key:0,title:"Download as PDF",onClick:u(rs)},{default:M(()=>[w(Qe)]),_:1},8,["onClick"])):b("v-if",!0)],64)),!u(q)&&u(ke).info&&!u(Z)?(c(),x(V,{key:7,title:"Show info",onClick:g[5]||(g[5]=se=>et.value=!u(et))},{default:M(()=>[w(P)]),_:1})):b("v-if",!0),!u(q)&&!u(Z)?(c(),x(Ao,{key:8},{button:M(()=>[w(V,{title:"Adjust settings"},{default:M(()=>[w(ie)]),_:1})]),menu:M(()=>[w(Io)]),_:1})):b("v-if",!0),u(Z)?b("v-if",!0):(c(),x(me,{key:9})),C("div",Do,[C("div",Vo,[Pe(Q(u(we))+" ",1),C("span",Fo,"/ "+Q(u(as)),1)])]),w(u(Po))],34)],512)}}}),ei=G(jo,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/NavControls.vue"]]);function Bo(){const s=Kt(),e=O(!1);let t,n;const o=typeof document<"u"&&"startViewTransition"in document;return s.beforeResolve((i,r)=>{var v,g;const a=(v=r.meta.slide)==null?void 0:v.no,l=(g=i.meta.slide)==null?void 0:g.no;if(!(a!==void 0&&l!==void 0&&(r.meta.transition==="view-transition"&&a{t=k,n=I});let d;const _=new Promise(k=>d=k);return document.startViewTransition(()=>(d(),h)).finished.then(()=>{n=void 0,t=void 0}),_}),o&&s.afterEach(()=>{t==null||t(),n==null||n()}),e}const Go={key:0,class:"absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl"},Ko=W({__name:"PresenterMouse",setup(s){return(e,t)=>{const n=gt;return u(Ae).cursor?(c(),f("div",Go,[w(n,{class:"absolute",style:fe({left:`${u(Ae).cursor.x}%`,top:`${u(Ae).cursor.y}%`})},null,8,["style"])])):b("v-if",!0)}}}),Wo=G(Ko,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PresenterMouse.vue"]]),zo=W({__name:"SlidesShow",props:{renderContext:{type:String,required:!0}},setup(s){xe(re,()=>{var i,r;(i=re.value)!=null&&i.meta&&re.value.meta.preload!==!1&&(re.value.meta.__preloaded=!0),(r=Te.value)!=null&&r.meta&&Te.value.meta.preload!==!1&&(Te.value.meta.__preloaded=!0)},{immediate:!0});const e=Bo(),t=De();mt(()=>import("./DrawingLayer-C8CbKT5s.js"),__vite__mapDeps([10,2,5,1,3,4,6])).then(i=>t.value=i.default);const n=E(()=>oe.filter(i=>{var r;return((r=i.meta)==null?void 0:r.__preloaded)||i===re.value}));function o(){tt.value=!0}return(i,r)=>(c(),f(B,null,[b(" Global Bottom "),w(u(Cs)),b(" Slides "),(c(),x(ut(u(e)?"div":Wt),ct(u(tt)?{}:u(ls),{id:"slideshow",tag:"div",onAfterLeave:o}),{default:M(()=>[(c(!0),f(B,null,Ee(n.value,a=>dt((c(),x(u(yt),{key:a.path,is:a==null?void 0:a.component,"clicks-context":u(cs)(a),class:N([u(kt)(a),"overflow-hidden"]),route:a,"render-context":i.renderContext},null,8,["is","clicks-context","class","route","render-context"])),[[ht,a===u(re)]])),128))]),_:1},16)),b(" Global Top "),w(u(Is)),t.value?(c(),x(u(t),{key:0})):b("v-if",!0),u(q)?b("v-if",!0):(c(),x(Wo,{key:1}))],64))}}),ti=G(zo,[["__scopeId","data-v-2fe83b23"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/SlidesShow.vue"]]);export{qo as G,V as I,ei as N,Zo as Q,ti as S,me as V,Fs as a,Jo as r}; + `)),Ot(Xt,a),(d,_)=>(c(),f("div",{id:"slide-container",ref_key:"root",ref:t,class:N(["slidev-slides-container",h.value])},[C("div",{id:"slide-content",class:"slidev-slide-content",style:fe(l.value)},[he(d.$slots,"default")],4),he(d.$slots,"controls")],2))}}),Fs=G(Vs,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/SlideContainer.vue"]]),js={class:"sr-only"},Bs=W({__name:"IconButton",props:{title:{type:String,required:!0},icon:{type:String,required:!1},as:{type:String,required:!1}},setup(s){return(e,t)=>(c(),x(ut(e.as||"button"),ct({class:"slidev-icon-btn",title:e.title},e.$attrs),{default:M(()=>[C("span",js,Q(e.title),1),he(e.$slots,"default",{},()=>[C("div",{class:N(e.icon)},null,2)])]),_:3},16,["title"]))}}),V=G(Bs,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/IconButton.vue"]]),Gs=["onClick"],Ks={class:"text-green font-bold"},Ws={class:"opacity-50"},zs={key:1,class:"opacity-50"},Hs={key:0,class:"fixed top-4 right-4 text-gray-400 flex flex-col items-center gap-2"},Ne=4*16*2,st=2*16,Us=W({__name:"QuickOverview",props:{modelValue:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(s,{emit:e}){const o=ze(s,"modelValue",e);function i(){o.value=!1}function r(v){Me(v),i()}function a(v){return v===A.value}const l=Ve.smaller("xs"),h=Ve.smaller("sm"),d=E(()=>l.value?Re.width.value-Ne:h.value?(Re.width.value-Ne-st)/2:300),_=E(()=>Math.floor((Re.width.value-Ne)/(d.value+st))),p=O("");return Pt("keypress",v=>{if(!j.value){p.value="";return}if(v.key==="Enter"){v.preventDefault(),p.value?(r(+p.value),p.value=""):r(A.value);return}const g=Number.parseInt(v.key.replace(/[^0-9]/g,""));if(Number.isNaN(g)){p.value="";return}if(!p.value&&g===0)return;if(p.value+=String(g),+p.value>=oe.length){p.value="";return}const k=oe.findIndex(I=>I.path===p.value);k!==-1&&(A.value=k+1),+p.value*10>oe.length&&(r(+p.value),p.value="")}),lt(()=>{A.value=we.value,He.value=_.value}),(v,g)=>{const k=us,I=ds;return c(),f(B,null,[w(Dt,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 scale-102 !backdrop-blur-0px","leave-active-class":"duration-200 ease-in","leave-to-class":"opacity-0 scale-102 !backdrop-blur-0px",persisted:""},{default:M(()=>[dt(C("div",{class:"bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)]",onClick:g[0]||(g[0]=S=>i())},[C("div",{class:"grid gap-y-4 gap-x-8 w-full",style:fe(`grid-template-columns: repeat(auto-fit,minmax(${d.value}px,1fr))`)},[(c(!0),f(B,null,Ee(u(oe),(S,R)=>(c(),f("div",{key:S.path,class:"relative"},[C("div",{class:N(["inline-block border rounded overflow-hidden bg-main hover:border-primary transition",a(R+1)||u(A)===R+1?"border-primary":"border-main"]),onClick:y=>r(+S.path)},[(c(),x(Fs,{key:S.path,width:d.value,"clicks-disabled":!0,class:"pointer-events-none"},{default:M(()=>[S!=null&&S.component?(c(),x(u(yt),{key:0,is:S.component,"clicks-context":u(Jt)(S,u(Zt)),class:N(u(kt)(S)),route:S,"render-context":"overview"},null,8,["is","clicks-context","class","route"])):b("v-if",!0),w(Rs,{page:+S.path},null,8,["page"])]),_:2},1032,["width"]))],10,Gs),C("div",{class:"absolute top-0",style:fe(`left: ${d.value+5}px`)},[p.value&&String(R+1).startsWith(p.value)?(c(),f(B,{key:0},[C("span",Ks,Q(p.value),1),C("span",Ws,Q(String(R+1).slice(p.value.length)),1)],64)):(c(),f("span",zs,Q(R+1),1))],4)]))),128))],4)],512),[[ht,u(o)]])]),_:1}),u(o)?(c(),f("div",Hs,[w(V,{title:"Close",class:"text-2xl",onClick:i},{default:M(()=>[w(k)]),_:1}),w(V,{as:"a",title:"Slides Overview",target:"_blank",href:"/overview","tab-index":"-1",class:"text-2xl"},{default:M(()=>[w(I)]),_:1})])):b("v-if",!0)],64)}}}),Zo=G(Us,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/QuickOverview.vue"]]);function Y(s){return Array.isArray?Array.isArray(s):xt(s)==="[object Array]"}const Qs=1/0;function Ys(s){if(typeof s=="string")return s;let e=s+"";return e=="0"&&1/s==-Qs?"-0":e}function Xs(s){return s==null?"":Ys(s)}function U(s){return typeof s=="string"}function bt(s){return typeof s=="number"}function Js(s){return s===!0||s===!1||Zs(s)&&xt(s)=="[object Boolean]"}function St(s){return typeof s=="object"}function Zs(s){return St(s)&&s!==null}function F(s){return s!=null}function Oe(s){return!s.trim().length}function xt(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const qs="Incorrect 'index' type",en=s=>`Invalid value for key ${s}`,tn=s=>`Pattern length exceeds max of ${s}.`,sn=s=>`Missing ${s} property in key`,nn=s=>`Property 'weight' in key '${s}' must be a positive integer`,nt=Object.prototype.hasOwnProperty;class on{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{let o=Mt(n);this._keys.push(o),this._keyMap[o.id]=o,t+=o.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Mt(s){let e=null,t=null,n=null,o=1,i=null;if(U(s)||Y(s))n=s,e=ot(s),t=Fe(s);else{if(!nt.call(s,"name"))throw new Error(sn("name"));const r=s.name;if(n=r,nt.call(s,"weight")&&(o=s.weight,o<=0))throw new Error(nn(r));e=ot(r),t=Fe(r),i=s.getFn}return{path:e,id:t,weight:o,src:n,getFn:i}}function ot(s){return Y(s)?s:s.split(".")}function Fe(s){return Y(s)?s.join("."):s}function rn(s,e){let t=[],n=!1;const o=(i,r,a)=>{if(F(i))if(!r[a])t.push(i);else{let l=r[a];const h=i[l];if(!F(h))return;if(a===r.length-1&&(U(h)||bt(h)||Js(h)))t.push(Xs(h));else if(Y(h)){n=!0;for(let d=0,_=h.length;d<_;d+=1)o(h[d],r,a+1)}else r.length&&o(h,r,a+1)}};return o(s,U(e)?e.split("."):e,0),n?t:t[0]}const an={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ln={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(s,e)=>s.score===e.score?s.idx{this._keysMap[t.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,U(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();U(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t{let r=o.getFn?o.getFn(e):this.getFn(e,o.path);if(F(r)){if(Y(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:h,value:d}=l.pop();if(F(d))if(U(d)&&!Oe(d)){let _={v:d,i:h,n:this.norm.get(d)};a.push(_)}else Y(d)&&d.forEach((_,p)=>{l.push({nestedArrIndex:p,value:_})})}n.$[i]=a}else if(U(r)&&!Oe(r)){let a={v:r,n:this.norm.get(r)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function $t(s,e,{getFn:t=m.getFn,fieldNormWeight:n=m.fieldNormWeight}={}){const o=new Ue({getFn:t,fieldNormWeight:n});return o.setKeys(s.map(Mt)),o.setSources(e),o.create(),o}function fn(s,{getFn:e=m.getFn,fieldNormWeight:t=m.fieldNormWeight}={}){const{keys:n,records:o}=s,i=new Ue({getFn:e,fieldNormWeight:t});return i.setKeys(n),i.setIndexRecords(o),i}function ve(s,{errors:e=0,currentLocation:t=0,expectedLocation:n=0,distance:o=m.distance,ignoreLocation:i=m.ignoreLocation}={}){const r=e/s.length;if(i)return r;const a=Math.abs(n-t);return o?r+a/o:a?1:r}function pn(s=[],e=m.minMatchCharLength){let t=[],n=-1,o=-1,i=0;for(let r=s.length;i=e&&t.push([n,o]),n=-1)}return s[i-1]&&i-n>=e&&t.push([n,i-1]),t}const ne=32;function _n(s,e,t,{location:n=m.location,distance:o=m.distance,threshold:i=m.threshold,findAllMatches:r=m.findAllMatches,minMatchCharLength:a=m.minMatchCharLength,includeMatches:l=m.includeMatches,ignoreLocation:h=m.ignoreLocation}={}){if(e.length>ne)throw new Error(tn(ne));const d=e.length,_=s.length,p=Math.max(0,Math.min(n,_));let v=i,g=p;const k=a>1||l,I=k?Array(_):[];let S;for(;(S=s.indexOf(e,g))>-1;){let T=ve(e,{currentLocation:S,expectedLocation:p,distance:o,ignoreLocation:h});if(v=Math.min(T,v),g=S+d,k){let z=0;for(;z=ce;P-=1){let ie=P-1,se=t[s.charAt(ie)];if(k&&(I[ie]=+!!se),J[P]=(J[P+1]<<1|1)&se,T&&(J[P]|=(R[P+1]|R[P])<<1|1|R[P+1]),J[P]&K&&(y=ve(e,{errors:T,currentLocation:ie,expectedLocation:p,distance:o,ignoreLocation:h}),y<=v)){if(v=y,g=ie,g<=p)break;ce=Math.max(1,2*p-g)}}if(ve(e,{errors:T+1,currentLocation:p,expectedLocation:p,distance:o,ignoreLocation:h})>v)break;R=J}const X={isMatch:g>=0,score:Math.max(.001,y)};if(k){const T=pn(I,a);T.length?l&&(X.indices=T):X.isMatch=!1}return X}function vn(s){let e={};for(let t=0,n=s.length;t{this.chunks.push({pattern:p,alphabet:vn(p),startIndex:v})},_=this.pattern.length;if(_>ne){let p=0;const v=_%ne,g=_-v;for(;p{const{isMatch:S,score:R,indices:y}=_n(e,g,k,{location:o+I,distance:i,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:n,ignoreLocation:h});S&&(p=!0),_+=R,S&&y&&(d=[...d,...y])});let v={isMatch:p,score:p?_/this.chunks.length:1};return p&&n&&(v.indices=d),v}}class te{constructor(e){this.pattern=e}static isMultiMatch(e){return it(e,this.multiRegex)}static isSingleMatch(e){return it(e,this.singleRegex)}search(){}}function it(s,e){const t=s.match(e);return t?t[1]:null}class mn extends te{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class gn extends te{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class yn extends te{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class kn extends te{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class wn extends te{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class bn extends te{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Ct extends te{constructor(e,{location:t=m.location,threshold:n=m.threshold,distance:o=m.distance,includeMatches:i=m.includeMatches,findAllMatches:r=m.findAllMatches,minMatchCharLength:a=m.minMatchCharLength,isCaseSensitive:l=m.isCaseSensitive,ignoreLocation:h=m.ignoreLocation}={}){super(e),this._bitapSearch=new Et(e,{location:t,threshold:n,distance:o,includeMatches:i,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class It extends te{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n;const o=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,o.push([n,t-1]);const r=!!o.length;return{isMatch:r,score:r?0:1,indices:o}}}const je=[mn,It,yn,kn,bn,wn,gn,Ct],rt=je.length,Sn=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,xn="|";function Mn(s,e={}){return s.split(xn).map(t=>{let n=t.trim().split(Sn).filter(i=>i&&!!i.trim()),o=[];for(let i=0,r=n.length;i!!(s[$e.AND]||s[$e.OR]),In=s=>!!s[Ke.PATH],Rn=s=>!Y(s)&&St(s)&&!We(s),at=s=>({[$e.AND]:Object.keys(s).map(e=>({[e]:s[e]}))});function Rt(s,e,{auto:t=!0}={}){const n=o=>{let i=Object.keys(o);const r=In(o);if(!r&&i.length>1&&!We(o))return n(at(o));if(Rn(o)){const l=r?o[Ke.PATH]:i[0],h=r?o[Ke.PATTERN]:o[l];if(!U(h))throw new Error(en(l));const d={keyId:Fe(l),pattern:h};return t&&(d.searcher=Ge(h,e)),d}let a={children:[],operator:i[0]};return i.forEach(l=>{const h=o[l];Y(h)&&h.forEach(d=>{a.children.push(n(d))})}),a};return We(s)||(s=at(s)),n(s)}function Ln(s,{ignoreFieldNorm:e=m.ignoreFieldNorm}){s.forEach(t=>{let n=1;t.matches.forEach(({key:o,norm:i,score:r})=>{const a=o?o.weight:null;n*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(e?1:i))}),t.score=n})}function An(s,e){const t=s.matches;e.matches=[],F(t)&&t.forEach(n=>{if(!F(n.indices)||!n.indices.length)return;const{indices:o,value:i}=n;let r={indices:o,value:i};n.key&&(r.key=n.key.src),n.idx>-1&&(r.refIndex=n.idx),e.matches.push(r)})}function Tn(s,e){e.score=s.score}function Nn(s,e,{includeMatches:t=m.includeMatches,includeScore:n=m.includeScore}={}){const o=[];return t&&o.push(An),n&&o.push(Tn),s.map(i=>{const{idx:r}=i,a={item:e[r],refIndex:r};return o.length&&o.forEach(l=>{l(i,a)}),a})}class le{constructor(e,t={},n){this.options={...m,...t},this.options.useExtendedSearch,this._keyStore=new on(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Ue))throw new Error(qs);this._myIndex=t||$t(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){F(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let n=0,o=this._docs.length;n-1&&(l=l.slice(0,t)),Nn(l,this._docs,{includeMatches:n,includeScore:o})}_searchStringList(e){const t=Ge(e,this.options),{records:n}=this._myIndex,o=[];return n.forEach(({v:i,i:r,n:a})=>{if(!F(i))return;const{isMatch:l,score:h,indices:d}=t.searchIn(i);l&&o.push({item:i,idx:r,matches:[{score:h,value:i,norm:a,indices:d}]})}),o}_searchLogical(e){const t=Rt(e,this.options),n=(a,l,h)=>{if(!a.children){const{keyId:_,searcher:p}=a,v=this._findMatches({key:this._keyStore.get(_),value:this._myIndex.getValueForItemAtKeyId(l,_),searcher:p});return v&&v.length?[{idx:h,item:l,matches:v}]:[]}const d=[];for(let _=0,p=a.children.length;_{if(F(a)){let h=n(t,a,l);h.length&&(i[l]||(i[l]={idx:l,item:a,matches:[]},r.push(i[l])),h.forEach(({matches:d})=>{i[l].matches.push(...d)}))}}),r}_searchObjectList(e){const t=Ge(e,this.options),{keys:n,records:o}=this._myIndex,i=[];return o.forEach(({$:r,i:a})=>{if(!F(r))return;let l=[];n.forEach((h,d)=>{l.push(...this._findMatches({key:h,value:r[d],searcher:t}))}),l.length&&i.push({idx:a,item:r,matches:l})}),i}_findMatches({key:e,value:t,searcher:n}){if(!F(t))return[];let o=[];if(Y(t))t.forEach(({v:i,i:r,n:a})=>{if(!F(i))return;const{isMatch:l,score:h,indices:d}=n.searchIn(i);l&&o.push({score:h,key:e,value:i,idx:r,norm:a,indices:d})});else{const{v:i,n:r}=t,{isMatch:a,score:l,indices:h}=n.searchIn(i);a&&o.push({score:l,key:e,value:i,norm:r,indices:h})}return o}}le.version="7.0.0";le.createIndex=$t;le.parseIndex=fn;le.config=m;le.parseQuery=Rt;Cn(En);const On={key:0},Pn={key:1},Dn={key:2},Vn={key:3},Fn={key:4},jn={key:5},Bn={key:6},Gn={key:7},Kn={key:8},Wn={key:9},zn={key:10},Hn={key:11},Un={key:12},Qn={key:13},Yn={key:14},Xn={key:15},Jn={key:16},Zn={key:17},qn={key:18},eo={key:19},to={key:20},so={key:21},no={key:22},oo={key:23},io={key:24},ro={key:25},ao={key:26},lo={key:27},co={key:28},uo={key:29},ho={key:30},fo={key:31},po=W({__name:"titles",props:{no:{type:[Number,String],required:!0}},setup(s){return(e,t)=>(c(),f("div",null,[+e.no==1?(c(),f("p",On,"Software Architecture")):+e.no==2?(c(),f("p",Pn,"回顾")):+e.no==3?(c(),f("p",Dn,"问题一")):+e.no==4?(c(),f("p",Vn,"问题二")):+e.no==5?(c(),f("p",Fn,"RESTful Petclinic")):+e.no==6?(c(),f("p",jn,"REST架构风格")):+e.no==7?(c(),f("p",Bn,"REST")):+e.no==8?(c(),f("p",Gn,"REST")):+e.no==9?(c(),f("p",Kn,"资源")):+e.no==10?(c(),f("p",Wn,"资源标识")):+e.no==11?(c(),f("p",zn,"URI设计原则")):+e.no==12?(c(),f("p",Hn,"统一资源接口")):+e.no==13?(c(),f("p",Un,"GET")):+e.no==14?(c(),f("p",Qn,"POST")):+e.no==15?(c(),f("p",Yn,"PUT")):+e.no==16?(c(),f("p",Xn,"DELETE")):+e.no==17?(c(),f("p",Jn,"指导意义")):+e.no==18?(c(),f("p",Zn,"表现(Representation)/表述/表征")):+e.no==19?(c(),f("p",qn,"资源表述")):+e.no==20?(c(),f("p",eo,"资源表述")):+e.no==21?(c(),f("p",to,"资源表述")):+e.no==22?(c(),f("p",so,"资源链接")):+e.no==23?(c(),f("p",no,"资源链接")):+e.no==24?(c(),f("p",oo,"状态转移(State Transfer)")):+e.no==25?(c(),f("p",io,"undefined")):+e.no==26?(c(),f("p",ro,"一个完整的故事")):+e.no==27?(c(),f("p",ao,"一个完整的故事-2")):+e.no==28?(c(),f("p",lo,"一个完整的故事-3")):+e.no==29?(c(),f("p",co,"一个完整的故事-4")):+e.no==30?(c(),f("p",uo,"一个完整的故事-5")):+e.no==31?(c(),f("p",ho,"Tutorial")):+e.no==32?(c(),f("p",fo,"Demo")):b("v-if",!0)]))}}),_o=G(po,[["__file","/@slidev/titles.md"]]),vo={class:"bg-main transform",shadow:"~",p:"x-4 y-2",border:"~ transparent rounded dark:main"},mo=["value","disabled"],go=["border","onClick"],yo={"w-4":"","text-right":"",op50:"","text-sm":""},ko=W({__name:"Goto",setup(s){const e=O(),t=O(),n=O(),o=O(),i=O(""),r=O(0);function a(y){return y!=null}const l=E(()=>new le(oe.map(y=>{var L;return(L=y.meta)==null?void 0:L.slide}).filter(a),{keys:["no","title"],threshold:.3,shouldSort:!0,minMatchCharLength:1})),h=E(()=>i.value.startsWith("/")?i.value.substring(1):i.value),d=E(()=>l.value.search(h.value).map(y=>y.item)),_=E(()=>!!d.value.length);function p(){if(_.value){const y=d.value.at(r.value||0);y&&Me(y.no)}v()}function v(){i.value="",ae.value=!1}function g(y){y.preventDefault(),r.value++,r.value>=d.value.length&&(r.value=0),I()}function k(y){y.preventDefault(),r.value--,r.value<=-2&&(r.value=d.value.length-1),I()}function I(){var L;const y=(L=o.value)==null?void 0:L[r.value];y&&n.value&&(y.offsetTop+y.offsetHeight>n.value.offsetHeight+n.value.scrollTop?n.value.scrollTo({behavior:"smooth",top:y.offsetTop+y.offsetHeight-n.value.offsetHeight+1}):y.offsetTop{var L;y?(i.value="",r.value=0,setTimeout(()=>{var K;return(K=t.value)==null?void 0:K.focus()},0)):(L=t.value)==null||L.blur()}),xe(de,()=>{var y;(y=e.value)!=null&&y.contains(de.value)||v()}),(y,L)=>(c(),f("div",{id:"slidev-goto-dialog",ref_key:"container",ref:e,class:N(["fixed right-5 transition-all",u(ae)?"top-5":"-top-20"]),"w-90":"","max-w-90":"","min-w-90":""},[C("div",vo,[C("input",{id:"slidev-goto-input",ref_key:"input",ref:t,value:i.value,type:"text",disabled:!u(ae),class:N(["outline-none bg-transparent",{"text-red-400":!_.value&&i.value}]),placeholder:"Goto...",onKeydown:[pe(p,["enter"]),pe(v,["escape"]),pe(g,["down"]),pe(k,["up"])],onInput:S},null,42,mo)]),d.value.length>0?(c(),f("ul",{key:0,ref_key:"list",ref:n,class:"autocomplete-list",shadow:"~",border:"~ transparent rounded dark:main"},[(c(!0),f(B,null,Ee(d.value,(K,X)=>(c(),f("li",{ref_for:!0,ref_key:"items",ref:o,key:K.id,role:"button",tabindex:"0",p:"x-4 y-2","cursor-pointer":"",hover:"op100",flex:"~ gap-2","w-90":"","items-center":"",border:X===0?"":"t main",class:N(r.value===X?"bg-active op100":"op80"),onClick:Vt(T=>R(K.no),["stop","prevent"])},[C("div",yo,Q(K.no),1),w(u(_o),{no:K.no},null,8,["no"])],10,go))),128))],512)):b("v-if",!0)],2))}}),qo=G(ko,[["__scopeId","data-v-9ed224f5"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Goto.vue"]]),wo={class:"select-list"},bo={class:"title"},So={class:"items"},xo=["onClick"],Mo=W({__name:"SelectList",props:{modelValue:{type:[Object,String,Number]},title:{type:String},items:{type:Array}},setup(s,{emit:e}){const o=ze(s,"modelValue",e,{passive:!0});return(i,r)=>{const a=hs;return c(),f("div",wo,[C("div",bo,Q(s.title),1),C("div",So,[(c(!0),f(B,null,Ee(s.items,l=>(c(),f("div",{key:l.value,class:N(["item",{active:u(o)===l.value}]),onClick:()=>{var h;o.value=l.value,(h=l.onClick)==null||h.call(l)}},[w(a,{class:N(["text-green-500",{"opacity-0":u(o)!==l.value}])},null,8,["class"]),Pe(" "+Q(l.display||l.value),1)],10,xo))),128))])])}}}),$o=G(Mo,[["__scopeId","data-v-38e64e7e"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/SelectList.vue"]]),Eo={class:"text-sm"},Co=W({__name:"Settings",setup(s){const e=[{display:"Fit",value:0},{display:"1:1",value:1}];return(t,n)=>(c(),f("div",Eo,[w($o,{modelValue:u(Le),"onUpdate:modelValue":n[0]||(n[0]=o=>Ft(Le)?Le.value=o:null),title:"Scale",items:e},null,8,["modelValue"])]))}}),Io=G(Co,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Settings.vue"]]),Ro={key:0,class:"rounded-md bg-main shadow absolute bottom-10 left-0 z-20","dark:border":"~ main"},Lo=W({__name:"MenuButton",props:{modelValue:{default:!1},disabled:{default:!1}},setup(s,{emit:e}){const o=ze(s,"modelValue",e,{passive:!0}),i=O();return jt(i,()=>{o.value=!1}),(r,a)=>(c(),f("div",{ref_key:"el",ref:i,class:"flex relative"},[C("button",{class:N({disabled:s.disabled}),onClick:a[0]||(a[0]=l=>o.value=!u(o))},[he(r.$slots,"button",{class:N({disabled:s.disabled})})],2),(c(),x(Bt,null,[u(o)?(c(),f("div",Ro,[he(r.$slots,"menu")])):b("v-if",!0)],1024))],512))}}),Ao=G(Lo,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/MenuButton.vue"]]),To={},No={class:"w-1px opacity-10 bg-current m-1 lg:m-2"};function Oo(s,e){return c(),f("div",No)}const me=G(To,[["render",Oo],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/VerticalDivider.vue"]]),Po={render(){return[]}},Do={class:"h-40px flex",p:"l-1 t-0.5 r-2",text:"sm leading-2"},Vo={class:"my-auto"},Fo={class:"opacity-50"},jo=W({__name:"NavControls",props:{persist:{default:!1}},setup(s){const e=s,t=Ve.smaller("md"),{isFullscreen:n,toggle:o}=vt,i=E(()=>Ze.value?`?password=${Ze.value}`:""),r=E(()=>`/presenter/${we.value}${i.value}`),a=E(()=>`/${we.value}${i.value}`),l=O();function h(){l.value&&de.value&&l.value.contains(de.value)&&de.value.blur()}const d=E(()=>e.persist?"text-$slidev-controls-foreground bg-transparent":"rounded-md bg-main shadow dark:border dark:border-main"),_=De(),p=De();return mt(()=>import("./DrawingControls-CwStMqrz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(v=>p.value=v.default),(v,g)=>{const k=fs,I=ps,S=_s,R=vs,y=bs,L=ms,K=gs,X=gt,T=ys,z=ks,H=Ss,ce=Gt("RouterLink"),ue=xs,J=Ms,Qe=$s,P=Es,ie=ws;return c(),f("nav",{ref_key:"root",ref:l,class:"flex flex-col"},[C("div",{class:N(["flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:gap-1 lg:p-2",d.value]),onMouseleave:h},[u(Z)?b("v-if",!0):(c(),x(V,{key:0,title:u(n)?"Close fullscreen":"Enter fullscreen",onClick:u(o)},{default:M(()=>[u(n)?(c(),x(k,{key:0})):(c(),x(I,{key:1}))]),_:1},8,["title","onClick"])),w(V,{class:N({disabled:!u(qt)}),title:"Go to previous slide",onClick:u(ye)},{default:M(()=>[w(S)]),_:1},8,["class","onClick"]),w(V,{class:N({disabled:!u(es)}),title:"Go to next slide",onClick:u(ge)},{default:M(()=>[w(R)]),_:1},8,["class","onClick"]),u(Z)?b("v-if",!0):(c(),x(V,{key:1,title:"Show slide overview",onClick:g[0]||(g[0]=se=>u(pt)())},{default:M(()=>[w(y)]),_:1})),u(ts)?b("v-if",!0):(c(),x(V,{key:2,title:u(qe)?"Switch to light mode theme":"Switch to dark mode theme",onClick:g[1]||(g[1]=se=>u(ft)())},{default:M(()=>[u(qe)?(c(),x(L,{key:0})):(c(),x(K,{key:1}))]),_:1},8,["title"])),w(me),u(Z)?b("v-if",!0):(c(),f(B,{key:3},[!u(q)&&!u(t)&&_.value?(c(),f(B,{key:0},[w(u(_)),w(me)],64)):b("v-if",!0),u(q)?(c(),x(V,{key:1,title:u(_e)?"Hide presenter cursor":"Show presenter cursor",onClick:g[2]||(g[2]=se=>_e.value=!u(_e))},{default:M(()=>[u(_e)?(c(),x(X,{key:0})):(c(),x(T,{key:1}))]),_:1},8,["title"])):b("v-if",!0)],64)),(!u(ke).drawings.presenterOnly||u(q))&&!u(Z)?(c(),f(B,{key:4},[w(V,{class:"relative",title:u(ee)?"Hide drawing toolbar":"Show drawing toolbar",onClick:g[3]||(g[3]=se=>ee.value=!u(ee))},{default:M(()=>[w(z),u(ee)?(c(),f("div",{key:0,class:"absolute left-1 right-1 bottom-0 h-0.7 rounded-full",style:fe({background:u(ss).color})},null,4)):b("v-if",!0)]),_:1},8,["title"]),w(me)],64)):b("v-if",!0),u(Z)?b("v-if",!0):(c(),f(B,{key:5},[u(q)?(c(),x(ce,{key:0,to:a.value,class:"slidev-icon-btn",title:"Play Mode"},{default:M(()=>[w(H)]),_:1},8,["to"])):b("v-if",!0),u(ns)?(c(),x(ce,{key:1,to:r.value,class:"slidev-icon-btn",title:"Presenter Mode"},{default:M(()=>[w(ue)]),_:1},8,["to"])):b("v-if",!0),b("v-if",!0),u(q)?(c(),x(V,{key:3,title:"Toggle Presenter Layout",class:"aspect-ratio-initial",onClick:u(is)},{default:M(()=>[w(J),Pe(" "+Q(u(os)),1)]),_:1},8,["onClick"])):b("v-if",!0)],64)),(c(),f(B,{key:6},[u(ke).download?(c(),x(V,{key:0,title:"Download as PDF",onClick:u(rs)},{default:M(()=>[w(Qe)]),_:1},8,["onClick"])):b("v-if",!0)],64)),!u(q)&&u(ke).info&&!u(Z)?(c(),x(V,{key:7,title:"Show info",onClick:g[5]||(g[5]=se=>et.value=!u(et))},{default:M(()=>[w(P)]),_:1})):b("v-if",!0),!u(q)&&!u(Z)?(c(),x(Ao,{key:8},{button:M(()=>[w(V,{title:"Adjust settings"},{default:M(()=>[w(ie)]),_:1})]),menu:M(()=>[w(Io)]),_:1})):b("v-if",!0),u(Z)?b("v-if",!0):(c(),x(me,{key:9})),C("div",Do,[C("div",Vo,[Pe(Q(u(we))+" ",1),C("span",Fo,"/ "+Q(u(as)),1)])]),w(u(Po))],34)],512)}}}),ei=G(jo,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/NavControls.vue"]]);function Bo(){const s=Kt(),e=O(!1);let t,n;const o=typeof document<"u"&&"startViewTransition"in document;return s.beforeResolve((i,r)=>{var v,g;const a=(v=r.meta.slide)==null?void 0:v.no,l=(g=i.meta.slide)==null?void 0:g.no;if(!(a!==void 0&&l!==void 0&&(r.meta.transition==="view-transition"&&a{t=k,n=I});let d;const _=new Promise(k=>d=k);return document.startViewTransition(()=>(d(),h)).finished.then(()=>{n=void 0,t=void 0}),_}),o&&s.afterEach(()=>{t==null||t(),n==null||n()}),e}const Go={key:0,class:"absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl"},Ko=W({__name:"PresenterMouse",setup(s){return(e,t)=>{const n=gt;return u(Ae).cursor?(c(),f("div",Go,[w(n,{class:"absolute",style:fe({left:`${u(Ae).cursor.x}%`,top:`${u(Ae).cursor.y}%`})},null,8,["style"])])):b("v-if",!0)}}}),Wo=G(Ko,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PresenterMouse.vue"]]),zo=W({__name:"SlidesShow",props:{renderContext:{type:String,required:!0}},setup(s){xe(re,()=>{var i,r;(i=re.value)!=null&&i.meta&&re.value.meta.preload!==!1&&(re.value.meta.__preloaded=!0),(r=Te.value)!=null&&r.meta&&Te.value.meta.preload!==!1&&(Te.value.meta.__preloaded=!0)},{immediate:!0});const e=Bo(),t=De();mt(()=>import("./DrawingLayer-pMDckV8h.js"),__vite__mapDeps([10,2,5,1,3,4,6])).then(i=>t.value=i.default);const n=E(()=>oe.filter(i=>{var r;return((r=i.meta)==null?void 0:r.__preloaded)||i===re.value}));function o(){tt.value=!0}return(i,r)=>(c(),f(B,null,[b(" Global Bottom "),w(u(Cs)),b(" Slides "),(c(),x(ut(u(e)?"div":Wt),ct(u(tt)?{}:u(ls),{id:"slideshow",tag:"div",onAfterLeave:o}),{default:M(()=>[(c(!0),f(B,null,Ee(n.value,a=>dt((c(),x(u(yt),{key:a.path,is:a==null?void 0:a.component,"clicks-context":u(cs)(a),class:N([u(kt)(a),"overflow-hidden"]),route:a,"render-context":i.renderContext},null,8,["is","clicks-context","class","route","render-context"])),[[ht,a===u(re)]])),128))]),_:1},16)),b(" Global Top "),w(u(Is)),t.value?(c(),x(u(t),{key:0})):b("v-if",!0),u(q)?b("v-if",!0):(c(),x(Wo,{key:1}))],64))}}),ti=G(zo,[["__scopeId","data-v-2fe83b23"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/SlidesShow.vue"]]);export{qo as G,V as I,ei as N,Zo as Q,ti as S,me as V,Fs as a,Jo as r}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/slidev/DrawingControls-CemI06Hp.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/modules/vue-BoI2EFOv.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/index-BBhYVIJ4.js","assets/index-CTiKa7JK.css","assets/slidev/bottom-DXdIwbm1.js","assets/slidev/DrawingPreview-C05gdWf_.js","assets/DrawingControls-BO6lw4N5.css","assets/slidev/DrawingLayer-C8CbKT5s.js"] + __vite__mapDeps.viteFileDeps = ["assets/slidev/DrawingControls-CwStMqrz.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/modules/vue-BoI2EFOv.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/index-CTBKgxrZ.js","assets/index-CTiKa7JK.css","assets/slidev/bottom-DYeMWyTH.js","assets/slidev/DrawingPreview-DOv9aIwT.js","assets/DrawingControls-BO6lw4N5.css","assets/slidev/DrawingLayer-pMDckV8h.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/05-restful/assets/slidev/bottom-DXdIwbm1.js b/05-restful/assets/slidev/bottom-DYeMWyTH.js similarity index 93% rename from 05-restful/assets/slidev/bottom-DXdIwbm1.js rename to 05-restful/assets/slidev/bottom-DYeMWyTH.js index b8b38b9..fd899eb 100644 --- a/05-restful/assets/slidev/bottom-DXdIwbm1.js +++ b/05-restful/assets/slidev/bottom-DYeMWyTH.js @@ -1 +1 @@ -import{d as c,Q as o,t as s,P as l,I as d,v as u}from"../modules/vue-BoI2EFOv.js";import{ah as m,ai as p,aj as f,ak as j,al as C}from"../index-BBhYVIJ4.js";function g(e,a=""){var r,i;const t=["slidev-page",a],n=(i=(r=e==null?void 0:e.meta)==null?void 0:r.slide)==null?void 0:i.no;return n!=null&&t.push(`slidev-page-${n}`),t.filter(Boolean).join(" ")}const v=c({name:"SlideWrapper",props:{clicksContext:{type:Object,required:!0},renderContext:{type:String,default:"main"},active:{type:Boolean,default:!1},is:{type:Object,required:!0},route:{type:Object,required:!0}},setup(e){return o(m,e.route),o(p,s(+e.route.path)),o(f,s(e.renderContext)),o(j,l(e,"active")),o(C,l(e,"clicksContext")),{style:d(()=>{var n,r;const t=((r=(n=e.route.meta)==null?void 0:n.slide)==null?void 0:r.frontmatter.zoom)??1;return t===1?void 0:{width:`${100/t}%`,height:`${100/t}%`,transformOrigin:"top left",transform:`scale(${t})`}})}},render(){return u(this.$props.is,{style:this.style})}}),x={render(){return[]}},b={render(){return[]}};export{b as G,v as S,x as a,g}; +import{d as c,Q as o,t as s,P as l,I as d,v as u}from"../modules/vue-BoI2EFOv.js";import{ah as m,ai as p,aj as f,ak as j,al as C}from"../index-CTBKgxrZ.js";function g(e,a=""){var r,i;const t=["slidev-page",a],n=(i=(r=e==null?void 0:e.meta)==null?void 0:r.slide)==null?void 0:i.no;return n!=null&&t.push(`slidev-page-${n}`),t.filter(Boolean).join(" ")}const v=c({name:"SlideWrapper",props:{clicksContext:{type:Object,required:!0},renderContext:{type:String,default:"main"},active:{type:Boolean,default:!1},is:{type:Object,required:!0},route:{type:Object,required:!0}},setup(e){return o(m,e.route),o(p,s(+e.route.path)),o(f,s(e.renderContext)),o(j,l(e,"active")),o(C,l(e,"clicksContext")),{style:d(()=>{var n,r;const t=((r=(n=e.route.meta)==null?void 0:n.slide)==null?void 0:r.frontmatter.zoom)??1;return t===1?void 0:{width:`${100/t}%`,height:`${100/t}%`,transformOrigin:"top left",transform:`scale(${t})`}})}},render(){return u(this.$props.is,{style:this.style})}}),x={render(){return[]}},b={render(){return[]}};export{b as G,v as S,x as a,g}; diff --git a/05-restful/assets/slidev/play-CGBDlsHN.js b/05-restful/assets/slidev/play-DSehltPn.js similarity index 85% rename from 05-restful/assets/slidev/play-CGBDlsHN.js rename to 05-restful/assets/slidev/play-DSehltPn.js index 7b90ec7..541a6a0 100644 --- a/05-restful/assets/slidev/play-CGBDlsHN.js +++ b/05-restful/assets/slidev/play-DSehltPn.js @@ -1,7 +1,7 @@ -import{_ as g,c as v,s as h,a as y,b as V,u as P,i as z,d as S,e as E,f as D,g as $,h as B,w as O,j as R,k as T,n as U,p as A}from"../index-BBhYVIJ4.js";import{d as b,ab as N,o as t,c as r,z as e,b as w,e as s,f as H,i as k,g as n,ac as L,I,k as x,ad as f,V as j,N as _,l as u,F as M,t as F,h as G}from"../modules/vue-BoI2EFOv.js";import{Q,G as W,r as K,S as X,N as Y,a as q}from"./SlidesShow-D-sR6O06.js";import{P as J}from"./PrintStyle-M7jeBLz1.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";import"./bottom-DXdIwbm1.js";import"./DrawingPreview-C05gdWf_.js";const Z="/sa2024/05-restful/assets/logo-BYkHSa_O.png",ee={key:0,class:"fixed top-0 bottom-0 left-0 right-0 grid z-20"},oe=b({__name:"Modal",props:{modelValue:{default:!1},class:{default:""}},emits:["update:modelValue"],setup(c,{emit:a}){const i=c,o=N(i,"modelValue",a);function l(){o.value=!1}return(d,p)=>(t(),r(L,null,[e(o)?(t(),w("div",ee,[s("div",{bg:"black opacity-80",class:"absolute top-0 bottom-0 left-0 right-0 -z-1",onClick:p[0]||(p[0]=C=>l())}),s("div",{class:k(["m-auto rounded-md bg-main shadow",i.class]),"dark:border":"~ main"},[H(d.$slots,"default")],2)])):n("v-if",!0)],1024))}}),le=g(oe,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Modal.vue"]]),se={class:"slidev-info-dialog slidev-layout flex flex-col gap-4 text-base"},te=["innerHTML"],ae=s("a",{href:"https://github.com/slidevjs/slidev",target:"_blank",class:"!opacity-100 !border-none !text-current"},[s("div",{class:"flex gap-1 children:my-auto"},[s("div",{class:"opacity-50 text-sm mr-2"},"Powered by"),s("img",{class:"w-5 h-5",src:Z,alt:"Slidev logo"}),s("div",{style:{color:"#2082A6"}},[s("b",null,"Sli"),j("dev ")])])],-1),ie=b({__name:"InfoDialog",props:{modelValue:{default:!1}},emits:["update:modelValue"],setup(c,{emit:a}){const o=N(c,"modelValue",a),l=I(()=>typeof v.info=="string");return(d,p)=>(t(),r(le,{modelValue:e(o),"onUpdate:modelValue":p[0]||(p[0]=C=>f(o)?o.value=C:null),class:"px-6 py-4"},{default:x(()=>[s("div",se,[l.value?(t(),w("div",{key:0,class:"mb-4",innerHTML:e(v).info},null,8,te)):n("v-if",!0),ae])]),_:1},8,["modelValue"]))}}),ne=g(ie,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/InfoDialog.vue"]]),re=b({__name:"Controls",setup(c){const a=_(),i=_();return(m,o)=>(t(),w(M,null,[u(Q,{modelValue:e(h),"onUpdate:modelValue":o[0]||(o[0]=l=>f(h)?h.value=l:null)},null,8,["modelValue"]),u(W),a.value?(t(),r(e(a),{key:0})):n("v-if",!0),i.value?(t(),r(e(i),{key:1,modelValue:e(y),"onUpdate:modelValue":o[1]||(o[1]=l=>f(y)?y.value=l:null)},null,8,["modelValue"])):n("v-if",!0),e(v).info?(t(),r(ne,{key:2,modelValue:e(V),"onUpdate:modelValue":o[2]||(o[2]=l=>f(V)?V.value=l:null)},null,8,["modelValue"])):n("v-if",!0)],64))}}),de=g(re,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Controls.vue"]]),ue=b({__name:"play",setup(c){K();const a=F();function i(l){var d;S.value||((d=l.target)==null?void 0:d.id)==="slide-container"&&(l.screenX/window.innerWidth>.6?U():A())}P(a);const m=I(()=>z.value||S.value);_();const o=_();return E(()=>import("./DrawingControls-CemI06Hp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(l=>o.value=l.default),(l,d)=>(t(),w(M,null,[e(D)?(t(),r(J,{key:0})):n("v-if",!0),s("div",{id:"page-root",ref_key:"root",ref:a,class:k(["grid",e(T)?"grid-rows-[1fr_max-content]":"grid-cols-[1fr_max-content]"])},[u(q,{class:"w-full h-full",style:G({background:"var(--slidev-slide-container-background, black)"}),width:e(D)?e(O).width.value:void 0,scale:e(R),"is-main":!0,onPointerdown:i},{default:x(()=>[u(X,{"render-context":"slide"})]),controls:x(()=>[s("div",{class:k(["absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100",[m.value?"!opacity-100 right-0":"opacity-0 p-2",e($)?"pointer-events-none":""]])},[u(Y,{class:"m-auto",persist:m.value},null,8,["persist"])],2),!e(v).drawings.presenterOnly&&!e(B)&&o.value?(t(),r(e(o),{key:0,class:"ml-0"})):n("v-if",!0)]),_:1},8,["style","width","scale"]),n("v-if",!0)],2),u(de)],64))}}),we=g(ue,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/pages/play.vue"]]);export{we as default}; +import{_ as g,c as v,s as h,a as y,b as V,u as P,i as z,d as S,e as E,f as D,g as $,h as B,w as O,j as R,k as T,n as U,p as A}from"../index-CTBKgxrZ.js";import{d as b,ab as N,o as t,c as r,z as e,b as w,e as s,f as H,i as k,g as n,ac as L,I,k as x,ad as f,V as j,N as _,l as u,F as M,t as F,h as G}from"../modules/vue-BoI2EFOv.js";import{Q,G as W,r as K,S as X,N as Y,a as q}from"./SlidesShow-aZvHWNC2.js";import{P as J}from"./PrintStyle-C5A1Lxy8.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";import"./bottom-DYeMWyTH.js";import"./DrawingPreview-DOv9aIwT.js";const Z="/sa2024/05-restful/assets/logo-BYkHSa_O.png",ee={key:0,class:"fixed top-0 bottom-0 left-0 right-0 grid z-20"},oe=b({__name:"Modal",props:{modelValue:{default:!1},class:{default:""}},emits:["update:modelValue"],setup(c,{emit:a}){const i=c,o=N(i,"modelValue",a);function l(){o.value=!1}return(d,p)=>(t(),r(L,null,[e(o)?(t(),w("div",ee,[s("div",{bg:"black opacity-80",class:"absolute top-0 bottom-0 left-0 right-0 -z-1",onClick:p[0]||(p[0]=C=>l())}),s("div",{class:k(["m-auto rounded-md bg-main shadow",i.class]),"dark:border":"~ main"},[H(d.$slots,"default")],2)])):n("v-if",!0)],1024))}}),le=g(oe,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Modal.vue"]]),se={class:"slidev-info-dialog slidev-layout flex flex-col gap-4 text-base"},te=["innerHTML"],ae=s("a",{href:"https://github.com/slidevjs/slidev",target:"_blank",class:"!opacity-100 !border-none !text-current"},[s("div",{class:"flex gap-1 children:my-auto"},[s("div",{class:"opacity-50 text-sm mr-2"},"Powered by"),s("img",{class:"w-5 h-5",src:Z,alt:"Slidev logo"}),s("div",{style:{color:"#2082A6"}},[s("b",null,"Sli"),j("dev ")])])],-1),ie=b({__name:"InfoDialog",props:{modelValue:{default:!1}},emits:["update:modelValue"],setup(c,{emit:a}){const o=N(c,"modelValue",a),l=I(()=>typeof v.info=="string");return(d,p)=>(t(),r(le,{modelValue:e(o),"onUpdate:modelValue":p[0]||(p[0]=C=>f(o)?o.value=C:null),class:"px-6 py-4"},{default:x(()=>[s("div",se,[l.value?(t(),w("div",{key:0,class:"mb-4",innerHTML:e(v).info},null,8,te)):n("v-if",!0),ae])]),_:1},8,["modelValue"]))}}),ne=g(ie,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/InfoDialog.vue"]]),re=b({__name:"Controls",setup(c){const a=_(),i=_();return(m,o)=>(t(),w(M,null,[u(Q,{modelValue:e(h),"onUpdate:modelValue":o[0]||(o[0]=l=>f(h)?h.value=l:null)},null,8,["modelValue"]),u(W),a.value?(t(),r(e(a),{key:0})):n("v-if",!0),i.value?(t(),r(e(i),{key:1,modelValue:e(y),"onUpdate:modelValue":o[1]||(o[1]=l=>f(y)?y.value=l:null)},null,8,["modelValue"])):n("v-if",!0),e(v).info?(t(),r(ne,{key:2,modelValue:e(V),"onUpdate:modelValue":o[2]||(o[2]=l=>f(V)?V.value=l:null)},null,8,["modelValue"])):n("v-if",!0)],64))}}),de=g(re,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/Controls.vue"]]),ue=b({__name:"play",setup(c){K();const a=F();function i(l){var d;S.value||((d=l.target)==null?void 0:d.id)==="slide-container"&&(l.screenX/window.innerWidth>.6?U():A())}P(a);const m=I(()=>z.value||S.value);_();const o=_();return E(()=>import("./DrawingControls-CwStMqrz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(l=>o.value=l.default),(l,d)=>(t(),w(M,null,[e(D)?(t(),r(J,{key:0})):n("v-if",!0),s("div",{id:"page-root",ref_key:"root",ref:a,class:k(["grid",e(T)?"grid-rows-[1fr_max-content]":"grid-cols-[1fr_max-content]"])},[u(q,{class:"w-full h-full",style:G({background:"var(--slidev-slide-container-background, black)"}),width:e(D)?e(O).width.value:void 0,scale:e(R),"is-main":!0,onPointerdown:i},{default:x(()=>[u(X,{"render-context":"slide"})]),controls:x(()=>[s("div",{class:k(["absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100",[m.value?"!opacity-100 right-0":"opacity-0 p-2",e($)?"pointer-events-none":""]])},[u(Y,{class:"m-auto",persist:m.value},null,8,["persist"])],2),!e(v).drawings.presenterOnly&&!e(B)&&o.value?(t(),r(e(o),{key:0,class:"ml-0"})):n("v-if",!0)]),_:1},8,["style","width","scale"]),n("v-if",!0)],2),u(de)],64))}}),we=g(ue,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/pages/play.vue"]]);export{we as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/slidev/DrawingControls-CemI06Hp.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/modules/vue-BoI2EFOv.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/index-BBhYVIJ4.js","assets/index-CTiKa7JK.css","assets/slidev/SlidesShow-D-sR6O06.js","assets/slidev/bottom-DXdIwbm1.js","assets/slidev/DrawingPreview-C05gdWf_.js","assets/SlidesShow-Do3DTZt5.css","assets/DrawingControls-BO6lw4N5.css"] + __vite__mapDeps.viteFileDeps = ["assets/slidev/DrawingControls-CwStMqrz.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/modules/vue-BoI2EFOv.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/index-CTBKgxrZ.js","assets/index-CTiKa7JK.css","assets/slidev/SlidesShow-aZvHWNC2.js","assets/slidev/bottom-DYeMWyTH.js","assets/slidev/DrawingPreview-DOv9aIwT.js","assets/SlidesShow-Do3DTZt5.css","assets/DrawingControls-BO6lw4N5.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/05-restful/assets/slidev/presenter-DwcU7Ppu.js b/05-restful/assets/slidev/presenter-BJ0i69ip.js similarity index 95% rename from 05-restful/assets/slidev/presenter-DwcU7Ppu.js rename to 05-restful/assets/slidev/presenter-BJ0i69ip.js index c75658b..74e4b73 100644 --- a/05-restful/assets/slidev/presenter-DwcU7Ppu.js +++ b/05-restful/assets/slidev/presenter-BJ0i69ip.js @@ -1 +1 @@ -import{b as G,c as H,d as J,e as Q,f as E}from"../modules/unplugin-icons-CfAESjuq.js";import{t as F,ag as K,d as D,c as f,i as m,z as e,o as c,I as y,b as x,e as t,l as i,F as T,x as w,g as S,ae as U,ah as W,ai as X,h as N,p as O,a as A,C as B,N as Y,T as Z,J as ee,aj as te,ak as se,k as g,ad as oe}from"../modules/vue-BoI2EFOv.js";import{_ as M,C as le,u as ne,c as R,A as ae,D as re,y as ie,r as ce,E as k,F as C,G as ue,H as de,I as pe,J as me,g as ve,K as _e,L as fe,M as xe,N as V,O as he,P as be,Q as ye,R as ge,B as ke,s as z}from"../index-BBhYVIJ4.js";import{r as Ce,S as we,a as q,I as L,Q as Se,N as Ne,G as $e}from"./SlidesShow-D-sR6O06.js";import{S as Ie,g as ze}from"./bottom-DXdIwbm1.js";import{N as Fe}from"./NoteDisplay-BdeEY5Sw.js";import Te from"./DrawingControls-CemI06Hp.js";import"../modules/shiki-DdzKTf6Q.js";import"./DrawingPreview-C05gdWf_.js";function De(a){if(a==null)return{info:F(),update:async()=>{}};const r=`/@slidev/slide/${a}.json`,{data:s,execute:l}=K(r).json().get();return l(),{info:s,update:async d=>await fetch(r,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(d)}).then(n=>n.json())}}const Me=D({__name:"NoteStatic",props:{no:{type:Number,required:!1},class:{type:String,required:!1},clicksContext:{type:null,required:!1}},setup(a){const r=a,{info:s}=De(r.no);return(l,v)=>{var d,n;return c(),f(Fe,{class:m(r.class),note:(d=e(s))==null?void 0:d.note,"note-html":(n=e(s))==null?void 0:n.noteHTML,"clicks-context":l.clicksContext},null,8,["class","note","note-html","clicks-context"])}}}),Pe=M(Me,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/NoteStatic.vue"]]),je=a=>(O("data-v-bcb3340a"),a=a(),A(),a),Be=["title"],Re={class:"flex gap-1 items-center min-w-16"},Ve={"text-primary":""},qe=je(()=>t("span",{op50:""},"/",-1)),Le={op50:""},Oe=["max"],Ae=D({__name:"ClicksSlider",props:{clicksContext:{type:null,required:!0}},setup(a){const r=a,s=y(()=>r.clicksContext.total),l=y({get(){return r.clicksContext.current>s.value?-1:r.clicksContext.current},set(n){r.clicksContext.current=n}}),v=y(()=>Array.from({length:s.value+1},(n,u)=>u));function d(){(l.value<0||l.value>s.value)&&(l.value=0)}return(n,u)=>{const _=G;return c(),x("div",{class:m(["flex gap-0.5 items-center select-none",s.value?"":"op50"]),title:`Clicks in this slide: ${s.value}`},[t("div",Re,[i(_,{"text-sm":"",op50:""}),l.value<=s.value&&l.value>=0?(c(),x(T,{key:0},[t("span",Ve,w(l.value),1),qe],64)):S("v-if",!0),t("span",Le,w(s.value),1)]),t("div",{relative:"","flex-auto":"",h5:"",flex:"~",onDblclick:u[1]||(u[1]=o=>l.value=e(le))},[(c(!0),x(T,null,U(v.value,o=>(c(),x("div",{key:o,border:"y main","of-hidden":"",relative:"",class:m([o===0?"rounded-l border-l":"",o===s.value?"rounded-r border-r":""]),style:N({width:s.value>0?`${1/s.value*100}%`:"100%"})},[t("div",{absolute:"","inset-0":"",class:m(o<=l.value?"bg-primary op20":"")},null,2),t("div",{class:m([+o==+l.value?"text-primary font-bold op100 border-primary":"op30 border-main",o===0?"rounded-l":"",o===s.value?"rounded-r":"border-r-2"]),"w-full":"","h-full":"","text-xs":"",flex:"","items-center":"","justify-center":"","z-1":""},w(o),3)],6))),128)),W(t("input",{"onUpdate:modelValue":u[0]||(u[0]=o=>l.value=o),class:"range",absolute:"","inset-0":"",type:"range",min:0,max:s.value,step:1,"z-10":"",op0:"",style:N({"--thumb-width":`${1/(s.value+1)*100}%`}),onMousedown:d},null,44,Oe),[[X,l.value]])],32)],10,Be)}}}),Ge=M(Ae,[["__scopeId","data-v-bcb3340a"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/ClicksSlider.vue"]]),P=a=>(O("data-v-5d22dd02"),a=a(),A(),a),He={class:"bg-main h-full slidev-presenter"},Je=P(()=>t("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Current ",-1)),Qe={class:"relative grid-section next flex flex-col p-2 lg:p-4"},Ee=P(()=>t("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Next ",-1)),Ke={key:1,class:"grid-section note grid grid-rows-[1fr_min-content] overflow-hidden"},Ue={class:"border-t border-main py-1 px-2 text-sm"},We={class:"grid-section bottom flex"},Xe=P(()=>t("div",{"flex-auto":""},null,-1)),Ye={class:"text-2xl pl-2 pr-6 my-auto tabular-nums"},Ze={class:"progress-bar"},et=D({__name:"presenter",setup(a){const r=F();Ce(),ne(r);const s=R.titleTemplate.replace("%s",R.title||"Slidev");ae({title:`Presenter - ${s}`}),F(!1);const{timer:l,resetTimer:v}=re(),d=ie.map(_=>ce(_)),n=y(()=>k.value.currentn.value&&d[+n.value[0].path-1]);return B([C,pe],()=>{u.value&&(u.value.current=n.value[1])},{immediate:!0}),Y(),Z(()=>{const _=r.value.querySelector("#slide-content"),o=ee(te()),$=se();B(()=>{if(!$.value||ve.value||!_e.value)return;const p=_.getBoundingClientRect(),h=(o.x-p.left)/p.width*100,b=(o.y-p.top)/p.height*100;if(!(h<0||h>100||b<0||b>100))return{x:h,y:b}},p=>{me.cursor=p})}),(_,o)=>{var j;const $=H,p=J,h=Q,b=E;return c(),x(T,null,[t("div",He,[t("div",{class:m(["grid-container",`layout${e(fe)}`])},[t("div",{ref_key:"main",ref:r,class:"relative grid-section main flex flex-col"},[i(q,{key:"main",class:"h-full w-full p-2 lg:p-4 flex-auto"},{default:g(()=>[i(we,{"render-context":"presenter"})]),_:1}),(c(),f(Ge,{key:(j=e(C))==null?void 0:j.path,"clicks-context":e(xe)(e(C)),class:"w-full pb2 px4 flex-none"},null,8,["clicks-context"])),Je],512),t("div",Qe,[n.value&&u.value?(c(),f(q,{key:"next",class:"h-full w-full"},{default:g(()=>[(c(),f(e(Ie),{is:n.value[0].component,key:n.value[0].path,"clicks-context":u.value,class:m(e(ze)(n.value[0])),route:n.value[0],"render-context":"previewNext"},null,8,["is","clicks-context","class","route"]))]),_:1})):S("v-if",!0),Ee]),S(" Notes "),(c(),x("div",Ke,[(c(),f(Pe,{key:`static-${e(V)}`,no:e(V),class:"w-full max-w-full h-full overflow-auto p-2 lg:p-4",style:N({fontSize:`${e(he)}em`}),"clicks-context":e(k)},null,8,["no","style","clicks-context"])),t("div",Ue,[i(L,{title:"Increase font size",onClick:e(be)},{default:g(()=>[i($)]),_:1},8,["onClick"]),i(L,{title:"Decrease font size",onClick:e(ye)},{default:g(()=>[i(p)]),_:1},8,["onClick"]),S("v-if",!0)])])),t("div",We,[i(Ne,{persist:!0}),Xe,t("div",{class:"timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg",opacity:"50 hover:100",onClick:o[2]||(o[2]=(...I)=>e(v)&&e(v)(...I))},[i(h,{class:"absolute"}),i(b,{class:"absolute opacity-0"})]),t("div",Ye,w(e(l)),1)]),(c(),f(Te,{key:2}))],2),t("div",Ze,[t("div",{class:"progress h-3px bg-primary transition-all",style:N({width:`${(e(ge)-1)/(e(ke)-1)*100}%`})},null,4)])]),i($e),i(Se,{modelValue:e(z),"onUpdate:modelValue":o[3]||(o[3]=I=>oe(z)?z.value=I:null)},null,8,["modelValue"])],64)}}}),ut=M(et,[["__scopeId","data-v-5d22dd02"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/pages/presenter.vue"]]);export{ut as default}; +import{b as G,c as H,d as J,e as Q,f as E}from"../modules/unplugin-icons-CfAESjuq.js";import{t as F,ag as K,d as D,c as f,i as m,z as e,o as c,I as y,b as x,e as t,l as i,F as T,x as w,g as S,ae as U,ah as W,ai as X,h as N,p as O,a as A,C as B,N as Y,T as Z,J as ee,aj as te,ak as se,k as g,ad as oe}from"../modules/vue-BoI2EFOv.js";import{_ as M,C as le,u as ne,c as R,A as ae,D as re,y as ie,r as ce,E as k,F as C,G as ue,H as de,I as pe,J as me,g as ve,K as _e,L as fe,M as xe,N as V,O as he,P as be,Q as ye,R as ge,B as ke,s as z}from"../index-CTBKgxrZ.js";import{r as Ce,S as we,a as q,I as L,Q as Se,N as Ne,G as $e}from"./SlidesShow-aZvHWNC2.js";import{S as Ie,g as ze}from"./bottom-DYeMWyTH.js";import{N as Fe}from"./NoteDisplay-DVesK58r.js";import Te from"./DrawingControls-CwStMqrz.js";import"../modules/shiki-DdzKTf6Q.js";import"./DrawingPreview-DOv9aIwT.js";function De(a){if(a==null)return{info:F(),update:async()=>{}};const r=`/@slidev/slide/${a}.json`,{data:s,execute:l}=K(r).json().get();return l(),{info:s,update:async d=>await fetch(r,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(d)}).then(n=>n.json())}}const Me=D({__name:"NoteStatic",props:{no:{type:Number,required:!1},class:{type:String,required:!1},clicksContext:{type:null,required:!1}},setup(a){const r=a,{info:s}=De(r.no);return(l,v)=>{var d,n;return c(),f(Fe,{class:m(r.class),note:(d=e(s))==null?void 0:d.note,"note-html":(n=e(s))==null?void 0:n.noteHTML,"clicks-context":l.clicksContext},null,8,["class","note","note-html","clicks-context"])}}}),Pe=M(Me,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/NoteStatic.vue"]]),je=a=>(O("data-v-bcb3340a"),a=a(),A(),a),Be=["title"],Re={class:"flex gap-1 items-center min-w-16"},Ve={"text-primary":""},qe=je(()=>t("span",{op50:""},"/",-1)),Le={op50:""},Oe=["max"],Ae=D({__name:"ClicksSlider",props:{clicksContext:{type:null,required:!0}},setup(a){const r=a,s=y(()=>r.clicksContext.total),l=y({get(){return r.clicksContext.current>s.value?-1:r.clicksContext.current},set(n){r.clicksContext.current=n}}),v=y(()=>Array.from({length:s.value+1},(n,u)=>u));function d(){(l.value<0||l.value>s.value)&&(l.value=0)}return(n,u)=>{const _=G;return c(),x("div",{class:m(["flex gap-0.5 items-center select-none",s.value?"":"op50"]),title:`Clicks in this slide: ${s.value}`},[t("div",Re,[i(_,{"text-sm":"",op50:""}),l.value<=s.value&&l.value>=0?(c(),x(T,{key:0},[t("span",Ve,w(l.value),1),qe],64)):S("v-if",!0),t("span",Le,w(s.value),1)]),t("div",{relative:"","flex-auto":"",h5:"",flex:"~",onDblclick:u[1]||(u[1]=o=>l.value=e(le))},[(c(!0),x(T,null,U(v.value,o=>(c(),x("div",{key:o,border:"y main","of-hidden":"",relative:"",class:m([o===0?"rounded-l border-l":"",o===s.value?"rounded-r border-r":""]),style:N({width:s.value>0?`${1/s.value*100}%`:"100%"})},[t("div",{absolute:"","inset-0":"",class:m(o<=l.value?"bg-primary op20":"")},null,2),t("div",{class:m([+o==+l.value?"text-primary font-bold op100 border-primary":"op30 border-main",o===0?"rounded-l":"",o===s.value?"rounded-r":"border-r-2"]),"w-full":"","h-full":"","text-xs":"",flex:"","items-center":"","justify-center":"","z-1":""},w(o),3)],6))),128)),W(t("input",{"onUpdate:modelValue":u[0]||(u[0]=o=>l.value=o),class:"range",absolute:"","inset-0":"",type:"range",min:0,max:s.value,step:1,"z-10":"",op0:"",style:N({"--thumb-width":`${1/(s.value+1)*100}%`}),onMousedown:d},null,44,Oe),[[X,l.value]])],32)],10,Be)}}}),Ge=M(Ae,[["__scopeId","data-v-bcb3340a"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/ClicksSlider.vue"]]),P=a=>(O("data-v-5d22dd02"),a=a(),A(),a),He={class:"bg-main h-full slidev-presenter"},Je=P(()=>t("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Current ",-1)),Qe={class:"relative grid-section next flex flex-col p-2 lg:p-4"},Ee=P(()=>t("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Next ",-1)),Ke={key:1,class:"grid-section note grid grid-rows-[1fr_min-content] overflow-hidden"},Ue={class:"border-t border-main py-1 px-2 text-sm"},We={class:"grid-section bottom flex"},Xe=P(()=>t("div",{"flex-auto":""},null,-1)),Ye={class:"text-2xl pl-2 pr-6 my-auto tabular-nums"},Ze={class:"progress-bar"},et=D({__name:"presenter",setup(a){const r=F();Ce(),ne(r);const s=R.titleTemplate.replace("%s",R.title||"Slidev");ae({title:`Presenter - ${s}`}),F(!1);const{timer:l,resetTimer:v}=re(),d=ie.map(_=>ce(_)),n=y(()=>k.value.currentn.value&&d[+n.value[0].path-1]);return B([C,pe],()=>{u.value&&(u.value.current=n.value[1])},{immediate:!0}),Y(),Z(()=>{const _=r.value.querySelector("#slide-content"),o=ee(te()),$=se();B(()=>{if(!$.value||ve.value||!_e.value)return;const p=_.getBoundingClientRect(),h=(o.x-p.left)/p.width*100,b=(o.y-p.top)/p.height*100;if(!(h<0||h>100||b<0||b>100))return{x:h,y:b}},p=>{me.cursor=p})}),(_,o)=>{var j;const $=H,p=J,h=Q,b=E;return c(),x(T,null,[t("div",He,[t("div",{class:m(["grid-container",`layout${e(fe)}`])},[t("div",{ref_key:"main",ref:r,class:"relative grid-section main flex flex-col"},[i(q,{key:"main",class:"h-full w-full p-2 lg:p-4 flex-auto"},{default:g(()=>[i(we,{"render-context":"presenter"})]),_:1}),(c(),f(Ge,{key:(j=e(C))==null?void 0:j.path,"clicks-context":e(xe)(e(C)),class:"w-full pb2 px4 flex-none"},null,8,["clicks-context"])),Je],512),t("div",Qe,[n.value&&u.value?(c(),f(q,{key:"next",class:"h-full w-full"},{default:g(()=>[(c(),f(e(Ie),{is:n.value[0].component,key:n.value[0].path,"clicks-context":u.value,class:m(e(ze)(n.value[0])),route:n.value[0],"render-context":"previewNext"},null,8,["is","clicks-context","class","route"]))]),_:1})):S("v-if",!0),Ee]),S(" Notes "),(c(),x("div",Ke,[(c(),f(Pe,{key:`static-${e(V)}`,no:e(V),class:"w-full max-w-full h-full overflow-auto p-2 lg:p-4",style:N({fontSize:`${e(he)}em`}),"clicks-context":e(k)},null,8,["no","style","clicks-context"])),t("div",Ue,[i(L,{title:"Increase font size",onClick:e(be)},{default:g(()=>[i($)]),_:1},8,["onClick"]),i(L,{title:"Decrease font size",onClick:e(ye)},{default:g(()=>[i(p)]),_:1},8,["onClick"]),S("v-if",!0)])])),t("div",We,[i(Ne,{persist:!0}),Xe,t("div",{class:"timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg",opacity:"50 hover:100",onClick:o[2]||(o[2]=(...I)=>e(v)&&e(v)(...I))},[i(h,{class:"absolute"}),i(b,{class:"absolute opacity-0"})]),t("div",Ye,w(e(l)),1)]),(c(),f(Te,{key:2}))],2),t("div",Ze,[t("div",{class:"progress h-3px bg-primary transition-all",style:N({width:`${(e(ge)-1)/(e(ke)-1)*100}%`})},null,4)])]),i($e),i(Se,{modelValue:e(z),"onUpdate:modelValue":o[3]||(o[3]=I=>oe(z)?z.value=I:null)},null,8,["modelValue"])],64)}}}),ut=M(et,[["__scopeId","data-v-5d22dd02"],["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/pages/presenter.vue"]]);export{ut as default}; diff --git a/05-restful/assets/slidev/print-Db79bZhK.js b/05-restful/assets/slidev/print-2cNOs_aZ.js similarity index 89% rename from 05-restful/assets/slidev/print-Db79bZhK.js rename to 05-restful/assets/slidev/print-2cNOs_aZ.js index b54984a..7399b65 100644 --- a/05-restful/assets/slidev/print-Db79bZhK.js +++ b/05-restful/assets/slidev/print-2cNOs_aZ.js @@ -1,7 +1,7 @@ -import{d as _,I as i,N as L,Q as N,J as E,o as n,b as d,l as p,z as e,i as q,c as m,g as b,h as B,F as v,ae as j,e as z,f as O,B as R}from"../modules/vue-BoI2EFOv.js";import{l as V,m as g,e as A,c as k,o as F,_ as h,q as G,r as C,t as f,v as P,x as D,y as I,z as T,f as x,w as W}from"../index-BBhYVIJ4.js";import{G as H,g as J,S as M,a as Q}from"./bottom-DXdIwbm1.js";import{P as K}from"./PrintStyle-M7jeBLz1.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const U=["id"],X=_({__name:"PrintSlideClick",props:{clicksContext:{type:null,required:!0},nav:{type:Object,required:!0},route:{type:Object,required:!0}},setup(c){const o=c,t=i(()=>({height:`${V}px`,width:`${g}px`})),r=L();A(()=>import("./DrawingPreview-C05gdWf_.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(s=>r.value=s.default);const l=i(()=>`${o.route.path.toString().padStart(3,"0")}-${(o.nav.clicks.value+1).toString().padStart(2,"0")}`);return N(F,E({nav:o.nav,configs:k,themeConfigs:i(()=>k.themeConfig)})),(s,u)=>{var a;return n(),d("div",{id:l.value,class:"print-slide-container",style:B(t.value)},[p(e(H)),p(e(M),{is:(a=s.route)==null?void 0:a.component,"clicks-context":s.clicksContext,class:q(e(J)(s.route)),route:s.route},null,8,["is","clicks-context","class","route"]),r.value?(n(),m(e(r),{key:0,page:+s.route.path},null,8,["page"])):b("v-if",!0),p(e(Q))],12,U)}}}),$=h(X,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintSlideClick.vue"]]),Y=_({__name:"PrintSlide",props:{route:{type:Object,required:!0}},setup(c){const o=c,t=i(()=>o.route),r=G(t),l=C(t.value,0);return(s,u)=>(n(),d(v,null,[p($,{"clicks-context":e(l),nav:e(r),route:t.value},null,8,["clicks-context","nav","route"]),e(l).disabled?b("v-if",!0):(n(!0),d(v,{key:0},j(e(l).total,a=>(n(),m($,{key:a,"clicks-context":e(C)(t.value,a),nav:e(r),route:t.value},null,8,["clicks-context","nav","route"]))),128))],64))}}),Z=h(Y,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintSlide.vue"]]),ee={id:"print-content"},te=_({__name:"PrintContainer",props:{width:{type:Number,required:!0}},setup(c){const o=c,t=i(()=>o.width),r=i(()=>o.width/f),l=i(()=>t.value/r.value),s=i(()=>l.valueu[y-1]));const a=i(()=>({"select-none":!k.selectable}));return N(T,s),(w,y)=>(n(),d("div",{id:"print-container",class:q(a.value)},[z("div",ee,[(n(!0),d(v,null,j(e(u),S=>(n(),m(Z,{key:S.path,route:S},null,8,["route"]))),128))]),O(w.$slots,"controls")],2))}}),se=h(te,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintContainer.vue"]]),ne={id:"page-root",class:"grid grid-cols-[1fr_max-content]"},oe=_({__name:"print",setup(c){return R(()=>{x?document.body.parentNode.classList.add("print"):document.body.parentNode.classList.remove("print")}),(o,t)=>(n(),d(v,null,[e(x)?(n(),m(K,{key:0})):b("v-if",!0),z("div",ne,[p(se,{class:"w-full h-full",style:B({background:"var(--slidev-slide-container-background, black)"}),width:e(W).width.value},null,8,["style","width"])])],64))}}),de=h(oe,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/pages/print.vue"]]);export{de as default}; +import{d as _,I as i,N as L,Q as N,J as E,o as n,b as d,l as p,z as e,i as q,c as m,g as b,h as B,F as v,ae as j,e as z,f as O,B as R}from"../modules/vue-BoI2EFOv.js";import{l as V,m as g,e as A,c as k,o as F,_ as h,q as G,r as C,t as f,v as P,x as D,y as I,z as T,f as x,w as W}from"../index-CTBKgxrZ.js";import{G as H,g as J,S as M,a as Q}from"./bottom-DYeMWyTH.js";import{P as K}from"./PrintStyle-C5A1Lxy8.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const U=["id"],X=_({__name:"PrintSlideClick",props:{clicksContext:{type:null,required:!0},nav:{type:Object,required:!0},route:{type:Object,required:!0}},setup(c){const o=c,t=i(()=>({height:`${V}px`,width:`${g}px`})),r=L();A(()=>import("./DrawingPreview-DOv9aIwT.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(s=>r.value=s.default);const l=i(()=>`${o.route.path.toString().padStart(3,"0")}-${(o.nav.clicks.value+1).toString().padStart(2,"0")}`);return N(F,E({nav:o.nav,configs:k,themeConfigs:i(()=>k.themeConfig)})),(s,u)=>{var a;return n(),d("div",{id:l.value,class:"print-slide-container",style:B(t.value)},[p(e(H)),p(e(M),{is:(a=s.route)==null?void 0:a.component,"clicks-context":s.clicksContext,class:q(e(J)(s.route)),route:s.route},null,8,["is","clicks-context","class","route"]),r.value?(n(),m(e(r),{key:0,page:+s.route.path},null,8,["page"])):b("v-if",!0),p(e(Q))],12,U)}}}),$=h(X,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintSlideClick.vue"]]),Y=_({__name:"PrintSlide",props:{route:{type:Object,required:!0}},setup(c){const o=c,t=i(()=>o.route),r=G(t),l=C(t.value,0);return(s,u)=>(n(),d(v,null,[p($,{"clicks-context":e(l),nav:e(r),route:t.value},null,8,["clicks-context","nav","route"]),e(l).disabled?b("v-if",!0):(n(!0),d(v,{key:0},j(e(l).total,a=>(n(),m($,{key:a,"clicks-context":e(C)(t.value,a),nav:e(r),route:t.value},null,8,["clicks-context","nav","route"]))),128))],64))}}),Z=h(Y,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintSlide.vue"]]),ee={id:"print-content"},te=_({__name:"PrintContainer",props:{width:{type:Number,required:!0}},setup(c){const o=c,t=i(()=>o.width),r=i(()=>o.width/f),l=i(()=>t.value/r.value),s=i(()=>l.valueu[y-1]));const a=i(()=>({"select-none":!k.selectable}));return N(T,s),(w,y)=>(n(),d("div",{id:"print-container",class:q(a.value)},[z("div",ee,[(n(!0),d(v,null,j(e(u),S=>(n(),m(Z,{key:S.path,route:S},null,8,["route"]))),128))]),O(w.$slots,"controls")],2))}}),se=h(te,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/internals/PrintContainer.vue"]]),ne={id:"page-root",class:"grid grid-cols-[1fr_max-content]"},oe=_({__name:"print",setup(c){return R(()=>{x?document.body.parentNode.classList.add("print"):document.body.parentNode.classList.remove("print")}),(o,t)=>(n(),d(v,null,[e(x)?(n(),m(K,{key:0})):b("v-if",!0),z("div",ne,[p(se,{class:"w-full h-full",style:B({background:"var(--slidev-slide-container-background, black)"}),width:e(W).width.value},null,8,["style","width"])])],64))}}),de=h(oe,[["__file","/opt/homebrew/lib/node_modules/@slidev/cli/node_modules/@slidev/client/pages/print.vue"]]);export{de as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/slidev/DrawingPreview-C05gdWf_.js","assets/modules/vue-BoI2EFOv.js","assets/index-BBhYVIJ4.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/index-CTiKa7JK.css"] + __vite__mapDeps.viteFileDeps = ["assets/slidev/DrawingPreview-DOv9aIwT.js","assets/modules/vue-BoI2EFOv.js","assets/index-CTBKgxrZ.js","assets/modules/unplugin-icons-CfAESjuq.js","assets/modules/shiki-DdzKTf6Q.js","assets/modules/shiki-BSchMNmt.css","assets/index-CTiKa7JK.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/05-restful/assets/slidev/print-Blm48ouN.js b/05-restful/assets/slidev/print-Ss9g6xiG.js similarity index 92% rename from 05-restful/assets/slidev/print-Blm48ouN.js rename to 05-restful/assets/slidev/print-Ss9g6xiG.js index f39bc8a..67d7170 100644 --- a/05-restful/assets/slidev/print-Blm48ouN.js +++ b/05-restful/assets/slidev/print-Ss9g6xiG.js @@ -1,4 +1,4 @@ -import{d as p,af as _,I as d,b as a,e as t,x as s,z as c,F as u,ae as h,o as l,V as f,l as g,g as v}from"../modules/vue-BoI2EFOv.js";import{A as x,c as m,y as b,B as y,_ as N}from"../index-BBhYVIJ4.js";import{N as k}from"./NoteDisplay-BdeEY5Sw.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const w={id:"page-root"},V={class:"m-4"},B={class:"mb-10"},L={class:"text-4xl font-bold mt-2"},T={class:"opacity-50"},D={class:"text-lg"},H={class:"font-bold flex gap-2"},S={class:"opacity-50"},z=t("div",{class:"flex-auto"},null,-1),A={key:0,class:"border-main mb-8"},C=p({__name:"print",setup(F){_(` +import{d as p,af as _,I as d,b as a,e as t,x as s,z as c,F as u,ae as h,o as l,V as f,l as g,g as v}from"../modules/vue-BoI2EFOv.js";import{A as x,c as m,y as b,B as y,_ as N}from"../index-CTBKgxrZ.js";import{N as k}from"./NoteDisplay-DVesK58r.js";import"../modules/unplugin-icons-CfAESjuq.js";import"../modules/shiki-DdzKTf6Q.js";const w={id:"page-root"},V={class:"m-4"},B={class:"mb-10"},L={class:"text-4xl font-bold mt-2"},T={class:"opacity-50"},D={class:"text-lg"},H={class:"font-bold flex gap-2"},S={class:"opacity-50"},z=t("div",{class:"flex-auto"},null,-1),A={key:0,class:"border-main mb-8"},C=p({__name:"print",setup(F){_(` @page { size: A4; margin-top: 1.5cm; diff --git a/05-restful/index.html b/05-restful/index.html index f1ca625..28bbc61 100644 --- a/05-restful/index.html +++ b/05-restful/index.html @@ -7,7 +7,7 @@ - +