@protobase/ui 0.50.1 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/live/model-helpers.js +1 -22
- package/dist/live/naming.js +1 -5
- package/dist/package.js +1 -1
- package/dist/shell/assets/app-hgMooGgd.js +9 -0
- package/dist/shell/assets/{export-worker-IJWS5-Wc.js → export-worker-3e4Zsv0a.js} +3 -3
- package/dist/shell/assets/{index-DguZxa40.js → index-DG1uMvhV.js} +2 -2
- package/dist/shell/assets/{records-map-DAT69z7P.js → records-map-BM6l3koM.js} +2 -2
- package/dist/shell/assets/{shared-protobase-ui--qDr5Xxl.js → shared-protobase-ui-B0IRfMH1.js} +2 -2
- package/dist/shell/index.html +3 -3
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/app-hgMooGgd.js.map +1 -0
- package/dist/shell-source-maps/assets/{export-worker-IJWS5-Wc.js.map → export-worker-3e4Zsv0a.js.map} +1 -1
- package/dist/shell-source-maps/assets/{index-DguZxa40.js.map → index-DG1uMvhV.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-DAT69z7P.js.map → records-map-BM6l3koM.js.map} +1 -1
- package/dist/shell-source-maps/assets/{shared-protobase-ui--qDr5Xxl.js.map → shared-protobase-ui-B0IRfMH1.js.map} +1 -1
- package/package.json +4 -4
- package/dist/shell/assets/app-BErWVtb0.js +0 -9
- package/dist/shell-source-maps/assets/app-BErWVtb0.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(){let e=`en`,t=()=>e,n=t=>{e=t},r={en:`en-GB`,nl:`nl-NL`},i=()=>r[t()],a=(e,t)=>t?.[e]??e,o=/* @__PURE__ */ new Map,s=(e,t)=>{let n=i(),r=`${n}|${e}`;return o.has(r)||o.set(r,t(n)),o.get(r)},c=e=>(n,...r)=>{let i=e[t()][n];return typeof i==`function`?i(...r):i},l=c({en:{rows:(e,t)=>`${e} ${t?`row`:`rows`}`,aboutRows:e=>`about ${e} rows`,secondsAgo:e=>`${e} s ago`,minutesAgo:e=>`${e} min ago`,hoursAgo:e=>`${e} h ago`,daysAgo:e=>`${e} d ago`,justNow:`just now`},nl:{rows:(e,t)=>`${e} ${t?`rij`:`rijen`}`,aboutRows:e=>`ongeveer ${e} rijen`,secondsAgo:e=>`${e} s geleden`,minutesAgo:e=>`${e} min geleden`,hoursAgo:e=>`${e} u geleden`,daysAgo:e=>`${e} d geleden`,justNow:`zojuist`}}),u=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,d=/* @__PURE__ */ new Map,f=e=>{let t=d.get(e);if(t)return t;let n=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return d.set(e,n),n},p=(e,t)=>{let n=Object.fromEntries(f(t).formatToParts(e).map(e=>[e.type,e.value]));return{year:Number(n.year),month:Number(n.month),day:Number(n.day),hour:Number(n.hour),minute:Number(n.minute),second:Number(n.second)}},m=(e,t)=>{let n=p(e,t);return Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second)-Math.floor(e/1e3)*1e3},h=((e,t)=>()=>s(`date:${e}`,e=>new Intl.DateTimeFormat(e,{...t,timeZone:`UTC`})))(`day`,{day:`numeric`,month:`short`,year:`numeric`}),g=e=>h().format(e),_=e=>s(`zoned:${e}`,t=>({day:new Intl.DateTimeFormat(t,{day:`numeric`,month:`short`,year:`numeric`,timeZone:e}),time:new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:e})})),v=(e,t=u())=>{let n=_(t);return`${n.day.format(e)}, ${n.time.format(e)}`},y=()=>s(`relative`,e=>new Intl.RelativeTimeFormat(e,{numeric:`auto`})),b=[[`year`,31536e3],[`month`,2592e3],[`day`,86400],[`hour`,3600],[`minute`,60]],x=e=>{let t=Math.abs(e),[n,r]=b.find(([,e])=>t>=e)??[`second`,1];return n===`second`&&t<45?l(`justNow`):y().format(-Math.sign(e)*Math.floor(t/r),n)},S=c({en:{yes:`Yes`,no:`No`,shownIn:e=>`Shown in ${e}`,fileMissing:`File missing`},nl:{yes:`Ja`,no:`Nee`,shownIn:e=>`Getoond in ${e}`,fileMissing:`Bestand ontbreekt`}}),C=e=>typeof e==`object`&&!!e&&typeof e.uri==`string`,w=e=>typeof e==`object`&&!!e&&typeof e.uploaded?.value==`string`,T=e=>{if(w(e))return{...e.uploaded.file,...e.preview&&{url:e.preview},corrected:e.uploaded.corrected};if(C(e))return`missing`in e?{name:S(`fileMissing`),type:``,missing:!0}:e},E=(e,t)=>`${t.prefix??``}${e}${t.suffix??``}`,D=(e,t,n={},r=u(),o=Date.now())=>{if(t==null||t===``)return`—`;switch(e.type){case`boolean`:return S(t?`yes`:`no`);case`file`:return T(t)?.name??`—`;case`enum`:return a(String(t),n.valueLabels);case`timestamp`:{let e=Date.parse(String(t));return n.format===`relative`?x(Math.round((o-e)/1e3)):v(e,r)}case`date`:return g(Date.parse(String(t)));case`decimal`:{let e=n.decimals===void 0?String(t):Number(t).toFixed(n.decimals);return n.format===`percent`?`${Number(t)}%`:E(Number(e).toLocaleString(i(),{minimumFractionDigits:n.decimals??0,maximumFractionDigits:n.decimals??20}),n)}case`integer`:case`bigint`:return E(String(t),n);default:return typeof t==`object`?JSON.stringify(t):String(t)}},O={kind:`empty`},k=e=>({kind:`text`,value:e}),A=e=>e==null||e===``,j=(e,t,n)=>n[e.name]?.[String(t)]??String(t),M=(e,t)=>C(e)?t===`raw`?e.uri:T(e)?.name??e.uri:String(e),N=(e,t,n,r)=>{if(A(t))return``;let{field:i,hints:a}=e;return i.type===`file`?M(t,r):i.type===`relation`?r===`shown`?j(e,t,n):String(t):r===`shown`?D(i,t,{...a,format:void 0}):typeof t==`object`?JSON.stringify(t):String(t)},P=e=>e/864e5+25569,F={shown:{date:`d mmm yyyy`,timestamp:`d mmm yyyy, hh:mm`},raw:{date:`yyyy-mm-dd`,timestamp:`yyyy-mm-dd hh:mm:ss`}},ee=e=>[...e??``].map(e=>`\\${e}`).join(``),I=e=>{if(e.format===`percent`)return`General\\%`;let t=e.decimals===void 0?`General`:e.decimals>0?`#,##0.${`0`.repeat(e.decimals)}`:`#,##0`,n=`${ee(e.prefix)}${t}${ee(e.suffix)}`;return n===`General`?void 0:n},L=(e,t,n)=>{let r=Number(t);if(!Number.isFinite(r)||e.field.type===`bigint`&&!Number.isSafeInteger(r))return k(String(t));let i=n===`shown`?I(e.hints):void 0;return i?{kind:`number`,value:r,format:i}:{kind:`number`,value:r}},R=(e,t,n,r)=>{let i=Date.parse(String(t));if(Number.isNaN(i))return k(String(t));let a=e===`timestamp`&&n===`shown`?i+m(i,r):i;return{kind:`number`,value:P(a),format:F[n][e]}},z=(e,t,n,r,i=u())=>{if(A(t))return O;let{field:a}=e;switch(a.type){case`boolean`:return{kind:`boolean`,value:!!t};case`integer`:case`bigint`:case`decimal`:return L(e,t,r);case`date`:case`timestamp`:return R(a.type,t,r,i);case`relation`:return r===`shown`?k(j(e,t,n)):typeof t==`number`?{kind:`number`,value:t}:k(String(t));default:return k(N(e,t,n,r))}},B=new Uint8Array([239,187,191]),V=/[",\r\n]/,te=/^[=+\-@\t\r]/,H=e=>V.test(e)?`"${e.replaceAll(`"`,`""`)}"`:e,ne=e=>H(te.test(e)?`'${e}`:e),re=e=>`${e.join(`,`)}\r\n`;var U=Uint8Array,W=Uint16Array,ie=Int32Array,ae=new U([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oe=new U([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),se=new U([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ce=function(e,t){for(var n=new W(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new ie(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},le=ce(ae,2),ue=le.b,de=le.r;ue[28]=258,de[258]=28;var fe=ce(oe,0);fe.b;for(var pe=fe.r,me=new W(32768),G=0;G<32768;++G){var K=(G&43690)>>1|(G&21845)<<1;K=(K&52428)>>2|(K&13107)<<2,K=(K&61680)>>4|(K&3855)<<4,me[G]=((K&65280)>>8|(K&255)<<8)>>1}for(var q=(function(e,t,n){for(var r=e.length,i=0,a=new W(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new W(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new W(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[me[d]>>c]=l}else for(s=new W(r),i=0;i<r;++i)e[i]&&(s[i]=me[o[e[i]-1]++]>>15-e[i]);return s}),J=new U(288),G=0;G<144;++G)J[G]=8;for(var G=144;G<256;++G)J[G]=9;for(var G=256;G<280;++G)J[G]=7;for(var G=280;G<288;++G)J[G]=8;for(var he=new U(32),G=0;G<32;++G)he[G]=5;var ge=/*#__PURE__*/ q(J,9,0),_e=/*#__PURE__*/ q(he,5,0),ve=function(e){return(e+7)/8|0},ye=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new U(e.subarray(t,n))},be=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],Y=function(e,t,n){var r=Error(t||be[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Y),!n)throw r;return r},X=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Z=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},xe=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:Oe,l:0};if(i==1){var o=new U(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=a[0].s,r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var p=new W(f+1),m=Se(n[u-1],p,0);if(m>t){var r=0,h=0,g=m-t,_=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<i;++r){var v=a[r].s;if(p[v]>t)h+=_-(1<<m-p[v]),p[v]=t;else break}for(h>>=g;h>0;){var y=a[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return{t:new U(p),l:m}},Se=function(e,t,n){return e.s==-1?Math.max(Se(e.l,t,n+1),Se(e.r,t,n+1)):t[e.s]=n},Ce=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new W(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},we=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Te=function(e,t,n){var r=n.length,i=ve(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},Ee=function(e,t,n,r,i,a,o,s,c,l,u){X(t,u++,n),++i[256];for(var d=xe(i,15),f=d.t,p=d.l,m=xe(a,15),h=m.t,g=m.l,_=Ce(f),v=_.c,y=_.n,b=Ce(h),x=b.c,S=b.n,C=new W(19),w=0;w<v.length;++w)++C[v[w]&31];for(var w=0;w<x.length;++w)++C[x[w]&31];for(var T=xe(C,7),E=T.t,D=T.l,O=19;O>4&&!E[se[O-1]];--O);var k=l+5<<3,A=we(i,J)+we(a,he)+o,j=we(i,f)+we(a,h)+o+14+3*O+we(C,E)+2*C[16]+3*C[17]+7*C[18];if(c>=0&&k<=A&&k<=j)return Te(t,u,e.subarray(c,c+l));var M,N,P,F;if(X(t,u,1+(j<A)),u+=2,j<A){M=q(f,p,0),N=f,P=q(h,g,0),F=h;var ee=q(E,D,0);X(t,u,y-257),X(t,u+5,S-1),X(t,u+10,O-4),u+=14;for(var w=0;w<O;++w)X(t,u+3*w,E[se[w]]);u+=3*O;for(var I=[v,x],L=0;L<2;++L)for(var R=I[L],w=0;w<R.length;++w){var z=R[w]&31;X(t,u,ee[z]),u+=E[z],z>15&&(X(t,u,R[w]>>5&127),u+=R[w]>>12)}}else M=ge,N=J,P=_e,F=he;for(var w=0;w<s;++w){var B=r[w];if(B>255){var z=B>>18&31;Z(t,u,M[z+257]),u+=N[z+257],z>7&&(X(t,u,B>>23&31),u+=ae[z]);var V=B&31;Z(t,u,P[V]),u+=F[V],V>3&&(Z(t,u,B>>5&8191),u+=oe[V])}else Z(t,u,M[B]),u+=N[B]}return Z(t,u,M[256]),u+N[256]},De=/*#__PURE__*/ new ie([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Oe=/*#__PURE__*/ new U(0),ke=function(e,t,n,r,i,a){var o=a.z||e.length,s=new U(r+o+5*(1+Math.ceil(o/7e3))+i),c=s.subarray(r,s.length-i),l=a.l,u=(a.r||0)&7;if(t){u&&(c[0]=a.r>>3);for(var d=De[t-1],f=d>>13,p=d&8191,m=(1<<n)-1,h=a.p||new W(32768),g=a.h||new W(m+1),_=Math.ceil(n/3),v=2*_,y=function(t){return(e[t]^e[t+1]<<_^e[t+2]<<v)&m},b=new ie(25e3),x=new W(288),S=new W(32),C=0,w=0,T=a.i||0,E=0,D=a.w||0,O=0;T+2<o;++T){var k=y(T),A=T&32767,j=g[k];if(h[A]=j,g[k]=A,D<=T){var M=o-T;if((C>7e3||E>24576)&&(M>423||!l)){u=Ee(e,c,0,b,x,S,w,E,O,T-O,u),E=C=w=0,O=T;for(var N=0;N<286;++N)x[N]=0;for(var N=0;N<30;++N)S[N]=0}var P=2,F=0,ee=p,I=A-j&32767;if(M>2&&k==y(T-I))for(var L=Math.min(f,M)-1,R=Math.min(32767,T),z=Math.min(258,M);I<=R&&--ee&&A!=j;){if(e[T+P]==e[T+P-I]){for(var B=0;B<z&&e[T+B]==e[T+B-I];++B);if(B>P){if(P=B,F=I,B>L)break;for(var V=Math.min(I,B-2),te=0,N=0;N<V;++N){var H=T-I+N&32767,ne=H-h[H]&32767;ne>te&&(te=ne,j=H)}}}A=j,j=h[A],I+=A-j&32767}if(F){b[E++]=268435456|de[P]<<18|pe[F];var re=de[P]&31,se=pe[F]&31;w+=ae[re]+oe[se],++x[257+re],++S[se],D=T+P,++C}else b[E++]=e[T],++x[e[T]]}}for(T=Math.max(T,D);T<o;++T)b[E++]=e[T],++x[e[T]];u=Ee(e,c,l,b,x,S,w,E,O,T-O,u),l||(a.r=u&7|c[u/8|0]<<3,u-=7,a.h=g,a.p=h,a.i=T,a.w=D)}else{for(var T=a.w||0;T<o+l;T+=65535){var ce=T+65535;ce>=o&&(c[u/8|0]=l,ce=o),u=Te(c,u+1,e.subarray(T,ce))}a.i=o}return ye(s,0,r+ve(u)+i)},Ae=/*#__PURE__*/ (function(){for(var e=/* @__PURE__ */ new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),je=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Ae[n&255^t[r]]^n>>>8;e=n},d:function(){return~e}}},Me=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new U(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return ke(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},Ne=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Q=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},Pe=/* @__PURE__ */ function(){function e(e,t){if(typeof e==`function`&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new U(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(Me(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.s.l&&Y(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new U(n&-32768);r.set(this.b.subarray(0,this.s.z)),this.b=r}var i=this.b.length-this.s.z;this.b.set(e.subarray(0,i),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(i),32768),this.s.z=e.length-i+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=t&1,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2),t&&(this.s=this.o={},this.b=Oe)},e.prototype.flush=function(e){if(this.ondata||Y(5),this.s.l&&Y(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,e){var t=new U(6);t[0]=this.s.r>>3;var n=Te(t,this.s.r,Oe);this.s.r=0,this.ondata(t.subarray(0,n>>3),!1)}},e}(),Fe=typeof TextEncoder<`u`&&/*#__PURE__*/ new TextEncoder,Ie=typeof TextDecoder<`u`&&/*#__PURE__*/ new TextDecoder;try{Ie.decode(Oe,{stream:!0})}catch{}function Le(e,t){if(t){for(var n=new U(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Fe)return Fe.encode(e);for(var i=e.length,a=new U(e.length+(e.length>>1)),o=0,s=function(e){a[o++]=e},r=0;r<i;++r){if(o+5>a.length){var c=new U(o+8+(i-r<<1));c.set(a),a=c}var l=e.charCodeAt(r);l<128||t?s(l):l<2048?(s(192|l>>6),s(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|e.charCodeAt(++r)&1023,s(240|l>>18),s(128|l>>12&63),s(128|l>>6&63),s(128|l&63)):(s(224|l>>12),s(128|l>>6&63),s(128|l&63))}return ye(a,0,o)}var Re=function(e){return e==1?3:e<6?2:+(e==9)},ze=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Y(9),t+=r+4}return t},Be=function(e,t,n,r,i,a,o,s){var c=r.length,l=n.extra,u=s&&s.length,d=ze(l);Q(e,t,o==null?67324752:33639248),t+=4,o!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var f=new Date(n.mtime==null?Date.now():n.mtime),p=f.getFullYear()-1980;if((p<0||p>119)&&Y(10),Q(e,t,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,a!=-1&&(Q(e,t,n.crc),Q(e,t+4,a<0?-a-2:a),Q(e,t+8,n.size)),Q(e,t+12,c),Q(e,t+14,d),t+=16,o!=null&&(Q(e,t,u),Q(e,t+6,n.attrs),Q(e,t+10,o),t+=14),e.set(r,t),t+=c,d)for(var m in l){var h=l[m],g=h.length;Q(e,t,+m),Q(e,t+2,g),e.set(h,t+4),t+=4+g}return u&&(e.set(s,t),t+=u),t},Ve=function(e,t,n,r,i){Q(e,t,101010256),Q(e,t+8,n),Q(e,t+10,n),Q(e,t+12,r),Q(e,t+16,i)},He=/* @__PURE__ */ function(){function e(e){this.filename=e,this.c=je(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),Ue=/* @__PURE__ */ function(){function e(e,t){var n=this;t||={},He.call(this,e),this.d=new Pe(t,function(e,t){n.ondata(null,e,t)}),this.compression=8,this.flag=Re(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){He.prototype.push.call(this,e,t)},e}(),We=/* @__PURE__ */ function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(this.ondata||Y(5),this.d&2)this.ondata(Y(4+(this.d&1)*8,0,1),null,!1);else{var n=Le(e.filename),r=n.length,i=e.comment,a=i&&Le(i),o=r!=e.filename.length||a&&i.length!=a.length,s=r+ze(e.extra)+30;r>65535&&this.ondata(Y(11,0,1),null,!1);var c=new U(s);Be(c,0,e,n,o,-1);var l=[c],u=function(){for(var e=0,n=l;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}l=[]},d=this.d;this.d=0;var f=this.u.length,p=Ne(e,{f:n,u:o,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(u(),d){var e=t.u[f+1];e?e.r():t.d=1}d=1}}),m=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(m+=r.length,l.push(r),i){var a=new U(16);Q(a,0,134695760),Q(a,4,e.crc),Q(a,8,m),Q(a,12,e.size),l.push(a),p.c=m,p.b=s+m+16,p.crc=e.crc,p.size=e.size,d&&p.r(),d=1}else d&&u()},this.u.push(p)}},e.prototype.end=function(){var e=this;if(this.d&2){this.ondata(Y(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:function(){e.d&1&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){var a=i[r];n+=46+a.f.length+ze(a.extra)+(a.o?a.o.length:0)}for(var o=new U(n+22),s=0,c=this.u;s<c.length;s++){var a=c[s];Be(o,e,a,a.f,a.u,-a.c-2,t,a.o),e+=46+a.f.length+ze(a.extra)+(a.o?a.o.length:0),t+=a.b}Ve(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++)t[e].t();this.d=2},e}();let Ge=/[\u0000-\u0008\u000b\u000c\u000e-\u001f]/g,Ke=e=>e.replace(Ge,``).replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`),qe=e=>{let t=String.fromCharCode(65+e%26);return e<26?t:qe(Math.floor(e/26)-1)+t},Je=(e,t,n=``)=>`<c r="${e}"${n} t="inlineStr"><is><t xml:space="preserve">${Ke(t.slice(0,32767))}</t></is></c>`,$=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
-
`,Ye=`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,Xe=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,Ze=`http://schemas.openxmlformats.org/package/2006/relationships`,Qe=`${$}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/></Types>`,$e=`${$}<Relationships xmlns="${Ze}"><Relationship Id="rId1" Type="${Xe}/officeDocument" Target="xl/workbook.xml"/></Relationships>`,et=`${$}<Relationships xmlns="${Ze}"><Relationship Id="rId1" Type="${Xe}/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="${Xe}/styles" Target="styles.xml"/></Relationships>`,tt=e=>e.replace(/[:\\/?*[\]]/g,` `).slice(0,31).trim()||`Sheet1`,nt=e=>`${$}<workbook xmlns="${Ye}" xmlns:r="${Xe}"><sheets><sheet name="${Ke(tt(e))}" sheetId="1" r:id="rId1"/></sheets></workbook>`,rt=e=>{let t=e.map((e,t)=>`<numFmt numFmtId="${164+t}" formatCode="${Ke(e)}"/>`).join(``),n=e.map((e,t)=>`<xf numFmtId="${164+t}" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/>`).join(``);return`${$}<styleSheet xmlns="${Ye}">${e.length>0?`<numFmts count="${e.length}">${t}</numFmts>`:``}<fonts count="2"><font><sz val="11"/><name val="Calibri"/></font><font><b/><sz val="11"/><name val="Calibri"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${2+e.length}"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" xfId="0" applyFont="1"/>${n}</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></styleSheet>`},it=new TextEncoder,at=(e,t)=>{let n=new We((e,n,r)=>{if(e)throw e;t(n,r)}),r=(e,t)=>{let r=new Ue(e,{level:6});n.add(r),r.push(it.encode(t),!0)};r(`[Content_Types].xml`,Qe),r(`_rels/.rels`,$e),r(`xl/workbook.xml`,nt(e.name)),r(`xl/_rels/workbook.xml.rels`,et);let i=new Ue(`xl/worksheets/sheet1.xml`,{level:6});n.add(i);let a=e.widths.map((e,t)=>`<col min="${t+1}" max="${t+1}" width="${e}" customWidth="1"/>`).join(``),o=`<row r="1">${e.headers.map((e,t)=>Je(`${qe(t)}1`,e,` s="1"`)).join(``)}</row>`;i.push(it.encode(`${$}<worksheet xmlns="${Ye}"><sheetViews><sheetView workbookViewId="0"><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/></sheetView></sheetViews>${a?`<cols>${a}</cols>`:``}<sheetData>${o}`));let s=e.headers.map((e,t)=>qe(t)),c=[],l=e=>{let t=c.indexOf(e);return t>=0?t+2:(c.push(e),c.length+1)},u=(e,t)=>{switch(e.kind){case`empty`:return``;case`text`:return Je(t,e.value);case`boolean`:return`<c r="${t}" t="b"><v>${+!!e.value}</v></c>`;case`number`:return`<c r="${t}"${e.format?` s="${l(e.format)}"`:``}><v>${e.value}</v></c>`}},d=1;return{rows:e=>{let t=``;for(let n of e){if(d+=1,d>1048576)throw Error(`A sheet holds at most 1048575 rows`);t+=`<row r="${d}">${n.map((e,t)=>u(e,`${s[t]}${d}`)).join(``)}</row>`}i.push(it.encode(t))},finish:()=>{i.push(it.encode(`</sheetData></worksheet>`),!0),r(`xl/styles.xml`,rt(c)),n.end()}}},ot=/* @__PURE__ */ new Set([`text`,`uuid`,`enum`,`relation`,`file`,`json`,`currency`,`country`]),st=(e,t,n)=>e.map(e=>{let r=Math.max(e.header.length,...t.map(t=>N(e,t[e.name],n,`shown`).length));return Math.min(60,Math.max(8,r+2))}),ct=(e,t)=>{let n=new TextEncoder;t(B),t(n.encode(re(e.columns.map(e=>H(e.header)))));let r=(t,n,r)=>{let i=N(t,n[t.name],r,e.mode);return ot.has(t.field.type)?ne(i):H(i)};return{page:(i,a)=>{t(n.encode(i.map(t=>re(e.columns.map(e=>r(e,t,a)))).join(``)))},finish:()=>void 0}},lt=(e,t)=>{let n,r=(n,r)=>at({name:e.name,headers:e.columns.map(e=>e.header),widths:st(e.columns,n,r)},t);return{page:(t,i)=>{n??=r(t,i),n.rows(t.map(t=>e.columns.map(n=>z(n,t[n.name],i,e.mode))))},finish:()=>{n??=r([],{}),n.finish()}}},ut=(e,t)=>e.format===`csv`?ct(e,t):lt(e,t),dt=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t},ft=(()=>{let e,t=[];return n=>{if(n.kind===`start`)e=ut(n.plan,e=>t.push(e));else if(e)n.kind===`page`?e.page(n.records,n.labels):e.finish();else throw Error(`The export was not started`);let r=dt(t);return t=[],r}})(),pt=self;pt.onmessage=e=>{e.data.kind===`start`&&
|
|
3
|
-
//# debugId=
|
|
1
|
+
(function(){let e=(e,t)=>t?.[e]??e,t=`en`,n=()=>t,r=e=>{t=e},i={en:`en-GB`,nl:`nl-NL`},a=()=>i[n()],o=/* @__PURE__ */ new Map,s=(e,t)=>{let n=a(),r=`${n}|${e}`;return o.has(r)||o.set(r,t(n)),o.get(r)},c=e=>(t,...r)=>{let i=e[n()][t];return typeof i==`function`?i(...r):i},l=c({en:{rows:(e,t)=>`${e} ${t?`row`:`rows`}`,aboutRows:e=>`about ${e} rows`,secondsAgo:e=>`${e} s ago`,minutesAgo:e=>`${e} min ago`,hoursAgo:e=>`${e} h ago`,daysAgo:e=>`${e} d ago`,justNow:`just now`},nl:{rows:(e,t)=>`${e} ${t?`rij`:`rijen`}`,aboutRows:e=>`ongeveer ${e} rijen`,secondsAgo:e=>`${e} s geleden`,minutesAgo:e=>`${e} min geleden`,hoursAgo:e=>`${e} u geleden`,daysAgo:e=>`${e} d geleden`,justNow:`zojuist`}}),u=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,d=/* @__PURE__ */ new Map,f=e=>{let t=d.get(e);if(t)return t;let n=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return d.set(e,n),n},p=(e,t)=>{let n=Object.fromEntries(f(t).formatToParts(e).map(e=>[e.type,e.value]));return{year:Number(n.year),month:Number(n.month),day:Number(n.day),hour:Number(n.hour),minute:Number(n.minute),second:Number(n.second)}},m=(e,t)=>{let n=p(e,t);return Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second)-Math.floor(e/1e3)*1e3},h=((e,t)=>()=>s(`date:${e}`,e=>new Intl.DateTimeFormat(e,{...t,timeZone:`UTC`})))(`day`,{day:`numeric`,month:`short`,year:`numeric`}),g=e=>h().format(e),_=e=>s(`zoned:${e}`,t=>({day:new Intl.DateTimeFormat(t,{day:`numeric`,month:`short`,year:`numeric`,timeZone:e}),time:new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:e})})),v=(e,t=u())=>{let n=_(t);return`${n.day.format(e)}, ${n.time.format(e)}`},y=()=>s(`relative`,e=>new Intl.RelativeTimeFormat(e,{numeric:`auto`})),b=[[`year`,31536e3],[`month`,2592e3],[`day`,86400],[`hour`,3600],[`minute`,60]],x=e=>{let t=Math.abs(e),[n,r]=b.find(([,e])=>t>=e)??[`second`,1];return n===`second`&&t<45?l(`justNow`):y().format(-Math.sign(e)*Math.floor(t/r),n)},S=c({en:{yes:`Yes`,no:`No`,shownIn:e=>`Shown in ${e}`,fileMissing:`File missing`},nl:{yes:`Ja`,no:`Nee`,shownIn:e=>`Getoond in ${e}`,fileMissing:`Bestand ontbreekt`}}),C=e=>typeof e==`object`&&!!e&&typeof e.uri==`string`,w=e=>typeof e==`object`&&!!e&&typeof e.uploaded?.value==`string`,T=e=>{if(w(e))return{...e.uploaded.file,...e.preview&&{url:e.preview},corrected:e.uploaded.corrected};if(C(e))return`missing`in e?{name:S(`fileMissing`),type:``,missing:!0}:e},E=(e,t)=>`${t.prefix??``}${e}${t.suffix??``}`,D=(t,n,r={},i=u(),o=Date.now())=>{if(n==null||n===``)return`—`;switch(t.type){case`boolean`:return S(n?`yes`:`no`);case`file`:return T(n)?.name??`—`;case`enum`:return e(String(n),r.valueLabels);case`timestamp`:{let e=Date.parse(String(n));return r.format===`relative`?x(Math.round((o-e)/1e3)):v(e,i)}case`date`:return g(Date.parse(String(n)));case`decimal`:{let e=r.decimals===void 0?String(n):Number(n).toFixed(r.decimals);return r.format===`percent`?`${Number(n)}%`:E(Number(e).toLocaleString(a(),{minimumFractionDigits:r.decimals??0,maximumFractionDigits:r.decimals??20}),r)}case`integer`:case`bigint`:return E(String(n),r);default:return typeof n==`object`?JSON.stringify(n):String(n)}},O={kind:`empty`},k=e=>({kind:`text`,value:e}),A=e=>e==null||e===``,j=(e,t,n)=>n[e.name]?.[String(t)]??String(t),M=(e,t)=>C(e)?t===`raw`?e.uri:T(e)?.name??e.uri:String(e),N=(e,t,n,r)=>{if(A(t))return``;let{field:i,hints:a}=e;return i.type===`file`?M(t,r):i.type===`relation`?r===`shown`?j(e,t,n):String(t):r===`shown`?D(i,t,{...a,format:void 0}):typeof t==`object`?JSON.stringify(t):String(t)},P=e=>e/864e5+25569,F={shown:{date:`d mmm yyyy`,timestamp:`d mmm yyyy, hh:mm`},raw:{date:`yyyy-mm-dd`,timestamp:`yyyy-mm-dd hh:mm:ss`}},ee=e=>[...e??``].map(e=>`\\${e}`).join(``),I=e=>{if(e.format===`percent`)return`General\\%`;let t=e.decimals===void 0?`General`:e.decimals>0?`#,##0.${`0`.repeat(e.decimals)}`:`#,##0`,n=`${ee(e.prefix)}${t}${ee(e.suffix)}`;return n===`General`?void 0:n},L=(e,t,n)=>{let r=Number(t);if(!Number.isFinite(r)||e.field.type===`bigint`&&!Number.isSafeInteger(r))return k(String(t));let i=n===`shown`?I(e.hints):void 0;return i?{kind:`number`,value:r,format:i}:{kind:`number`,value:r}},R=(e,t,n,r)=>{let i=Date.parse(String(t));if(Number.isNaN(i))return k(String(t));let a=e===`timestamp`&&n===`shown`?i+m(i,r):i;return{kind:`number`,value:P(a),format:F[n][e]}},z=(e,t,n,r,i=u())=>{if(A(t))return O;let{field:a}=e;switch(a.type){case`boolean`:return{kind:`boolean`,value:!!t};case`integer`:case`bigint`:case`decimal`:return L(e,t,r);case`date`:case`timestamp`:return R(a.type,t,r,i);case`relation`:return r===`shown`?k(j(e,t,n)):typeof t==`number`?{kind:`number`,value:t}:k(String(t));default:return k(N(e,t,n,r))}},B=new Uint8Array([239,187,191]),V=/[",\r\n]/,te=/^[=+\-@\t\r]/,H=e=>V.test(e)?`"${e.replaceAll(`"`,`""`)}"`:e,ne=e=>H(te.test(e)?`'${e}`:e),re=e=>`${e.join(`,`)}\r\n`;var U=Uint8Array,W=Uint16Array,ie=Int32Array,ae=new U([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oe=new U([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),se=new U([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ce=function(e,t){for(var n=new W(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new ie(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},le=ce(ae,2),ue=le.b,de=le.r;ue[28]=258,de[258]=28;var fe=ce(oe,0);fe.b;for(var pe=fe.r,me=new W(32768),G=0;G<32768;++G){var K=(G&43690)>>1|(G&21845)<<1;K=(K&52428)>>2|(K&13107)<<2,K=(K&61680)>>4|(K&3855)<<4,me[G]=((K&65280)>>8|(K&255)<<8)>>1}for(var q=(function(e,t,n){for(var r=e.length,i=0,a=new W(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new W(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new W(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[me[d]>>c]=l}else for(s=new W(r),i=0;i<r;++i)e[i]&&(s[i]=me[o[e[i]-1]++]>>15-e[i]);return s}),J=new U(288),G=0;G<144;++G)J[G]=8;for(var G=144;G<256;++G)J[G]=9;for(var G=256;G<280;++G)J[G]=7;for(var G=280;G<288;++G)J[G]=8;for(var he=new U(32),G=0;G<32;++G)he[G]=5;var ge=/*#__PURE__*/ q(J,9,0),_e=/*#__PURE__*/ q(he,5,0),ve=function(e){return(e+7)/8|0},ye=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new U(e.subarray(t,n))},be=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],Y=function(e,t,n){var r=Error(t||be[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Y),!n)throw r;return r},X=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Z=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},xe=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:Oe,l:0};if(i==1){var o=new U(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=a[0].s,r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var p=new W(f+1),m=Se(n[u-1],p,0);if(m>t){var r=0,h=0,g=m-t,_=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<i;++r){var v=a[r].s;if(p[v]>t)h+=_-(1<<m-p[v]),p[v]=t;else break}for(h>>=g;h>0;){var y=a[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return{t:new U(p),l:m}},Se=function(e,t,n){return e.s==-1?Math.max(Se(e.l,t,n+1),Se(e.r,t,n+1)):t[e.s]=n},Ce=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new W(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},we=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Te=function(e,t,n){var r=n.length,i=ve(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},Ee=function(e,t,n,r,i,a,o,s,c,l,u){X(t,u++,n),++i[256];for(var d=xe(i,15),f=d.t,p=d.l,m=xe(a,15),h=m.t,g=m.l,_=Ce(f),v=_.c,y=_.n,b=Ce(h),x=b.c,S=b.n,C=new W(19),w=0;w<v.length;++w)++C[v[w]&31];for(var w=0;w<x.length;++w)++C[x[w]&31];for(var T=xe(C,7),E=T.t,D=T.l,O=19;O>4&&!E[se[O-1]];--O);var k=l+5<<3,A=we(i,J)+we(a,he)+o,j=we(i,f)+we(a,h)+o+14+3*O+we(C,E)+2*C[16]+3*C[17]+7*C[18];if(c>=0&&k<=A&&k<=j)return Te(t,u,e.subarray(c,c+l));var M,N,P,F;if(X(t,u,1+(j<A)),u+=2,j<A){M=q(f,p,0),N=f,P=q(h,g,0),F=h;var ee=q(E,D,0);X(t,u,y-257),X(t,u+5,S-1),X(t,u+10,O-4),u+=14;for(var w=0;w<O;++w)X(t,u+3*w,E[se[w]]);u+=3*O;for(var I=[v,x],L=0;L<2;++L)for(var R=I[L],w=0;w<R.length;++w){var z=R[w]&31;X(t,u,ee[z]),u+=E[z],z>15&&(X(t,u,R[w]>>5&127),u+=R[w]>>12)}}else M=ge,N=J,P=_e,F=he;for(var w=0;w<s;++w){var B=r[w];if(B>255){var z=B>>18&31;Z(t,u,M[z+257]),u+=N[z+257],z>7&&(X(t,u,B>>23&31),u+=ae[z]);var V=B&31;Z(t,u,P[V]),u+=F[V],V>3&&(Z(t,u,B>>5&8191),u+=oe[V])}else Z(t,u,M[B]),u+=N[B]}return Z(t,u,M[256]),u+N[256]},De=/*#__PURE__*/ new ie([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Oe=/*#__PURE__*/ new U(0),ke=function(e,t,n,r,i,a){var o=a.z||e.length,s=new U(r+o+5*(1+Math.ceil(o/7e3))+i),c=s.subarray(r,s.length-i),l=a.l,u=(a.r||0)&7;if(t){u&&(c[0]=a.r>>3);for(var d=De[t-1],f=d>>13,p=d&8191,m=(1<<n)-1,h=a.p||new W(32768),g=a.h||new W(m+1),_=Math.ceil(n/3),v=2*_,y=function(t){return(e[t]^e[t+1]<<_^e[t+2]<<v)&m},b=new ie(25e3),x=new W(288),S=new W(32),C=0,w=0,T=a.i||0,E=0,D=a.w||0,O=0;T+2<o;++T){var k=y(T),A=T&32767,j=g[k];if(h[A]=j,g[k]=A,D<=T){var M=o-T;if((C>7e3||E>24576)&&(M>423||!l)){u=Ee(e,c,0,b,x,S,w,E,O,T-O,u),E=C=w=0,O=T;for(var N=0;N<286;++N)x[N]=0;for(var N=0;N<30;++N)S[N]=0}var P=2,F=0,ee=p,I=A-j&32767;if(M>2&&k==y(T-I))for(var L=Math.min(f,M)-1,R=Math.min(32767,T),z=Math.min(258,M);I<=R&&--ee&&A!=j;){if(e[T+P]==e[T+P-I]){for(var B=0;B<z&&e[T+B]==e[T+B-I];++B);if(B>P){if(P=B,F=I,B>L)break;for(var V=Math.min(I,B-2),te=0,N=0;N<V;++N){var H=T-I+N&32767,ne=H-h[H]&32767;ne>te&&(te=ne,j=H)}}}A=j,j=h[A],I+=A-j&32767}if(F){b[E++]=268435456|de[P]<<18|pe[F];var re=de[P]&31,se=pe[F]&31;w+=ae[re]+oe[se],++x[257+re],++S[se],D=T+P,++C}else b[E++]=e[T],++x[e[T]]}}for(T=Math.max(T,D);T<o;++T)b[E++]=e[T],++x[e[T]];u=Ee(e,c,l,b,x,S,w,E,O,T-O,u),l||(a.r=u&7|c[u/8|0]<<3,u-=7,a.h=g,a.p=h,a.i=T,a.w=D)}else{for(var T=a.w||0;T<o+l;T+=65535){var ce=T+65535;ce>=o&&(c[u/8|0]=l,ce=o),u=Te(c,u+1,e.subarray(T,ce))}a.i=o}return ye(s,0,r+ve(u)+i)},Ae=/*#__PURE__*/ (function(){for(var e=/* @__PURE__ */ new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),je=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Ae[n&255^t[r]]^n>>>8;e=n},d:function(){return~e}}},Me=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new U(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return ke(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},Ne=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Q=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},Pe=/* @__PURE__ */ function(){function e(e,t){if(typeof e==`function`&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new U(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(Me(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.s.l&&Y(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new U(n&-32768);r.set(this.b.subarray(0,this.s.z)),this.b=r}var i=this.b.length-this.s.z;this.b.set(e.subarray(0,i),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(i),32768),this.s.z=e.length-i+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=t&1,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2),t&&(this.s=this.o={},this.b=Oe)},e.prototype.flush=function(e){if(this.ondata||Y(5),this.s.l&&Y(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,e){var t=new U(6);t[0]=this.s.r>>3;var n=Te(t,this.s.r,Oe);this.s.r=0,this.ondata(t.subarray(0,n>>3),!1)}},e}(),Fe=typeof TextEncoder<`u`&&/*#__PURE__*/ new TextEncoder,Ie=typeof TextDecoder<`u`&&/*#__PURE__*/ new TextDecoder;try{Ie.decode(Oe,{stream:!0})}catch{}function Le(e,t){if(t){for(var n=new U(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Fe)return Fe.encode(e);for(var i=e.length,a=new U(e.length+(e.length>>1)),o=0,s=function(e){a[o++]=e},r=0;r<i;++r){if(o+5>a.length){var c=new U(o+8+(i-r<<1));c.set(a),a=c}var l=e.charCodeAt(r);l<128||t?s(l):l<2048?(s(192|l>>6),s(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|e.charCodeAt(++r)&1023,s(240|l>>18),s(128|l>>12&63),s(128|l>>6&63),s(128|l&63)):(s(224|l>>12),s(128|l>>6&63),s(128|l&63))}return ye(a,0,o)}var Re=function(e){return e==1?3:e<6?2:+(e==9)},ze=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Y(9),t+=r+4}return t},Be=function(e,t,n,r,i,a,o,s){var c=r.length,l=n.extra,u=s&&s.length,d=ze(l);Q(e,t,o==null?67324752:33639248),t+=4,o!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(a<0&&8),e[t++]=i&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var f=new Date(n.mtime==null?Date.now():n.mtime),p=f.getFullYear()-1980;if((p<0||p>119)&&Y(10),Q(e,t,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,a!=-1&&(Q(e,t,n.crc),Q(e,t+4,a<0?-a-2:a),Q(e,t+8,n.size)),Q(e,t+12,c),Q(e,t+14,d),t+=16,o!=null&&(Q(e,t,u),Q(e,t+6,n.attrs),Q(e,t+10,o),t+=14),e.set(r,t),t+=c,d)for(var m in l){var h=l[m],g=h.length;Q(e,t,+m),Q(e,t+2,g),e.set(h,t+4),t+=4+g}return u&&(e.set(s,t),t+=u),t},Ve=function(e,t,n,r,i){Q(e,t,101010256),Q(e,t+8,n),Q(e,t+10,n),Q(e,t+12,r),Q(e,t+16,i)},He=/* @__PURE__ */ function(){function e(e){this.filename=e,this.c=je(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||Y(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}(),Ue=/* @__PURE__ */ function(){function e(e,t){var n=this;t||={},He.call(this,e),this.d=new Pe(t,function(e,t){n.ondata(null,e,t)}),this.compression=8,this.flag=Re(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){He.prototype.push.call(this,e,t)},e}(),We=/* @__PURE__ */ function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(this.ondata||Y(5),this.d&2)this.ondata(Y(4+(this.d&1)*8,0,1),null,!1);else{var n=Le(e.filename),r=n.length,i=e.comment,a=i&&Le(i),o=r!=e.filename.length||a&&i.length!=a.length,s=r+ze(e.extra)+30;r>65535&&this.ondata(Y(11,0,1),null,!1);var c=new U(s);Be(c,0,e,n,o,-1);var l=[c],u=function(){for(var e=0,n=l;e<n.length;e++){var r=n[e];t.ondata(null,r,!1)}l=[]},d=this.d;this.d=0;var f=this.u.length,p=Ne(e,{f:n,u:o,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(u(),d){var e=t.u[f+1];e?e.r():t.d=1}d=1}}),m=0;e.ondata=function(n,r,i){if(n)t.ondata(n,r,i),t.terminate();else if(m+=r.length,l.push(r),i){var a=new U(16);Q(a,0,134695760),Q(a,4,e.crc),Q(a,8,m),Q(a,12,e.size),l.push(a),p.c=m,p.b=s+m+16,p.crc=e.crc,p.size=e.size,d&&p.r(),d=1}else d&&u()},this.u.push(p)}},e.prototype.end=function(){var e=this;if(this.d&2){this.ondata(Y(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:function(){e.d&1&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3},e.prototype.e=function(){for(var e=0,t=0,n=0,r=0,i=this.u;r<i.length;r++){var a=i[r];n+=46+a.f.length+ze(a.extra)+(a.o?a.o.length:0)}for(var o=new U(n+22),s=0,c=this.u;s<c.length;s++){var a=c[s];Be(o,e,a,a.f,a.u,-a.c-2,t,a.o),e+=46+a.f.length+ze(a.extra)+(a.o?a.o.length:0),t+=a.b}Ve(o,e,this.u.length,n,t),this.ondata(null,o,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++)t[e].t();this.d=2},e}();let Ge=/[\u0000-\u0008\u000b\u000c\u000e-\u001f]/g,Ke=e=>e.replace(Ge,``).replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`),qe=e=>{let t=String.fromCharCode(65+e%26);return e<26?t:qe(Math.floor(e/26)-1)+t},Je=(e,t,n=``)=>`<c r="${e}"${n} t="inlineStr"><is><t xml:space="preserve">${Ke(t.slice(0,32767))}</t></is></c>`,$=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
`,Ye=`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,Xe=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,Ze=`http://schemas.openxmlformats.org/package/2006/relationships`,Qe=`${$}<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/></Types>`,$e=`${$}<Relationships xmlns="${Ze}"><Relationship Id="rId1" Type="${Xe}/officeDocument" Target="xl/workbook.xml"/></Relationships>`,et=`${$}<Relationships xmlns="${Ze}"><Relationship Id="rId1" Type="${Xe}/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="${Xe}/styles" Target="styles.xml"/></Relationships>`,tt=e=>e.replace(/[:\\/?*[\]]/g,` `).slice(0,31).trim()||`Sheet1`,nt=e=>`${$}<workbook xmlns="${Ye}" xmlns:r="${Xe}"><sheets><sheet name="${Ke(tt(e))}" sheetId="1" r:id="rId1"/></sheets></workbook>`,rt=e=>{let t=e.map((e,t)=>`<numFmt numFmtId="${164+t}" formatCode="${Ke(e)}"/>`).join(``),n=e.map((e,t)=>`<xf numFmtId="${164+t}" fontId="0" fillId="0" borderId="0" xfId="0" applyNumberFormat="1"/>`).join(``);return`${$}<styleSheet xmlns="${Ye}">${e.length>0?`<numFmts count="${e.length}">${t}</numFmts>`:``}<fonts count="2"><font><sz val="11"/><name val="Calibri"/></font><font><b/><sz val="11"/><name val="Calibri"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${2+e.length}"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" xfId="0" applyFont="1"/>${n}</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></styleSheet>`},it=new TextEncoder,at=(e,t)=>{let n=new We((e,n,r)=>{if(e)throw e;t(n,r)}),r=(e,t)=>{let r=new Ue(e,{level:6});n.add(r),r.push(it.encode(t),!0)};r(`[Content_Types].xml`,Qe),r(`_rels/.rels`,$e),r(`xl/workbook.xml`,nt(e.name)),r(`xl/_rels/workbook.xml.rels`,et);let i=new Ue(`xl/worksheets/sheet1.xml`,{level:6});n.add(i);let a=e.widths.map((e,t)=>`<col min="${t+1}" max="${t+1}" width="${e}" customWidth="1"/>`).join(``),o=`<row r="1">${e.headers.map((e,t)=>Je(`${qe(t)}1`,e,` s="1"`)).join(``)}</row>`;i.push(it.encode(`${$}<worksheet xmlns="${Ye}"><sheetViews><sheetView workbookViewId="0"><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/></sheetView></sheetViews>${a?`<cols>${a}</cols>`:``}<sheetData>${o}`));let s=e.headers.map((e,t)=>qe(t)),c=[],l=e=>{let t=c.indexOf(e);return t>=0?t+2:(c.push(e),c.length+1)},u=(e,t)=>{switch(e.kind){case`empty`:return``;case`text`:return Je(t,e.value);case`boolean`:return`<c r="${t}" t="b"><v>${+!!e.value}</v></c>`;case`number`:return`<c r="${t}"${e.format?` s="${l(e.format)}"`:``}><v>${e.value}</v></c>`}},d=1;return{rows:e=>{let t=``;for(let n of e){if(d+=1,d>1048576)throw Error(`A sheet holds at most 1048575 rows`);t+=`<row r="${d}">${n.map((e,t)=>u(e,`${s[t]}${d}`)).join(``)}</row>`}i.push(it.encode(t))},finish:()=>{i.push(it.encode(`</sheetData></worksheet>`),!0),r(`xl/styles.xml`,rt(c)),n.end()}}},ot=/* @__PURE__ */ new Set([`text`,`uuid`,`enum`,`relation`,`file`,`json`,`currency`,`country`]),st=(e,t,n)=>e.map(e=>{let r=Math.max(e.header.length,...t.map(t=>N(e,t[e.name],n,`shown`).length));return Math.min(60,Math.max(8,r+2))}),ct=(e,t)=>{let n=new TextEncoder;t(B),t(n.encode(re(e.columns.map(e=>H(e.header)))));let r=(t,n,r)=>{let i=N(t,n[t.name],r,e.mode);return ot.has(t.field.type)?ne(i):H(i)};return{page:(i,a)=>{t(n.encode(i.map(t=>re(e.columns.map(e=>r(e,t,a)))).join(``)))},finish:()=>void 0}},lt=(e,t)=>{let n,r=(n,r)=>at({name:e.name,headers:e.columns.map(e=>e.header),widths:st(e.columns,n,r)},t);return{page:(t,i)=>{n??=r(t,i),n.rows(t.map(t=>e.columns.map(n=>z(n,t[n.name],i,e.mode))))},finish:()=>{n??=r([],{}),n.finish()}}},ut=(e,t)=>e.format===`csv`?ct(e,t):lt(e,t),dt=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t},ft=(()=>{let e,t=[];return n=>{if(n.kind===`start`)e=ut(n.plan,e=>t.push(e));else if(e)n.kind===`page`?e.page(n.records,n.labels):e.finish();else throw Error(`The export was not started`);let r=dt(t);return t=[],r}})(),pt=self;pt.onmessage=e=>{e.data.kind===`start`&&r(e.data.locale);let t=ft(e.data);pt.postMessage({bytes:t},[t.buffer])}})();
|
|
3
|
+
//# debugId=377b866c-bf46-48ef-be82-f3983de3fc69
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n,n as r,t as i}from"./react-CR5VJ85Q.js";import{Ot as a,j as o,t as s}from"./app-
|
|
2
|
-
//# debugId=
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n,n as r,t as i}from"./react-CR5VJ85Q.js";import{Ot as a,j as o,t as s}from"./app-hgMooGgd.js";import{c}from"./preload-helper-SYSsmQ2O.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=t(n(),1),u=r(),d=e({default:()=>f}),f={},p=`protobase-api-origin`,m=async e=>{e.getPlatform()===`ios`&&e.isPluginAvailable(`Keyboard`)&&await e.nativePromise(`Keyboard`,`setAccessoryBarVisible`,{isVisible:!0})},h=e=>[...e.split(`,`).map(e=>e.trim()).filter(e=>e&&!/^maximum-scale\s*=/.test(e)),`maximum-scale=1`].join(`, `),g=e=>{let t=e.querySelector(`meta[name="viewport"]`);t&&t.setAttribute(`content`,h(t.getAttribute(`content`)??``))},_=e=>{if(e.length===0)return;if(e.length>1)throw Error(`The page has ${e.length} ${p} meta tags; it may have one`);let t=e[0],n=URL.canParse(t)?new URL(t):void 0;if(!n||n.protocol!==`http:`&&n.protocol!==`https:`||n.origin!==t)throw Error(`The page's ${p} meta tag holds "${t}", which is not an http or https origin such as https://shop.example.com`);return t},v=()=>_([...document.querySelectorAll(`meta[name="${p}"]`)].map(e=>e.content)),y=t(i(),1),b=document.getElementById(`root`);if(!b)throw Error(`index.html needs an element with id "root"`);var x=a(window);x&&(g(document),m(x)),(0,u.createRoot)(b).render((0,y.jsx)(l.StrictMode,{children:(0,y.jsx)(s,{baseUrl:`${v()??``}/api/v1`,ui:o(d),locale:c(),nativeBridge:x})}));
|
|
2
|
+
//# debugId=c6d6e32f-8557-4ddc-bede-b849b556d3e6
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{B as r,gt as i}from"./app-
|
|
2
|
-
//# debugId=
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{B as r,gt as i}from"./app-hgMooGgd.js";import{a,c as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./maplibre-CjNYwEqW.js";import{t as p}from"./cn-Bi0ZEjD9.js";var m=e(t(),1),h=512,g=85.051129,_=16,v=Array.from({length:23},(e,t)=>t),y=e=>e.type===`LineString`?e.coordinates:e.type===`MultiPolygon`?e.coordinates.flat(2):e.coordinates.flat(),b=e=>{let t=Math.max(-85.051129,Math.min(g,e))*Math.PI/180;return .5-Math.log(Math.tan(Math.PI/4+t/2))/(2*Math.PI)},x=e=>{let t=y(e),n=t.map(([e])=>e),r=t.map(([,e])=>b(e)),i=(Math.max(...n)-Math.min(...n))/360*h,a=(Math.max(...r)-Math.min(...r))*h;return Math.max(i,a)},S=(e,t)=>{let n=e.flatMap(e=>{if(!e.area)return[];let n=e.area.type===`LineString`||e.area.type===`MultiLineString`?`line`:`polygon`;return[{type:`Feature`,geometry:e.area,properties:{key:e.key,kind:n,span:x(e.area),chosen:t?.includes(e.key)??!1}}]});return{type:`FeatureCollection`,features:[...n.filter(e=>!e.properties.chosen),...n.filter(e=>e.properties.chosen)]}},C=e=>[`interpolate`,[`linear`],[`zoom`],...v.flatMap(t=>[t,[`*`,e,[`min`,1,[`max`,0,[`/`,[`-`,[`*`,[`get`,`span`],2**t],_],32]]]]])],w=e(n(),1),T=`position-area-fills`,E=[`==`,[`get`,`kind`],`polygon`],D=[`==`,[`get`,`kind`],`line`],O=(e,t)=>[`case`,[`get`,`chosen`],e,t],k=({points:e,selected:t,colors:n})=>{let r=S(e,t);if(r.features.length===0)return null;let i=[`case`,[`get`,`chosen`],n.chosen,n.area];return(0,w.jsxs)(s,{id:`position-areas`,type:`geojson`,data:r,children:[(0,w.jsx)(u,{id:T,type:`fill`,filter:E,paint:{"fill-color":i,"fill-opacity":C(O(.15,.1))}}),(0,w.jsx)(u,{id:`position-area-outlines`,type:`line`,filter:E,paint:{"line-color":i,"line-width":1.5,"line-dasharray":[3,2],"line-opacity":C(.8)}}),(0,w.jsx)(u,{id:`position-area-lines`,type:`line`,filter:D,layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-color":i,"line-width":6,"line-opacity":C(O(.6,.35))}})]})},A=(e,t)=>{let n=document.createElement(`span`);n.style.color=`var(${t})`,e.append(n);let r=getComputedStyle(n).color;n.remove();let i=document.createElement(`canvas`);i.width=1,i.height=1;let a=i.getContext(`2d`,{willReadFrequently:!0});if(!a)return r;a.fillStyle=r,a.fillRect(0,0,1,1);let[o,s,c,l]=a.getImageData(0,0,1,1).data;return`rgba(${o}, ${s}, ${c}, ${l/255})`},j=28,M={padding:48,maxZoom:15,duration:0},N={padding:48,maxZoom:16,duration:300},P=32,F=()=>i(`compact`,e=>new Intl.NumberFormat(e,{notation:`compact`,maximumFractionDigits:1})),I=e=>[[e.west,e.south],[e.east,e.north]],L=({style:e,layers:t,initial:n,points:i,buckets:s,fit:u,onFitted:h,onMove:g,selected:_,covered:v,onSelect:y,onClear:b,markerLabel:x,bucketLabel:S})=>{let C=(0,m.useRef)(null),[E,D]=(0,m.useState)([]),[O,L]=(0,m.useState)(),R=new globalThis.Map(i.map(e=>[e.key,e])),z=i.map(e=>e.key).join(`,`),B=u&&JSON.stringify(u),V=()=>{let e=C.current?.getMap();e&&D(r(i.map(t=>({key:t.key,...e.project([t.longitude,t.latitude])})),j))},H=()=>{let e=C.current?.getMap();if(!e)return;let t=e.getBounds(),n=e.getCenter();g({bounds:{south:t.getSouth(),west:t.getWest(),north:t.getNorth(),east:t.getEast()},zoom:e.getZoom()},{latitude:n.lat,longitude:n.lng,zoom:e.getZoom()})},U=()=>{let e=C.current?.getMap();e&&u&&(e.fitBounds(I(u),M),h(),H())};(0,m.useEffect)(V,[z]),(0,m.useEffect)(U,[B]);let W=E.find(e=>_!==void 0&&e.keys.some(e=>_.includes(e)))?.at;return(0,m.useEffect)(()=>{let e=C.current?.getMap(),t=W===void 0?void 0:R.get(W);if(!e||!t||v===0)return;let{y:n}=e.project([t.longitude,t.latitude]),r=e.getContainer().clientHeight-v;n>P&&n<r||e.easeTo({center:[t.longitude,t.latitude],offset:[0,(P-v)/2],duration:300})},[W,v]),(0,w.jsxs)(d,{ref:C,mapLib:f,mapStyle:e,initialViewState:n??{latitude:0,longitude:0,zoom:1},style:{width:`100%`,height:`100%`},onLoad:()=>{let e=C.current.getMap().getContainer();L({area:A(e,`--primary`),chosen:A(e,`--foreground`)}),V(),u?U():H()},onZoomEnd:V,onMoveEnd:H,onClick:b,children:[(0,w.jsx)(a,{showCompass:!1}),(0,w.jsx)(c,{layers:t,below:T}),O&&(0,w.jsx)(k,{points:i,selected:_,colors:O}),s.map(e=>(0,w.jsx)(l,{latitude:e.latitude,longitude:e.longitude,anchor:`center`,children:(0,w.jsx)(`button`,{type:`button`,"aria-label":S(e.count),className:`flex size-10 cursor-pointer items-center justify-center rounded-full border-2 border-background bg-primary text-xs font-semibold text-primary-foreground tabular-nums shadow`,onClick:t=>{t.stopPropagation(),C.current?.getMap().fitBounds(I(e.bounds),N)},children:F().format(e.count)})},`${e.latitude},${e.longitude}`)),E.map(e=>{let t=R.get(e.at);if(!t)return null;let n=_!==void 0&&e.keys.some(e=>_.includes(e)),r=e.keys.every(e=>R.get(e)?.approximate);return(0,w.jsx)(l,{latitude:t.latitude,longitude:t.longitude,anchor:`bottom`,style:{zIndex:+!!n},children:(0,w.jsxs)(`button`,{type:`button`,"aria-label":x(e.keys),"aria-pressed":n,className:`relative block cursor-pointer`,onClick:t=>{t.stopPropagation(),y(e.keys)},children:[(0,w.jsx)(o,{"aria-hidden":!0,"data-approximate":r||void 0,className:p(`size-8 drop-shadow`,r?n?`fill-background text-foreground`:`fill-background text-primary`:n?`fill-foreground text-background`:`fill-primary text-primary-foreground`),strokeWidth:r?2:1.5,strokeDasharray:r?`3 2`:void 0}),e.keys.length>1&&(0,w.jsx)(`span`,{className:`absolute -right-2 -top-1 min-w-5 rounded-full border border-background bg-foreground px-1 text-center text-[11px] font-medium leading-4 text-background tabular-nums`,children:e.keys.length})]})},e.at)})]})};export{L as RecordsMap};
|
|
2
|
+
//# debugId=4cea5de4-a0c1-45a3-bc3f-6d3aecd994e0
|
package/dist/shell/assets/{shared-protobase-ui--qDr5Xxl.js → shared-protobase-ui-B0IRfMH1.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{G as r,V as i,q as a}from"./vendor-xNCj9Gc_.js";import{$ as o,A as s,C as c,Ct as l,D as u,Dt as d,E as f,Et as p,F as ee,G as te,H as ne,I as re,J as ie,K as ae,L as m,M as h,N as g,O as _,P as v,Q as y,R as b,S as x,St as S,T as C,Tt as w,U as T,V as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,h as G,ht as K,i as q,it as J,j as oe,k as se,l as ce,lt as Y,m as le,mt as ue,n as de,nt as fe,o as pe,ot as X,p as me,pt as he,q as ge,r as _e,rt as ve,s as ye,st as be,t as xe,tt as Se,u as Ce,ut as we,v as Te,vt as Ee,w as De,wt as Oe,x as ke,xt as Ae,y as je,yt as Me,z as Ne}from"./app-
|
|
2
|
-
//# debugId=
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{G as r,V as i,q as a}from"./vendor-xNCj9Gc_.js";import{$ as o,A as s,C as c,Ct as l,D as u,Dt as d,E as f,Et as p,F as ee,G as te,H as ne,I as re,J as ie,K as ae,L as m,M as h,N as g,O as _,P as v,Q as y,R as b,S as x,St as S,T as C,Tt as w,U as T,V as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,h as G,ht as K,i as q,it as J,j as oe,k as se,l as ce,lt as Y,m as le,mt as ue,n as de,nt as fe,o as pe,ot as X,p as me,pt as he,q as ge,r as _e,rt as ve,s as ye,st as be,t as xe,tt as Se,u as Ce,ut as we,v as Te,vt as Ee,w as De,wt as Oe,x as ke,xt as Ae,y as je,yt as Me,z as Ne}from"./app-hgMooGgd.js";import{n as Pe}from"./preload-helper-SYSsmQ2O.js";import{t as Z}from"./cn-Bi0ZEjD9.js";var Q=e(n(),1),$=({row:e,resource:t,recordKey:n,...r})=>{let i=ne(),a=o(),s=t??i?.resource??a?.model.name;if(s===void 0)throw Error(`RecordLink needs a resource outside a list display or a record`);return(0,Q.jsx)(Y,{to:{kind:`record`,resource:s,key:e?e.key:n},...r})},Fe={width:640,height:480},Ie=e=>e.flatMap(e=>{if(`src`in e)return[{image:{url:e.src},alt:e.alt}];let t=B(e,Fe);return t?[{image:t,alt:e.alt??``}]:[]}),Le=({images:e,label:t,fit:n=`cover`,swipe:r=!0,className:i})=>{let a=Ie(e),o=T(a.length);return(0,Q.jsxs)(`div`,{role:`group`,"aria-roledescription":`carousel`,"aria-label":t,className:Z(`group/carousel relative overflow-hidden`,i),children:[(0,Q.jsx)(D,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,Q.jsx)(J,{image:e,alt:t,loading:`lazy`,className:Z(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,Q.jsx)(te,{carousel:o,count:a.length,swipe:r,reveal:`group-hover/carousel:opacity-100`,className:`inset-0`})]})},Re=({name:e,label:t,options:n,value:r,onChange:i})=>(0,Q.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,Q.jsxs)(`label`,{className:Z(`block rounded-lg border p-3 transition-colors has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary`,t.disabled?`cursor-default bg-background opacity-60`:t.value===r?`cursor-pointer border-primary bg-primary-soft`:`cursor-pointer bg-background hover:bg-surface`),children:[(0,Q.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,Q.jsx)(`span`,{className:Z(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,Q.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))}),ze=(e,t,n)=>{let o=w(),s=a(),c=[...new Set(n)].sort();return i({queryKey:d.pickedLabels(e.name,c.join(`,`)),enabled:c.length>0,placeholderData:r,queryFn:()=>k(s,o,e,c,t)}).data??new Map},Be=e(t(),1),Ve=e=>{let{resources:t,views:n}=Ae(),r=t[e.resource];if(!r)throw Error(`RecordPicker: the app has no resource named "${e.resource}"`);if(r.primaryKey.length!==1)throw Error(`RecordPicker: "${e.resource}" has a composite key, which a picker cannot name`);let i=n[e.resource],a=e.multiple?e.value:e.value===void 0?[]:[e.value],[o,s]=(0,Be.useState)({}),c=ze(r,i,a),l=e=>o[e]??c.get(e)??e,u=(e,t)=>s(n=>({...n,[e]:t}));if(!e.multiple){let{value:t,onChange:n}=e;return(0,Q.jsx)(X,{target:r,view:i,value:t??``,label:t===void 0?void 0:l(t),invalid:e.invalid,onChange:(e,t)=>{u(e,t),n(e)}})}let{value:d,onChange:f}=e;return(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(X,{target:r,view:i,value:``,chosen:d,several:!0,invalid:e.invalid,onChange:(e,t)=>{u(e,t),f(d.includes(e)?d.filter(t=>t!==e):[...d,e])}}),d.length>0&&(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:d.map(e=>(0,Q.jsx)(ge,{label:l(e),onRemove:()=>f(d.filter(t=>t!==e))},e))})]})};export{F as ActionCard,V as ActionInputError,Oe as ApiProvider,xe as App,Y as AppLink,z as AssistantDock,b as AuthLayout,Me as Button,Le as Carousel,De as ChatMessage,c as ChatThread,Re as Choices,h as CodeForm,Te as CompactTable,x as Composer,Ee as Dialog,G as DiffView,he as Field,je as FieldList,L as Form,ue as Input,ie as LogoMark,Se as Markdown,Ne as MenuSelect,P as OtpInput,me as PartView,$ as RecordLink,Ve as RecordPicker,g as ResendCodeButton,M as ResponsiveDialog,U as Section,Pe as Segmented,ke as SidePanel,ae as SignInPrompt,S as Spinner,le as StepList,R as Textarea,v as allowDelayMs,I as buttonClass,fe as definePlugin,ve as defineUi,W as diffStats,de as isConflict,ee as isFramed,s as mergeUi,j as parseDiff,u as pluginApi,_ as protobaseVersion,oe as uiFromModule,f as useApiToken,we as useAppAddress,re as useArmedAfterFocus,Ce as useAssistant,ce as useAssistantClient,H as useBackendData,w as useClient,O as useFacets,K as useFieldControl,m as useGuardedPress,A as useHistogram,q as useInbox,o as useLayoutRecord,be as useList,E as useListDisplay,N as useMarkNotificationsRead,l as useMeta,se as usePlugin,ye as usePushNotifications,C as useRecord,p as useResourceClient,y as useSeries,pe as useUnreadNotifications,_e as useUpdateRecord};
|
|
2
|
+
//# debugId=742117cc-1f5d-466d-9c40-f7cbdc263ba0
|
package/dist/shell/index.html
CHANGED
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
}
|
|
19
19
|
document.documentElement.dataset.theme = stored === 'light' || stored === 'dark' ? stored : matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
20
20
|
</script>
|
|
21
|
-
<script type="importmap">{"imports":{"react":"/assets/shared-react-CuZpzdyh.js","react/jsx-runtime":"/assets/shared-react-jsx-runtime-Csr2Kx2w.js","react-dom":"/assets/shared-react-dom-BNlY7-7i.js","@protobase/ui":"/assets/shared-protobase-ui
|
|
22
|
-
<script type="module" crossorigin src="/assets/index-
|
|
21
|
+
<script type="importmap">{"imports":{"react":"/assets/shared-react-CuZpzdyh.js","react/jsx-runtime":"/assets/shared-react-jsx-runtime-Csr2Kx2w.js","react-dom":"/assets/shared-react-dom-BNlY7-7i.js","@protobase/ui":"/assets/shared-protobase-ui-B0IRfMH1.js"}}</script>
|
|
22
|
+
<script type="module" crossorigin src="/assets/index-DG1uMvhV.js"></script>
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/react-CR5VJ85Q.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/vendor-xNCj9Gc_.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/cn-Bi0ZEjD9.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-SYSsmQ2O.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/app-
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/app-hgMooGgd.js">
|
|
29
29
|
<link rel="stylesheet" crossorigin href="/assets/app-GUjJKojE.css">
|
|
30
30
|
<link rel="stylesheet" crossorigin href="/assets/index-DETGvbIP.css">
|
|
31
31
|
<link rel="stylesheet" href="/protobase.theme.css">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const cacheName = "protobase-shell-
|
|
2
|
-
const precache = ["/index.html","/assets/shared-react-CuZpzdyh.js","/assets/shared-react-jsx-runtime-Csr2Kx2w.js","/assets/shared-react-dom-BNlY7-7i.js","/assets/shared-protobase-ui
|
|
1
|
+
const cacheName = "protobase-shell-79c806945e19934b"
|
|
2
|
+
const precache = ["/index.html","/assets/shared-react-CuZpzdyh.js","/assets/shared-react-jsx-runtime-Csr2Kx2w.js","/assets/shared-react-dom-BNlY7-7i.js","/assets/shared-protobase-ui-B0IRfMH1.js","/assets/index-DG1uMvhV.js","/assets/rolldown-runtime-hePW80VL.js","/assets/react-CR5VJ85Q.js","/assets/vendor-xNCj9Gc_.js","/assets/cn-Bi0ZEjD9.js","/assets/preload-helper-SYSsmQ2O.js","/assets/app-hgMooGgd.js","/assets/app-GUjJKojE.css","/assets/index-DETGvbIP.css","/protobase.theme.css","/protobase.favicon.svg"]
|
|
3
3
|
const revalidated = ["/protobase.theme.css","/protobase.favicon.svg"]
|
|
4
4
|
|
|
5
5
|
const fromCache = (request) =>
|