Anvil/assets/Created-TehUZe-O.js
André Jaenisch 754ebfe778
Updates
2024-07-27 14:18:38 +02:00

1 line
1.8 KiB
JavaScript

import{S as b,c as g,a as v,n as c}from"./index-CP70Tq58.js";import{e as m,i as k,d,a as f,t as S,H as D,f as u,h as p,j as w,c as C,l as _,m as y}from"./lifecycle-D_bIUHQK.js";function h(n){let a,e,t,l,o;return{c(){a=f("span"),e=S("created "),t=f("time"),l=new D(!1),this.h()},l(i){a=u(i,"SPAN",{});var s=p(a);e=w(s,"created "),t=u(s,"TIME",{datetime:!0});var r=p(t);l=C(r,!1),r.forEach(d),s.forEach(d),this.h()},h(){var i;l.a=null,_(t,"datetime",o=(i=n[0])==null?void 0:i.toISOString())},m(i,s){k(i,a,s),y(a,e),y(a,t),l.m(n[1],t)},p(i,s){var r;s&2&&l.p(i[1]),s&1&&o!==(o=(r=i[0])==null?void 0:r.toISOString())&&_(t,"datetime",o)},d(i){i&&d(a)}}}function I(n){let a,e=n[0]&&n[1]&&h(n);return{c(){e&&e.c(),a=m()},l(t){e&&e.l(t),a=m()},m(t,l){e&&e.m(t,l),k(t,a,l)},p(t,[l]){t[0]&&t[1]?e?e.p(t,l):(e=h(t),e.c(),e.m(a.parentNode,a)):e&&(e.d(1),e=null)},i:c,o:c,d(t){t&&d(a),e&&e.d(t)}}}function E(n,a,e){let t,{created_at:l=null}=a,{locale:o="en"}=a;return n.$$set=i=>{"created_at"in i&&e(0,l=i.created_at),"locale"in i&&e(2,o=i.locale)},n.$$.update=()=>{n.$$.dirty&5&&e(1,t=new Intl.DateTimeFormat(o).format(l))},[l,t,o]}class H extends b{constructor(a){super(),g(this,a,E,I,v,{created_at:0,locale:2})}}H.__docgen={version:3,name:"Created.svelte",data:[{keywords:[{name:"type",description:"{Date | null}"}],visibility:"public",description:"Date object for created time.",name:"created_at",kind:"let",static:!1,readonly:!1,type:{kind:"union",text:"Date | null",type:[{kind:"type",text:"Date",type:"Date"},{kind:"type",text:"null",type:"null"}]},defaultValue:null},{keywords:[],visibility:"public",description:"Locale to format the datetime according to.",name:"locale",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"en"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};export{H as C};